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
5c7398a4
Commit
5c7398a4
authored
Sep 29, 2023
by
fahrur huzain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pop up information parameter currency
parent
27da6d73
Changes
4
Expand all
Show 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 @
5c7398a4
...
...
@@ -58,6 +58,7 @@ const Images = {
zip
:
require
(
'./zip.png'
),
warning
:
require
(
'./warning.png'
),
simulasiUpload
:
require
(
'./upload-simulasi.png'
),
information
:
require
(
'./information.png'
),
}
export
default
Images
\ No newline at end of file
src/assets/information.png
0 → 100644
View file @
5c7398a4
20.4 KB
src/container/MasterData/Parameter/CreateParameter.js
View file @
5c7398a4
...
...
@@ -7,6 +7,7 @@ import { format } from 'date-fns';
import
*
as
R
from
'ramda'
import
Images
from
'../../../assets/Images'
;
import
Constant
from
'../../../library/Constant'
;
import
PopUpInformation
from
'../../../library/PopUpInformation'
;
export
default
class
CreateParameter
extends
Component
{
constructor
(
props
)
{
...
...
@@ -69,6 +70,7 @@ export default class CreateParameter extends Component {
minMaxRegex
:
""
,
minLength
:
""
,
maxLength
:
""
,
visiblePopupInformation
:
false
,
}
}
...
...
@@ -841,7 +843,7 @@ export default class CreateParameter extends Component {
obj
=
{
regexValue
:
""
,
valueLength
:
""
}
}
else
{
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"
){
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
obj
=
{
regexValue
:
(
/
\b\d{4}\b
/
),
valueLength
:
4
}
...
...
@@ -969,7 +971,7 @@ export default class CreateParameter extends Component {
validasiValueData
(){
let
obj
=
null
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
{
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 {
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
()
{
let
{
type
}
=
this
.
props
return
type
===
'edit'
?
this
.
renderEdit
()
:
this
.
renderCreate
()
...
...
@@ -1387,7 +1401,10 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
reportName
}
debug
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
this
.
openPopUp
()
})}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
...
...
@@ -1407,7 +1424,8 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
formatCurrency
}
debug
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getFormatData
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getFormatData
:
newInputValue
},
()
=>
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
...
...
@@ -1646,6 +1664,12 @@ export default class CreateParameter extends Component {
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
visiblePopupInformation
&&
(
<
PopUpInformation
onClickClose
=
{()
=>
this
.
setState
({
visiblePopupInformation
:
false
})}
reportName
=
{
this
.
state
.
getReportName
.
setting_type_name
}
/
>
)}
<
/div
>
)
}
...
...
@@ -1861,7 +1885,9 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
reportName
}
debug
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
{
this
.
clearMessage
()
this
.
openPopUp
()})}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
...
...
@@ -1932,6 +1958,7 @@ export default class CreateParameter extends Component {
}
error
=
{
this
.
state
.
errorMinValue
}
helperText
=
{
this
.
state
.
msgErrorMinValue
}
>
<
/TextField
>
<
/div
>
...
...
@@ -2089,6 +2116,12 @@ export default class CreateParameter extends Component {
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
visiblePopupInformation
&&
(
<
PopUpInformation
onClickClose
=
{()
=>
this
.
setState
({
visiblePopupInformation
:
false
})}
reportName
=
{
this
.
state
.
getReportName
.
setting_type_name
}
/
>
)}
<
/div
>
)
}
...
...
src/library/PopUpInformation.js
0 → 100644
View file @
5c7398a4
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