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
fded6b6a
Commit
fded6b6a
authored
Aug 24, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'syadziy' into 'master'
update standarisasi ui See merge request
!171
parents
72013a79
03710feb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
79 deletions
+139
-79
ReportItems.js
src/container/MasterData/ReportItems.js
+4
-4
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+14
-10
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+10
-10
VisualReportItems.js
...container/MasterData/formReportItems/VisualReportItems.js
+95
-39
Profile.js
src/container/Profile.js
+13
-13
ResetPassword.js
src/container/ResetPassword.js
+3
-3
No files found.
src/container/MasterData/ReportItems.js
View file @
fded6b6a
...
...
@@ -575,7 +575,7 @@ export default class ReportItems extends Component {
api
.
create
().
uploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
alert
(
response
.
data
.
message
)
//
alert(response.data.message)
this
.
getData
()
this
.
setState
({
itemReport
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
...
...
@@ -824,7 +824,7 @@ export default class ReportItems extends Component {
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Add'
}
data
-
for
=
"tambah"
>
<
a
data
-
tip
=
{
'Add
New
'
}
data
-
for
=
"tambah"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -881,7 +881,7 @@ export default class ReportItems extends Component {
style
=
{{
marginRight
:
20
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Bata
l
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cance
l
<
/span
>
<
/div
>
<
/button
>
<
button
...
...
@@ -890,7 +890,7 @@ export default class ReportItems extends Component {
style
=
{{}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
impan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
ave
<
/span
>
<
/div
>
<
/button
>
<
/div
>
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
fded6b6a
...
...
@@ -147,32 +147,32 @@ export default class CreateReportItems extends Component {
validasi
()
{
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
{
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
cannot be empty
.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
is required
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
cannot be empty
.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required.
'
})
}
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be empty
'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required.
'
})
}
else
if
(
this
.
state
.
disabledValue
===
false
&&
R
.
isEmpty
(
this
.
state
.
realVal
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
Value cannot be empty
'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
value is required.
'
})
}
else
if
(
this
.
state
.
disabledCondt
===
false
&&
R
.
isEmpty
(
this
.
state
.
condition
))
{
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
Condition cannot be empty
'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
condition is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
Date cannot be empty
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
date is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
Date cannot be empty
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
date is required.
'
})
}
else
{
this
.
addReportItems
()
...
...
@@ -338,6 +338,10 @@ export default class CreateReportItems extends Component {
})
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
return
(
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
fded6b6a
...
...
@@ -128,25 +128,25 @@ export default class EditReportItems extends Component {
validasi
()
{
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
)){
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
cannot be empty
'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
cannot be empty
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required.
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required.
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required.
'
})
}
else
if
((
this
.
state
.
InputType
.
type_report_name
===
'Formula'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
||
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
)))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be empty
'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required.
'
})
}
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
condition_it_should_be
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
Value cannot be empty
'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
value is required.
'
})
}
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isNil
(
this
.
state
.
tempData
.
condition_if_wrong
))
{
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
Condition cannot be empty
'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
condition is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
Date cannot be empty
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
date is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
Date cannot be empty
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
date is required.
'
})
}
else
{
this
.
updateReportItems
()
}
...
...
src/container/MasterData/formReportItems/VisualReportItems.js
View file @
fded6b6a
This diff is collapsed.
Click to expand it.
src/container/Profile.js
View file @
fded6b6a
...
...
@@ -36,9 +36,9 @@ export default class Profile extends Component {
errorOldPassword
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
msgOldPassword
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgPassword
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgConfirmPassword
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgOldPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
msgPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
msgConfirmPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
company
:
[],
listCompany
:
[],
selectedIndex
:
0
,
...
...
@@ -68,23 +68,23 @@ export default class Profile extends Component {
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
console
.
log
(
e
.
target
.
name
);
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
}
validasi
()
{
if
(
this
.
state
.
oldPassword
==
""
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword is required.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword is required.'
})
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword minimum 8 characters.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword minimum 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword format should not use email.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword must be a combination of characters, letters and numbers.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required.'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
...
...
@@ -94,11 +94,11 @@ 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
:
'
Confirm Password
is required.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password confirmation
is required.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirm password
of at least 8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password confirmation
of at least 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
may
not use email.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
should
not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
...
...
src/container/ResetPassword.js
View file @
fded6b6a
...
...
@@ -33,7 +33,7 @@ class ResetPassword extends Component {
console
.
log
(
this
.
props
.
match
.
params
.
id
)
let
userId
=
this
.
props
.
match
.
params
.
id
this
.
setState
({
userId
})
//
this.checkExpiredLink(userId)
this
.
checkExpiredLink
(
userId
)
// console.log(this.props)
}
...
...
@@ -67,7 +67,7 @@ class ResetPassword extends Component {
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
of at least
8 characters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
minimum
8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
...
...
@@ -75,7 +75,7 @@ class ResetPassword extends Component {
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password is required.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
of at least
8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
minimum
8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
...
...
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