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
ab220b31
Commit
ab220b31
authored
Jan 18, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
90007a0e
5bb9ffbb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
22 deletions
+35
-22
HomePage.js
src/container/HomePage.js
+2
-2
MonthlyReport.js
src/container/MonthlyReport.js
+33
-20
No files found.
src/container/HomePage.js
View file @
ab220b31
...
...
@@ -69,8 +69,6 @@ class HomePage extends Component {
this
.
getPermissionMR
()
this
.
getApprMat
()
// this.getListUserSubco()
this
.
getDashboardMB
()
this
.
getDashboard
()
this
.
getMonth
()
}
...
...
@@ -370,6 +368,8 @@ class HomePage extends Component {
}
this
.
setState
({
isApproverMB
,
isApproverMR
})
this
.
getDashboardMB
()
// this.getDashboardMB()
this
.
getDashboard
()
// console.log(actAM)
this
.
setState
({
loading
:
false
})
})
...
...
src/container/MonthlyReport.js
View file @
ab220b31
...
...
@@ -466,7 +466,7 @@ export default class MonthlyReport extends Component {
"months"
:
this
.
state
.
month
.
month_id
,
"status"
:
selectedStatus
}
this
.
setState
({
isApprovedMB
:
true
})
api
.
create
().
getCompanySubmittedMonthly
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
@@ -507,12 +507,12 @@ export default class MonthlyReport extends Component {
}
else
{
// console.log(this.state.listCompany)
// console.log(this.state.company_submit)
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
})
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
lastRevision
:
""
,
visibleTableHistory
:
false
})
}
//
})
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
listCompany
:
null
,
company
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
},
()
=>
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
listCompany
:
null
,
company
:
null
,
dataTable
:
[],
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
...
...
@@ -605,7 +605,7 @@ export default class MonthlyReport extends Component {
console
.
log
(
response
)
if
(
this
.
state
.
btnCreate
===
true
&&
this
.
state
.
btnEdit
===
true
)
{
console
.
log
(
'editable'
);
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
})
this
.
setState
({
isApprover
:
this
.
state
.
approverTrue
?
true
:
false
,
checkApprover
:
this
.
state
.
approverTrue
?
true
:
false
})
}
else
{
console
.
log
(
'just view'
);
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
...
...
@@ -883,8 +883,8 @@ export default class MonthlyReport extends Component {
validate
()
{
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
this
.
setState
({
loading
:
true
,
selectedStatus
:
this
.
state
.
listStatus
},
()
=>
{
//
document.body.style.overflow = 'hidden';
})
let
array
=
[]
let
canSubmit
=
true
...
...
@@ -909,7 +909,7 @@ export default class MonthlyReport extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
get
Permission
()
this
.
get
MonthlyReportID
()
}
}
})
...
...
@@ -927,7 +927,7 @@ export default class MonthlyReport extends Component {
}
validateRevision
()
{
this
.
scrollToMyRef
()
//
this.scrollToMyRef()
let
arrayRevisi
=
this
.
state
.
detailRevisiCheck
let
remarksKosong
=
0
arrayRevisi
.
map
((
item
,
index
)
=>
{
...
...
@@ -944,9 +944,10 @@ export default class MonthlyReport extends Component {
}
approvalSubmission
(
type
)
{
this
.
scrollToMyRef
()
this
.
setState
({
loading
:
true
},
()
=>
{
document
.
body
.
style
.
overflow
=
'hidden'
;
// this.scrollToMyRef()
this
.
setState
({
loading
:
true
,
selectedStatus
:
this
.
state
.
listStatus
},
()
=>
{
// document.body.style.overflow = 'hidden';
})
let
body
=
{
"approval_id"
:
this
.
state
.
approverID
,
...
...
@@ -957,10 +958,11 @@ export default class MonthlyReport extends Component {
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
this
.
state
.
month
.
month_id
,
"min_periode"
:
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY-MM-DD'
),
"max_periode"
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY-MM-DD'
)
}
// // //
console.log(payload)
console
.
log
(
payload
)
// // console.log(this.props.location);
// // console.log(body)
api
.
create
().
approvalMonthly
(
body
).
then
((
res
)
=>
{
...
...
@@ -970,7 +972,7 @@ export default class MonthlyReport extends Component {
if
(
type
==
'revision'
)
{
api
.
create
().
createPeriodeRevisionMonthly
(
payload
).
then
((
res
))
}
this
.
get
Permission
()
this
.
get
MonthlyReportID
()
})
}
...
...
@@ -1254,7 +1256,7 @@ export default class MonthlyReport extends Component {
);
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
ref
=
{
this
.
myRef
}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
,
overflow
:
'scroll'
}
}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
...
...
@@ -1345,7 +1347,11 @@ export default class MonthlyReport extends Component {
// this.getCompanySubmitted()
// } else {
this
.
setState
({
visibleTableHistory
:
false
})
if
(
this
.
state
.
listCompany
==
null
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
getRevision
()
}
// }
})}
disableClearable
...
...
@@ -1361,7 +1367,11 @@ export default class MonthlyReport extends Component {
// this.getCompanySubmitted()
// } else {
this
.
setState
({
visibleTableHistory
:
false
})
if
(
this
.
state
.
listCompany
==
null
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
getRevision
()
}
// }
})}
disableClearable
...
...
@@ -1535,6 +1545,9 @@ export default class MonthlyReport extends Component {
<
/div> : this.state.lastStatus === 'WAITING FOR APPROVAL'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
-
${
this
.
state
.
pic
}
`
}
<
/span
>
<
/div> : this.state.lastStatus === 'REVISION'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
this
.
state
.
textRevision
}
<
/span
>
<
/div> : this.state.lastStatus === 'APPROVED'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
`
}
<
/span
>
...
...
@@ -1655,7 +1668,7 @@ export default class MonthlyReport extends Component {
<
/div
>
<
/div> : nul
l
:
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
this
.
state
.
isSubmit
===
true
?
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
this
.
state
.
isSubmit
?
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
style
=
{{
...
...
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