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
5718da83
Commit
5718da83
authored
Sep 07, 2020
by
a.bairuha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into syadziy
parents
d28b9c17
56353a9b
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
366 additions
and
120 deletions
+366
-120
App.js
src/App.js
+10
-1
index.js
src/api/index.js
+2
-0
app.css
src/assets/sass/app.css
+28
-0
ApprovalMatrix.js
src/container/ApprovalMatrix/ApprovalMatrix.js
+71
-16
CreateApprovalMatrix.js
src/container/ApprovalMatrix/CreateApprovalMatrix.js
+1
-1
PopUpDelete.js
src/container/ApprovalMatrix/PopUpDelete.js
+124
-0
BudgetTahunan.js
src/container/BudgetTahunan.js
+48
-18
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+22
-22
Home.js
src/container/Home.js
+1
-9
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+4
-4
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+19
-19
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+25
-26
CreateUnitBisnis.js
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
+4
-4
Profile.js
src/container/Profile.js
+2
-0
CustomTable.js
src/library/CustomTable.js
+5
-0
No files found.
src/App.js
View file @
5718da83
...
...
@@ -2,10 +2,19 @@ import React from 'react';
import
'./assets/sass/app.css'
;
import
Route
from
'./router'
import
'bootstrap/dist/css/bootstrap.min.css'
;
import
Constant
from
'./library/Constant'
;
if
(
sessionStorage
.
getItem
(
'reloaded'
)
!=
null
)
{
console
.
log
(
'page was reloaded'
);
}
else
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
}
sessionStorage
.
setItem
(
'reloaded'
,
'yes'
);
function
App
()
{
return
(
<
Route
/>
<
Route
/>
// <div className="App">
// <header className="App-header">
// <img src={logo} className="App-logo" alt="logo" />
...
...
src/api/index.js
View file @
5718da83
...
...
@@ -117,6 +117,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const
updateVAM
=
(
body
)
=>
api
.
post
(
'/approval_matrix/visual_approval_matrix'
,
body
)
const
checkUploadAM
=
(
body
)
=>
api
.
post
(
'/approval_matrix/check_import_approval_matrix'
,
body
)
const
uploadAM
=
(
body
)
=>
api
.
post
(
'approval_matrix/import_approval_matrix'
,
body
)
const
deleteAM
=
(
id
)
=>
api
.
post
(
`approval_matrix/delete_approval_matrix/
${
id
}
`
)
//User
const
getUser
=
()
=>
api
.
get
(
'user/get_all_user'
)
...
...
@@ -213,6 +214,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
updateVAM
,
checkUploadAM
,
uploadAM
,
deleteAM
,
getUser
,
getDetailUser
,
searchUser
,
...
...
src/assets/sass/app.css
View file @
5718da83
...
...
@@ -10,6 +10,34 @@
color: #273b80 !important;
}
.color-pallete1{
background-color: #273b80 !important;
}
.color-pallete2{
background-color: #1c71b8 !important;
}
.color-pallete3{
background-color: #37b5e6 !important;
}
.color-pallete4{
background-color: #07a7d0 !important;
}
.color-pallete5{
background-color: #768895 !important;
}
.color-pallete6{
background-color: #211e1e !important;
}
.color-pallete7{
background-color: #242021 !important;
}
.btn-save{
width: 102px;
height: 30px;
src/container/ApprovalMatrix/ApprovalMatrix.js
View file @
5718da83
...
...
@@ -11,6 +11,7 @@ import UploadFile from "../../library/Upload";
import
CreateApprovalMatrix
from
"./CreateApprovalMatrix"
;
import
EditApprovalMatrix
from
"./EditApprovalMatrix"
;
import
VisualisasiAM
from
"./VisualisasiAM"
;
import
PopUpDelete
from
"./PopUpDelete"
;
import
PopUpFailedSave
from
"../../library/PopUpFailedSave"
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
...
...
@@ -46,6 +47,7 @@ export default class ApprovalMatrix extends Component {
btnedit
:
false
,
load
:
false
,
judul
:
''
,
popupDel
:
false
,
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -355,7 +357,14 @@ export default class ApprovalMatrix extends Component {
rowData
:
index
,
visibleEdit
:
true
})
}
else
{
}
else
if
(
type
===
'delete'
)
{
console
.
log
(
"berhasil klik btn del"
)
this
.
setState
({
rowData
:
index
,
popupDel
:
true
})
}
else
{
this
.
setState
({
visibleCreate
:
true
})
...
...
@@ -539,10 +548,39 @@ export default class ApprovalMatrix extends Component {
this
.
setState
({
alert
:
false
})
}
deleteAM
=
(
payload
)
=>
{
this
.
setState
({
popupDel
:
false
})
api
.
create
().
deleteAM
(
payload
).
then
(
response
=>
{
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
this
.
getData
()
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
render
()
{
const
columns
=
[{
name
:
"Action"
,
options
:
{
filter
:
false
,
sort
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
...
...
@@ -560,6 +598,19 @@ export default class ApprovalMatrix extends Component {
<
img
src
=
{
Images
.
editCopy
}
/
>
<
/button
>
)}
{
this
.
state
.
btnedit
&&
(
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
marginLeft
:
10
}}
onClick
=
{()
=>
this
.
openPopUp
(
tableMeta
.
rowData
,
'delete'
)}
>
<
img
src
=
{
Images
.
visualisasi
}
/
>
<
/button
>
)}
<
/div
>
);
}
...
...
@@ -643,16 +694,16 @@ export default class ApprovalMatrix extends Component {
{
this
.
state
.
visibleAM
===
true
?
this
.
state
.
load
&&
(
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
195
,
width
:
'100%'
}}
/
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
<
div
class
=
"main-color"
style
=
{{
height
:
195
,
width
:
'100%'
}}
/
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
1
18
}}
>
<
label
style
=
{{
width
:
'
20%'
,
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
paddingTop
:
8
}}
>
Master
Data
-
Approval
Matrix
<
/label
>
<
div
style
=
{{
color
:
'white'
,
width
:
'50%'
,
height
:
37
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
,
borderRadius
:
6
,
paddingLeft
:
5
,
paddingRight
:
5
,
alignSelf
:
'center'
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
1
82
}}
>
<
label
style
=
{{
width
:
'
50%'
,
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Master
Data
-
Approval
Matrix
<
/label
>
{
/*
<div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
style={{ width: '100%' }}
...
...
@@ -661,15 +712,14 @@ export default class ApprovalMatrix extends Component {
onChange={(e) => this.handleInputChange(e.target.value)}
inputProps={{ 'aria-label': 'naked' }}
/>
<
/div
>
<
div
style
=
{{
width
:
'
3
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
</div>
*/
}
<
div
style
=
{{
width
:
'
5
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadFile
()}
...
...
@@ -685,7 +735,6 @@ export default class ApprovalMatrix extends Component {
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
...
...
@@ -701,7 +750,6 @@ export default class ApprovalMatrix extends Component {
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
,
margin
:
5
}}
onClick
=
{()
=>
this
.
downloadDataTable
()}
...
...
@@ -716,7 +764,6 @@ export default class ApprovalMatrix extends Component {
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
,
margin
:
5
}}
onClick
=
{()
=>
this
.
setState
({
visibleVisual
:
true
,
visibleAM
:
false
})}
...
...
@@ -732,7 +779,6 @@ export default class ApprovalMatrix extends Component {
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
padding
:
0
,
margin
:
5
,
marginRight
:
20
}}
...
...
@@ -769,10 +815,10 @@ export default class ApprovalMatrix extends Component {
/
>
:
<
div
style
=
{{
height
:
this
.
props
.
height
}}
>
<
div
class
=
"main-color"
style
=
{{
height
:
19
9
,
width
:
'100%'
}}
/
>
<
div
class
=
"main-color"
style
=
{{
height
:
19
5
,
width
:
'100%'
}}
/
>
<
div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
1
50
}}
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
1
65
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Preview
Data
<
/label
>
<
/div
>
<
div
style
=
{{
padding
:
25
}}
>
...
...
@@ -782,7 +828,7 @@ export default class ApprovalMatrix extends Component {
theme
=
{
getMuiTheme
()}
data
=
{
this
.
state
.
rows
}
columns
=
{
this
.
state
.
cols
}
options
=
{
options
2
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
)}
...
...
@@ -830,6 +876,15 @@ export default class ApprovalMatrix extends Component {
updateAM
=
{
this
.
updateAM
.
bind
(
this
)}
/
>
)}
{
this
.
state
.
popupDel
&&
(
<
PopUpDelete
type
=
{
"delete"
}
onClickClose
=
{()
=>
this
.
setState
({
popupDel
:
false
})}
data
=
{
this
.
state
.
rowData
}
// getList={() => this.getData.bind(this)}
deleteAM
=
{
this
.
deleteAM
.
bind
(
this
)}
/
>
)}
{
this
.
state
.
popupError
&&
(
<
PopUpFailedSave
onClickClose
=
{()
=>
this
.
setState
({
popupError
:
false
})}
/
>
)}
...
...
src/container/ApprovalMatrix/CreateApprovalMatrix.js
View file @
5718da83
...
...
@@ -218,7 +218,7 @@ export default class CreateApprovalMatrix extends Component {
this
.
setState
({
errorApproved
:
true
,
msgErrApproved
:
'Approver Name Cannot be Empty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
operatorId
))
{
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty.'
})
this
.
setState
({
errorOperator
:
true
,
msgErrOperator
:
'Operator Cannot be Empty.
Please Choose - Option
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty.'
})
...
...
src/container/ApprovalMatrix/PopUpDelete.js
0 → 100644
View file @
5718da83
import
React
,
{
Component
}
from
'react'
;
import
Images
from
'../../assets/Images'
;
import
{
Typography
}
from
'@material-ui/core'
;
import
api
from
"../../api"
;
import
Constant
from
'../../library/Constant'
;
export
default
class
PopUpDelete
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
id
:
''
,
getApprovedBy
:
null
,
getTypes
:
null
,
}
}
componentDidMount
()
{
if
(
this
.
props
.
type
===
'delete'
)
{
this
.
getDetailAM
()
}
}
getDetailAM
()
{
api
.
create
().
getDetailAM
(
this
.
props
.
data
[
1
]).
then
(
response
=>
{
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
this
.
setState
({
id
:
data
.
approval_matrix_id
,
getTypes
:
data
.
approval_type_name
,
getApprovedBy
:
data
.
fullname
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
// hapus(){
// this.setState({ popupDel: false })
// api.create().deleteAM(this.state.id).then(response => {
// console.log(response.data)
// if (response.data) {
// if (response.ok) {
// if (response.data.status == 'success') {
// // this.getData()
// this.props.getList()
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Token")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
// }
// })
// }
hapus
()
{
if
(
this
.
props
.
type
==
'delete'
)
{
let
payload
=
this
.
state
.
id
this
.
props
.
deleteAM
(
payload
)
}
}
render
()
{
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
,
padding
:
50
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
img
src
=
{
Images
.
failedCopy
}
/
>
<
/div
>
<
div
style
=
{{
display
:
'grid'
,
justifyContent
:
'center'
,
marginTop
:
20
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
14
,
fontWeight
:
'bold'
}}
>
Delete
{
this
.
state
.
getTypes
}
-
{
this
.
state
.
getApprovedBy
}
?
<
/span
>
{
/* <span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold' }}>
{`Please try again later.`}
</span> */
}
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'center'
,
marginTop
:
24
}}
>
<
button
className
=
{
"btn-save"
}
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
span
style
=
{{
color
:
'white'
}}
>
Cancel
<
/span
>
<
/button
>
<
button
className
=
{
"btn-save"
}
style
=
{{
marginLeft
:
50
}}
onClick
=
{()
=>
this
.
hapus
()}
>
<
span
style
=
{{
color
:
'white'
}}
>
Delete
<
/span
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
src/container/BudgetTahunan.js
View file @
5718da83
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
,
Select
,
FormControlLabel
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
,
Select
,
FormControlLabel
,
Snackbar
,
withStyles
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
Images
from
'../assets/Images'
;
import
BalanceSheet
from
'./BudgetTahunan/BalanceSheet'
;
import
api
from
'../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
{
titleCase
}
from
'../library/Utils'
;
import
ProfitLoss
from
'./BudgetTahunan/ProfitLoss'
;
import
TaxPlanning
from
'./BudgetTahunan/TaxPlanning'
;
...
...
@@ -13,6 +14,10 @@ import CorporateAnnualTarget from './BudgetTahunan/CorporateAnnualTarget';
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
UploadFile
from
"../library/Upload"
;
import
{
format
}
from
'date-fns'
;
import
Constant
from
'../library/Constant'
;
const
Alert
=
withStyles
({
})((
props
)
=>
<
MuiAlert
elevation
=
{
6
}
variant
=
"filled"
{...
props
}
/>
)
;
export
default
class
BudgetTahunan
extends
Component
{
constructor
(
props
)
{
...
...
@@ -33,7 +38,10 @@ export default class BudgetTahunan extends Component {
visibleCAT
:
false
,
listAttachment
:
[],
visibleUpload
:
false
,
revisionTable
:
null
revisionTable
:
null
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -88,6 +96,7 @@ export default class BudgetTahunan extends Component {
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
companyData
=
data
.
map
((
item
)
=>
{
...
...
@@ -104,10 +113,21 @@ export default class BudgetTahunan extends Component {
this
.
getPeriode
()
})
}
else
{
alert
(
response
.
data
.
message
)
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
listCompany
:
null
,
company
:
null
})
}
})
}
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
...
...
@@ -264,6 +284,10 @@ export default class BudgetTahunan extends Component {
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
const
columns
=
[
"#"
,
"Jenis Laporan"
,
{
...
...
@@ -395,6 +419,11 @@ export default class BudgetTahunan extends Component {
]
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
Snackbar
open
=
{
this
.
state
.
alert
}
autoHideDuration
=
{
6000
}
onClose
=
{()
=>
this
.
closeAlert
()}
>
<
Alert
onClose
=
{()
=>
this
.
closeAlert
()}
severity
=
{
this
.
state
.
tipeAlert
}
>
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
{
this
.
state
.
visibleBudgetTahunan
&&
(
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
...
...
@@ -558,6 +587,7 @@ export default class BudgetTahunan extends Component {
{
this
.
state
.
visibleBS
&&
(
<
BalanceSheet
open
=
{
this
.
props
.
open
}
report_id
=
{
this
.
state
.
report_id
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
5718da83
...
...
@@ -764,7 +764,7 @@ export default class BalanceSheet extends Component {
name
:
"Account"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#
354960
'
,
width
:
300
}}
>
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#
1c71b8
'
,
width
:
300
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'left'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -787,8 +787,8 @@ export default class BalanceSheet extends Component {
name
:
"31 Dec 2020 Actual"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -859,7 +859,7 @@ export default class BalanceSheet extends Component {
name
:
"Jan 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -931,7 +931,7 @@ export default class BalanceSheet extends Component {
name
:
"Feb 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1003,7 +1003,7 @@ export default class BalanceSheet extends Component {
name
:
"Mar 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1075,7 +1075,7 @@ export default class BalanceSheet extends Component {
name
:
"Apr 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1147,7 +1147,7 @@ export default class BalanceSheet extends Component {
name
:
"May 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1219,7 +1219,7 @@ export default class BalanceSheet extends Component {
name
:
"Jun 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1291,7 +1291,7 @@ export default class BalanceSheet extends Component {
name
:
"Jul 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1363,7 +1363,7 @@ export default class BalanceSheet extends Component {
name
:
"Aug 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1435,7 +1435,7 @@ export default class BalanceSheet extends Component {
name
:
"Sep 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1507,7 +1507,7 @@ export default class BalanceSheet extends Component {
name
:
"Oct 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1579,7 +1579,7 @@ export default class BalanceSheet extends Component {
name
:
"Nov 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1651,7 +1651,7 @@ export default class BalanceSheet extends Component {
name
:
"Dec 2021"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
354960
'
,
width
:
96
}}
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#
1c71b8
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
...
...
@@ -1723,8 +1723,8 @@ export default class BalanceSheet extends Component {
name
:
"Current Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -1795,8 +1795,8 @@ export default class BalanceSheet extends Component {
name
:
"31 Dec 2022 Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -1867,8 +1867,8 @@ export default class BalanceSheet extends Component {
name
:
"31 Dec 2023 Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
54960
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
white
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#3
7b5e6
'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'
black
'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
...
...
@@ -1957,7 +1957,7 @@ export default class BalanceSheet extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
200
,
height
:
this
.
props
.
height
-
400
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
,
height
:
this
.
props
.
height
-
400
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
dataTable2
}
...
...
src/container/Home.js
View file @
5718da83
...
...
@@ -373,14 +373,6 @@ export default function MiniDrawer() {
})
}
if
(
sessionStorage
.
getItem
(
'reloaded'
)
!=
null
)
{
console
.
log
(
'page was reloaded'
);
}
else
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
}
sessionStorage
.
setItem
(
'reloaded'
,
'yes'
);
const
logout
=
()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
...
...
@@ -649,7 +641,7 @@ export default function MiniDrawer() {
key
=
{
index
}
path
=
{
route
.
path
}
// exact={route.exact}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
/>
}
children
=
{
<
route
.
main
height
=
{
height
}
width
=
{
width
}
open
=
{
open
}
/>
}
/>
))}
<
/Switch
>
...
...
src/container/MasterData/Parameter/CreateParameter.js
View file @
5718da83
...
...
@@ -678,7 +678,7 @@ export default class CreateParameter extends Component {
margin
=
"normal"
id
=
"start_date"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
start_date
}
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorStartDate
}
...
...
@@ -846,7 +846,7 @@ export default class CreateParameter extends Component {
margin
=
"normal"
id
=
"end_date"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
minDate
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
...
...
@@ -1057,7 +1057,7 @@ export default class CreateParameter extends Component {
margin
=
"normal"
id
=
"startDate"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
error
=
{
this
.
state
.
errorStartDate
}
helperText
=
{
this
.
state
.
msgErrorStartDate
}
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
...
...
@@ -1216,7 +1216,7 @@ export default class CreateParameter extends Component {
margin
=
"normal"
id
=
"endDate"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
minDate
=
{
this
.
state
.
startDate
}
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
5718da83
...
...
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import
{
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
Images
from
'../../../assets/Images'
;
import
MUIDataTable
from
"mui-datatables"
;
import
{
InputBase
,
Snackbar
,
withStyles
}
from
"@material-ui/core"
;
import
{
InputBase
,
Snackbar
,
withStyles
,
Typography
}
from
"@material-ui/core"
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
CreateParameter
from
'../Parameter/CreateParameter'
;
import
api
from
'../../../api'
;
...
...
@@ -268,16 +268,16 @@ export default class Parameter extends Component {
if
(
item
.
length
>
0
)
{
payload
.
push
({
id
:
index
+
1
,
group
:
item
[
0
],
parameter
:
item
[
1
],
company
:
item
[
2
],
group
:
item
[
0
]
===
undefined
?
""
:
item
[
0
]
,
parameter
:
item
[
1
]
===
undefined
?
""
:
item
[
1
]
,
company
:
item
[
2
]
===
undefined
?
""
:
item
[
2
]
,
description
:
item
[
3
],
orders
:
item
[
4
],
value
:
item
[
5
],
min_value
:
item
[
6
],
max_value
:
item
[
7
],
start_date
:
item
[
8
],
end_date
:
item
[
9
],
start_date
:
item
[
8
]
===
undefined
?
""
:
item
[
8
]
,
end_date
:
item
[
9
]
===
undefined
?
""
:
item
[
9
]
,
})
}
})
...
...
@@ -329,9 +329,9 @@ export default class Parameter extends Component {
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
11
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
11
][
check
].
message
}
data
-
for
=
"group"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"group"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -354,9 +354,9 @@ export default class Parameter extends Component {
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
11
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
11
][
check
].
message
}
data
-
for
=
"parameter"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"parameter"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -379,9 +379,9 @@ export default class Parameter extends Component {
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
11
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
11
][
check
].
message
}
data
-
for
=
"company"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"company"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -529,9 +529,9 @@ export default class Parameter extends Component {
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
11
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
11
][
check
].
message
}
data
-
for
=
"start_date"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"start_date"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -554,9 +554,9 @@ export default class Parameter extends Component {
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
11
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
11
][
check
].
message
}
data
-
for
=
"enddate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"enddate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -797,8 +797,8 @@ export default class Parameter extends Component {
{
this
.
state
.
visibleParameter
===
true
?
<
div
>
{
this
.
state
.
load
&&
(
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
18
0
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'
2
0%'
,
}}
>
Parameter
<
/label
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
18
2
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'
4
0%'
,
}}
>
Parameter
<
/label
>
{
/* <div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
...
...
@@ -809,7 +809,7 @@ export default class Parameter extends Component {
inputProps={{ 'aria-label': 'naked' }}
/>
</div> */
}
<
div
style
=
{{
width
:
'
3
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
width
:
'
4
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
...
...
src/container/MasterData/UnitBisnis.js
View file @
5718da83
...
...
@@ -59,14 +59,15 @@ export default class UnitBisnis extends Component {
}
else
{
let
isi
=
resp
.
rows
.
slice
(
3
)
console
.
log
(
isi
);
let
payload
=
[]
isi
.
map
((
item
,
index
)
=>
{
if
(
item
.
length
>
0
)
{
payload
.
push
({
id
:
index
+
1
,
business_unit_name
:
item
[
0
],
start_date
:
item
[
1
],
end_date
:
item
[
2
],
business_unit_name
:
item
[
0
]
===
undefined
?
""
:
item
[
0
]
,
start_date
:
item
[
1
]
==
undefined
?
""
:
item
[
1
]
,
end_date
:
item
[
2
]
===
undefined
?
""
:
item
[
2
]
,
})
}
})
...
...
@@ -88,7 +89,6 @@ export default class UnitBisnis extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
index
+
1
,
item
.
business_unit_name
,
item
.
start_date
,
item
.
end_date
,
...
...
@@ -96,25 +96,24 @@ export default class UnitBisnis extends Component {
]
})
let
columns
=
[
"Data"
,
{
name
:
"Business Unit"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
4
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'business_unit_name'
))
if
(
tableMeta
.
rowData
[
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'business_unit_name'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
4
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
4
][
check
].
message
}
data
-
for
=
"unitbisnis"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
{
tableMeta
.
rowData
[
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
3
][
check
].
message
}
data
-
for
=
"unitbisnis"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"unitbisnis"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -127,19 +126,19 @@ export default class UnitBisnis extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
4
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
tableMeta
.
rowData
[
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'start_date'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
4
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
4
][
check
].
message
}
data
-
for
=
"startdate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
{
tableMeta
.
rowData
[
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
3
][
check
].
message
}
data
-
for
=
"startdate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"startdate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -152,19 +151,19 @@ export default class UnitBisnis extends Component {
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
let
check
=
null
if
(
tableMeta
.
rowData
[
4
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
4
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
tableMeta
.
rowData
[
3
]
!=
null
)
{
check
=
tableMeta
.
rowData
[
3
].
findIndex
((
val
)
=>
val
.
field
.
includes
(
'end_date'
))
if
(
check
>
-
1
)
{
this
.
setState
({
buttonError
:
true
})
}
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
4
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
4
][
check
].
message
}
data
-
for
=
"enddate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
{
tableMeta
.
rowData
[
3
]
!=
null
&&
check
>
-
1
?
<
a
data
-
tip
=
{
tableMeta
.
rowData
[
3
][
check
].
message
}
data
-
for
=
"enddate"
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
<
/a>
:
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
check
!=
null
&&
check
>
-
1
?
"red"
:
'black'
}}
>
{
val
===
""
?
"-"
:
val
}
<
/span
>
}
<
ReactTooltip
border
=
{
true
}
id
=
"enddate"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
/div
>
...
...
@@ -511,8 +510,8 @@ export default class UnitBisnis extends Component {
{
this
.
state
.
visibleUnitBisnis
===
true
?
this
.
state
.
load
&&
(
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
18
0
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'
2
0%'
,
}}
>
Master
Data
-
Business
Unit
<
/label
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
18
2
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'
5
0%'
,
}}
>
Master
Data
-
Business
Unit
<
/label
>
{
/* <div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
...
...
@@ -523,7 +522,7 @@ export default class UnitBisnis extends Component {
inputProps={{ 'aria-label': 'naked' }}
/>
</div> */
}
<
div
style
=
{{
width
:
'
3
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
width
:
'
5
0%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
...
...
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
View file @
5718da83
...
...
@@ -215,7 +215,7 @@ export default class CreateUnitBisnis extends Component {
margin
=
"normal"
id
=
"startDate"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
...
...
@@ -300,7 +300,7 @@ export default class CreateUnitBisnis extends Component {
margin
=
"normal"
id
=
"startDate"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
minDate
=
{
this
.
state
.
startDate
}
...
...
@@ -403,7 +403,7 @@ export default class CreateUnitBisnis extends Component {
margin
=
"normal"
id
=
"startDate"
label
=
"Valid From"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
value
=
{
this
.
state
.
startDate
==
""
?
null
:
this
.
state
.
startDate
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'start_date'
)}
KeyboardButtonProps
=
{{
...
...
@@ -482,7 +482,7 @@ export default class CreateUnitBisnis extends Component {
margin
=
"normal"
id
=
"endDate"
label
=
"Valid To"
format
=
"dd
MMMM
yyyy"
format
=
"dd
-MM-
yyyy"
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorEndDate
}
minDate
=
{
this
.
state
.
startDate
}
...
...
src/container/Profile.js
View file @
5718da83
...
...
@@ -119,6 +119,8 @@ export default class Profile extends Component {
setTimeout
(()
=>
{
window
.
location
.
reload
();
},
1000
);
}
else
if
(
response
.
data
.
message
===
"Old Password is Not Correct"
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Incorrect password.'
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Token"
))
{
...
...
src/library/CustomTable.js
View file @
5718da83
...
...
@@ -166,6 +166,7 @@ exports.customTable = function () {
toolButton
:
{
display
:
"flex"
,
height
:
"auto"
,
whiteSpace
:
'nowrap'
},
data
:
{
display
:
"inline-block"
,
...
...
@@ -445,11 +446,15 @@ exports.customTable3 = function () {
fontSize
:
"10pt"
}
},
ColorPallete3
:
{
backgroundColor
:
'#37b5e6'
},
MuiTableCell
:
{
root
:
{
display
:
'table-cell'
,
padding
:
7
,
paddingLeft
:
25
,
paddingRight
:
25
,
fontSize
:
'0.875rem'
,
textAlign
:
'left'
,
fontFamily
:
"Roboto, Helvetica, Arial, sans-serif"
,
...
...
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