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
d7c4689e
Commit
d7c4689e
authored
Aug 14, 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
d393cb9d
8b60a0ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
431 additions
and
22 deletions
+431
-22
CreateItemLaporan.js
...container/MasterData/formItemLaporan/CreateItemLaporan.js
+431
-22
No files found.
src/container/MasterData/formItemLaporan/CreateItemLaporan.js
View file @
d7c4689e
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
{
TextField
,
Typography
}
from
'@material-ui/core'
;
import
{
TextField
,
Typography
}
from
'@material-ui/core'
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
const
companies
=
[
const
companies
=
[
{
{
...
@@ -7,26 +8,89 @@ const companies = [
...
@@ -7,26 +8,89 @@ const companies = [
label
:
''
,
label
:
''
,
},
},
{
{
value
:
'
TIA
1'
,
value
:
'1'
,
label
:
'TIA'
,
label
:
'TIA'
,
},
},
{
{
value
:
'
TIA
2'
,
value
:
'2'
,
label
:
'TIA'
,
label
:
'TIA'
,
},
},
];
const
dataTypes
=
[
{
{
value
:
'TIA3'
,
value
:
''
,
label
:
'TIA'
,
label
:
''
,
},
{
value
:
'1'
,
label
:
'Formula'
,
},
{
value
:
'2'
,
label
:
'Formula'
,
},
];
const
reportTypes
=
[
{
value
:
''
,
label
:
''
,
},
{
value
:
'1'
,
label
:
'KPI'
,
},
{
value
:
'2'
,
label
:
'KPI'
,
},
];
const
parents
=
[
{
value
:
'-'
,
label
:
'-'
,
},
{
value
:
'1'
,
label
:
'1'
,
},
{
value
:
'2'
,
label
:
'2'
,
},
},
];
];
export
default
class
CreateItemLaporan
extends
Component
{
export
default
class
CreateItemLaporan
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
startDate
:
new
Date
(),
endDate
:
new
Date
(),
}
}
handleStartDate
=
(
date
)
=>
{
this
.
setState
({
startDate
:
date
});
};
handleEndDate
=
(
date
)
=>
{
this
.
setState
({
endDate
:
date
});
};
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
this
.
props
.
data
);
console
.
log
(
this
.
props
.
data
);
}
}
render
()
{
render
()
{
const
{
startDate
,
endDate
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
...
@@ -54,32 +118,56 @@ export default class CreateItemLaporan extends Component {
...
@@ -54,32 +118,56 @@ export default class CreateItemLaporan extends Component {
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
value
=
{
1
}
value
=
{
1
}
id
=
"
status
"
id
=
"
ID
"
label
=
"ID"
label
=
"ID"
disabled
disabled
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}
}}
}}
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}
}}
}}
/
>
/
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
id
=
"standard-select-currency-native"
id
=
"company"
style
=
{{
width
:
'100%'
}}
select
select
label
=
"
Native select
"
label
=
"
Perusahaan
"
// onChange={handleChange}
// onChange={handleChange}
helperText
=
""
SelectProps
=
{{
SelectProps
=
{{
native
:
true
,
native
:
true
,
}}
}}
helperText
=
"Please select your currency"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
>
>
{
companies
.
map
((
option
)
=>
(
{
companies
.
map
((
option
)
=>
(
<
option
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
<
option
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
...
@@ -88,23 +176,176 @@ export default class CreateItemLaporan extends Component {
...
@@ -88,23 +176,176 @@ export default class CreateItemLaporan extends Component {
))}
))}
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"description"
label
=
"Deskripsi"
// value={this.props.data.business_unit_name}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
>
<
/TextField
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"uom"
label
=
"UOM"
// value={this.props.data.business_unit_name}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
id
=
"dataType"
style
=
{{
width
:
'100%'
}}
select
label
=
"Tipe Data"
// onChange={handleChange}
helperText
=
""
SelectProps
=
{{
native
:
true
,
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
>
{
dataTypes
.
map
((
option
)
=>
(
<
option
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/option
>
))}
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
// value={this.props.data.status}
// value={this.props.data.status}
id
=
"realValue"
label
=
"Nilai Seharusnya"
value
=
"-"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"startDate"
value
=
{
startDate
}
onChange
=
{
this
.
handleStartDate
}
label
=
"Berlaku Mulai"
format
=
"dd MMMM yyyy"
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
"Aktif"
id
=
"status"
id
=
"status"
label
=
"Status"
label
=
"Status"
disabled
disabled
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}
}}
}}
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}
}}
}}
/
>
/
>
...
@@ -125,19 +366,123 @@ export default class CreateItemLaporan extends Component {
...
@@ -125,19 +366,123 @@ export default class CreateItemLaporan extends Component {
<
div
className
=
"column-2"
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
id
=
"reportType"
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"unit"
select
label
=
"Unit Bisnis"
label
=
"Jenis Laporan"
// value={this.props.data.business_unit_name}
// onChange={handleChange}
helperText
=
""
SelectProps
=
{{
native
:
true
,
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
>
{
reportTypes
.
map
((
option
)
=>
(
<
option
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/option
>
))}
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"order"
label
=
"Order"
value
=
"1"
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}
}}
}}
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
>
<
/TextField
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
id
=
"parent"
style
=
{{
width
:
'100%'
}}
select
label
=
"Parent"
// onChange={handleChange}
helperText
=
""
SelectProps
=
{{
native
:
true
,
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
>
{
parents
.
map
((
option
)
=>
(
<
option
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/option
>
))}
<
/TextField
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"weight"
label
=
"Weight"
value
=
"1"
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}
}}
}}
>
>
...
@@ -146,23 +491,87 @@ export default class CreateItemLaporan extends Component {
...
@@ -146,23 +491,87 @@ export default class CreateItemLaporan extends Component {
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
id
=
"
unit
"
id
=
"
formula
"
label
=
"
Berlaku Hingg
a"
label
=
"
Formul
a"
defaultValue
=
{
"31 Desember 2100"
}
value
=
"1"
inputProps
=
{{
inputProps
=
{{
style
:
{
style
:
{
fontSize
:
11
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}
}}
}}
InputLabelProps
=
{{
InputLabelProps
=
{{
style
:
{
style
:
{
fontSize
:
11
,
fontSize
:
11
,
color
:
'#7e8085'
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}
}}
}}
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
"-"
id
=
"isWrongCondition"
label
=
"Kondisi Jika Salah"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
,
paddingLeft
:
10
}
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"endDate"
value
=
{
endDate
}
onChange
=
{
this
.
handleEndDate
}
label
=
"Berlaku Hingga"
format
=
"dd MMMM yyyy"
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
paddingLeft
:
10
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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