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
fb040c34
Commit
fb040c34
authored
Oct 13, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
push conflict index dan hp xiaomi
parents
2b709459
f0391691
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
559 additions
and
122 deletions
+559
-122
index.js
src/api/index.js
+3
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+64
-11
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+8
-3
HomePage.js
src/container/HomePage.js
+52
-11
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+3
-2
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+335
-40
OutlookPA.js
src/container/OutlookPA.js
+94
-54
No files found.
src/api/index.js
View file @
fb040c34
...
@@ -210,6 +210,7 @@ const create = (type = "") => {
...
@@ -210,6 +210,7 @@ const create = (type = "") => {
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
const
getDashboardUser
=
()
=>
api
.
get
(
'transaction/get_dashboard_sub_co'
)
const
getDashboardMB
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard_table'
)
const
getDashboardMB
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard_table'
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_id'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_operating_indicator_id'
,
body
)
...
@@ -423,7 +424,8 @@ const create = (type = "") => {
...
@@ -423,7 +424,8 @@ const create = (type = "") => {
checkApproverOLPA
,
checkApproverOLPA
,
getLastPeriodeOI
,
getLastPeriodeOI
,
getSubmitOI
,
getSubmitOI
,
getLastPeriodOI
getLastPeriodOI
,
getDashboardUser
}
}
}
}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
fb040c34
...
@@ -78,7 +78,9 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -78,7 +78,9 @@ export default class CorporateAnnualTarget extends Component {
buttonDraft
:
true
,
buttonDraft
:
true
,
updateBy
:
''
,
updateBy
:
''
,
handleTekTekTek
:
0
,
handleTekTekTek
:
0
,
editable
:
false
editable
:
false
,
dataCustomerPrs
:
[],
dataInternalBsn
:
[]
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -104,12 +106,35 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -104,12 +106,35 @@ export default class CorporateAnnualTarget extends Component {
// console.log(JSON.stringify(payload))
// console.log(JSON.stringify(payload))
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
let
dataTable
=
[]
let
dataTable
=
[]
let
dataCustomerPrs
=
[]
let
dataInternalBsn
=
[]
// console.log(response)
// console.log(response)
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
if
(
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
)
{
if
(
item
.
type_report_id
!==
4
)
{
dataInternalBsn
.
push
({
id
:
item
.
id
,
name
:
item
.
description
,
check
:
false
})
}
}
if
(
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
)
{
if
(
item
.
type_report_id
!==
4
)
{
dataCustomerPrs
.
push
({
id
:
item
.
id
,
name
:
item
.
description
,
check
:
false
})
}
}
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -192,7 +217,9 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -192,7 +217,9 @@ export default class CorporateAnnualTarget extends Component {
}
}
}
}
})
})
this
.
setState
({
dataTable
,
loading
:
false
,
dataReal
:
res
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
dataReal
:
res
,
editable
:
true
,
dataCustomerPrs
,
dataInternalBsn
},
()
=>
{
console
.
log
(
dataCustomerPrs
)
})
})
})
}
}
...
@@ -325,13 +352,37 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -325,13 +352,37 @@ export default class CorporateAnnualTarget extends Component {
console
.
log
(
JSON
.
stringify
(
this
.
state
.
payload
))
console
.
log
(
JSON
.
stringify
(
this
.
state
.
payload
))
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
// // console.log(JSON.stringify(this.state.payload));
// // console.log(JSON.stringify(this.state.payload));
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
// this.setState({ visibleUpload: false, visibleCAT: false })
// this.setState({ visibleUpload: false, visibleCAT: false })
this
.
setState
({
visibleUpload
:
false
,
visibleCAT
:
false
})
this
.
setState
({
visibleUpload
:
false
,
visibleCAT
:
false
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTable
=
[]
return
[
let
custoId
=
0
let
bisnsId
=
0
let
dataDelete
=
this
.
state
.
dataDelete
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
item_report
==
'CUSTOMER PERSPECTIVE'
)
{
custoId
=
item
.
item_report_id
}
if
(
item
.
item_report
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
)
{
bisnsId
=
item
.
item_report_id
}
if
(
item
.
type_report_id
!==
4
&&
item
.
parent
!==
null
&&
(
item
.
parent
==
custoId
||
item
.
parent
==
bisnsId
))
{
let
indexCust
=
this
.
state
.
dataCustomerPrs
.
findIndex
((
val
)
=>
val
.
name
==
item
.
item_report
)
let
indexBisn
=
this
.
state
.
dataInternalBsn
.
findIndex
((
val
)
=>
val
.
name
==
item
.
item_report
)
if
(
indexCust
!==
-
1
&&
item
.
item_report_id
==
0
)
{
dataDelete
.
push
(
this
.
state
.
dataCustomerPrs
[
indexCust
].
id
)
}
if
(
indexBisn
!==
-
1
&&
item
.
item_report_id
==
0
)
{
dataDelete
.
push
(
this
.
state
.
dataInternalBsn
[
indexBisn
].
id
)
}
}
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
item_report_id
,
item
.
item_report_id
,
item
.
parent
,
item
.
parent
,
...
@@ -363,11 +414,11 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -363,11 +414,11 @@ export default class CorporateAnnualTarget extends Component {
item
.
strategic
,
item
.
strategic
,
item
.
pic
,
item
.
pic
,
item
.
error
item
.
error
]
]
)
})
})
//
console.log(dataTable)
console
.
log
(
dataTable
)
// console.log(this.state.buttonError)
// console.log(this.state.buttonError)
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
dataDelete
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
30
].
length
>
0
)
{
if
(
item
[
30
].
length
>
0
)
{
// console.log('masuk')
// console.log('masuk')
...
@@ -382,8 +433,9 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -382,8 +433,9 @@ export default class CorporateAnnualTarget extends Component {
}
}
uploadCAT
(
type
)
{
uploadCAT
(
type
)
{
// let dataDelete = this.state.dataDelete
// console.log(dataDelete)
let
payload
=
{
"item_report_id"
:
this
.
state
.
dataDelete
}
let
payload
=
{
"item_report_id"
:
this
.
state
.
dataDelete
}
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
api
.
create
().
deleteAllItemReport
(
payload
).
then
((
response
)
=>
{
api
.
create
().
deleteAllItemReport
(
payload
).
then
((
response
)
=>
{
this
.
functionUpload
(
type
)
this
.
functionUpload
(
type
)
...
@@ -436,7 +488,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -436,7 +488,7 @@ export default class CorporateAnnualTarget extends Component {
"cat"
:
data
"cat"
:
data
}
}
// console.log(data);
// console.log(data);
//
console.log(JSON.stringify(body))
console
.
log
(
JSON
.
stringify
(
body
))
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
// console.log(response);
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -888,7 +940,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -888,7 +940,7 @@ export default class CorporateAnnualTarget extends Component {
}
}
const
handleTambah
=
(
data
,
rowIndex
)
=>
{
const
handleTambah
=
(
data
,
rowIndex
)
=>
{
//
console.log(dataTable2)
console
.
log
(
dataTable2
)
let
newData
=
[]
let
newData
=
[]
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
newData
.
push
(
item
)
newData
.
push
(
item
)
...
@@ -932,6 +984,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -932,6 +984,7 @@ export default class CorporateAnnualTarget extends Component {
this
.
setState
({
dataTable
:
dataTable2
},
()
=>
{
this
.
setState
({
dataTable
:
dataTable2
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
console
.
log
(
dataTable2
)
},
500
)
},
500
)
})
})
}
}
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
fb040c34
...
@@ -512,10 +512,15 @@ export default class FixedAssetsMovement extends Component {
...
@@ -512,10 +512,15 @@ export default class FixedAssetsMovement extends Component {
}
else
{
}
else
{
// console.log(item)
// console.log(item)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
22
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
22
]
==
item
)
// console.log(dataTable2[indexID]
[tableMeta.columnIndex]
)
// console.log(dataTable2[indexID])
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
else
{
if
(
item
===
'(-1)'
)
{
anjay
.
push
(
-
1
)
}
// console.log(item);
}
}
}
}
}
}
...
@@ -551,8 +556,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -551,8 +556,8 @@ export default class FixedAssetsMovement extends Component {
// console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5])
// console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') {
// if (tableMeta.rowData[5] == 'Beginning Balance') {
//
console.log(baru)
//
console.log(baru)
//
console.log(anjay)
//
console.log(anjay)
// console.log(total)
// console.log(total)
// }
// }
...
...
src/container/HomePage.js
View file @
fb040c34
...
@@ -23,6 +23,8 @@ class HomePage extends Component {
...
@@ -23,6 +23,8 @@ class HomePage extends Component {
{
nama
:
'Daya Group'
,
status
:
'open'
},
{
nama
:
'Daya Group'
,
status
:
'open'
},
],
],
isApprover
:
true
,
isApprover
:
true
,
listSubcoMB
:
[],
valueSubmit
:
0
,
listdmb
:
[],
listdmb
:
[],
dataTableMB
:
[]
dataTableMB
:
[]
}
}
...
@@ -49,6 +51,7 @@ class HomePage extends Component {
...
@@ -49,6 +51,7 @@ class HomePage extends Component {
// }
// }
// })
// })
this
.
getApprMat
()
this
.
getApprMat
()
this
.
getListUserSubco
()
this
.
getDashboardMB
()
this
.
getDashboardMB
()
}
}
...
@@ -59,6 +62,26 @@ class HomePage extends Component {
...
@@ -59,6 +62,26 @@ class HomePage extends Component {
}
}
}
}
getListUserSubco
()
{
api
.
create
().
getDashboardUser
().
then
(
response
=>
{
console
.
log
(
response
);
let
valueSubmit
=
0
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
is_submit
===
true
)
{
valueSubmit
+=
1
}
})
this
.
setState
({
listSubcoMB
:
response
.
data
.
data
,
valueSubmit
})
}
}
})
}
getDashboard
()
{
getDashboard
()
{
let
listDashboard
=
[]
let
listDashboard
=
[]
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
api
.
create
().
getDashboard
().
then
((
response
)
=>
{
...
@@ -77,14 +100,14 @@ class HomePage extends Component {
...
@@ -77,14 +100,14 @@ class HomePage extends Component {
api
.
create
().
getAM
().
then
((
response
)
=>
{
api
.
create
().
getAM
().
then
((
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
let
actAM
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
actAM
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
)
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
)
{
return
item
return
item
}
}
})
})
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
let
indexId
=
actAM
.
findIndex
((
val
)
=>
val
.
user_id
==
userId
)
if
(
indexId
===
-
1
){
if
(
indexId
===
-
1
)
{
this
.
setState
({
isApprover
:
false
})
this
.
setState
({
isApprover
:
false
})
}
}
console
.
log
(
actAM
)
console
.
log
(
actAM
)
...
@@ -223,7 +246,7 @@ class HomePage extends Component {
...
@@ -223,7 +246,7 @@ class HomePage extends Component {
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
{
/*
<div style={{ marginTop: 20 }}>
<Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Status Laporan</Typography>
<Typography style={{ color: '#656565', fontSize: '16px', fontWeight: 'bold' }}>Status Laporan</Typography>
<div style={{ marginTop: 10, display: 'flex' }}>
<div style={{ marginTop: 10, display: 'flex' }}>
<div style={{ width: 280, height: 400, padding: 20, backgroundColor: 'white', borderRadius: 6, border: 'solid 1px #c4c4c4', marginRight: 25 }}>
<div style={{ width: 280, height: 400, padding: 20, backgroundColor: 'white', borderRadius: 6, border: 'solid 1px #c4c4c4', marginRight: 25 }}>
...
@@ -350,7 +373,7 @@ class HomePage extends Component {
...
@@ -350,7 +373,7 @@ class HomePage extends Component {
</div>
</div>
</div>
</div>
</div>
</div>
<
/div
>
</div>
*/
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
:
:
...
@@ -364,16 +387,33 @@ class HomePage extends Component {
...
@@ -364,16 +387,33 @@ class HomePage extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
width
:
4
0
0
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Paper
style
=
{{
width
:
4
5
0
,
padding
:
20
,
borderRadius
:
10
}}
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
Master
Budget
-
Oct
2020
(
1
/
4
)
<
/Typography
>
<
Typography
style
=
{{
fontWeight
:
'bold'
,
textDecorationLine
:
'underline'
}}
>
{
`Master Budget
${
this
.
state
.
valueSubmit
}
/
${
this
.
state
.
listSubcoMB
.
length
}
`
}
<
/Typography
>
{
this
.
state
.
list
MasterBudget
.
map
((
item
,
index
)
=>
{
{
this
.
state
.
list
SubcoMB
.
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
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
img
src
=
{
item
.
status
===
"overdue"
?
Images
.
dotOverdue
:
item
.
status
===
"open"
?
Images
.
dotOpen
:
Images
.
dotDone
}
/
>
<
img
src
=
{
item
.
is_submit
===
true
?
Images
.
dotDone
:
item
.
is_overdue
===
true
?
Images
.
dotOverdue
:
Images
.
dotOpen
}
/
>
<
Typography
style
=
{{
marginLeft
:
10
,
color
:
'#5198ea'
,
fontSize
:
13
}}
>
{
item
.
nama
}
<
/Typography
>
<
Link
to
=
{{
pathname
:
`/home/master-budget/`
,
state
:
{
userType
:
'user'
,
rawData
:
item
}
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
margin
:
5
,
outline
:
'none'
}}
>
<
Typography
style
=
{{
marginLeft
:
10
,
color
:
'#5198ea'
,
fontSize
:
13
}}
>
{
item
.
company_name
}
<
/Typography
>
<
/button
>
<
/Link
>
<
/div
>
<
/div
>
{
item
.
status
===
'overdue'
&&
(
{
item
.
is_overdue
&&
(
<
div
style
=
{{
backgroundColor
:
'#f65a4c'
,
paddingRight
:
5
,
paddingLeft
:
5
,
borderRadius
:
5
,
alignSelf
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#f65a4c'
,
paddingRight
:
5
,
paddingLeft
:
5
,
borderRadius
:
5
,
alignSelf
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
color
:
'#fff'
}}
>
Overdue
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
color
:
'#fff'
}}
>
Overdue
<
/Typography
>
<
/div
>
<
/div
>
...
@@ -387,6 +427,7 @@ class HomePage extends Component {
...
@@ -387,6 +427,7 @@ class HomePage extends Component {
}
}
<
/div
>
<
/div
>
);
);
}
}
}
}
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
fb040c34
...
@@ -240,6 +240,7 @@ export default class OperatingIndicator extends Component {
...
@@ -240,6 +240,7 @@ export default class OperatingIndicator extends Component {
options
:
periodeData
,
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
console
.
log
(
defaultProps
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
...
@@ -554,13 +555,13 @@ export default class OperatingIndicator extends Component {
...
@@ -554,13 +555,13 @@ export default class OperatingIndicator extends Component {
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
isSubmit
&&
(
{
/* {
this.state.isSubmit && (
<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' }} >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Submit</Typography>
</div>
</div>
</div>
</div>
)}
)}
*/
}
<
/Paper
>
<
/Paper
>
<
/div
>
<
/div
>
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
fb040c34
...
@@ -92,7 +92,7 @@ export default class BalanceSheet extends Component {
...
@@ -92,7 +92,7 @@ export default class BalanceSheet extends Component {
console
.
log
(
response
)
console
.
log
(
response
)
let
dataTable
=
[]
let
dataTable
=
[]
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
// console.log(res)
// console.log(res)
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
...
@@ -118,6 +118,7 @@ export default class BalanceSheet extends Component {
...
@@ -118,6 +118,7 @@ export default class BalanceSheet extends Component {
item
.
master_budget
.
november
==
""
?
item
.
master_budget
.
november
:
String
(
item
.
master_budget
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
november
)
:
Number
(
item
.
master_budget
.
november
).
toFixed
(
1
),
item
.
master_budget
.
november
==
""
?
item
.
master_budget
.
november
:
String
(
item
.
master_budget
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
november
)
:
Number
(
item
.
master_budget
.
november
).
toFixed
(
1
),
item
.
master_budget
.
december
==
""
?
item
.
master_budget
.
december
:
String
(
item
.
master_budget
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
december
)
:
Number
(
item
.
master_budget
.
december
).
toFixed
(
1
),
item
.
master_budget
.
december
==
""
?
item
.
master_budget
.
december
:
String
(
item
.
master_budget
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
december
)
:
Number
(
item
.
master_budget
.
december
).
toFixed
(
1
),
item
.
master_budget
.
total_current_year
==
""
?
item
.
master_budget
.
total_current_year
:
String
(
item
.
master_budget
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
total_current_year
)
:
Number
(
item
.
master_budget
.
total_current_year
).
toFixed
(
1
),
item
.
master_budget
.
total_current_year
==
""
?
item
.
master_budget
.
total_current_year
:
String
(
item
.
master_budget
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
total_current_year
)
:
Number
(
item
.
master_budget
.
total_current_year
).
toFixed
(
1
),
item
.
order
])
])
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -151,6 +152,7 @@ export default class BalanceSheet extends Component {
...
@@ -151,6 +152,7 @@ export default class BalanceSheet extends Component {
item
.
master_budget
.
november
==
""
?
item
.
master_budget
.
november
:
String
(
item
.
master_budget
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
november
)
:
Number
(
item
.
master_budget
.
november
).
toFixed
(
1
),
item
.
master_budget
.
november
==
""
?
item
.
master_budget
.
november
:
String
(
item
.
master_budget
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
november
)
:
Number
(
item
.
master_budget
.
november
).
toFixed
(
1
),
item
.
master_budget
.
december
==
""
?
item
.
master_budget
.
december
:
String
(
item
.
master_budget
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
december
)
:
Number
(
item
.
master_budget
.
december
).
toFixed
(
1
),
item
.
master_budget
.
december
==
""
?
item
.
master_budget
.
december
:
String
(
item
.
master_budget
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
december
)
:
Number
(
item
.
master_budget
.
december
).
toFixed
(
1
),
item
.
master_budget
.
total_current_year
==
""
?
item
.
master_budget
.
total_current_year
:
String
(
item
.
master_budget
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
total_current_year
)
:
Number
(
item
.
master_budget
.
total_current_year
).
toFixed
(
1
),
item
.
master_budget
.
total_current_year
==
""
?
item
.
master_budget
.
total_current_year
:
String
(
item
.
master_budget
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
master_budget
.
total_current_year
)
:
Number
(
item
.
master_budget
.
total_current_year
).
toFixed
(
1
),
item
.
order
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
...
@@ -382,6 +384,7 @@ export default class BalanceSheet extends Component {
...
@@ -382,6 +384,7 @@ export default class BalanceSheet extends Component {
item
.
november
,
item
.
november
,
item
.
december
,
item
.
december
,
item
.
total_current_year
,
item
.
total_current_year
,
item
.
order
,
item
.
error
item
.
error
]
]
})
})
...
@@ -474,21 +477,25 @@ export default class BalanceSheet extends Component {
...
@@ -474,21 +477,25 @@ export default class BalanceSheet extends Component {
return
total
return
total
}
}
const
handleFormula
=
(
data
,
tableMeta
)
=>
{
const
handleFormula
=
(
tableMeta
)
=>
{
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
let
arrayFormulaConvert
=
[]
// console.log(arrayFormula)
arrayFormula
.
map
((
item
,
indexs
)
=>
{
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
if
(
index
>
0
)
{
arrayFormulaConvert
.
push
(
item
)
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
}
else
{
}
else
{
arrayJumlah
.
push
(
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
21
]
==
item
)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
// console.log(dataTable2[indexID])
arrayFormulaConvert
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
}
// if (indexs % 2 !== 0) {
// operator.push(item)
// }
})
})
let
array
=
arrayJumlah
// console.log(arrayFormula)
// console.log(arrayFormulaConvert)
let
array
=
arrayFormulaConvert
let
total
=
0
let
total
=
0
let
opt
=
""
let
opt
=
""
array
.
map
((
item
,
index
)
=>
{
array
.
map
((
item
,
index
)
=>
{
...
@@ -558,9 +565,9 @@ export default class BalanceSheet extends Component {
...
@@ -558,9 +565,9 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
:
tableMeta
.
rowData
[
2
1
]
?
tableMeta
.
rowData
[
2
2
]
?
tableMeta
.
rowData
[
2
1
].
length
>
0
?
tableMeta
.
rowData
[
2
2
].
length
>
0
?
tableMeta
.
rowData
[
2
1
][
0
].
field
===
'item'
?
tableMeta
.
rowData
[
2
2
][
0
].
field
===
'item'
?
tableMeta
.
rowData
[
4
]
==
0
?
tableMeta
.
rowData
[
4
]
==
0
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
22
][
0
].
message
}
data
-
for
=
"account"
>
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
22
][
0
].
message
}
data
-
for
=
"account"
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
,
color
:
'red'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
,
color
:
'red'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
...
@@ -682,6 +689,30 @@ export default class BalanceSheet extends Component {
...
@@ -682,6 +689,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -703,7 +734,7 @@ export default class BalanceSheet extends Component {
...
@@ -703,7 +734,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -725,6 +756,30 @@ export default class BalanceSheet extends Component {
...
@@ -725,6 +756,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -736,8 +791,8 @@ export default class BalanceSheet extends Component {
...
@@ -736,8 +791,8 @@ export default class BalanceSheet extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -746,7 +801,7 @@ export default class BalanceSheet extends Component {
...
@@ -746,7 +801,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -767,6 +822,7 @@ export default class BalanceSheet extends Component {
...
@@ -767,6 +822,7 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -774,12 +830,12 @@ export default class BalanceSheet extends Component {
...
@@ -774,12 +830,12 @@ export default class BalanceSheet extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -789,6 +845,29 @@ export default class BalanceSheet extends Component {
...
@@ -789,6 +845,29 @@ export default class BalanceSheet extends Component {
}
}
/
>
/
>
<
/div
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -809,6 +888,7 @@ export default class BalanceSheet extends Component {
...
@@ -809,6 +888,7 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -816,12 +896,12 @@ export default class BalanceSheet extends Component {
...
@@ -816,12 +896,12 @@ export default class BalanceSheet extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -831,6 +911,29 @@ export default class BalanceSheet extends Component {
...
@@ -831,6 +911,29 @@ export default class BalanceSheet extends Component {
}
}
/
>
/
>
<
/div
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -851,6 +954,30 @@ export default class BalanceSheet extends Component {
...
@@ -851,6 +954,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -861,9 +988,9 @@ export default class BalanceSheet extends Component {
...
@@ -861,9 +988,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -872,7 +999,7 @@ export default class BalanceSheet extends Component {
...
@@ -872,7 +999,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -893,6 +1020,7 @@ export default class BalanceSheet extends Component {
...
@@ -893,6 +1020,7 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -900,12 +1028,12 @@ export default class BalanceSheet extends Component {
...
@@ -900,12 +1028,12 @@ export default class BalanceSheet extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -915,6 +1043,29 @@ export default class BalanceSheet extends Component {
...
@@ -915,6 +1043,29 @@ export default class BalanceSheet extends Component {
}
}
/
>
/
>
<
/div
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -935,6 +1086,30 @@ export default class BalanceSheet extends Component {
...
@@ -935,6 +1086,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -945,9 +1120,9 @@ export default class BalanceSheet extends Component {
...
@@ -945,9 +1120,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -956,7 +1131,7 @@ export default class BalanceSheet extends Component {
...
@@ -956,7 +1131,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -977,6 +1152,30 @@ export default class BalanceSheet extends Component {
...
@@ -977,6 +1152,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -987,9 +1186,9 @@ export default class BalanceSheet extends Component {
...
@@ -987,9 +1186,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -998,7 +1197,7 @@ export default class BalanceSheet extends Component {
...
@@ -998,7 +1197,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1019,6 +1218,30 @@ export default class BalanceSheet extends Component {
...
@@ -1019,6 +1218,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -1029,9 +1252,9 @@ export default class BalanceSheet extends Component {
...
@@ -1029,9 +1252,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -1040,7 +1263,7 @@ export default class BalanceSheet extends Component {
...
@@ -1040,7 +1263,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1061,6 +1284,30 @@ export default class BalanceSheet extends Component {
...
@@ -1061,6 +1284,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -1071,9 +1318,9 @@ export default class BalanceSheet extends Component {
...
@@ -1071,9 +1318,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -1082,7 +1329,7 @@ export default class BalanceSheet extends Component {
...
@@ -1082,7 +1329,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1103,6 +1350,30 @@ export default class BalanceSheet extends Component {
...
@@ -1103,6 +1350,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -1113,9 +1384,9 @@ export default class BalanceSheet extends Component {
...
@@ -1113,9 +1384,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -1124,7 +1395,7 @@ export default class BalanceSheet extends Component {
...
@@ -1124,7 +1395,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1145,6 +1416,30 @@ export default class BalanceSheet extends Component {
...
@@ -1145,6 +1416,30 @@ export default class BalanceSheet extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
null
:
:
(
tableMeta
.
rowData
[
0
]
==
5
||
tableMeta
.
rowData
[
0
]
==
6
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div
>
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -1155,9 +1450,9 @@ export default class BalanceSheet extends Component {
...
@@ -1155,9 +1450,9 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
disabled
=
{
!
this
.
props
.
permission
.
create
||
!
this
.
props
.
permission
.
edit
||
!
this
.
props
.
isSubmit
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
@@ -1166,7 +1461,7 @@ export default class BalanceSheet extends Component {
...
@@ -1166,7 +1461,7 @@ export default class BalanceSheet extends Component {
/
>
/
>
}
}
/
>
/
>
<
/div
>
<
/div>
)
}
}
<
/div
>
<
/div
>
)
)
...
...
src/container/OutlookPA.js
View file @
fb040c34
...
@@ -15,6 +15,7 @@ import Constant from '../library/Constant';
...
@@ -15,6 +15,7 @@ import Constant from '../library/Constant';
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
BalanceSheetOLPA
from
'./OutlookPA/BalanceSheetOLPA'
;
import
BalanceSheetOLPA
from
'./OutlookPA/BalanceSheetOLPA'
;
import
moment
from
'moment'
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -57,11 +58,16 @@ export default class OutlookPA extends Component {
...
@@ -57,11 +58,16 @@ export default class OutlookPA extends Component {
checkApprover
:
false
,
checkApprover
:
false
,
lastPeriod
:
''
,
lastPeriod
:
''
,
latestPeriode
:
''
,
latestPeriode
:
''
,
minDateRevision
:
new
Date
(),
maxDateRevision
:
new
Date
(),
btnApprove
:
false
btnApprove
:
false
}
}
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
scrollToMyRef
=
()
=>
window
.
scrollTo
(
0
,
this
.
myRef
.
current
.
offsetTop
)
componentDidMount
()
{
componentDidMount
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
this
.
props
.
selectIndex
(
'Outlook Performance Appraisal'
)
this
.
props
.
selectIndex
(
'Outlook Performance Appraisal'
)
...
@@ -306,7 +312,8 @@ export default class OutlookPA extends Component {
...
@@ -306,7 +312,8 @@ export default class OutlookPA extends Component {
options
:
periodeData
,
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
(
this
.
state
.
latestPeriode
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
latestPeriode
))
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
// console.log(data)
// console.log(data)
console
.
log
(
this
.
state
.
lastPeriod
)
console
.
log
(
this
.
state
.
lastPeriod
)
// console.log(periodeData)
// console.log(periodeData)
...
@@ -400,7 +407,8 @@ export default class OutlookPA extends Component {
...
@@ -400,7 +407,8 @@ export default class OutlookPA extends Component {
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
return
[
return
[
item
.
pic
,
item
.
pic
,
String
(
item
.
status_approval
).
replace
(
'APPROVAL_PROCCESS'
,
'WAITING FOR APPROVAL'
).
replace
(
'- -'
,
''
),
item
.
status_approval
,
// String(item.status_approval).replace('APPROVAL_PROCCESS', 'WAITING FOR APPROVAL').replace('- -', ''),
item
.
remarks
,
item
.
remarks
,
item
.
item_revision
,
item
.
item_revision
,
item
.
history_approval_date
item
.
history_approval_date
...
@@ -412,24 +420,26 @@ export default class OutlookPA extends Component {
...
@@ -412,24 +420,26 @@ export default class OutlookPA extends Component {
}
}
approvalSubmission
(
type
)
{
approvalSubmission
(
type
)
{
this
.
scrollToMyRef
()
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
body
=
{
let
body
=
{
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"status"
:
type
,
"status"
:
type
,
"detail"
:
this
.
state
.
detailRevisiCheck
"detail"
:
this
.
state
.
detailRevisiCheck
}
}
api
.
create
().
approvalSubmissionOLPA
(
body
).
then
((
res
)
=>
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"min_periode"
:
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY-MM-DD'
),
"max_periode"
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY-MM-DD'
)
}
console
.
log
(
payload
)
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
data
)
{
this
.
setState
({
loading
:
false
},
()
=>
{
if
(
res
.
data
.
status
===
"success"
)
{
this
.
getSubmission
()
this
.
getOutlookPAID
()
})
}
else
{
if
(
type
==
'revision'
)
{
this
.
setState
({
loading
:
false
})
api
.
create
().
createPeriodeRevision
(
payload
).
then
((
res
)
=>
console
.
log
(
res
))
alert
(
res
.
data
.
message
)
}
}
else
{
this
.
setState
({
loading
:
false
})
alert
(
res
.
problem
)
}
}
})
})
}
}
...
@@ -551,12 +561,14 @@ export default class OutlookPA extends Component {
...
@@ -551,12 +561,14 @@ export default class OutlookPA extends Component {
this
.
getOutlookPAID
()
this
.
getOutlookPAID
()
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
alert
(
response
.
data
.
message
)
// alert(response.data.message)
this
.
getOutlookPAID
()
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
alert
(
response
.
problem
)
// alert(response.problem)
this
.
getOutlookPAID
()
})
})
}
}
})
})
...
@@ -587,12 +599,12 @@ export default class OutlookPA extends Component {
...
@@ -587,12 +599,12 @@ export default class OutlookPA extends Component {
let
array
=
[]
let
array
=
[]
let
canSubmit
=
true
let
canSubmit
=
true
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
1
]
!==
'Cash Flow'
)
{
//
if (item[1] !== 'Cash Flow') {
if
(
item
[
3
]
!==
"submitted"
&&
item
[
3
]
!==
'approved'
)
{
//
if (item[3] !== "submitted" && item[3] !== 'approved') {
canSubmit
=
false
//
canSubmit = false
array
.
push
(
item
[
3
])
//
array.push(item[3])
}
//
}
}
//
}
// if (item[3].includes("not-yet") || item[3].includes("draft")) {
// if (item[3].includes("not-yet") || item[3].includes("draft")) {
// array.push(item[3])
// array.push(item[3])
// } else {
// } else {
...
@@ -623,6 +635,10 @@ export default class OutlookPA extends Component {
...
@@ -623,6 +635,10 @@ export default class OutlookPA extends Component {
}
}
render
()
{
render
()
{
const
handleMaxDate
=
()
=>
{
let
handleDate
=
Number
(
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYYMMDD'
))
-
Number
(
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYYMMDD'
))
return
handleDate
<
0
?
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY/MM/DD'
)
}
const
columns
=
[
"#"
,
"Report Type"
,
const
columns
=
[
"#"
,
"Report Type"
,
{
{
name
:
"Revision"
,
name
:
"Revision"
,
...
@@ -694,20 +710,20 @@ export default class OutlookPA extends Component {
...
@@ -694,20 +710,20 @@ export default class OutlookPA extends Component {
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
// cursor: tableMeta.rowData[5] ? 'pointer' : 'default',
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
isSubmit
===
false
?
null
:
tableMeta
.
rowData
[
5
]
==
true
?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
:
null
}
}
>
>
{
/* {this.state.isApprover == true ?
{
/* {this.state.isApprover == true ?
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[3] !== 'submitted' ? '#5198ea' : 'GrayText'))} */
}
(tableMeta.rowData[3] !== 'submitted' ? '#5198ea' : 'GrayText'))} */
}
<
Typography
style
=
{{
color
:
t
his
.
state
.
isSubmit
===
false
?
'GrayText'
:
t
ableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
);
);
...
@@ -823,6 +839,18 @@ export default class OutlookPA extends Component {
...
@@ -823,6 +839,18 @@ export default class OutlookPA extends Component {
pagination
:
false
,
pagination
:
false
,
search
:
false
search
:
false
}
}
const
optionsHistory
=
{
filter
:
false
,
sort
:
false
,
responsive
:
"scroll"
,
print
:
false
,
download
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
pagination
:
true
,
search
:
false
,
rowsPerPage
:
5
}
const
optionsRevision
=
{
const
optionsRevision
=
{
filter
:
false
,
filter
:
false
,
sort
:
false
,
sort
:
false
,
...
@@ -845,7 +873,7 @@ export default class OutlookPA extends Component {
...
@@ -845,7 +873,7 @@ export default class OutlookPA extends Component {
<
/div
>
<
/div
>
);
);
return
(
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
ref
=
{
this
.
myRef
}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
{
this
.
state
.
messageAlert
}
...
@@ -977,24 +1005,25 @@ export default class OutlookPA extends Component {
...
@@ -977,24 +1005,25 @@ export default class OutlookPA extends Component {
<
/div
>
<
/div
>
{
!
this
.
state
.
isApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
{
!
this
.
state
.
isApprover
&&
(
this
.
state
.
lastStatus
===
'SUBMIT'
||
this
.
state
.
lastStatus
===
'REVISION'
)
&&
(
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
state
.
listAttachment
.
length
>
0
?
{
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
this
.
state
.
listAttachment
.
length
>
0
?
return
(
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
<
button
return
(
style
=
{{
<
button
backgroundColor
:
'transparent'
,
style
=
{{
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
backgroundColor
:
'transparent'
,
borderColor
:
'transparent'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
outline
:
'none'
,
borderColor
:
'transparent'
,
display
:
'grid'
outline
:
'none'
,
}}
display
:
'grid'
onClick
=
{()
=>
this
.
state
.
isSubmit
===
false
?
null
:
this
.
deleteAttachment
(
item
)}
}}
>
onClick
=
{()
=>
this
.
state
.
isSubmit
===
false
?
null
:
this
.
deleteAttachment
(
item
)}
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
this
.
state
.
isSubmit
===
false
?
'GrayText'
:
'#ff3939'
}}
>
Delete
<
/Typography
>
>
<
/button
>
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
this
.
state
.
isSubmit
===
false
?
'GrayText'
:
'#ff3939'
}}
>
Delete
<
/Typography
>
)
<
/button
>
})
)
:
null
})
:
null
}
}
<
/div
>
<
/div
>
)}
)}
...
@@ -1006,7 +1035,13 @@ export default class OutlookPA extends Component {
...
@@ -1006,7 +1035,13 @@ export default class OutlookPA extends Component {
<
/div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL'
?
<
/div> : this.state.lastStatus === 'WAITING FOR YOUR APPROVAL'
?
<
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
>
{
this
.
state
.
lastStatus
}
<
/span
>
<
span
>
{
this
.
state
.
lastStatus
}
<
/span
>
<
/div> : nul
l
<
/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
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
{
`
${
this
.
state
.
lastStatus
}
`
}
<
/span
>
<
/div> : nul
l
:
:
this
.
state
.
lastStatus
===
'SUBMITTED'
?
this
.
state
.
lastStatus
===
'SUBMITTED'
?
<
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
}}
>
...
@@ -1177,7 +1212,7 @@ export default class OutlookPA extends Component {
...
@@ -1177,7 +1212,7 @@ export default class OutlookPA extends Component {
getReport
=
{
this
.
getOutlookPAID
.
bind
(
this
)}
getReport
=
{
this
.
getOutlookPAID
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)}
...
@@ -1197,7 +1232,7 @@ export default class OutlookPA extends Component {
...
@@ -1197,7 +1232,7 @@ export default class OutlookPA extends Component {
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)}
...
@@ -1217,7 +1252,7 @@ export default class OutlookPA extends Component {
...
@@ -1217,7 +1252,7 @@ export default class OutlookPA extends Component {
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)}
...
@@ -1241,7 +1276,7 @@ export default class OutlookPA extends Component {
...
@@ -1241,7 +1276,7 @@ export default class OutlookPA extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"border-bottom"
style
=
{{
padding
:
20
}}
>
<
div
className
=
"border-bottom"
style
=
{{
padding
:
20
}}
>
<
span
>
Anda
meminta
anak
perusahaan
untuk
melakukan
revisi
.
<
/span
>
<
span
>
You
ask
your
subsidiary
to
make
a
revision
<
/span
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
...
@@ -1252,7 +1287,7 @@ export default class OutlookPA extends Component {
...
@@ -1252,7 +1287,7 @@ export default class OutlookPA extends Component {
<
/MuiThemeProvider
>
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
span
>
Durasi
waktu
yang
anda
berikan
untuk
revisi
:
<
/span
>
<
span
>
Timing
duration
you
give
for
revision
:
<
/span
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginTop
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginTop
:
20
}}
>
<
div
>
<
div
>
<
DatePicker
<
DatePicker
...
@@ -1260,7 +1295,9 @@ export default class OutlookPA extends Component {
...
@@ -1260,7 +1295,9 @@ export default class OutlookPA extends Component {
id
=
"startDate"
id
=
"startDate"
label
=
"Valid From"
label
=
"Valid From"
format
=
"dd-MM-yyyy"
format
=
"dd-MM-yyyy"
onChange
=
{(
e
)
=>
null
}
// onChange={(e) => null}
onChange
=
{(
e
)
=>
this
.
setState
({
minDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)
},
()
=>
this
.
setState
({
maxDateRevision
:
handleMaxDate
()
}))}
value
=
{
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)}
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
...
@@ -1279,14 +1316,17 @@ export default class OutlookPA extends Component {
...
@@ -1279,14 +1316,17 @@ export default class OutlookPA extends Component {
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
<
/div
>
<
/div
>
<
span
style
=
{{
alignSelf
:
'center'
}}
>
Sampai
dengan
<
/span
>
<
span
style
=
{{
alignSelf
:
'center'
}}
>
Until
<
/span
>
<
div
>
<
div
>
<
DatePicker
<
DatePicker
margin
=
"normal"
margin
=
"normal"
id
=
"startDate"
id
=
"startDate"
label
=
"Valid To"
label
=
"Valid To"
format
=
"dd-MM-yyyy"
format
=
"dd-MM-yyyy"
onChange
=
{(
e
)
=>
null
}
// onChange={(e) => null}
onChange
=
{(
e
)
=>
this
.
setState
({
maxDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)
})}
minDate
=
{
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)}
value
=
{
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY/MM/DD'
)}
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
...
...
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