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
27570f5e
Commit
27570f5e
authored
Oct 11, 2023
by
fahrur huzain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update parameter minmaxvalue
parent
1a09db26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
5 deletions
+64
-5
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+64
-5
No files found.
src/container/MasterData/Parameter/CreateParameter.js
View file @
27570f5e
...
@@ -683,7 +683,6 @@ export default class CreateParameter extends Component {
...
@@ -683,7 +683,6 @@ export default class CreateParameter extends Component {
// }
// }
// }
// }
async
validasiValueResponse
()
{
async
validasiValueResponse
()
{
let
data
=
await
this
.
validasiValueData
()
let
data
=
await
this
.
validasiValueData
()
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
...
@@ -1033,13 +1032,73 @@ export default class CreateParameter extends Component {
...
@@ -1033,13 +1032,73 @@ export default class CreateParameter extends Component {
obj
=
{
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minLength
:
11
,
maxLength
:
11
,
regexValue
:
(
/^
\d
+$/
)}
obj
=
{
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minLength
:
11
,
maxLength
:
11
,
regexValue
:
(
/^
\d
+$/
)}
break
break
case
"REPORT_SUBMIT_PERIOD"
:
case
"REPORT_SUBMIT_PERIOD"
:
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
)){
obj
=
{
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minLength
:
11
,
maxLength
:
11
}
}
else
{
if
(
this
.
state
.
getPerusahaan
.
company_name
==
"Default"
){
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
obj
=
{
obj
=
{
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minLength
:
11
,
maxLength
:
11
minLength
:
11
,
maxLength
:
11
}
}
}
else
{
switch
(
this
.
state
.
getParameter
.
setting_type_name
)
{
case
"MASTER_BUDGET"
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
break
case
"MONTHLY_REPORT"
:
obj
=
{
minMaxRegex
:
(
/^
(?:\d{1,2}
|
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}))
$/
),
minLength
:
11
,
maxLength
:
11
}
break
case
"OUTLOOK_Q1"
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
break
case
"OUTLOOK_Q2"
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
break
case
"OUTLOOK_Q3"
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
break
case
"OUTLOOK_PA"
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
break
default
:
obj
=
{
minMaxRegex
:
(
/^
(\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
))(?:\s\d{4})?
$/
),
minLength
:
11
,
maxLength
:
11
}
}
}
}
else
{
obj
=
{
minMaxRegex
:
(
/
\b\d{1,2}\s(
Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
)\s\d{4}\b
/
),
minLength
:
11
,
maxLength
:
11
}
}
}
break
break
case
"THRESHOLD_CONTROL"
:
case
"THRESHOLD_CONTROL"
:
obj
=
{
minMaxRegex
:
(
/
^-
?\d
+
\.?\d
+
$/
),
minLength
:
this
.
state
.
minValue
.
length
,
maxLength
:
this
.
state
.
maxValue
.
length
}
obj
=
{
minMaxRegex
:
(
/
-
?\d
+
(\.?\d
+
)?
$/
),
minLength
:
this
.
state
.
minValue
.
length
,
maxLength
:
this
.
state
.
maxValue
.
length
}
break
break
default
:
default
:
obj
=
{
regexValue
:
null
,
minLength
:
11
,
maxLength
:
11
}
obj
=
{
regexValue
:
null
,
minLength
:
11
,
maxLength
:
11
}
...
...
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