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
c57df8b8
Commit
c57df8b8
authored
Jan 18, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
apdet See merge request
!983
parents
8e8cd888
864c576d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
20 deletions
+33
-20
MonthlyReport.js
src/container/MonthlyReport.js
+33
-20
No files found.
src/container/MonthlyReport.js
View file @
c57df8b8
...
...
@@ -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
})
this
.
getRevision
()
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
})
this
.
getRevision
()
if
(
this
.
state
.
listCompany
==
null
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
getRevision
()
}
// }
})}
disableClearable
...
...
@@ -1535,10 +1545,13 @@ 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 === '
APPROVED
'
?
<
/div> : this.state.lastStatus === '
REVISION
'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
`
}
<
/span
>
<
/div> : nul
l
<
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
>
<
/div> : nul
l
:
this
.
state
.
lastStatus
===
'SUBMITTED'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
...
...
@@ -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