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
9be36deb
Commit
9be36deb
authored
Jul 18, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/riri' into 'ENV-DEV'
update parameter See merge request
!1908
parents
750b9205
bdcec7ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+6
-3
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+17
-4
No files found.
src/container/MasterData/Parameter/CreateParameter.js
View file @
9be36deb
...
...
@@ -616,6 +616,7 @@ export default class CreateParameter extends Component {
"description"
:
this
.
state
.
tempData
.
description
,
"orders"
:
this
.
state
.
tempData
.
order
,
// "value": this.state.tempData.value,
// convert IDR to IDR mn
"value"
:
this
.
state
.
enableReportName
?
this
.
state
.
tempData
.
value
.
includes
(
"."
)
||
arrayChar
.
length
==
2
?
this
.
state
.
tempData
.
value
:
Number
((
this
.
state
.
tempData
.
value
)
/
1000
).
toFixed
(
1
)
:
this
.
state
.
tempData
.
value
,
"max_value"
:
this
.
state
.
tempData
.
max_value
,
"min_value"
:
this
.
state
.
tempData
.
min_value
,
...
...
@@ -637,7 +638,8 @@ export default class CreateParameter extends Component {
"reference_id"
:
this
.
state
.
getReportName
==
null
?
null
:
this
.
state
.
getReportName
.
setting_type_id
,
"description"
:
this
.
state
.
description
,
"orders"
:
this
.
state
.
order
,
"value"
:
this
.
state
.
value
.
includes
(
"."
)
&&
arrayChar
.
length
==
2
?
this
.
state
.
value
:
Number
((
this
.
state
.
value
)
/
1000
).
toFixed
(
1
)
,
// convert IDR to IDR mn
"value"
:
this
.
state
.
enableReportName
?
this
.
state
.
value
.
includes
(
"."
)
||
arrayChar
.
length
==
2
?
this
.
state
.
value
:
Number
((
this
.
state
.
value
)
/
1000
).
toFixed
(
1
)
:
this
.
state
.
value
,
"max_value"
:
this
.
state
.
maxValue
,
"min_value"
:
this
.
state
.
minValue
,
"start_date"
:
this
.
state
.
startDate
,
...
...
@@ -830,7 +832,8 @@ export default class CreateParameter extends Component {
style
=
{{
width
:
'100%'
}}
id
=
"value"
label
=
{
"Value"
}
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
value
}
// get data IDR by IDR mn
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
setting_group
===
"CURRENCY"
?
Number
(
this
.
state
.
tempData
.
value
)
*
1000
:
this
.
state
.
tempData
.
value
}
inputProps
=
{{
min
:
0
,
style
:
{
...
...
@@ -1266,7 +1269,7 @@ export default class CreateParameter extends Component {
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"value"
label
=
{
this
.
state
.
enableReportName
?
"Value IDR mn"
:
"Value"
}
label
=
{
"Value"
}
value
=
{
this
.
state
.
value
}
inputProps
=
{{
min
:
0
,
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
9be36deb
...
...
@@ -62,7 +62,7 @@ export default class Parameter extends Component {
this
.
getSizeUpload
()
}
getSizeUpload
(){
getSizeUpload
()
{
let
body
=
{
group
:
'MAX_FILE_SIZE'
,
company_id
:
0
,
...
...
@@ -104,6 +104,7 @@ export default class Parameter extends Component {
getAllParameter
()
{
this
.
setState
({
loading
:
true
})
api
.
create
().
getAllParameter
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -118,7 +119,7 @@ export default class Parameter extends Component {
item
.
company_name
,
item
.
description
,
item
.
order
,
item
.
value
,
item
.
setting_group
===
"CURRENCY"
?
Number
(
item
.
value
)
*
1000
:
item
.
value
,
// convert IDR mn to IDR
item
.
min_value
,
item
.
max_value
,
item
.
status
...
...
@@ -332,6 +333,7 @@ export default class Parameter extends Component {
let
body
=
{
setting
:
payload
}
console
.
log
(
body
);
// console.log(resp.rows[1]);
this
.
setState
({
payload
:
body
,
buttonError
:
false
,
judul
:
resp
.
rows
[
1
]
===
undefined
?
""
:
resp
.
rows
[
1
][
0
]
})
}
...
...
@@ -675,8 +677,19 @@ export default class Parameter extends Component {
}
uploadParameter
()
{
console
.
log
(
this
.
state
.
payload
);
api
.
create
().
uploadParameter
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
this
.
state
.
payload
let
arr
=
[]
for
(
let
index
=
0
;
index
<
payload
.
setting
.
length
;
index
++
)
{
let
item
=
payload
.
setting
[
index
]
arr
.
push
({
...
item
,
value
:
item
?.
group
===
'CURRENCY'
?
Number
(
item
?.
value
)
/
1000
:
item
?.
value
})
}
payload
=
{
setting
:
arr
}
api
.
create
().
uploadParameter
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
...
...
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