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
4da488cf
Commit
4da488cf
authored
Aug 24, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
bahasa See merge request
!161
parents
6e15c15d
7b82e08b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
54 deletions
+65
-54
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-0
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+14
-4
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+23
-23
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+10
-10
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+3
-3
CreateUnitBisnis.js
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
+14
-14
No files found.
src/container/BudgetTahunan.js
View file @
4da488cf
...
...
@@ -287,6 +287,7 @@ export default class BudgetTahunan extends Component {
<
BalanceSheet
report_id
=
{
this
.
state
.
report_id
}
company_id
=
{
this
.
state
.
company
.
company_id
}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})}
/
>
)}
{
this
.
state
.
visiblePL
&&
(
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
4da488cf
...
...
@@ -40,12 +40,12 @@ export default class BalanceSheet extends Component {
}
}
componentDidMount
(){
componentDidMount
()
{
this
.
getItemHierarki
()
console
.
log
(
this
.
props
);
}
getItemHierarki
(){
getItemHierarki
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"company_id"
:
this
.
props
.
company_id
...
...
@@ -60,7 +60,7 @@ export default class BalanceSheet extends Component {
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
this
.
setState
({
data
:
a
},
()
=>
console
.
log
(
this
.
state
.
dataTable
))
},
()
=>
console
.
log
(
this
.
state
.
dataTable
))
// let a = data[0].tableMeta.tableData[tableMeta.rowIndex] === value
// console.log(data)
}
...
...
@@ -317,7 +317,17 @@ export default class BalanceSheet extends Component {
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
button
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
}}
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Kembali
<
/Typography
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
...
...
src/container/MasterData/Parameter/CreateParameter.js
View file @
4da488cf
...
...
@@ -334,25 +334,25 @@ export default class CreateParameter extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group
tidak boleh kosong
'
})
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter
tidak boleh kosong
'
})
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'
Perusahaan tidak boleh kosong
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'
Company is required
'
})
// } else if (R.isEmpty(this.state.tempData.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
// } else if (R.isEmpty(this.state.tempData.value)) {
// this.setState({ errorValue: true, msgErrorValue: 'Value tidak boleh kosong' })
}
else
if
((
!
R
.
isNil
(
this
.
state
.
tempData
.
max_value
)
&&
R
.
isNil
(
this
.
state
.
tempData
.
min_value
))
||
(
!
R
.
isNil
(
this
.
state
.
tempData
.
max_value
)
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
min_value
)))
{
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value
tidak boleh kosong
'
})
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Start Date
is required
'
})
// } else if (R.isNil(this.state.tempData.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
}
else
if
(
!
R
.
isNil
(
this
.
state
.
tempData
.
min_value
)
&&
R
.
isNil
(
this
.
state
.
tempData
.
max_value
))
{
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value
tidak boleh kosong
'
})
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'End Date
tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'End Date
is required
'
})
}
else
{
this
.
updateParameter
()
}
...
...
@@ -360,23 +360,23 @@ export default class CreateParameter extends Component {
validasiCreate
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group
tidak boleh kosong
'
})
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter
tidak boleh kosong
'
})
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Perusahaan
tidak boleh kosong
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Perusahaan
is required
'
})
// } else if (R.isEmpty(this.state.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
// } else if (R.isNil(this.state.value)) {
// this.setState({ errorValue: true, msgErrorValue: 'Value tidak boleh kosong' })
}
else
if
(
!
R
.
isNil
(
this
.
state
.
maxValue
)
&&
R
.
isNil
(
this
.
state
.
minValue
))
{
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value
tidak boleh kosong
'
})
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Start Date
tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Start Date
is required
'
})
// } else if (R.isNil(this.state.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
}
else
if
(
!
R
.
isNil
(
this
.
state
.
minValue
)
&&
R
.
isNil
(
this
.
state
.
maxValue
))
{
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value
tidak boleh kosong
'
})
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value
is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'End Date tidak boleh kosong'
})
}
else
{
...
...
@@ -566,7 +566,7 @@ export default class CreateParameter extends Component {
<
DatePicker
margin
=
"normal"
id
=
"start_date"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
start_date
}
error
=
{
this
.
state
.
errorStartDate
}
...
...
@@ -614,11 +614,11 @@ export default class CreateParameter extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Created
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
tempData
===
null
?
""
:
this
.
state
.
tempData
.
created
}
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Updated
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
tempData
===
null
?
""
:
this
.
state
.
tempData
.
updated
===
null
?
""
:
this
.
state
.
tempData
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
...
...
@@ -654,7 +654,7 @@ export default class CreateParameter extends Component {
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"
Perusahaan
"
/>
}
label
=
"
Company
"
/>
}
value
=
{
this
.
state
.
getPerusahaan
}
/
>
<
/div
>
...
...
@@ -714,7 +714,7 @@ export default class CreateParameter extends Component {
<
DatePicker
margin
=
"normal"
id
=
"end_date"
label
=
"
Berakhir Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
...
...
@@ -911,7 +911,7 @@ export default class CreateParameter extends Component {
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorStartDate
}
...
...
@@ -958,8 +958,8 @@ export default class CreateParameter extends Component {
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Dibuat
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Diubah
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Created
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Updated
:
<
/Typography
>
<
/div
>
<
/div
>
...
...
@@ -993,7 +993,7 @@ export default class CreateParameter extends Component {
{...
params
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"
Perusahaan
"
label
=
"
Company
"
error
=
{
this
.
state
.
errorPerusahaan
}
helperText
=
{
this
.
state
.
msgErrorPerusahaan
}
/>
}
...
...
@@ -1056,7 +1056,7 @@ export default class CreateParameter extends Component {
<
DatePicker
margin
=
"normal"
id
=
"endDate"
label
=
"
Berakhir Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
4da488cf
...
...
@@ -566,7 +566,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -577,7 +577,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -588,7 +588,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -599,7 +599,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -610,7 +610,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -621,7 +621,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -632,7 +632,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -643,7 +643,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -654,7 +654,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -665,7 +665,7 @@ export default class Parameter extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
10
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
src/container/MasterData/UnitBisnis.js
View file @
4da488cf
...
...
@@ -357,7 +357,7 @@ export default class UnitBisnis extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -368,7 +368,7 @@ export default class UnitBisnis extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -379,7 +379,7 @@ export default class UnitBisnis extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ktif
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
3
]
===
"A
ctive
"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
View file @
4da488cf
...
...
@@ -100,11 +100,11 @@ export default class CreateUnitBisnis extends Component {
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
name
))
{
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'
Unit Bisnis tidak boleh kosong
'
})
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'
Business Unit is required
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'
Tanggal Mulai tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'
Start Date is required
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
)
||
this
.
state
.
endDate
===
null
)
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'
Tanggal Berakhir tidak boleh kosong
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'
End Date is required
'
})
}
else
{
let
payload
=
{
"business_unit_id"
:
this
.
state
.
id
,
...
...
@@ -118,11 +118,11 @@ export default class CreateUnitBisnis extends Component {
validasiCreate
()
{
if
(
R
.
isEmpty
(
this
.
state
.
name
))
{
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'
Unit Bisnis tidak boleh kosong
'
})
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'
Business Unit is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'
Berlaku Mulai tidak boleh kosong
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'
Start Date is required
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'
Berkahir Hingga tidak boleh kosong'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'
End Date is required'
})
}
else
{
let
payload
=
{
"business_unit_name"
:
this
.
state
.
name
,
...
...
@@ -181,7 +181,7 @@ export default class CreateUnitBisnis extends Component {
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
...
...
@@ -228,11 +228,11 @@ export default class CreateUnitBisnis extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Created
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
created
}
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Updated
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
state
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
...
...
@@ -266,7 +266,7 @@ export default class CreateUnitBisnis extends Component {
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"
Berakhir Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
...
...
@@ -369,7 +369,7 @@ export default class CreateUnitBisnis extends Component {
<
DatePicker
margin
=
"normal"
id
=
"startDate"
label
=
"
Berlaku Mulai
"
label
=
"
Start Date
"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
...
...
@@ -415,8 +415,8 @@ export default class CreateUnitBisnis extends Component {
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Dibuat
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Diubah
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Created
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Updated
:
<
/Typography
>
<
/div
>
<
/div
>
...
...
@@ -448,7 +448,7 @@ export default class CreateUnitBisnis extends Component {
<
DatePicker
margin
=
"normal"
id
=
"endDate"
label
=
"
Berakhir Hingga
"
label
=
"
End Date
"
format
=
"dd MMMM yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
...
...
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