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
94ee6781
Commit
94ee6781
authored
Dec 07, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usapprover tp
parent
cd9c7f4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
141 additions
and
159 deletions
+141
-159
MonthlyReport.js
src/container/MonthlyReport.js
+1
-0
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+140
-159
No files found.
src/container/MonthlyReport.js
View file @
94ee6781
...
@@ -1159,6 +1159,7 @@ export default class MonthlyReport extends Component {
...
@@ -1159,6 +1159,7 @@ export default class MonthlyReport extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
btnCreate
=
{
this
.
state
.
btnCreate
}
btnCreate
=
{
this
.
state
.
btnCreate
}
loadview
=
{
this
.
state
.
loadview
}
loadview
=
{
this
.
state
.
loadview
}
isApprover
=
{
this
.
state
.
isApprover
}
// getReport={this.getCompanyActive.bind(this)}
// getReport={this.getCompanyActive.bind(this)}
/
>
/
>
)}
)}
...
...
src/container/MonthlyReport/TaxPlanningMR.js
View file @
94ee6781
...
@@ -62,6 +62,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -62,6 +62,7 @@ export default class TaxPlanningMR extends Component {
this
.
getSettingControl
()
this
.
getSettingControl
()
// this.getItemHierarki()
// this.getItemHierarki()
this
.
getLatestUpdate
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
.
isApprover
)
}
}
getSettingControl
()
{
getSettingControl
()
{
...
@@ -245,8 +246,8 @@ export default class TaxPlanningMR extends Component {
...
@@ -245,8 +246,8 @@ export default class TaxPlanningMR extends Component {
}
}
api
.
create
(
'UPLOAD'
).
createMonthlyReportTP
(
payload
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
createMonthlyReportTP
(
payload
).
then
(
response
=>
{
//
console.log(payload);
console
.
log
(
payload
);
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
this
.
props
.
saveToMonthlyReport
()
...
@@ -903,10 +904,10 @@ export default class TaxPlanningMR extends Component {
...
@@ -903,10 +904,10 @@ export default class TaxPlanningMR extends Component {
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
decimalSeparator
=
{
"."
}
decimalSeparator
=
{
"."
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
this
.
props
.
isApprover
?
'black'
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
"input"
placeholder
=
"input"
disabled
=
{
t
rue
}
disabled
=
{
t
his
.
props
.
isApprover
}
value
=
{
Number
(
value
.
tbc
).
toFixed
(
1
)}
value
=
{
Number
(
value
.
tbc
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
,
0
)
handleChange
(
event
.
target
.
value
,
tableMeta
,
0
)
...
@@ -1428,8 +1429,8 @@ export default class TaxPlanningMR extends Component {
...
@@ -1428,8 +1429,8 @@ export default class TaxPlanningMR extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
/* {this.state.dataTable.length == 0 ? null : this.props.isApprover == true ? */
}
{
this
.
props
.
isApprover
===
true
?
{
/*
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
<
button
style
=
{{
style
=
{{
...
@@ -1438,91 +1439,70 @@ export default class TaxPlanningMR extends Component {
...
@@ -1438,91 +1439,70 @@ export default class TaxPlanningMR extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick={() => null
onClick
=
{()
=>
// this.setState({ loading: true }, () => {
this
.
setState
({
loading
:
true
},
()
=>
{
// setTimeout(() => {
setTimeout
(()
=>
{
// this.downloadAllData()
this
.
downloadAllData
()
// }, 100);
},
100
);
// })
})}
}
>
>
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
</div>
<
/div>
:
: */
}
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
{
/* {((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && ( */
}
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
{
this
.
props
.
btncreate
===
true
&&
<
button
<
div
>
style
=
{{
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
backgroundColor
:
'transparent'
,
<
button
cursor
:
'pointer'
,
style
=
{{
borderColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
margin
:
5
cursor
:
'pointer'
,
}}
borderColor
:
'transparent'
,
onClick
=
{()
=>
this
.
downloadTemplate
()}
margin
:
5
>
}}
<
img
src
=
{
Images
.
template
}
/
>
onClick
=
{()
=>
this
.
downloadTemplate
()}
<
/button
>
>
<
/a
>
<
img
src
=
{
Images
.
template
}
/
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/button
>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
/a
>
<
button
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
style
=
{{
<
/div
>
backgroundColor
:
'transparent'
,
}
cursor
:
'pointer'
,
{
/* )} */
}
borderColor
:
'transparent'
,
{
/* {((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted')) && ( */
}
margin
:
5
{
this
.
props
.
btncreate
===
true
&&
}}
<
div
>
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
>
<
button
<
img
src
=
{
Images
.
upload
}
/
>
style
=
{{
<
/button
>
backgroundColor
:
'transparent'
,
<
/a
>
cursor
:
'pointer'
,
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
borderColor
:
'transparent'
,
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
margin
:
5
<
button
}}
style
=
{{
onClick
=
{()
=>
backgroundColor
:
'transparent'
,
this
.
setState
({
visibleUpload
:
true
})
cursor
:
'pointer'
,
}
borderColor
:
'transparent'
,
>
margin
:
5
<
img
src
=
{
Images
.
upload
}
/
>
}}
<
/button
>
onClick
=
{()
=>
<
/a
>
this
.
setState
({
loading
:
true
},
()
=>
{
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
setTimeout
(()
=>
{
<
/div
>
this
.
downloadAllData
()
}
},
100
);
{
/* )} */
}
})}
{(
this
.
props
.
loadview
===
true
||
this
.
props
.
btncreate
===
true
)
&&
(
>
<
div
>
<
img
src
=
{
Images
.
download
}
/
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
/button
>
<
button
<
/a
>
style
=
{{
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
downloadAllData
()
},
100
);
})
}
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
)}
<
/div
>
<
/div
>
{
/* } */
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
loading
&&
loadingComponent
}
...
@@ -1560,86 +1540,87 @@ export default class TaxPlanningMR extends Component {
...
@@ -1560,86 +1540,87 @@ export default class TaxPlanningMR extends Component {
<
/div
>
<
/div
>
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
{
/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */
}
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */
}
{
this
.
props
.
btncreate
===
true
&&
{
this
.
props
.
isApprover
===
true
?
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
div
className
=
"col-2"
>
<
button
<
/div>
:
className
=
"button"
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
type
=
"button"
<
button
style
=
{{
className
=
"button"
backgroundColor
:
'transparent'
,
type
=
"button"
cursor
:
'pointer'
,
style
=
{{
borderColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
outline
:
'none'
,
cursor
:
'pointer'
,
marginRight
:
20
borderColor
:
'transparent'
,
}}
outline
:
'none'
,
onClick
=
{()
=>
marginRight
:
20
{
}}
this
.
setState
({
loading
:
true
,
buttonDraft
:
false
},
()
=>
{
onClick
=
{()
=>
setTimeout
(()
=>
{
{
// this.setState({ loading: false, buttonError: false, editable: true })
this
.
setState
({
loading
:
true
,
buttonDraft
:
false
},
()
=>
{
this
.
handleValidate
()
},
100
);
})
}
}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button
>
<
button
className
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
state
.
saveDraft
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
// this.setState({ loading: false, buttonError: false, editable: true })
this
.
handleValidate
()
},
100
);
},
100
);
})
})
}
}
style
=
{{
}
backgroundColor
:
'transparent'
,
>
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #354960'
}}
>
borderColor
:
'transparent'
,
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
outline
:
'none'
<
/div
>
}}
<
/button
>
>
<
button
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
className
=
"button"
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
type
=
"button"
<
/div
>
onClick
=
{()
=>
<
/button
>
this
.
state
.
saveDraft
===
true
?
<
/div
>
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
},
100
);
})
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
}
}
{
/* : null } */
}
<
/div
>
<
/div
>
<
/Paper
>
<
/Paper
>
:
:
...
...
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