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
9e231df9
Commit
9e231df9
authored
Jul 28, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Company
parent
ff0dacff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+12
-11
No files found.
src/container/MasterData/Parameter/CreateParameter.js
View file @
9e231df9
...
@@ -36,6 +36,7 @@ export default class CreateParameter extends Component {
...
@@ -36,6 +36,7 @@ export default class CreateParameter extends Component {
operators
:
null
,
operators
:
null
,
getOperators
:
null
,
getOperators
:
null
,
tempData
:
null
,
tempData
:
null
,
tesValue
:
null
,
errorParameter
:
false
,
errorParameter
:
false
,
errorDeskripsi
:
false
,
errorDeskripsi
:
false
,
errorReportName
:
false
,
errorReportName
:
false
,
...
@@ -91,7 +92,8 @@ export default class CreateParameter extends Component {
...
@@ -91,7 +92,8 @@ export default class CreateParameter extends Component {
getSettingTypeID
:
data
.
setting_type_id
,
getSettingTypeID
:
data
.
setting_type_id
,
typeReport
:
data
.
setting_type_name
,
typeReport
:
data
.
setting_type_name
,
getTypeReportID
:
data
.
setting_type_id
,
getTypeReportID
:
data
.
setting_type_id
,
enableReportName
:
data
.
setting_group
===
"CURRENCY"
?
true
:
false
enableReportName
:
data
.
setting_group
===
"CURRENCY"
?
true
:
false
,
tesValue
:
response
.
data
.
data
.
setting_group
===
"CURRENCY"
?
Number
(
response
.
data
.
data
.
value
)
*
1000
:
response
.
data
.
data
.
value
},
()
=>
{
},
()
=>
{
this
.
getAllGroup
()
this
.
getAllGroup
()
...
@@ -604,9 +606,9 @@ export default class CreateParameter extends Component {
...
@@ -604,9 +606,9 @@ export default class CreateParameter extends Component {
}
}
updateParameter
()
{
updateParameter
()
{
let
char
=
this
.
state
.
tempData
.
value
// let char = this.state
.value
let
arrayChar
=
char
.
split
(
''
);
//
let arrayChar = char.split('');
console
.
log
(
arrayC
har
);
// console.log(c
har);
let
body
=
{
let
body
=
{
"setting_id"
:
this
.
state
.
tempData
.
setting_id
,
"setting_id"
:
this
.
state
.
tempData
.
setting_id
,
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
...
@@ -615,22 +617,20 @@ export default class CreateParameter extends Component {
...
@@ -615,22 +617,20 @@ export default class CreateParameter extends Component {
"reference_id"
:
this
.
state
.
getReportName
==
null
?
null
:
this
.
state
.
getReportName
.
setting_type_id
,
"reference_id"
:
this
.
state
.
getReportName
==
null
?
null
:
this
.
state
.
getReportName
.
setting_type_id
,
"description"
:
this
.
state
.
tempData
.
description
,
"description"
:
this
.
state
.
tempData
.
description
,
"orders"
:
this
.
state
.
tempData
.
order
,
"orders"
:
this
.
state
.
tempData
.
order
,
// "value": this.state.tempData.value,
"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
,
"max_value"
:
this
.
state
.
tempData
.
max_value
,
"min_value"
:
this
.
state
.
tempData
.
min_value
,
"min_value"
:
this
.
state
.
tempData
.
min_value
,
"start_date"
:
this
.
state
.
tempData
.
start_date
,
"start_date"
:
this
.
state
.
tempData
.
start_date
,
"end_date"
:
this
.
state
.
tempData
.
end_date
"end_date"
:
this
.
state
.
tempData
.
end_date
}
}
console
.
log
(
body
);
console
.
log
(
body
);
this
.
props
.
updateParameter
(
body
)
//
this.props.updateParameter(body)
}
}
createParameter
()
{
createParameter
()
{
let
char
=
this
.
state
.
value
let
char
=
this
.
state
.
value
let
arrayChar
=
char
.
split
(
''
);
let
arrayChar
=
char
.
split
(
''
);
console
.
log
(
arrayC
har
);
// console.log(c
har);
let
body
=
{
let
body
=
{
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
"setting_type_id"
:
this
.
state
.
getParameter
.
setting_type_id
,
"setting_type_id"
:
this
.
state
.
getParameter
.
setting_type_id
,
...
@@ -638,6 +638,7 @@ export default class CreateParameter extends Component {
...
@@ -638,6 +638,7 @@ export default class CreateParameter extends Component {
"reference_id"
:
this
.
state
.
getReportName
==
null
?
null
:
this
.
state
.
getReportName
.
setting_type_id
,
"reference_id"
:
this
.
state
.
getReportName
==
null
?
null
:
this
.
state
.
getReportName
.
setting_type_id
,
"description"
:
this
.
state
.
description
,
"description"
:
this
.
state
.
description
,
"orders"
:
this
.
state
.
order
,
"orders"
:
this
.
state
.
order
,
"value"
:
this
.
state
.
value
,
// convert IDR to IDR mn
// 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
,
"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
,
"max_value"
:
this
.
state
.
maxValue
,
...
@@ -646,7 +647,7 @@ export default class CreateParameter extends Component {
...
@@ -646,7 +647,7 @@ export default class CreateParameter extends Component {
"end_date"
:
this
.
state
.
endDate
"end_date"
:
this
.
state
.
endDate
}
}
console
.
log
(
body
);
console
.
log
(
body
);
this
.
props
.
createParameter
(
body
)
//
this.props.createParameter(body)
}
}
render
()
{
render
()
{
...
@@ -851,7 +852,7 @@ export default class CreateParameter extends Component {
...
@@ -851,7 +852,7 @@ export default class CreateParameter extends Component {
this
.
setState
({
this
.
setState
({
tempData
:
{
tempData
:
{
...
this
.
state
.
tempData
,
...
this
.
state
.
tempData
,
value
:
e
.
target
.
value
value
:
this
.
state
.
tempData
.
setting_group
===
"CURRENCY"
?
e
.
target
.
value
/
1000
:
e
.
target
.
value
}
}
})
})
this
.
clearMessage
()
this
.
clearMessage
()
...
...
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