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
0486a70b
Commit
0486a70b
authored
Dec 13, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update!
parent
40740a9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
439 additions
and
164 deletions
+439
-164
index.js
src/api/index.js
+2
-0
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+421
-145
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+16
-19
No files found.
src/api/index.js
View file @
0486a70b
...
@@ -275,6 +275,7 @@ const create = (type = "") => {
...
@@ -275,6 +275,7 @@ const create = (type = "") => {
const
createMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
createMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/create_monthly_report'
,
body
)
const
createMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/create_monthly_report'
,
body
)
const
createMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/create_monthly_report'
,
body
)
const
createMonthlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/create_monthly_report'
,
body
)
const
createMonthlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/create_monthly_report'
,
body
)
const
createMonthlyReportCAT
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/cat/create_monthly_report'
,
body
)
const
checkUploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/check_import'
,
body
)
const
checkUploadMonthlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/check_import'
,
body
)
const
checkUploadMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/check_import'
,
body
)
const
checkUploadMonthlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/check_import'
,
body
)
const
checkUploadMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/check_import'
,
body
)
const
checkUploadMonthlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/check_import'
,
body
)
...
@@ -429,6 +430,7 @@ const create = (type = "") => {
...
@@ -429,6 +430,7 @@ const create = (type = "") => {
createMonthlyReportPL
,
createMonthlyReportPL
,
createMonthlyReportFAM
,
createMonthlyReportFAM
,
createMonthlyReportOI
,
createMonthlyReportOI
,
createMonthlyReportCAT
,
checkUploadMonthlyReportPL
,
checkUploadMonthlyReportPL
,
getSubmission
,
getSubmission
,
checkUploadMB
,
checkUploadMB
,
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
0486a70b
...
@@ -11,6 +11,7 @@ import Constant from '../../library/Constant';
...
@@ -11,6 +11,7 @@ import Constant from '../../library/Constant';
import
{
Alert
,
Autocomplete
}
from
'@material-ui/lab'
;
import
{
Alert
,
Autocomplete
}
from
'@material-ui/lab'
;
import
UploadFile
from
'../../library/Upload'
;
import
UploadFile
from
'../../library/Upload'
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
PropagateLoader
}
from
'react-spinners'
;
const
LightTooltip
=
withStyles
((
theme
)
=>
({
const
LightTooltip
=
withStyles
((
theme
)
=>
({
tooltip
:
{
tooltip
:
{
...
@@ -118,16 +119,44 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -118,16 +119,44 @@ export default class CorporateAnnualTargetMR extends Component {
api
.
create
().
getHierarkiMontlyReportCAT
(
payload
).
then
(
response
=>
{
api
.
create
().
getHierarkiMontlyReportCAT
(
payload
).
then
(
response
=>
{
let
dataTable
=
[]
let
dataTable
=
[]
let
dataCustomerPrs
=
[]
let
dataInternalBsn
=
[]
console
.
log
(
payload
);
console
.
log
(
payload
);
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
if
(
response
.
data
.
status
===
'success'
)
{
const
handlePushChild
=
(
item
)
=>
{
let
res
=
response
.
data
.
data
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
const
handlePushChild
=
(
item
)
=>
{
if
(
indexIDzz
===
-
1
)
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
item
.
corporate_annual_target
.
weight
).
indexOf
(
"."
)
==
-
1
?
item
.
corporate_annual_target
.
weight
:
`
${
Number
(
item
.
weight
)
*
100
}
%`
),
parentTrue
?
item
.
corporate_annual_target
.
uom
:
item
.
uom
,
parentTrue
?
item
.
corporate_annual_target
.
kpi_type
==
""
?
null
:
{
value
:
item
.
corporate_annual_target
.
kpi_type
}
:
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
parentTrue
?
item
.
corporate_annual_target
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
corporate_annual_target
.
max_ach
)
}
:
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
parentTrue
?
item
.
corporate_annual_target
.
formula
==
""
?
null
:
{
value
:
item
.
corporate_annual_target
.
formula
}
:
item
.
formula_ytd
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
corporate_annual_target
.
actual_monthly
==
""
?
item
.
corporate_annual_target
.
actual_monthly
:
String
(
item
.
corporate_annual_target
.
actual_monthly
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
actual_monthly
)
:
Number
(
item
.
corporate_annual_target
.
actual_monthly
).
toFixed
(
1
),
item
.
corporate_annual_target
.
target_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
target_monthly
,
item
.
corporate_annual_target
.
achivement_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
achivement_monthly
,
item
.
corporate_annual_target
.
score
===
null
?
"0"
:
item
.
corporate_annual_target
.
score
,
item
.
corporate_annual_target
.
score_x_weight
===
null
?
"0"
:
item
.
corporate_annual_target
.
score_x_weight
,
item
.
corporate_annual_target
.
notes
===
null
?
""
:
item
.
corporate_annual_target
.
notes
,
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
}
res
.
map
((
item
,
index
)
=>
{
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -135,11 +164,11 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -135,11 +164,11 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
formula
,
item
.
formula
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
item
.
corporate_annual_target
.
weight
).
indexOf
(
"."
)
==
-
1
?
item
.
corporate_annual_target
.
weight
:
`
${
Number
(
item
.
weight
)
*
100
}
%`
)
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
item
.
weight
,
parentTrue
?
item
.
corporate_annual_target
.
uom
:
item
.
uom
,
item
.
corporate_annual_target
.
uom
,
parentTrue
?
item
.
corporate_annual_target
.
kpi_type
==
""
?
null
:
{
value
:
item
.
corporate_annual_target
.
kpi_type
}
:
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
parentTrue
?
item
.
corporate_annual_target
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
corporate_annual_target
.
max_ach
)
}
:
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
parentTrue
?
item
.
corporate_annual_target
.
formula
==
""
?
null
:
{
value
:
item
.
corporate_annual_target
.
formula
}
:
item
.
formula_ytd
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
formula
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
corporate_annual_target
.
actual_monthly
==
""
?
item
.
corporate_annual_target
.
actual_monthly
:
String
(
item
.
corporate_annual_target
.
actual_monthly
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
actual_monthly
)
:
Number
(
item
.
corporate_annual_target
.
actual_monthly
).
toFixed
(
1
),
item
.
corporate_annual_target
.
actual_monthly
==
""
?
item
.
corporate_annual_target
.
actual_monthly
:
String
(
item
.
corporate_annual_target
.
actual_monthly
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
actual_monthly
)
:
Number
(
item
.
corporate_annual_target
.
actual_monthly
).
toFixed
(
1
),
item
.
corporate_annual_target
.
target_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
target_monthly
,
item
.
corporate_annual_target
.
target_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
target_monthly
,
item
.
corporate_annual_target
.
achivement_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
achivement_monthly
,
item
.
corporate_annual_target
.
achivement_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
achivement_monthly
,
...
@@ -147,46 +176,28 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -147,46 +176,28 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
corporate_annual_target
.
score_x_weight
===
null
?
"0"
:
item
.
corporate_annual_target
.
score_x_weight
,
item
.
corporate_annual_target
.
score_x_weight
===
null
?
"0"
:
item
.
corporate_annual_target
.
score_x_weight
,
item
.
corporate_annual_target
.
notes
===
null
?
""
:
item
.
corporate_annual_target
.
notes
,
item
.
corporate_annual_target
.
notes
===
null
?
""
:
item
.
corporate_annual_target
.
notes
,
])
])
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
handlePushChild
(
items
)
}
)
}
)
}
}
}
}
})
}
// console.log(dataTable);
res
.
map
((
item
,
index
)
=>
{
this
.
setState
({
dataTable
,
loading
:
false
})
dataTable
.
push
([
}
else
{
item
.
type_report_id
,
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
item
.
id
,
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
item
.
parent
,
setTimeout
(()
=>
{
item
.
formula
,
localStorage
.
removeItem
(
Constant
.
TOKEN
)
item
.
level
,
window
.
location
.
reload
();
item
.
description
,
},
1000
);
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
item
.
weight
,
item
.
corporate_annual_target
.
uom
,
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
item
.
formula
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
corporate_annual_target
.
actual_monthly
==
""
?
item
.
corporate_annual_target
.
actual_monthly
:
String
(
item
.
corporate_annual_target
.
actual_monthly
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
actual_monthly
)
:
Number
(
item
.
corporate_annual_target
.
actual_monthly
).
toFixed
(
1
),
item
.
corporate_annual_target
.
target_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
target_monthly
,
item
.
corporate_annual_target
.
achivement_monthly
===
null
?
"0"
:
item
.
corporate_annual_target
.
achivement_monthly
,
item
.
corporate_annual_target
.
score
===
null
?
"0"
:
item
.
corporate_annual_target
.
score
,
item
.
corporate_annual_target
.
score_x_weight
===
null
?
"0"
:
item
.
corporate_annual_target
.
score_x_weight
,
item
.
corporate_annual_target
.
notes
===
null
?
""
:
item
.
corporate_annual_target
.
notes
,
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
}
})
})
}
this
.
setState
({
dataTable
,
loading
:
false
,
dataReal
:
res
,
editable
:
true
,
dataCustomerPrs
,
dataInternalBsn
},
()
=>
{
}
else
{
// console.log(dataCustomerPrs)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
})
}
}
console
.
log
(
dataTable
);
console
.
log
(
dataTable
);
})
})
...
@@ -431,6 +442,60 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -431,6 +442,60 @@ export default class CorporateAnnualTargetMR extends Component {
})
})
}
}
backToMonthlyReport
(
type
)
{
this
.
setState
({
loading
:
true
})
console
.
log
(
this
.
state
.
dataTable
);
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"weight"
:
i
[
6
],
"uom"
:
i
[
7
],
"jenis_kpi"
:
i
[
8
],
"max_ach"
:
i
[
9
],
"formula_ytd"
:
i
[
10
],
"actual_monthly"
:
i
[
11
],
"target_monthly"
:
i
[
12
],
"achivement_monthly"
:
i
[
13
],
"score"
:
i
[
14
],
"score_x_weight"
:
i
[
15
],
"notes"
:
i
[
16
]
})
})
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"corporate_annual_target"
:
data
}
console
.
log
(
JSON
.
stringify
(
payload
));
api
.
create
(
'UPLOAD'
).
createMonthlyReportCAT
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
props
.
saveToMonthlyReport
()
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
let
dataDelete
=
this
.
state
.
dataDelete
let
dataDelete
=
this
.
state
.
dataDelete
...
@@ -473,10 +538,10 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -473,10 +538,10 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
const
handleValueDropdown
=
(
value
,
type
,
tableMeta
)
=>
{
const
handleValueDropdown
=
(
value
,
type
,
tableMeta
)
=>
{
console
.
log
(
value
,
type
,
tableMeta
);
//
console.log(value,type, tableMeta);
console
.
log
(
this
.
state
.
maxAchList
.
options
);
//
console.log(this.state.maxAchList.options);
let
data
=
type
==
'KPI'
?
this
.
state
.
kpiTypeList
.
options
:
(
type
==
'MAX'
?
this
.
state
.
maxAchList
.
options
:
this
.
state
.
formulaYtdList
.
options
)
let
data
=
type
==
'KPI'
?
this
.
state
.
kpiTypeList
.
options
:
(
type
==
'MAX'
?
this
.
state
.
maxAchList
.
options
:
this
.
state
.
formulaYtdList
.
options
)
console
.
log
(
data
);
//
console.log(data);
let
index
=
0
let
index
=
0
if
(
value
==
null
)
{
if
(
value
==
null
)
{
console
.
log
(
"masuk"
);
console
.
log
(
"masuk"
);
...
@@ -1192,112 +1257,323 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1192,112 +1257,323 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
]
]
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'absolute'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
return
(
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
/div
>
<
/div
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
{
this
.
state
.
visibleCATMR
?
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Corporate
Annual
Target
-
Performance
<
/Typography
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
/div
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Corporate
Annual
Target
-
Performance
<
/Typography
>
<
div
style
=
{{
padding
:
20
}}
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadTemplate
()
}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
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
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
(
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
columns
=
{
columns
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
)}
<
/div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
{
this
.
props
.
isApprover
===
true
?
<
div
className
=
"col-2"
><
/div>
:
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
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"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
})
}
>
<
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
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
})}
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'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div>
}
<
/div
>
<
/Paper>
:
<
Paper
style
=
{{
paddingTop
:
10
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Corporate
Annual
Target
-
Performance
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
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
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
{
console
.
log
(
this
.
state
.
loading
)
}
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
{
!
this
.
state
.
loading
&&
(
<
button
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
style
=
{{
<
MUIDataTable
backgroundColor
:
'transparent'
,
data
=
{
dataTable2
}
cursor
:
'pointer'
,
columns
=
{
columns
}
borderColor
:
'transparent'
,
options
=
{
options
}
margin
:
5
/
>
}}
<
/MuiThemeProvider
>
onClick
=
{()
=>
this
.
downloadTemplate
()
}
)}
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
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
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
button
{
!
this
.
state
.
loading
&&
(
type
=
"button"
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
<
MUIDataTable
setTimeout
(()
=>
{
data
=
{
dataTable2
}
this
.
props
.
onClickClose
()
columns
=
{
columns
}
},
100
);
options
=
{
options
}
})}
/
>
style
=
{{
<
/MuiThemeProvider
>
backgroundColor
:
'transparent'
,
)}
cursor
:
'pointer'
,
<
/div
>
borderColor
:
'transparent'
,
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
{
this
.
state
.
updateBy
}
<
/Typography
>
outline
:
'none'
<
/div
>
}}
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
button
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
type
=
"button"
<
/div
>
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
<
/button
>
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
},
100
);
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Back
<
/Typography
>
<
/div
>
<
/div
>
<
/button
>
{
/* {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') ? */
}
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
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"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
saveDraft
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
state
.
saveDraft
===
true
?
null
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
uploadCATMR
(
'draft'
)
})
}
>
<
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
},
()
=>
{
this
.
uploadCATMR
(
'submitted'
)
})}
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'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div>
<
/div
>
<
/div
>
<
/div
>
<
/
div
>
<
/
Paper
>
<
/Paper
>
}
<
/div
>
<
/div
>
{
this
.
state
.
visibleUpload
&&
(
{
this
.
state
.
visibleUpload
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
>
...
...
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
0486a70b
...
@@ -1454,25 +1454,22 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -1454,25 +1454,22 @@ export default class FixedAssetsMovementMR extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Fixed
Assets
Movement
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
Fixed
Assets
Movement
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
!
this
.
state
.
loading
&&
(
<
MUIDataTable
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
data
=
{
dataTable2
}
<
MUIDataTable
columns
=
{
columns
}
data
=
{
dataTable2
}
options
=
{
options
}
columns
=
{
columns
}
/
>
options
=
{
options
}
<
/MuiThemeProvider
>
/
>
)}
<
/MuiThemeProvider
>
<
/div
>
)}
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
<
button
<
button
...
...
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