Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
4122fe51
Commit
4122fe51
authored
Oct 16, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bye console
parent
3c7883b2
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
70 additions
and
95 deletions
+70
-95
ApprovalMatrix.js
src/container/ApprovalMatrix/ApprovalMatrix.js
+7
-8
CreateApprovalMatrix.js
src/container/ApprovalMatrix/CreateApprovalMatrix.js
+2
-10
EditApprovalMatrix.js
src/container/ApprovalMatrix/EditApprovalMatrix.js
+0
-3
PopUpDeleteAM.js
src/container/ApprovalMatrix/PopUpDeleteAM.js
+1
-1
VisualisasiAM.js
src/container/ApprovalMatrix/VisualisasiAM.js
+1
-5
AllDocument.js
src/container/DocumentManagement/AllDocument.js
+4
-9
CreateManagementDoc.js
src/container/DocumentManagement/CreateManagementDoc.js
+6
-8
DocumentManagement.js
src/container/DocumentManagement/DocumentManagement.js
+5
-6
EditManagementDoc.js
src/container/DocumentManagement/EditManagementDoc.js
+6
-6
PopUpDelete.js
src/container/DocumentManagement/PopUpDelete.js
+2
-2
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+36
-37
No files found.
src/container/ApprovalMatrix/ApprovalMatrix.js
View file @
4122fe51
...
@@ -68,9 +68,9 @@ export default class ApprovalMatrix extends Component {
...
@@ -68,9 +68,9 @@ export default class ApprovalMatrix extends Component {
fileHandler
=
(
event
)
=>
{
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
resp
)
//
console.log(resp)
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
//
console.log(err);
}
}
else
{
else
{
let
isi
=
resp
.
rows
.
slice
(
3
)
let
isi
=
resp
.
rows
.
slice
(
3
)
...
@@ -93,14 +93,14 @@ export default class ApprovalMatrix extends Component {
...
@@ -93,14 +93,14 @@ export default class ApprovalMatrix extends Component {
approval_matrix
:
payload
approval_matrix
:
payload
}
}
this
.
setState
({
payload
:
body
,
buttonError
:
false
,
judul
:
resp
.
rows
[
1
][
0
]
})
this
.
setState
({
payload
:
body
,
buttonError
:
false
,
judul
:
resp
.
rows
[
1
][
0
]
})
console
.
log
(
this
.
state
.
payload
)
//
console.log(this.state.payload)
}
}
});
});
}
}
checkUpload
(){
checkUpload
(){
api
.
create
().
checkUploadAM
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadAM
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
let
dataRow
=
[]
let
dataRow
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
...
@@ -335,7 +335,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -335,7 +335,7 @@ export default class ApprovalMatrix extends Component {
menu
:
"approval matrix"
menu
:
"approval matrix"
}
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -540,7 +540,6 @@ export default class ApprovalMatrix extends Component {
...
@@ -540,7 +540,6 @@ export default class ApprovalMatrix extends Component {
}
}
downloadDataTable
=
async
()
=>
{
downloadDataTable
=
async
()
=>
{
// alert('link belum ada')
let
res
=
await
fetch
(
let
res
=
await
fetch
(
"https://tia.eksad.com/tia-reporting-dev/public/approval_matrix/export_approval_matrix"
"https://tia.eksad.com/tia-reporting-dev/public/approval_matrix/export_approval_matrix"
)
)
...
@@ -557,7 +556,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -557,7 +556,7 @@ export default class ApprovalMatrix extends Component {
uploadAM
()
{
uploadAM
()
{
api
.
create
().
uploadAM
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
uploadAM
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -589,7 +588,7 @@ export default class ApprovalMatrix extends Component {
...
@@ -589,7 +588,7 @@ export default class ApprovalMatrix extends Component {
deleteAM
=
(
payload
)
=>
{
deleteAM
=
(
payload
)
=>
{
this
.
setState
({
popupDel
:
false
})
this
.
setState
({
popupDel
:
false
})
api
.
create
().
deleteAM
(
payload
).
then
(
response
=>
{
api
.
create
().
deleteAM
(
payload
).
then
(
response
=>
{
console
.
log
(
response
.
data
)
//
console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
...
src/container/ApprovalMatrix/CreateApprovalMatrix.js
View file @
4122fe51
...
@@ -45,7 +45,6 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -45,7 +45,6 @@ export default class CreateApprovalMatrix extends Component {
this
.
getTypeData
()
this
.
getTypeData
()
this
.
getOperatorData
()
this
.
getOperatorData
()
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
let
date
=
format
(
new
Date
,
'yyyy-MM-dd'
)
console
.
log
(
date
);
this
.
setState
({
this
.
setState
({
startDate
:
date
,
startDate
:
date
,
endDate
:
date
endDate
:
date
...
@@ -64,14 +63,12 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -64,14 +63,12 @@ export default class CreateApprovalMatrix extends Component {
fullname
:
item
.
fullname
==
null
?
"(NO_NAME)"
:
item
.
fullname
fullname
:
item
.
fullname
==
null
?
"(NO_NAME)"
:
item
.
fullname
}
}
})
})
// console.log(userData)
let
defaultProps
=
{
let
defaultProps
=
{
options
:
userData
,
options
:
userData
,
getOptionLabel
:
(
option
)
=>
option
.
fullname
,
getOptionLabel
:
(
option
)
=>
option
.
fullname
,
};
};
this
.
setState
({
approvedBy
:
defaultProps
,
userData
:
response
.
data
.
data
})
this
.
setState
({
approvedBy
:
defaultProps
,
userData
:
response
.
data
.
data
})
}
else
{
}
else
{
// alert('Approver Name: ' +response.data.message)
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -110,7 +107,6 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -110,7 +107,6 @@ export default class CreateApprovalMatrix extends Component {
};
};
this
.
setState
({
types
:
typeProps
,
typeData
:
response
.
data
.
data
})
this
.
setState
({
types
:
typeProps
,
typeData
:
response
.
data
.
data
})
}
else
{
}
else
{
// alert('Approval Type: ' +response.data.message)
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -143,14 +139,12 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -143,14 +139,12 @@ export default class CreateApprovalMatrix extends Component {
operator_type_name
:
item
.
operator_type_name
operator_type_name
:
item
.
operator_type_name
}
}
})
})
// console.log(userData)
let
operatorProps
=
{
let
operatorProps
=
{
options
:
operatorData
,
options
:
operatorData
,
getOptionLabel
:
(
option
)
=>
option
.
operator_type_name
,
getOptionLabel
:
(
option
)
=>
option
.
operator_type_name
,
};
};
this
.
setState
({
operators
:
operatorProps
,
operatorData
:
response
.
data
.
data
})
this
.
setState
({
operators
:
operatorProps
,
operatorData
:
response
.
data
.
data
})
}
else
{
}
else
{
// alert('Operator: ' +response.data.message)
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -177,12 +171,12 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -177,12 +171,12 @@ export default class CreateApprovalMatrix extends Component {
if
(
isDate
&&
type
==
'start_date'
)
{
if
(
isDate
&&
type
==
'start_date'
)
{
this
.
setState
({
startDate
:
format
(
e
,
'yyyy-MM-dd'
),
endDate
:
null
},
()
=>
{
this
.
setState
({
startDate
:
format
(
e
,
'yyyy-MM-dd'
),
endDate
:
null
},
()
=>
{
this
.
clearError
()
this
.
clearError
()
console
.
log
(
this
.
state
.
startDate
)
//
console.log(this.state.startDate)
})
})
}
else
if
(
isDate
&&
type
==
'end_date'
)
{
}
else
if
(
isDate
&&
type
==
'end_date'
)
{
this
.
setState
({
endDate
:
format
(
e
,
'yyyy-MM-dd'
)},
()
=>
{
this
.
setState
({
endDate
:
format
(
e
,
'yyyy-MM-dd'
)},
()
=>
{
this
.
clearError
()
this
.
clearError
()
console
.
log
(
this
.
state
.
endDate
)
//
console.log(this.state.endDate)
})
})
}
else
{
}
else
{
// this.setState({...data, tempData: {...this.state.tempData, [e.target.name] : e.target.value}})
// this.setState({...data, tempData: {...this.state.tempData, [e.target.name] : e.target.value}})
...
@@ -225,7 +219,6 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -225,7 +219,6 @@ export default class CreateApprovalMatrix extends Component {
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
}
else
{
console
.
log
(
'masuk'
);
let
payload
=
{
let
payload
=
{
"approval_type_id"
:
this
.
state
.
typeId
.
approval_type_id
,
"approval_type_id"
:
this
.
state
.
typeId
.
approval_type_id
,
"orders"
:
this
.
state
.
order
,
"orders"
:
this
.
state
.
order
,
...
@@ -235,7 +228,6 @@ export default class CreateApprovalMatrix extends Component {
...
@@ -235,7 +228,6 @@ export default class CreateApprovalMatrix extends Component {
"end_date"
:
this
.
state
.
endDate
"end_date"
:
this
.
state
.
endDate
}
}
this
.
props
.
createAM
(
payload
)
this
.
props
.
createAM
(
payload
)
// console.log(payload)
}
}
}
}
...
...
src/container/ApprovalMatrix/EditApprovalMatrix.js
View file @
4122fe51
...
@@ -42,7 +42,6 @@ export default class EditApprovalMatrix extends Component {
...
@@ -42,7 +42,6 @@ export default class EditApprovalMatrix extends Component {
componentDidMount
()
{
componentDidMount
()
{
if
(
this
.
props
.
type
===
'edit'
)
{
if
(
this
.
props
.
type
===
'edit'
)
{
this
.
getDetailAM
()
this
.
getDetailAM
()
console
.
log
(
this
.
state
.
startDate
);
// let getApprovedBy = {
// let getApprovedBy = {
// user_id: data.user_id,
// user_id: data.user_id,
// fullname: data.fullname
// fullname: data.fullname
...
@@ -265,7 +264,6 @@ export default class EditApprovalMatrix extends Component {
...
@@ -265,7 +264,6 @@ export default class EditApprovalMatrix extends Component {
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
}
else
{
console
.
log
(
'masuk'
);
if
(
this
.
props
.
type
==
'edit'
)
{
if
(
this
.
props
.
type
==
'edit'
)
{
let
payload
=
{
let
payload
=
{
"approval_matrix_id"
:
this
.
state
.
id
,
"approval_matrix_id"
:
this
.
state
.
id
,
...
@@ -277,7 +275,6 @@ export default class EditApprovalMatrix extends Component {
...
@@ -277,7 +275,6 @@ export default class EditApprovalMatrix extends Component {
"end_date"
:
this
.
state
.
endDate
"end_date"
:
this
.
state
.
endDate
}
}
this
.
props
.
updateAM
(
payload
)
this
.
props
.
updateAM
(
payload
)
// console.log(payload)
}
}
}
}
}
}
...
...
src/container/ApprovalMatrix/PopUpDeleteAM.js
View file @
4122fe51
...
@@ -22,7 +22,7 @@ export default class PopUpDeleteAM extends Component {
...
@@ -22,7 +22,7 @@ export default class PopUpDeleteAM extends Component {
getDetailAM
()
{
getDetailAM
()
{
api
.
create
().
getDetailAM
(
this
.
props
.
data
[
1
]).
then
(
response
=>
{
api
.
create
().
getDetailAM
(
this
.
props
.
data
[
1
]).
then
(
response
=>
{
console
.
log
(
response
.
data
)
//
console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
src/container/ApprovalMatrix/VisualisasiAM.js
View file @
4122fe51
...
@@ -100,15 +100,11 @@ export default class VisualisasiAM extends Component {
...
@@ -100,15 +100,11 @@ export default class VisualisasiAM extends Component {
orderId
:
item
.
orders
,
orderId
:
item
.
orders
,
data
:
[
item
]
data
:
[
item
]
})
})
// console.log(listVisual);
}
else
{
}
else
{
listVisual
[
indexId
].
data
.
push
(
item
)
listVisual
[
indexId
].
data
.
push
(
item
)
// console.log('listVisual');
// console.log(listVisual);
}
}
})
})
this
.
setState
({
listApproval
:
listVisual
})
this
.
setState
({
listApproval
:
listVisual
})
// console.log(listVisual);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
@@ -133,7 +129,7 @@ export default class VisualisasiAM extends Component {
...
@@ -133,7 +129,7 @@ export default class VisualisasiAM extends Component {
let
orderIdFrom
=
listApproval
[
fromIndex
].
orderId
let
orderIdFrom
=
listApproval
[
fromIndex
].
orderId
listApproval
[
fromIndex
].
orderId
=
listApproval
[
toIndex
].
orderId
listApproval
[
fromIndex
].
orderId
=
listApproval
[
toIndex
].
orderId
listApproval
[
toIndex
].
orderId
=
orderIdFrom
listApproval
[
toIndex
].
orderId
=
orderIdFrom
that
.
setState
({
listEdit
:
listApproval
}
,
()
=>
console
.
log
(
this
.
state
.
listEdit
)
)
that
.
setState
({
listEdit
:
listApproval
})
}
}
handleSave
()
{
handleSave
()
{
...
...
src/container/DocumentManagement/AllDocument.js
View file @
4122fe51
...
@@ -41,7 +41,6 @@ export default class getAllDocument extends Component {
...
@@ -41,7 +41,6 @@ export default class getAllDocument extends Component {
const
{
refresh
,
id
}
=
this
.
props
;
const
{
refresh
,
id
}
=
this
.
props
;
if
(
props
.
refresh
!==
refresh
)
{
if
(
props
.
refresh
!==
refresh
)
{
this
.
getData
()
this
.
getData
()
console
.
log
(
this
.
props
.
data
)
}
}
}
}
...
@@ -51,14 +50,13 @@ export default class getAllDocument extends Component {
...
@@ -51,14 +50,13 @@ export default class getAllDocument extends Component {
}
}
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
getAllDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
dataTable
=
[]
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
indexId
=
this
.
props
.
userCompActive
.
findIndex
((
val
)
=>
val
==
item
.
company_id
)
let
indexId
=
this
.
props
.
userCompActive
.
findIndex
((
val
)
=>
val
==
item
.
company_id
)
console
.
log
(
indexId
)
if
(
String
(
this
.
props
.
name
).
includes
(
'Manual'
)){
if
(
String
(
this
.
props
.
name
).
includes
(
'Manual'
)){
dataTable
.
push
(
[
dataTable
.
push
(
[
index
,
index
,
...
@@ -89,7 +87,7 @@ export default class getAllDocument extends Component {
...
@@ -89,7 +87,7 @@ export default class getAllDocument extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
)
//
console.log(dataTable)
this
.
setState
({
dataTable
,
loading
:
false
})
this
.
setState
({
dataTable
,
loading
:
false
})
let
docPath
=
response
.
data
.
data
.
map
((
item
)
=>
{
let
docPath
=
response
.
data
.
data
.
map
((
item
)
=>
{
return
[
return
[
...
@@ -124,7 +122,6 @@ export default class getAllDocument extends Component {
...
@@ -124,7 +122,6 @@ export default class getAllDocument extends Component {
openPopUp
=
async
(
index
,
val
,
type
)
=>
{
openPopUp
=
async
(
index
,
val
,
type
)
=>
{
if
(
type
===
'download'
)
{
if
(
type
===
'download'
)
{
console
.
log
(
this
.
state
.
docPath
[
val
])
let
res
=
await
fetch
(
let
res
=
await
fetch
(
"https://tia.eksad.com/tia-reporting-dev/public/document/download_document?documentName="
+
this
.
state
.
docPath
[
val
]
+
"&&fileType="
+
index
[
5
]
"https://tia.eksad.com/tia-reporting-dev/public/document/download_document?documentName="
+
this
.
state
.
docPath
[
val
]
+
"&&fileType="
+
index
[
5
]
)
)
...
@@ -157,7 +154,7 @@ export default class getAllDocument extends Component {
...
@@ -157,7 +154,7 @@ export default class getAllDocument extends Component {
deleteDoc
=
(
payload
)
=>
{
deleteDoc
=
(
payload
)
=>
{
this
.
setState
({
popupDel
:
false
,
loading
:
true
})
this
.
setState
({
popupDel
:
false
,
loading
:
true
})
api
.
create
().
deleteDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
deleteDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
.
data
)
//
console.log(response.data)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
@@ -185,7 +182,7 @@ export default class getAllDocument extends Component {
...
@@ -185,7 +182,7 @@ export default class getAllDocument extends Component {
updateDocument
(
payload
)
{
updateDocument
(
payload
)
{
this
.
setState
({
visibleEdit
:
false
,
loading
:
true
})
this
.
setState
({
visibleEdit
:
false
,
loading
:
true
})
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
updateDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -231,7 +228,6 @@ export default class getAllDocument extends Component {
...
@@ -231,7 +228,6 @@ export default class getAllDocument extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
marginRight
:
15
marginRight
:
15
}}
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
val
,
'download'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
val
,
'download'
)}
>
>
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
...
@@ -247,7 +243,6 @@ export default class getAllDocument extends Component {
...
@@ -247,7 +243,6 @@ export default class getAllDocument extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
marginRight
:
15
marginRight
:
15
}}
}}
// onClick={() => console.log(tableMeta)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
val
,
'edit'
)}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
val
,
'edit'
)}
>
>
<
img
src
=
{
Images
.
editCopy
}
/
>
<
img
src
=
{
Images
.
editCopy
}
/
>
...
...
src/container/DocumentManagement/CreateManagementDoc.js
View file @
4122fe51
...
@@ -66,7 +66,7 @@ export default class CreateManagementDoc extends Component {
...
@@ -66,7 +66,7 @@ export default class CreateManagementDoc extends Component {
type
:
'MAX_FILE_SIZE'
type
:
'MAX_FILE_SIZE'
}
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
length
==
0
)
{
if
(
response
.
data
.
data
.
length
==
0
)
{
...
@@ -115,7 +115,7 @@ export default class CreateManagementDoc extends Component {
...
@@ -115,7 +115,7 @@ export default class CreateManagementDoc extends Component {
})
})
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
}
)
}
}
})
})
}
}
...
@@ -148,7 +148,7 @@ export default class CreateManagementDoc extends Component {
...
@@ -148,7 +148,7 @@ export default class CreateManagementDoc extends Component {
})
})
}
}
})
})
console
.
log
(
typeData
)
//
console.log(typeData)
let
typeProps
=
{
let
typeProps
=
{
options
:
typeData
.
sort
((
a
,
b
)
=>
a
.
document_category_id
-
b
.
document_category_id
),
options
:
typeData
.
sort
((
a
,
b
)
=>
a
.
document_category_id
-
b
.
document_category_id
),
getOptionLabel
:
(
option
)
=>
option
.
document_category_name
,
getOptionLabel
:
(
option
)
=>
option
.
document_category_name
,
...
@@ -165,7 +165,7 @@ export default class CreateManagementDoc extends Component {
...
@@ -165,7 +165,7 @@ export default class CreateManagementDoc extends Component {
})
})
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
}
)
}
}
})
})
}
}
...
@@ -173,7 +173,6 @@ export default class CreateManagementDoc extends Component {
...
@@ -173,7 +173,6 @@ export default class CreateManagementDoc extends Component {
getPeriode
()
{
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
dateNow
=
new
Date
// console.log(dateNow)
let
year
=
format
(
dateNow
,
'yyyy'
)
let
year
=
format
(
dateNow
,
'yyyy'
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -236,14 +235,13 @@ export default class CreateManagementDoc extends Component {
...
@@ -236,14 +235,13 @@ export default class CreateManagementDoc extends Component {
let
fileObj
=
event
let
fileObj
=
event
let
length
=
event
.
name
.
split
(
"."
).
length
let
length
=
event
.
name
.
split
(
"."
).
length
let
fileType
=
event
.
name
.
split
(
"."
)[
length
-
1
]
let
fileType
=
event
.
name
.
split
(
"."
)[
length
-
1
]
// console.log(fileType)
if
(
fileType
===
'zip'
||
'rar'
)
{
if
(
fileType
===
'zip'
||
'rar'
)
{
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
}
else
{
}
else
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
fileType
)
//
console.log(fileType)
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
//
console.log(err);
}
}
else
{
else
{
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
...
...
src/container/DocumentManagement/DocumentManagement.js
View file @
4122fe51
...
@@ -72,7 +72,7 @@ export default class DocumentManagement extends Component {
...
@@ -72,7 +72,7 @@ export default class DocumentManagement extends Component {
getDataDocument
(
id
,
name
)
{
getDataDocument
(
id
,
name
)
{
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
)
{
if
(
response
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -82,7 +82,6 @@ export default class DocumentManagement extends Component {
...
@@ -82,7 +82,6 @@ export default class DocumentManagement extends Component {
loadTable
:
true
,
loadTable
:
true
,
refresh
:
id
===
undefined
?
''
:
'create'
refresh
:
id
===
undefined
?
''
:
'create'
})
})
// console.log(this.state.listData)
}
else
{
}
else
{
}
}
...
@@ -95,7 +94,7 @@ export default class DocumentManagement extends Component {
...
@@ -95,7 +94,7 @@ export default class DocumentManagement extends Component {
createDocument
(
payload
,
settingID
,
menuName
)
{
createDocument
(
payload
,
settingID
,
menuName
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
api
.
create
().
uploadDocument
(
payload
).
then
(
response
=>
{
api
.
create
().
uploadDocument
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
message
===
"The Document Already Exists in The System, Do You Want to Overwrite It?"
)
{
if
(
response
.
data
.
message
===
"The Document Already Exists in The System, Do You Want to Overwrite It?"
)
{
...
@@ -131,7 +130,7 @@ export default class DocumentManagement extends Component {
...
@@ -131,7 +130,7 @@ export default class DocumentManagement extends Component {
formData
.
append
(
"updated"
,
1
)
formData
.
append
(
"updated"
,
1
)
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
api
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
api
.
create
().
updateDocument
(
formData
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -157,7 +156,7 @@ export default class DocumentManagement extends Component {
...
@@ -157,7 +156,7 @@ export default class DocumentManagement extends Component {
}
}
getID
(
id
)
{
getID
(
id
)
{
console
.
log
(
id
);
//
console.log(id);
this
.
setState
({
id
})
this
.
setState
({
id
})
}
}
...
@@ -208,7 +207,7 @@ export default class DocumentManagement extends Component {
...
@@ -208,7 +207,7 @@ export default class DocumentManagement extends Component {
this
.
setState
({
btnadd
:
false
})
this
.
setState
({
btnadd
:
false
})
}
}
this
.
setState
({
userCompActive
,
visibleTrue
:
true
})
this
.
setState
({
userCompActive
,
visibleTrue
:
true
})
console
.
log
(
userCompActive
)
//
console.log(userCompActive)
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
visibleTrue
:
true
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
visibleTrue
:
true
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
src/container/DocumentManagement/EditManagementDoc.js
View file @
4122fe51
...
@@ -68,7 +68,7 @@ export default class EditManagementDoc extends Component {
...
@@ -68,7 +68,7 @@ export default class EditManagementDoc extends Component {
type
:
'MAX_FILE_SIZE'
type
:
'MAX_FILE_SIZE'
}
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -81,7 +81,7 @@ export default class EditManagementDoc extends Component {
...
@@ -81,7 +81,7 @@ export default class EditManagementDoc extends Component {
getDetailDoc
()
{
getDetailDoc
()
{
api
.
create
().
getDetailDocument
(
this
.
props
.
idoc
).
then
(
response
=>
{
api
.
create
().
getDetailDocument
(
this
.
props
.
idoc
).
then
(
response
=>
{
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
@@ -159,7 +159,7 @@ export default class EditManagementDoc extends Component {
...
@@ -159,7 +159,7 @@ export default class EditManagementDoc extends Component {
})
})
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
}
)
}
}
})
})
}
}
...
@@ -172,7 +172,7 @@ export default class EditManagementDoc extends Component {
...
@@ -172,7 +172,7 @@ export default class EditManagementDoc extends Component {
// }
// }
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
api
.
create
().
getDocumentCategory
().
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
...
@@ -199,7 +199,7 @@ export default class EditManagementDoc extends Component {
...
@@ -199,7 +199,7 @@ export default class EditManagementDoc extends Component {
})
})
}
}
}
else
{
}
else
{
alert
(
response
.
problem
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
}
)
}
}
})
})
}
}
...
@@ -275,7 +275,7 @@ export default class EditManagementDoc extends Component {
...
@@ -275,7 +275,7 @@ export default class EditManagementDoc extends Component {
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
// console.log(fileType)
// console.log(fileType)
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
//
console.log(err);
}
}
else
{
else
{
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
this
.
setState
({
file
:
event
,
fileType
:
String
(
fileType
)
})
...
...
src/container/DocumentManagement/PopUpDelete.js
View file @
4122fe51
...
@@ -16,8 +16,8 @@ export default class PopUpDelete extends Component {
...
@@ -16,8 +16,8 @@ export default class PopUpDelete extends Component {
componentDidMount
()
{
componentDidMount
()
{
if
(
this
.
props
.
type
===
'delete'
)
{
if
(
this
.
props
.
type
===
'delete'
)
{
console
.
log
(
this
.
props
.
idoc
)
//
console.log(this.props.idoc)
console
.
log
(
this
.
props
.
data
)
//
console.log(this.props.data)
}
}
}
}
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
4122fe51
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment