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
89d2526a
Commit
89d2526a
authored
Aug 28, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
a44dec44
535cc7f6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
908 additions
and
149 deletions
+908
-149
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-1
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+164
-12
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+435
-59
EmailVerification.js
src/container/EmailVerification.js
+1
-1
ForgotPassword.js
src/container/ForgotPassword.js
+2
-2
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+9
-9
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+14
-4
ResetPassword.js
src/container/ResetPassword.js
+2
-2
RollingOutlook.js
src/container/RollingOutlook.js
+278
-57
SetPassword.js
src/container/SetPassword.js
+2
-2
No files found.
src/container/BudgetTahunan.js
View file @
89d2526a
...
@@ -225,7 +225,7 @@ export default class BudgetTahunan extends Component {
...
@@ -225,7 +225,7 @@ export default class BudgetTahunan extends Component {
}
}
else
{
else
{
const
formData
=
new
FormData
();
const
formData
=
new
FormData
();
formData
.
append
(
"revision"
,
Number
(
this
.
state
.
revisi
));
formData
.
append
(
"revision"
,
Number
(
this
.
state
.
revisi
on
.
revision
));
formData
.
append
(
"companyId"
,
this
.
state
.
company
.
company_id
);
formData
.
append
(
"companyId"
,
this
.
state
.
company
.
company_id
);
formData
.
append
(
"periode"
,
Number
(
this
.
state
.
periode
.
periode
));
formData
.
append
(
"periode"
,
Number
(
this
.
state
.
periode
.
periode
));
formData
.
append
(
"file"
,
event
);
formData
.
append
(
"file"
,
event
);
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
89d2526a
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -25,32 +26,183 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -25,32 +26,183 @@ export default class CorporateAnnualTarget extends Component {
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
dataTable
:
[
dataTable
:
[
[
"FINANCIAL PERSPECTIVE"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
],
//
["FINANCIAL PERSPECTIVE", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181"],
[
"Control"
,
"-"
,
"-"
],
//
["Control", "-", "-"],
[
"Accumulated Depreciation (negative value)"
,
"2,647,647"
,
"2,058,898"
],
//
["Accumulated Depreciation (negative value)", "2,647,647", "2,058,898"],
[
"Control"
,
"-"
,
"-"
],
//
["Control", "-", "-"],
[
"Gain / (Loss) on Fixed Assets"
,
"-"
,
"-"
],
//
["Gain / (Loss) on Fixed Assets", "-", "-"],
[
"Control"
,
"-"
,
"-"
]
//
["Control", "-", "-"]
]
]
}
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getItemHierarki
()
console
.
log
(
this
.
props
);
console
.
log
(
this
.
props
);
}
}
getItemHierarki
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"company_id"
:
this
.
props
.
company
.
company_id
}
api
.
create
().
getItemReportHierarki
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
item
.
children
.
map
(
i
=>
{
if
(
i
.
children
)
{
if
(
i
.
children
.
length
>
0
)
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
i
.
children
.
map
(
val
=>
{
if
(
val
.
children
&&
val
.
children
.
length
>
0
)
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
val
.
children
.
map
(
items
=>
{
console
.
log
(
items
)
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
])
})
}
else
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
}
})
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
}
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
}
})
}
else
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
}
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
})
}
}
})
}
handleValue
(
data
)
{
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
total
+
0
)
:
(
total
+
item
[
data
.
columnIndex
])
}
})
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
==
this
.
state
.
dataTable
[
data
.
rowIndex
][
2
])
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
// console.log(indexParent);
return
a
}
handleChange
(
value
,
tableMeta
)
{
handleChange
(
value
,
tableMeta
)
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
data
=
this
.
state
.
dataTable
let
data
=
this
.
state
.
dataTable
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
this
.
setState
({
if
(
indexParent
>
0
)
{
data
:
a
console
.
log
(
indexParent
)
},
()
=>
console
.
log
(
this
.
state
.
dataTable
))
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
// let a = data[0].tableMeta.tableData[tableMeta.rowIndex] === value
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
// console.log(data)
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
this
.
forceUpdate
()
// console.log(this.state.dataTable)
// this.setState({
// data: a,
// }, () => console.log(this.state.dataTable))
}
}
render
()
{
render
()
{
const
columns
=
[{
const
columns
=
[{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
"Key Performance Indicator"
,
name
:
"Key Performance Indicator"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
89d2526a
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
...
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -25,32 +26,180 @@ export default class FixedAssetsMovement extends Component {
...
@@ -25,32 +26,180 @@ export default class FixedAssetsMovement extends Component {
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
dataTable
:
[
dataTable
:
[
[
"COST"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
,
"9,884,181"
],
//
["COST", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181", "9,884,181"],
[
"Control"
,
"-"
,
"-"
],
//
["Control", "-", "-"],
[
"Accumulated Depreciation (negative value)"
,
"2,647,647"
,
"2,058,898"
],
//
["Accumulated Depreciation (negative value)", "2,647,647", "2,058,898"],
[
"Control"
,
"-"
,
"-"
],
//
["Control", "-", "-"],
[
"Gain / (Loss) on Fixed Assets"
,
"-"
,
"-"
],
//
["Gain / (Loss) on Fixed Assets", "-", "-"],
[
"Control"
,
"-"
,
"-"
]
//
["Control", "-", "-"]
]
]
}
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getItemHierarki
()
console
.
log
(
this
.
props
);
console
.
log
(
this
.
props
);
}
}
getItemHierarki
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"company_id"
:
this
.
props
.
company
.
company_id
}
api
.
create
().
getItemReportHierarki
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
item
.
children
.
map
(
i
=>
{
if
(
i
.
children
)
{
if
(
i
.
children
.
length
>
0
)
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
i
.
children
.
map
(
val
=>
{
if
(
val
.
children
&&
val
.
children
.
length
>
0
)
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
val
.
children
.
map
(
items
=>
{
console
.
log
(
items
)
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
])
})
}
else
{
dataTable
.
push
([
val
.
type_report_id
,
val
.
id
,
val
.
parent
,
val
.
formula
,
val
.
level
,
val
.
description
])
}
})
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
}
}
else
{
dataTable
.
push
([
i
.
type_report_id
,
i
.
id
,
i
.
parent
,
i
.
formula
,
i
.
level
,
i
.
description
])
}
})
}
else
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
description
])
}
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
})
}
}
})
}
handleValue
(
data
)
{
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
total
+
0
)
:
(
total
+
item
[
data
.
columnIndex
])
}
})
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
==
this
.
state
.
dataTable
[
data
.
rowIndex
][
2
])
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
// console.log(indexParent);
return
a
}
handleChange
(
value
,
tableMeta
)
{
handleChange
(
value
,
tableMeta
)
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
data
=
this
.
state
.
dataTable
let
data
=
this
.
state
.
dataTable
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
this
.
setState
({
if
(
indexParent
>
0
)
{
data
:
a
console
.
log
(
indexParent
)
},
()
=>
console
.
log
(
this
.
state
.
dataTable
))
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
// let a = data[0].tableMeta.tableData[tableMeta.rowIndex] === value
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
// console.log(data)
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
this
.
forceUpdate
()
// console.log(this.state.dataTable)
}
}
render
()
{
render
()
{
const
columns
=
[{
const
columns
=
[{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
"Account"
,
name
:
"Account"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
...
@@ -62,12 +211,12 @@ export default class FixedAssetsMovement extends Component {
...
@@ -62,12 +211,12 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
388
}}
>
<
div
style
=
{{
width
:
388
}}
>
{
tableMeta
.
row
Index
==
0
||
tableMeta
.
rowIndex
==
1
?
{
tableMeta
.
row
Data
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
val
).
toUpperCase
()
}
<
/span
>
:
:
tableMeta
.
row
Index
==
2
||
tableMeta
.
rowIndex
==
6
||
tableMeta
.
rowIndex
==
7
||
tableMeta
.
rowIndex
==
8
?
tableMeta
.
row
Data
[
4
]
===
1
?
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
10
}}
>
{
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -77,18 +226,54 @@ export default class FixedAssetsMovement extends Component {
...
@@ -77,18 +226,54 @@ export default class FixedAssetsMovement extends Component {
name
:
"31 Dec 2020 Actual"
,
name
:
"31 Dec 2020 Actual"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#354960'
,
width
:
96
}}
>
<
TableCell
style
=
{{
backgroundColor
:
'#354960'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
setCellProps
:
()
=>
({
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
style
:
{
return
(
position
:
"sticky"
,
<
div
style
=
{{
textAlign
:
'right'
}}
>
left
:
420
,
{
tableMeta
.
rowData
[
0
]
===
4
?
background
:
"white"
,
<
div
style
=
{{
flex
:
1
}}
>
zIndex
:
101
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
}
}
})
}
}
},
{
},
{
name
:
"January 2021"
,
name
:
"January 2021"
,
...
@@ -102,37 +287,43 @@ export default class FixedAssetsMovement extends Component {
...
@@ -102,37 +287,43 @@ export default class FixedAssetsMovement extends Component {
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
row
Index
===
3
||
tableMeta
.
rowIndex
===
4
||
tableMeta
.
rowIndex
===
9
?
{
tableMeta
.
row
Data
[
0
]
===
4
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
value
=
{
value
}
value
=
{
value
}
control
=
{
control
=
{
// <Input
// value={this.formatValue(value)}
// style={{}}
// inputProps={{
// style: {
// color: "#5198ea",
// fontSize: 12,
// textAlign: 'right'
// }
// }}
// disableUnderline={true}
// inputStyle={{ color: 'red' }}
// />
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
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
=
{
value
}
value
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
/
>
}
}
onChange
=
{
event
=>
updateValue
(
event
.
target
.
value
)}
/
>
/
>
<
/div>
:
<
/div>
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
{
value
===
""
?
"-"
:
value
}
<
/span
>
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -146,10 +337,47 @@ export default class FixedAssetsMovement extends Component {
...
@@ -146,10 +337,47 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
)
=>
{
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
val
}
{
tableMeta
.
rowData
[
0
]
===
4
?
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -162,10 +390,47 @@ export default class FixedAssetsMovement extends Component {
...
@@ -162,10 +390,47 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
)
=>
{
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
val
}
{
tableMeta
.
rowData
[
0
]
===
4
?
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -178,10 +443,47 @@ export default class FixedAssetsMovement extends Component {
...
@@ -178,10 +443,47 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
)
=>
{
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
val
}
{
tableMeta
.
rowData
[
0
]
===
4
?
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -194,10 +496,47 @@ export default class FixedAssetsMovement extends Component {
...
@@ -194,10 +496,47 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
)
=>
{
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
val
}
{
tableMeta
.
rowData
[
0
]
===
4
?
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -210,10 +549,47 @@ export default class FixedAssetsMovement extends Component {
...
@@ -210,10 +549,47 @@ export default class FixedAssetsMovement extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
)
=>
{
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
val
}
{
tableMeta
.
rowData
[
0
]
===
4
?
<
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
=
{
value
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
handleValue
(
tableMeta
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -281,7 +657,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -281,7 +657,7 @@ export default class FixedAssetsMovement extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
PT
.
XYZ
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
2021
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
2021
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
...
...
src/container/EmailVerification.js
View file @
89d2526a
...
@@ -18,7 +18,7 @@ class EmailVerification extends Component {
...
@@ -18,7 +18,7 @@ class EmailVerification extends Component {
}
}
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
152d4
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
263b8
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
paddingTop
:
20
,
paddingRight
:
24
,
paddingLeft
:
24
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
300
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
paddingTop
:
20
,
paddingRight
:
24
,
paddingLeft
:
24
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
300
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
img
src
=
{
Images
.
berhasil
}
/
>
<
img
src
=
{
Images
.
berhasil
}
/
>
...
...
src/container/ForgotPassword.js
View file @
89d2526a
...
@@ -75,14 +75,14 @@ class ForgotPassword extends Component {
...
@@ -75,14 +75,14 @@ class ForgotPassword extends Component {
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
152d4
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
263b8
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
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
}
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
<
div
style
=
{{
padding
:
60
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
(
this
.
state
.
msgEmail
.
length
>
45
?
403
:
378
),
height
:
351
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
padding
:
60
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
(
this
.
state
.
msgEmail
.
length
>
45
?
403
:
378
),
height
:
351
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
img
src
=
{
Images
.
tia
}
/
>
<
img
src
=
{
Images
.
triputraBlack
}
style
=
{{
height
:
59
,
width
:
175
,
alignSelf
:
'center'
}
}
/
>
<
TextField
<
TextField
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Email
*<
/Typography>
}
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Email
*<
/Typography>
}
...
...
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
89d2526a
...
@@ -186,13 +186,13 @@ export default class CreatePerusahaan extends Component {
...
@@ -186,13 +186,13 @@ export default class CreatePerusahaan extends Component {
validasiEdit
()
{
validasiEdit
()
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name
required
'
})
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit
required
'
})
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From
required
'
})
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To
required
'
})
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To
Cannot be Empty
'
})
}
else
{
}
else
{
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
companyID
,
"company_id"
:
this
.
state
.
companyID
,
...
@@ -208,13 +208,13 @@ export default class CreatePerusahaan extends Component {
...
@@ -208,13 +208,13 @@ export default class CreatePerusahaan extends Component {
validasi
()
{
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name
required
'
})
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit
required
'
})
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From
required
'
})
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From
Cannot be Empty
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To
required
'
})
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To
Cannot be Empty
'
})
}
}
else
{
else
{
let
payload
=
{
let
payload
=
{
...
@@ -538,7 +538,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -538,7 +538,7 @@ export default class CreatePerusahaan extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
,
backgroundColor
:
'#e8e8e8'
,
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
,
backgroundColor
:
'#e8e8e8'
,
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
defaultValue
=
{
"A
ktif
"
}
defaultValue
=
{
"A
ctive
"
}
id
=
"status"
id
=
"status"
label
=
"Status"
label
=
"Status"
disabled
disabled
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
89d2526a
...
@@ -286,6 +286,7 @@ export default class EditReportItems extends Component {
...
@@ -286,6 +286,7 @@ export default class EditReportItems extends Component {
getParent
()
{
getParent
()
{
if
(
this
.
state
.
reportType
!==
null
&&
this
.
state
.
company
!==
null
)
{
if
(
this
.
state
.
reportType
!==
null
&&
this
.
state
.
company
!==
null
)
{
console
.
log
(
this
.
state
.
tempData
.
item_report_id
)
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"company_id"
:
this
.
state
.
company
.
company_id
"company_id"
:
this
.
state
.
company
.
company_id
...
@@ -295,12 +296,21 @@ export default class EditReportItems extends Component {
...
@@ -295,12 +296,21 @@ export default class EditReportItems extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
parentData
=
data
.
map
((
item
)
=>
{
let
currentIndex
=
null
let
parentData
=
data
.
map
((
item
,
index
)
=>
{
if
(
this
.
state
.
tempData
.
item_report_id
!==
item
.
item_report_id
)
{
return
{
return
{
item_report_id
:
item
.
item_report_id
,
item_report_id
:
item
.
item_report_id
,
description
:
item
.
description
description
:
item
.
description
}
}
}
else
{
currentIndex
=
index
}
})
})
if
(
currentIndex
!==
null
)
{
parentData
.
splice
(
currentIndex
,
1
)
}
console
.
log
(
parentData
)
let
defaultProps
=
{
let
defaultProps
=
{
options
:
parentData
,
options
:
parentData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
description
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
description
),
...
...
src/container/ResetPassword.js
View file @
89d2526a
...
@@ -133,14 +133,14 @@ class ResetPassword extends Component {
...
@@ -133,14 +133,14 @@ class ResetPassword extends Component {
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
152d4
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
263b8
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
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
}
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
<
div
style
=
{{
padding
:
56
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
415
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
padding
:
56
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
415
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
img
src
=
{
Images
.
tia
}
/
>
<
img
src
=
{
Images
.
triputraBlack
}
style
=
{{
height
:
59
,
width
:
175
,
alignSelf
:
'center'
}
}
/
>
<
TextField
<
TextField
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
New
password
*<
/Typography>
}
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
New
password
*<
/Typography>
}
...
...
src/container/RollingOutlook.js
View file @
89d2526a
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
TextField
,
MenuItem
,
Select
,
FormControlLabel
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
MUIDataTable
from
'mui-datatables'
;
import
Images
from
'../assets/Images'
;
import
Images
from
'../assets/Images'
;
import
BalanceSheet
from
'./BudgetTahunan/BalanceSheet'
;
import
api
from
'../api'
;
import
api
from
'../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
{
titleCase
}
from
'../library/Utils'
;
import
{
titleCase
}
from
'../library/Utils'
;
import
ProfitLoss
from
'./BudgetTahunan/ProfitLoss'
;
import
TaxPlanning
from
'./BudgetTahunan/TaxPlanning'
;
import
FixedAssetsMovement
from
'./BudgetTahunan/FixedAssetsMovement'
;
import
CorporateAnnualTarget
from
'./BudgetTahunan/CorporateAnnualTarget'
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
UploadFile
from
"../library/Upload"
;
import
{
format
}
from
'date-fns'
;
export
default
class
RollingOutlook
extends
Component
{
export
default
class
RollingOutlook
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
periode
:
'2020'
,
perusahaan
:
'TAP Group'
,
perusahaan
:
'TAP Group'
,
revisi
:
'0'
,
listRevision
:
null
,
revision
:
null
,
visibleRollingOutlook
:
true
,
visibleRollingOutlook
:
true
,
visibleBS
:
false
,
listPeriode
:
null
,
periode
:
null
,
listCompany
:
null
,
listCompany
:
null
,
company
:
null
,
company
:
null
,
report_id
:
null
,
report_id
:
null
,
visibleBS
:
false
,
visiblePL
:
false
,
visiblePL
:
false
,
visibleTP
:
false
,
visibleCAT
:
false
,
visibleCAT
:
false
listAttachment
:
[],
visibleUpload
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getCompanyActive
()
this
.
getCompanyActive
()
}
}
getReportAttachment
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"revision"
:
this
.
state
.
revision
.
revision
,
}
api
.
create
().
getMasterBudgetAtt
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
listAttachment
:
response
.
data
.
data
})
}
}
// console.log(response);
})
}
getReport
()
{
getReport
()
{
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"report_type"
:
"Rolling Outlook"
,
"report_type"
:
"Rolling Outlook"
,
}
}
console
.
log
(
payload
)
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
return
[
i
ndex
+
1
,
i
tem
.
number
,
item
.
report_name
,
item
.
report_name
,
""
,
item
.
revision
,
item
.
report_id
item
.
current_status
,
item
.
report_id
,
item
.
is_can_upload
,
item
.
revision
]
]
})
})
// console.log(dataTable);
this
.
setState
({
dataTable
})
this
.
setState
({
dataTable
})
}
}
}
}
...
@@ -67,13 +98,68 @@ export default class RollingOutlook extends Component {
...
@@ -67,13 +98,68 @@ export default class RollingOutlook extends Component {
options
:
companyData
,
options
:
companyData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
this
.
getReport
())
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
this
.
getPeriode
()
})
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
}
}
})
})
}
}
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
let
dateNow
=
new
Date
let
year
=
format
(
dateNow
,
'yyyy'
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
let
periodeData
=
data
.
map
((
item
)
=>
{
return
{
periode
:
item
,
}
})
let
defaultProps
=
{
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
year
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getRevision
()
})
}
}
})
}
getRevision
()
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getRevision
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
let
revisionData
=
data
.
map
((
item
)
=>
{
return
{
revision
:
item
,
}
})
let
defaultProps
=
{
options
:
revisionData
,
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
})
}
clickDetail
(
item
,
id
)
{
clickDetail
(
item
,
id
)
{
this
.
setState
({
report_id
:
id
})
this
.
setState
({
report_id
:
id
})
if
(
item
===
'Balance Sheet'
)
{
if
(
item
===
'Balance Sheet'
)
{
...
@@ -106,7 +192,6 @@ export default class RollingOutlook extends Component {
...
@@ -106,7 +192,6 @@ export default class RollingOutlook extends Component {
visibleBS
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleCAT
:
false
,
visibleFAM
:
true
,
visibleTP
:
false
visibleTP
:
false
})
})
}
else
if
(
item
===
'CAT'
)
{
}
else
if
(
item
===
'CAT'
)
{
...
@@ -115,23 +200,93 @@ export default class RollingOutlook extends Component {
...
@@ -115,23 +200,93 @@ export default class RollingOutlook extends Component {
visibleBS
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visiblePL
:
false
,
visibleCAT
:
true
,
visibleCAT
:
true
,
visibleFAM
:
false
,
visibleTP
:
false
visibleTP
:
false
})
})
}
}
}
}
handleChange
(
value
,
tableMeta
)
{
let
data
=
this
.
state
.
dataTable
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
value
}
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
// console.log(resp)
if
(
err
)
{
console
.
log
(
err
);
}
else
{
const
formData
=
new
FormData
();
formData
.
append
(
"revision"
,
Number
(
this
.
state
.
revision
.
revision
));
formData
.
append
(
"companyId"
,
this
.
state
.
company
.
company_id
);
formData
.
append
(
"periode"
,
Number
(
this
.
state
.
periode
.
periode
));
formData
.
append
(
"file"
,
event
);
this
.
setState
({
formData
})
}
})
}
uploadAttachment
(
formData
)
{
api
.
create
().
uploadAttachment
(
formData
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleUpload
:
false
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
// console.log(response)
})
}
render
()
{
render
()
{
const
columns
=
[
"#"
,
"Jenis Laporan"
,
const
columns
=
[
"#"
,
"Jenis Laporan"
,
{
{
name
:
"Revision"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
var
list
=
[];
for
(
var
i
=
0
;
i
<=
tableMeta
.
rowData
[
6
];
i
++
)
{
list
.
push
(
i
);
}
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
val
}
control
=
{
<
Select
value
=
{
val
}
onChange
=
{
event
=>
{
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
autoWidth
>
{
list
.
map
((
item
,
index
)
=>
<
MenuItem
key
=
{
index
}
value
=
{
item
}
>
{
item
}
<
/MenuItem
>
)}
<
/Select
>
}
/
>
<
/div
>
);
}
}
},
{
name
:
"Status"
,
name
:
"Status"
,
options
:
{
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
val
===
"
acc
"
?
{
val
===
"
submitted"
||
val
===
"approved
"
?
<
img
src
=
{
Images
.
ceklis
}
style
=
{{
width
:
31
,
height
:
24
}}
/>
:
<
img
src
=
{
Images
.
ceklis
}
style
=
{{
width
:
31
,
height
:
24
}}
/>
:
val
===
"revision"
?
<
span
>
Revisi
<
/span>
:
null
null
}
}
<
/div
>
<
/div
>
...
@@ -148,17 +303,25 @@ export default class RollingOutlook extends Component {
...
@@ -148,17 +303,25 @@ export default class RollingOutlook extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
null
,
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
3
])}
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
])
:
null
}
>
>
<
Typography
style
=
{{
color
:
'#5198ea
'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText
'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
);
);
}
}
}
}
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}]
}]
const
dataTable
=
[
const
dataTable
=
[
[
"1"
,
"Balance Sheet"
,
"done"
],
[
"1"
,
"Balance Sheet"
,
"done"
],
...
@@ -190,6 +353,7 @@ export default class RollingOutlook extends Component {
...
@@ -190,6 +353,7 @@ export default class RollingOutlook extends Component {
search
:
false
search
:
false
}
}
const
periode
=
[
const
periode
=
[
{
value
:
'2021'
,
label
:
'2021'
},
{
value
:
'2020'
,
label
:
'2020'
},
{
value
:
'2020'
,
label
:
'2020'
},
{
value
:
'2019'
,
label
:
'2019'
},
{
value
:
'2019'
,
label
:
'2019'
},
{
value
:
'2018'
,
label
:
'2018'
},
{
value
:
'2018'
,
label
:
'2018'
},
...
@@ -221,26 +385,28 @@ export default class RollingOutlook extends Component {
...
@@ -221,26 +385,28 @@ export default class RollingOutlook extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
>
<
TextField
<
Autocomplete
style
=
{{
width
:
250
,
}
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
select
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
label
=
"Periode"
this
.
getReport
()
this
.
getReportAttachment
()
})}
debug
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Periode"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
onChange
=
{(
e
)
=>
this
.
setState
({
periode
:
e
.
target
.
value
})}
/
>
>
{
periode
.
map
((
option
)
=>
(
<
MenuItem
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/MenuItem
>
))}
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
})}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})}
debug
debug
disableClearable
disableClearable
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
...
@@ -249,20 +415,19 @@ export default class RollingOutlook extends Component {
...
@@ -249,20 +415,19 @@ export default class RollingOutlook extends Component {
/
>
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
TextField
<
Autocomplete
style
=
{{
width
:
250
,
}}
{...
this
.
state
.
listRevision
}
id
=
"reivisi"
id
=
"revision"
select
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
revision
:
newInputValue
},
()
=>
{
label
=
"Revisi"
this
.
getReport
()
value
=
{
this
.
state
.
revisi
}
this
.
getReportAttachment
()
onChange
=
{(
e
)
=>
this
.
setState
({
revisi
:
e
.
target
.
value
})}
})}
>
debug
{
revisi
.
map
((
option
)
=>
(
disableClearable
<
MenuItem
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
style
=
{{
width
:
250
}}
{
option
.
label
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Revision"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
<
/MenuItem
>
value
=
{
this
.
state
.
revision
}
))}
/
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
...
@@ -277,17 +442,39 @@ export default class RollingOutlook extends Component {
...
@@ -277,17 +442,39 @@ export default class RollingOutlook extends Component {
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
,
fontWeight
:
'bold'
}}
>
Attachment
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
,
fontWeight
:
'bold'
}}
>
Attachment
:
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#5198ea'
}}
>
Upload
File
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#5198ea'
}}
>
Upload
File
<
/Typography
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
10
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
10
}}
>
<
div
style
=
{{
width
:
'50%'
,
paddingLeft
:
20
}}
>
<
div
style
=
{{
width
:
'50%'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
}}
>
File
1
.
xls
<
/Typography
>
{
this
.
state
.
listAttachment
.
length
>
0
?
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
}}
>
File
2
.
xls
<
/Typography
>
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
return
(
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#4b4b4b'
}}
>
{
item
.
attachment_name
}
<
/Typography
>
)
})
:
null
}
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
{
this
.
state
.
listAttachment
.
length
>
0
?
this
.
state
.
listAttachment
.
map
((
item
)
=>
{
return
(
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
)
})
:
null
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -301,6 +488,40 @@ export default class RollingOutlook extends Component {
...
@@ -301,6 +488,40 @@ export default class RollingOutlook extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
)}
{
this
.
state
.
visibleUpload
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x main-color"
style
=
{{
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Upload
File
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
,
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
className
=
"btn btn-circle btn-white"
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
false
})}
>
<
img
src
=
{
Images
.
close
}
/
>
<
/button
>
<
/div
>
<
/div
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
result
=
{
this
.
state
.
result
}
acceptedFiles
=
{[
"xlsx"
]}
onHandle
=
{(
dt
)
=>
{
this
.
fileHandler
(
dt
)
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
this
.
uploadAttachment
(
this
.
state
.
formData
)}
/
>
<
/div
>
<
/div
>
)}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/container/SetPassword.js
View file @
89d2526a
...
@@ -133,14 +133,14 @@ class SetPassword extends Component {
...
@@ -133,14 +133,14 @@ class SetPassword extends Component {
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
152d4
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
,
backgroundColor
:
'#
263b8
0'
,
height
:
'100vh'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
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
}
<
/Alert
>
<
/Alert
>
<
/Snackbar
>
<
/Snackbar
>
<
div
style
=
{{
padding
:
56
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
415
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
padding
:
56
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
378
,
height
:
415
,
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
img
src
=
{
Images
.
tia
}
/
>
<
img
src
=
{
Images
.
triputraBlack
}
style
=
{{
height
:
59
,
width
:
175
,
alignSelf
:
'center'
}
}
/
>
<
TextField
<
TextField
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
New
password
*<
/Typography>
}
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
New
password
*<
/Typography>
}
...
...
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