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
92769d24
Commit
92769d24
authored
4 years ago
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!977
parents
21a26477
56894852
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
HomePage.js
src/container/HomePage.js
+4
-4
MonthlyReport.js
src/container/MonthlyReport.js
+21
-7
No files found.
src/container/HomePage.js
View file @
92769d24
...
@@ -8,6 +8,7 @@ import api from '../api';
...
@@ -8,6 +8,7 @@ import api from '../api';
import
{
Link
}
from
'react-router-dom'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
PropagateLoader
}
from
'react-spinners'
;
import
{
PropagateLoader
}
from
'react-spinners'
;
import
{
titleCase
}
from
'../library/Utils'
;
import
{
titleCase
}
from
'../library/Utils'
;
import
{
format
}
from
'date-fns'
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -216,7 +217,7 @@ class HomePage extends Component {
...
@@ -216,7 +217,7 @@ class HomePage extends Component {
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Link
to
=
{{
<
Link
to
=
{{
pathname
:
this
.
state
.
isApproverMB
?
`/home/master-budget/`
:
`/home/monthly-report/`
,
pathname
:
String
(
tableMeta
.
rowData
[
3
]).
toLocaleLowerCase
().
includes
(
"master"
)
?
`/home/master-budget/`
:
`/home/monthly-report/`
,
state
:
{
state
:
{
userType
:
'approver'
,
userType
:
'approver'
,
rawData
:
this
.
state
.
rawData
[
tableMeta
.
rowIndex
]
rawData
:
this
.
state
.
rawData
[
tableMeta
.
rowIndex
]
...
@@ -297,8 +298,7 @@ class HomePage extends Component {
...
@@ -297,8 +298,7 @@ class HomePage extends Component {
/
>
/
>
<
/div
>
<
/div
>
);
);
let
bulan
=
format
(
new
Date
(),
'MMM'
)
let
bulan
=
new
Date
().
toLocaleString
(
'default'
,
{
month
:
'long'
})
let
tahun
=
new
Date
().
getFullYear
()
let
tahun
=
new
Date
().
getFullYear
()
return
(
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
,
minHeight
:
this
.
props
.
height
}}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
,
minHeight
:
this
.
props
.
height
}}
>
...
@@ -520,7 +520,7 @@ class HomePage extends Component {
...
@@ -520,7 +520,7 @@ class HomePage extends Component {
{
/* : this.state.isApproverMRList === true || this.state.isApprover === false ? */
}
{
/* : this.state.isApproverMRList === true || this.state.isApprover === false ? */
}
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
width
:
450
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Paper
style
=
{{
width
:
450
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
{
`Monthly Report
${
this
.
state
.
valueSubmitMR
}
/
${
this
.
state
.
listSubcoMR
.
length
}
-
${
bulan
}
${
tahun
}
`
}
<
/Typography
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
{
`Monthly Report
-
${
bulan
}
${
tahun
}
${
this
.
state
.
valueSubmitMR
}
/
${
this
.
state
.
listSubcoMR
.
length
}
`
}
<
/Typography
>
{
this
.
state
.
listSubcoMR
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
listSubcoMR
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginTop
:
10
,
paddingLeft
:
10
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginTop
:
10
,
paddingLeft
:
10
}}
>
...
...
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport.js
View file @
92769d24
...
@@ -68,7 +68,8 @@ export default class MonthlyReport extends Component {
...
@@ -68,7 +68,8 @@ export default class MonthlyReport extends Component {
listStatus
:
[],
listStatus
:
[],
selectedStatus
:
[],
selectedStatus
:
[],
detailRevisiCheck
:
[],
detailRevisiCheck
:
[],
isApprovedMB
:
false
isApprovedMB
:
false
,
textRevision
:
''
}
}
this
.
myRef
=
React
.
createRef
()
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -107,10 +108,21 @@ export default class MonthlyReport extends Component {
...
@@ -107,10 +108,21 @@ export default class MonthlyReport extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getPermission
()
//
this.getPermission()
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
this
.
props
.
selectIndex
(
'Monthly Report'
)
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
// console.log(this.props);
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
.
periode
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
getPermission
()
})
}
else
{
this
.
getPermission
()
}
// console.log(this.props)
// this.getCompanyActive()
// this.getCompanyActive()
// this.getCompanySubmitted()
// this.getCompanySubmitted()
// console.log(a)
}
}
getChecApprover
()
{
getChecApprover
()
{
...
@@ -581,7 +593,8 @@ export default class MonthlyReport extends Component {
...
@@ -581,7 +593,8 @@ export default class MonthlyReport extends Component {
lastRevision
:
response
.
data
.
data
.
last_revision
,
lastRevision
:
response
.
data
.
data
.
last_revision
,
btnApprove
:
response
.
data
.
data
.
is_submit
,
btnApprove
:
response
.
data
.
data
.
is_submit
,
monthlyReportId
:
response
.
data
.
data
?
response
.
data
.
data
.
monthly_report_id
:
null
,
monthlyReportId
:
response
.
data
.
data
?
response
.
data
.
data
.
monthly_report_id
:
null
,
isApprovedMB
:
response
.
data
.
data
.
is_approved_master_budget
isApprovedMB
:
response
.
data
.
data
.
is_approved_master_budget
,
textRevision
:
response
.
data
.
data
.
text_revision
},
()
=>
{
},
()
=>
{
// // console.log(this.state.lastStatus);
// // console.log(this.state.lastStatus);
this
.
historyApproval
()
this
.
historyApproval
()
...
@@ -1370,6 +1383,7 @@ export default class MonthlyReport extends Component {
...
@@ -1370,6 +1383,7 @@ export default class MonthlyReport extends Component {
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
onChange
=
{(
event
,
newInputValue
)
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
{
this
.
setState
({
selectedStatus
:
newInputValue
},
()
=>
{
this
.
setState
({
selectedStatus
:
newInputValue
},
()
=>
{
console
.
log
(
newInputValue
);
this
.
getCompanySubmitted
()
this
.
getCompanySubmitted
()
})
})
}}
}}
...
@@ -1433,7 +1447,7 @@ export default class MonthlyReport extends Component {
...
@@ -1433,7 +1447,7 @@ export default class MonthlyReport extends Component {
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
,
fontWeight
:
'bold'
}}
>
Attachment
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
,
fontWeight
:
'bold'
}}
>
Attachment
:
<
/Typography
>
<
/div
>
<
/div
>
{
!
this
.
state
.
approverTrue
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
{
!
this
.
state
.
checkApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
button
<
button
style
=
{{
style
=
{{
...
@@ -1479,7 +1493,7 @@ export default class MonthlyReport extends Component {
...
@@ -1479,7 +1493,7 @@ export default class MonthlyReport extends Component {
:
null
:
null
}
}
<
/div
>
<
/div
>
{
!
this
.
state
.
approverTrue
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
{
!
this
.
state
.
checkApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
{
this
.
state
.
listAttachment
.
length
>
0
?
this
.
state
.
listAttachment
.
length
>
0
?
...
@@ -1534,7 +1548,7 @@ export default class MonthlyReport extends Component {
...
@@ -1534,7 +1548,7 @@ export default class MonthlyReport extends Component {
<
/div>
:
<
/div>
:
this
.
state
.
lastStatus
===
'REVISION'
?
this
.
state
.
lastStatus
===
'REVISION'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
NEED
REVISION
<
/span
>
<
span
>
{
this
.
state
.
textRevision
}
<
/span
>
<
/div>
:
<
/div>
:
this
.
state
.
lastStatus
===
'APPROVED'
?
this
.
state
.
lastStatus
===
'APPROVED'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
...
@@ -1587,7 +1601,7 @@ export default class MonthlyReport extends Component {
...
@@ -1587,7 +1601,7 @@ export default class MonthlyReport extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
:
this
.
state
.
approverTrue
?
this
.
state
.
checkApprover
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
<
button
...
...
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