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
e5629327
Commit
e5629327
authored
Aug 27, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
validasi item report See merge request
!192
parents
0b643fd5
06740938
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
436 additions
and
89 deletions
+436
-89
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+396
-49
ForgotPassword.js
src/container/ForgotPassword.js
+1
-1
Login.js
src/container/Login.js
+2
-2
ReportItems.js
src/container/MasterData/ReportItems.js
+1
-1
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+10
-10
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+10
-10
ResetPassword.js
src/container/ResetPassword.js
+8
-8
SetPassword.js
src/container/SetPassword.js
+8
-8
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
e5629327
This diff is collapsed.
Click to expand it.
src/container/ForgotPassword.js
View file @
e5629327
...
...
@@ -39,7 +39,7 @@ class ForgotPassword extends Component {
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
is required
.'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
Cannot be Empty
.'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct.'
})
}
else
{
...
...
src/container/Login.js
View file @
e5629327
...
...
@@ -75,11 +75,11 @@ class Login extends Component {
validateLogin
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
is required
.'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
Cannot be Empty
.'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email format is not correct.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
is required
.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
Cannot be Empty
.'
})
}
else
{
this
.
login
()
}
...
...
src/container/MasterData/ReportItems.js
View file @
e5629327
...
...
@@ -666,7 +666,7 @@ export default class ReportItems extends Component {
}
},
{
name
:
"Company"
,
name
:
"Company
Name
"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
e5629327
...
...
@@ -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
is required
.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required
.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
name cannot be empty
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required
.'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
.'
})
}
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required
.'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be empty
.'
})
}
else
if
(
this
.
state
.
disabledValue
===
false
&&
R
.
isEmpty
(
this
.
state
.
realVal
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True value
is required
.'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True value
cannot be empty
.'
})
}
else
if
(
this
.
state
.
disabledCondt
===
false
&&
R
.
isEmpty
(
this
.
state
.
condition
))
{
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False condition
is required
.'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False condition
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'
Start date is required
.'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'
Valid From cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'
End date is required
.'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'
Valid To cannot be empty
.'
})
}
else
{
this
.
addReportItems
()
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
e5629327
...
...
@@ -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
is required
.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required
.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
name cannot be empty
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required.
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required.
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required
.'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
.'
})
}
else
if
((
this
.
state
.
InputType
.
type_item_report_name
===
'Formula'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
||
(
this
.
state
.
InputType
.
type_item_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
)))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required
.'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be empty
.'
})
}
else
if
(
this
.
state
.
InputType
.
type_item_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
condition_it_should_be
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True value
is required
.'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True value
cannot be empty
.'
})
}
else
if
(
this
.
state
.
InputType
.
type_item_report_name
===
'Validation'
&&
R
.
isNil
(
this
.
state
.
tempData
.
condition_if_wrong
))
{
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False condition
is required
.'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False condition
cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'
Start date is required
.'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'
Valid From cannot be empty
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'
End date is required
.'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'
Valid To cannot be empty
.'
})
}
else
{
this
.
updateReportItems
()
}
...
...
src/container/ResetPassword.js
View file @
e5629327
...
...
@@ -68,23 +68,23 @@ class ResetPassword extends Component {
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
Password is required
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New Password Cannot be Empty.
'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password minimum 8 characters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
Password minimum 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password format should not use email.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
Password format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password must be a combination of characters, letters and numbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
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 Cannot be Empty
.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirm password
minimum 8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Confirmation
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
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirmation password must match the password
.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Does Not Match
.'
})
}
else
{
this
.
confirmPassword
()
}
...
...
@@ -127,7 +127,7 @@ class ResetPassword extends Component {
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Password consists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Confirm Password
consists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password Confirmation
consists of 8 characters with a combination of numbers.'
})
}
}
...
...
src/container/SetPassword.js
View file @
e5629327
...
...
@@ -68,23 +68,23 @@ class SetPassword extends Component {
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
Password is required
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New Password Cannot be Empty.
'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password minimum 8 characters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
Password minimum 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password format should not use email.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
Password format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password must be a combination of characters, letters and numbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'
New
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 Cannot be Empty
.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirm password
minimum 8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Confirmation
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
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirmation password must match the password
.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password Does Not Match
.'
})
}
else
{
this
.
confirmPassword
()
}
...
...
@@ -127,7 +127,7 @@ class SetPassword extends Component {
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Password consists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Confirm Password
consists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password Confirmation
consists of 8 characters with a combination of numbers.'
})
}
}
...
...
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