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
1fef009e
Commit
1fef009e
authored
Oct 01, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-DEV' of
http://103.44.149.204/d.arizona/tia-dev
into dev/riri
parents
a4af3da3
121ed3fc
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
378 additions
and
5 deletions
+378
-5
Images.js
src/assets/Images.js
+1
-0
information.png
src/assets/information.png
+0
-0
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+38
-5
PopUpInformation.js
src/library/PopUpInformation.js
+339
-0
No files found.
src/assets/Images.js
View file @
1fef009e
...
@@ -58,6 +58,7 @@ const Images = {
...
@@ -58,6 +58,7 @@ const Images = {
zip
:
require
(
'./zip.png'
),
zip
:
require
(
'./zip.png'
),
warning
:
require
(
'./warning.png'
),
warning
:
require
(
'./warning.png'
),
simulasiUpload
:
require
(
'./upload-simulasi.png'
),
simulasiUpload
:
require
(
'./upload-simulasi.png'
),
information
:
require
(
'./information.png'
),
}
}
export
default
Images
export
default
Images
\ No newline at end of file
src/assets/information.png
0 → 100644
View file @
1fef009e
20.4 KB
src/container/MasterData/Parameter/CreateParameter.js
View file @
1fef009e
...
@@ -7,6 +7,7 @@ import { format } from 'date-fns';
...
@@ -7,6 +7,7 @@ import { format } from 'date-fns';
import
*
as
R
from
'ramda'
import
*
as
R
from
'ramda'
import
Images
from
'../../../assets/Images'
;
import
Images
from
'../../../assets/Images'
;
import
Constant
from
'../../../library/Constant'
;
import
Constant
from
'../../../library/Constant'
;
import
PopUpInformation
from
'../../../library/PopUpInformation'
;
export
default
class
CreateParameter
extends
Component
{
export
default
class
CreateParameter
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -69,6 +70,7 @@ export default class CreateParameter extends Component {
...
@@ -69,6 +70,7 @@ export default class CreateParameter extends Component {
minMaxRegex
:
""
,
minMaxRegex
:
""
,
minLength
:
""
,
minLength
:
""
,
maxLength
:
""
,
maxLength
:
""
,
visiblePopupInformation
:
false
,
}
}
}
}
...
@@ -841,7 +843,7 @@ export default class CreateParameter extends Component {
...
@@ -841,7 +843,7 @@ export default class CreateParameter extends Component {
obj
=
{
regexValue
:
""
,
valueLength
:
""
}
obj
=
{
regexValue
:
""
,
valueLength
:
""
}
}
else
{
}
else
{
if
(
this
.
state
.
getTypes
.
setting_group_name
===
"CURRENCY"
){
if
(
this
.
state
.
getTypes
.
setting_group_name
===
"CURRENCY"
){
obj
=
{
regexValue
:
(
/
^
\d
+$
/
),
valueLength
:
20
}
obj
=
{
regexValue
:
(
/
\d
+
(\.\d
+
)?
/
),
valueLength
:
20
}
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
===
"REPORT_SUBMIT_PERIOD"
){
}
else
if
(
this
.
state
.
getTypes
.
setting_group_name
===
"REPORT_SUBMIT_PERIOD"
){
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
obj
=
{
regexValue
:
(
/
\b\d{4}\b
/
),
valueLength
:
4
}
obj
=
{
regexValue
:
(
/
\b\d{4}\b
/
),
valueLength
:
4
}
...
@@ -969,7 +971,7 @@ export default class CreateParameter extends Component {
...
@@ -969,7 +971,7 @@ export default class CreateParameter extends Component {
validasiValueData
(){
validasiValueData
(){
let
obj
=
null
let
obj
=
null
if
(
this
.
props
.
type
===
"edit"
){
if
(
this
.
props
.
type
===
"edit"
){
obj
=
{
value
:
this
.
state
.
tempData
.
value
,
minValue
:
this
.
state
.
tempData
.
min_value
,
maxValue
:
this
.
state
.
tempData
.
max_value
,
endDate
:
this
.
state
.
tempData
.
end_date
,
startDate
:
this
.
state
.
tempData
.
start_date
}
obj
=
{
value
:
this
.
state
.
tempData
.
value
.
toString
()
,
minValue
:
this
.
state
.
tempData
.
min_value
,
maxValue
:
this
.
state
.
tempData
.
max_value
,
endDate
:
this
.
state
.
tempData
.
end_date
,
startDate
:
this
.
state
.
tempData
.
start_date
}
}
else
{
}
else
{
obj
=
{
value
:
this
.
state
.
value
,
minValue
:
this
.
state
.
minValue
,
maxValue
:
this
.
state
.
maxValue
,
endDate
:
this
.
state
.
endDate
,
startDate
:
this
.
state
.
startDate
}
obj
=
{
value
:
this
.
state
.
value
,
minValue
:
this
.
state
.
minValue
,
maxValue
:
this
.
state
.
maxValue
,
endDate
:
this
.
state
.
endDate
,
startDate
:
this
.
state
.
startDate
}
}
}
...
@@ -1165,6 +1167,18 @@ export default class CreateParameter extends Component {
...
@@ -1165,6 +1167,18 @@ export default class CreateParameter extends Component {
this
.
props
.
createParameter
(
body
)
this
.
props
.
createParameter
(
body
)
}
}
openPopUp
()
{
if
(
!
R
.
isNil
(
this
.
state
.
getTypes
)){
if
(
this
.
state
.
getTypes
.
setting_group_name
==
"CURRENCY"
){
if
(
!
R
.
isNil
(
this
.
state
.
getReportName
)){
this
.
setState
({
visiblePopupInformation
:
true
})
}
}
}
}
render
()
{
render
()
{
let
{
type
}
=
this
.
props
let
{
type
}
=
this
.
props
return
type
===
'edit'
?
this
.
renderEdit
()
:
this
.
renderCreate
()
return
type
===
'edit'
?
this
.
renderEdit
()
:
this
.
renderCreate
()
...
@@ -1387,7 +1401,10 @@ export default class CreateParameter extends Component {
...
@@ -1387,7 +1401,10 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
reportName
}
{...
this
.
state
.
reportName
}
debug
debug
id
=
"report"
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
this
.
openPopUp
()
})}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
<
TextField
{...
params
}
{...
params
}
...
@@ -1407,7 +1424,8 @@ export default class CreateParameter extends Component {
...
@@ -1407,7 +1424,8 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
formatCurrency
}
{...
this
.
state
.
formatCurrency
}
debug
debug
id
=
"report"
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getFormatData
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getFormatData
:
newInputValue
},
()
=>
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
<
TextField
{...
params
}
{...
params
}
...
@@ -1646,6 +1664,12 @@ export default class CreateParameter extends Component {
...
@@ -1646,6 +1664,12 @@ export default class CreateParameter extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
visiblePopupInformation
&&
(
<
PopUpInformation
onClickClose
=
{()
=>
this
.
setState
({
visiblePopupInformation
:
false
})}
reportName
=
{
this
.
state
.
getReportName
.
setting_type_name
}
/
>
)}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -1861,7 +1885,9 @@ export default class CreateParameter extends Component {
...
@@ -1861,7 +1885,9 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
reportName
}
{...
this
.
state
.
reportName
}
debug
debug
id
=
"report"
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
this
.
openPopUp
()})}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
<
TextField
{...
params
}
{...
params
}
...
@@ -1932,6 +1958,7 @@ export default class CreateParameter extends Component {
...
@@ -1932,6 +1958,7 @@ export default class CreateParameter extends Component {
}
}
error
=
{
this
.
state
.
errorMinValue
}
error
=
{
this
.
state
.
errorMinValue
}
helperText
=
{
this
.
state
.
msgErrorMinValue
}
helperText
=
{
this
.
state
.
msgErrorMinValue
}
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
...
@@ -2089,6 +2116,12 @@ export default class CreateParameter extends Component {
...
@@ -2089,6 +2116,12 @@ export default class CreateParameter extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
visiblePopupInformation
&&
(
<
PopUpInformation
onClickClose
=
{()
=>
this
.
setState
({
visiblePopupInformation
:
false
})}
reportName
=
{
this
.
state
.
getReportName
.
setting_type_name
}
/
>
)}
<
/div
>
<
/div
>
)
)
}
}
...
...
src/library/PopUpInformation.js
0 → 100644
View file @
1fef009e
This diff is collapsed.
Click to expand it.
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