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
1955d960
Commit
1955d960
authored
Sep 07, 2020
by
a.bairuha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update report items riri
parent
6921ae0d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
336 additions
and
63 deletions
+336
-63
ReportItems.js
src/container/MasterData/ReportItems.js
+137
-56
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+98
-3
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+99
-2
Profile.js
src/container/Profile.js
+1
-1
SetPassword.js
src/container/SetPassword.js
+1
-1
No files found.
src/container/MasterData/ReportItems.js
View file @
1955d960
This diff is collapsed.
Click to expand it.
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
1955d960
...
...
@@ -60,8 +60,13 @@ export default class CreateReportItems extends Component {
options
:
[
'WARNING'
,
'STOPPER'
],
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
messageAlert
:
''
,
kpiType
:
[
'HIG'
,
'HIB'
],
maxAch
:
[
'50%'
,
'100%'
,
'Unlimited'
],
formulaYtd
:
[
'SUM'
,
'AVG'
,
'MIN'
,
'MAX'
],
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
}
}
...
...
@@ -194,6 +199,9 @@ export default class CreateReportItems extends Component {
"weight"
:
this
.
state
.
weight
,
"condition_if_wrong"
:
this
.
state
.
condition
,
"condition_it_should_be"
:
this
.
state
.
realVal
,
"type_kpi"
:
this
.
state
.
kpiTypeValue
,
"max_ach"
:
this
.
state
.
maxAchValue
,
"formula_ytd"
:
this
.
state
.
formulaYTDValue
,
"start_date"
:
this
.
state
.
startDate
,
"end_date"
:
this
.
state
.
endDate
}
...
...
@@ -442,7 +450,10 @@ export default class CreateReportItems extends Component {
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
{
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
clearMessage
();
})}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
...
...
@@ -778,6 +789,90 @@ export default class CreateReportItems extends Component {
<
/div
>
<
/div
>
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
kpiTypeValue
}
id
=
"kpiType"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
kpiTypeValue
:
newValue
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
kpiType
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"KPI Type"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
maxAchValue
}
id
=
"maxAch"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
maxAchValue
:
newValue
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
maxAch
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Max Achievement"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
/div
>
))}
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
formulaYTDValue
}
id
=
"formulaYTD"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
formulaYTDValue
:
newValue
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
formulaYtd
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Formula YTD"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
/div
>
))}
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
1955d960
...
...
@@ -62,7 +62,13 @@ export default class EditReportItems extends Component {
options
:
[
'WARNING'
,
'STOPPER'
],
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
messageAlert
:
''
,
kpiType
:
[
'HIG'
,
'HIB'
],
maxAch
:
[
'50%'
,
'100%'
,
'Unlimited'
],
formulaYtd
:
[
'SUM'
,
'AVG'
,
'MIN'
,
'MAX'
],
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
}
}
...
...
@@ -169,6 +175,9 @@ export default class EditReportItems extends Component {
"weight"
:
this
.
state
.
tempData
.
weight
==
null
?
""
:
this
.
state
.
tempData
.
weight
,
"condition_if_wrong"
:
this
.
state
.
tempData
.
condition_if_wrong
,
"condition_it_should_be"
:
this
.
state
.
tempData
.
condition_it_should_be
,
"type_kpi"
:
this
.
state
.
tempData
.
kpi_type
,
"max_ach"
:
this
.
state
.
tempData
.
max_ach
,
"formula_ytd"
:
this
.
state
.
tempData
.
formula_ytd
,
"start_date"
:
this
.
state
.
tempData
.
start_date
,
"end_date"
:
this
.
state
.
tempData
.
end_date
}
...
...
@@ -456,7 +465,10 @@ export default class EditReportItems extends Component {
<
Autocomplete
{...
this
.
state
.
listReportType
}
id
=
"reportType"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
this
.
getParent
(),
this
.
clearMessage
()
)}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
reportType
:
newInputValue
},
()
=>
newInputValue
==
null
||
(
newInputValue
.
report_name
!==
'CAT'
)
?
this
.
setState
({
tempData
:
{
...
this
.
state
.
tempData
,
kpi_type
:
null
,
max_ach
:
null
,
formula_ytd
:
null
}
},
()
=>
this
.
getParent
(),
this
.
clearMessage
())
:
this
.
getParent
(),
this
.
clearMessage
()
)}
debug
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
...
...
@@ -760,6 +772,91 @@ export default class EditReportItems extends Component {
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
tempData
===
null
?
""
:
this
.
state
.
tempData
.
kpi_type
}
id
=
"kpiType"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
tempData
:
{
...
this
.
state
.
tempData
,
kpi_type
:
newValue
}
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
kpiType
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"KPI Type"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
tempData
===
null
?
""
:
this
.
state
.
tempData
.
max_ach
}
id
=
"maxAch"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
tempData
:
{
...
this
.
state
.
tempData
,
max_ach
:
newValue
}
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
maxAch
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Max Achievement"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
/div
>
))}
{
this
.
state
.
reportType
!==
null
&&
(
this
.
state
.
reportType
.
report_name
===
'CAT'
&&
(
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
value
=
{
this
.
state
.
tempData
===
null
?
""
:
this
.
state
.
tempData
.
formula_ytd
}
id
=
"kpiType"
onChange
=
{(
event
,
newValue
)
=>
{
this
.
setState
({
tempData
:
{
...
this
.
state
.
tempData
,
formula_ytd
:
newValue
}
},
()
=>
this
.
clearMessage
());
}}
options
=
{
this
.
state
.
formulaYtd
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Formula YTD"
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
,
color
:
'#7e8085'
}
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
,
fontFamily
:
'Nunito Sans, sans-serif'
}
}}
/>
}
/>
<
/div
>
<
/div
>
<
/div
>
))}
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
...
...
src/container/Profile.js
View file @
1955d960
...
...
@@ -94,7 +94,7 @@ export default class Profile extends Component {
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Must be a Combination of Characters, Letters and Numbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Confirmation
Cannot be Empty.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Repeat Password
Cannot be Empty.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
}
else
{
...
...
src/container/SetPassword.js
View file @
1955d960
...
...
@@ -76,7 +76,7 @@ class SetPassword extends Component {
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Confirmation
Cannot be Empty.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Repeat Password
Cannot be Empty.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match.'
})
}
else
{
...
...
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