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
f4b95bab
Commit
f4b95bab
authored
Dec 27, 2023
by
fahrur huzain
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'
Env dev See merge request
!2294
parents
842cc5b1
36540f87
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
CreateMasterDataCAT.js
...container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
+4
-4
EditMasterDataCAT.js
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
+6
-6
No files found.
src/container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
View file @
f4b95bab
...
...
@@ -3,7 +3,7 @@ import { TextField, Typography, Snackbar, withStyles } from '@material-ui/core';
import
*
as
R
from
'ramda'
;
import
api
from
'../../../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
{
titleCase
}
from
'../../../library/Utils'
;
import
{
fixNumber
,
titleCase
}
from
'../../../library/Utils'
;
import
format
from
"date-fns/format"
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
Images
from
'../../../assets/Images'
;
...
...
@@ -184,10 +184,10 @@ export default class CreateMasterDataCAT extends Component {
getData
.
map
((
item
)
=>
{
jumlah
+=
Number
(
item
.
weight
)
})
console
.
log
(
jumlah
)
if
(
jumlah
>
100
/
100
)
{
console
.
log
(
fixNumber
(
jumlah
,
3
)
)
if
(
fixNumber
(
jumlah
,
3
)
>
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight more than 100%'
})
}
else
if
(
jumlah
<
100
/
100
)
{
}
else
if
(
fixNumber
(
jumlah
,
3
)
<
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight less than 100%'
})
}
else
{
...
...
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
View file @
f4b95bab
...
...
@@ -6,7 +6,7 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
api
from
'../../../api'
;
import
*
as
R
from
'ramda'
import
{
titleCase
}
from
'../../../library/Utils'
;
import
{
fixNumber
,
titleCase
}
from
'../../../library/Utils'
;
import
Images
from
'../../../assets/Images'
;
import
Constant
from
'../../../library/Constant'
;
const
Alert
=
withStyles
({
...
...
@@ -194,10 +194,10 @@ export default class EditMasterDataCAT extends Component {
getData
.
map
((
item
)
=>
{
jumlah
+=
Number
(
item
.
weight
)
})
console
.
log
(
jumlah
)
if
(
jumlah
>
100
/
100
)
{
console
.
log
(
fixNumber
(
jumlah
,
3
)
)
if
(
fixNumber
(
jumlah
,
3
)
>
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight more than 100%'
})
}
else
if
(
jumlah
<
100
/
100
)
{
}
else
if
(
fixNumber
(
jumlah
,
3
)
<
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight less than 100%'
})
}
else
{
...
...
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