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
5d444a81
Commit
5d444a81
authored
Sep 21, 2023
by
fahrur huzain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update issue parameter edit
parent
49bef4bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
11 deletions
+64
-11
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+64
-11
No files found.
src/container/MasterData/Parameter/CreateParameter.js
View file @
5d444a81
...
@@ -727,21 +727,30 @@ export default class CreateParameter extends Component {
...
@@ -727,21 +727,30 @@ export default class CreateParameter extends Component {
}
}
}
}
validasiCreateEdit
(){
async
validasiCreateEdit
(){
console
.
log
(
"Masuk ke validasiCreateEdit"
)
console
.
log
(
"Masuk ke validasiCreateEdit"
)
let
data
=
await
this
.
validasiValueData
()
if
(
this
.
props
.
type
===
"edit"
){
if
(
this
.
props
.
type
===
"edit"
){
if
(
R
.
isNil
(
this
.
state
.
getTypes
)){
if
(
R
.
isNil
(
this
.
state
.
getTypes
)){
}
else
{
}
else
{
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY"
){
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY"
){
if
(
R
.
isNil
(
this
.
state
.
getReportName
)){
if
(
R
.
isNil
(
this
.
state
.
getReportName
))
{
}
else
{
if
(
R
.
isEmpty
(
data
.
maxValue
)
||
data
.
maxValue
==
""
)
{
this
.
updateParameter
()
}
else
{
this
.
updateParameter
()
}
}
}
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY_MONEY_FORMAT"
){
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY_MONEY_FORMAT"
){
if
(
R
.
isNil
(
this
.
state
.
getFormatData
)){
if
(
R
.
isNil
(
this
.
state
.
getFormatData
)){
}
else
{
}
else
{
this
.
updateParameter
()
this
.
updateParameter
()
}
}
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"REPORT_SUBMIT_PERIOD"
)
{
console
.
log
(
"masuk creat : "
+
data
.
maxValue
);
if
(
R
.
isEmpty
(
data
.
maxValue
)
||
data
.
maxValue
==
""
)
{
}
else
{
this
.
updateParameter
()
}
}
else
{
}
else
{
this
.
updateParameter
()
this
.
updateParameter
()
}
}
...
@@ -750,15 +759,23 @@ export default class CreateParameter extends Component {
...
@@ -750,15 +759,23 @@ export default class CreateParameter extends Component {
if
(
R
.
isNil
(
this
.
state
.
getTypes
)){
if
(
R
.
isNil
(
this
.
state
.
getTypes
)){
}
else
{
}
else
{
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY"
){
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY"
){
if
(
R
.
isNil
(
this
.
state
.
getReportName
)){
if
(
R
.
isNil
(
this
.
state
.
getReportName
))
{
}
else
{
if
(
R
.
isEmpty
(
data
.
maxValue
))
{
this
.
createParameter
()
}
else
{
this
.
createParameter
()
}
}
}
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY_MONEY_FORMAT"
){
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY_MONEY_FORMAT"
){
if
(
R
.
isNil
(
this
.
state
.
getFormatData
)){
if
(
R
.
isNil
(
this
.
state
.
getFormatData
)){
}
else
{
}
else
{
this
.
createParameter
()
this
.
createParameter
()
}
}
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"REPORT_SUBMIT_PERIOD"
)
{
console
.
log
(
"masuk creat : "
+
data
.
maxValue
);
if
(
R
.
isEmpty
(
data
.
maxValue
)
||
data
.
maxValue
==
""
)
{
}
else
{
this
.
createParameter
()
}
}
else
{
}
else
{
this
.
createParameter
()
this
.
createParameter
()
}
}
...
@@ -919,6 +936,7 @@ export default class CreateParameter extends Component {
...
@@ -919,6 +936,7 @@ export default class CreateParameter extends Component {
}
}
async
validasiCreate
()
{
async
validasiCreate
()
{
console
.
log
(
this
.
state
.
getFormatData
);
console
.
log
(
this
.
state
.
tempData
);
console
.
log
(
this
.
state
.
tempData
);
console
.
log
(
this
.
state
.
getTypes
);
console
.
log
(
this
.
state
.
getTypes
);
console
.
log
(
this
.
state
.
getParameter
);
console
.
log
(
this
.
state
.
getParameter
);
...
@@ -6204,20 +6222,25 @@ export default class CreateParameter extends Component {
...
@@ -6204,20 +6222,25 @@ export default class CreateParameter extends Component {
}
}
}
}
}
else
{
}
else
{
this
.
validasiCreateEdit
()
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6244,20 +6267,25 @@ export default class CreateParameter extends Component {
...
@@ -6244,20 +6267,25 @@ export default class CreateParameter extends Component {
}
}
}
}
}
else
{
}
else
{
this
.
validasiCreateEdit
()
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6377,6 +6405,8 @@ export default class CreateParameter extends Component {
...
@@ -6377,6 +6405,8 @@ export default class CreateParameter extends Component {
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
...
@@ -6389,6 +6419,8 @@ export default class CreateParameter extends Component {
...
@@ -6389,6 +6419,8 @@ export default class CreateParameter extends Component {
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6504,20 +6536,25 @@ export default class CreateParameter extends Component {
...
@@ -6504,20 +6536,25 @@ export default class CreateParameter extends Component {
}
}
}
}
}
else
{
}
else
{
this
.
validasiCreateEdit
()
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6544,20 +6581,25 @@ export default class CreateParameter extends Component {
...
@@ -6544,20 +6581,25 @@ export default class CreateParameter extends Component {
}
}
}
}
}
else
{
}
else
{
this
.
validasiCreateEdit
()
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6633,16 +6675,22 @@ export default class CreateParameter extends Component {
...
@@ -6633,16 +6675,22 @@ export default class CreateParameter extends Component {
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
@@ -6669,6 +6717,7 @@ export default class CreateParameter extends Component {
...
@@ -6669,6 +6717,7 @@ export default class CreateParameter extends Component {
}
}
}
}
}
else
{
}
else
{
this
.
validasiCreateEdit
()
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
...
@@ -6756,6 +6805,8 @@ export default class CreateParameter extends Component {
...
@@ -6756,6 +6805,8 @@ export default class CreateParameter extends Component {
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isEmpty
(
data
.
maxValue
)){
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
else
{
}
else
{
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
if
(
data
.
maxValue
.
match
(
minMaxValidasi
.
minMaxRegex
)
&&
data
.
maxValue
.
substring
(
0
,
1
)
!=
"0"
&&
data
.
maxValue
.
length
<=
minMaxValidasi
.
maxLength
){
...
@@ -6768,6 +6819,8 @@ export default class CreateParameter extends Component {
...
@@ -6768,6 +6819,8 @@ export default class CreateParameter extends Component {
this
.
validasiMaxResponse
()
this
.
validasiMaxResponse
()
if
(
R
.
isNil
(
data
.
endDate
)){
if
(
R
.
isNil
(
data
.
endDate
)){
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
validasiCreateEdit
()
}
}
}
}
}
}
...
...
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