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
4cd9f815
Commit
4cd9f815
authored
Dec 28, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-STAGING' into 'ENV-PROD'
Env staging See merge request
!2300
parents
83b9fb6f
50f50f80
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
99 deletions
+100
-99
CreateMasterDataCAT.js
...container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
+4
-4
EditMasterDataCAT.js
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
+6
-6
MasterDataCAT.js
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
+90
-89
No files found.
src/container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
View file @
4cd9f815
...
@@ -3,7 +3,7 @@ import { TextField, Typography, Snackbar, withStyles } from '@material-ui/core';
...
@@ -3,7 +3,7 @@ import { TextField, Typography, Snackbar, withStyles } from '@material-ui/core';
import
*
as
R
from
'ramda'
;
import
*
as
R
from
'ramda'
;
import
api
from
'../../../api'
;
import
api
from
'../../../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
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
format
from
"date-fns/format"
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
{
DatePicker
}
from
'@material-ui/pickers'
;
import
Images
from
'../../../assets/Images'
;
import
Images
from
'../../../assets/Images'
;
...
@@ -184,10 +184,10 @@ export default class CreateMasterDataCAT extends Component {
...
@@ -184,10 +184,10 @@ export default class CreateMasterDataCAT extends Component {
getData
.
map
((
item
)
=>
{
getData
.
map
((
item
)
=>
{
jumlah
+=
Number
(
item
.
weight
)
jumlah
+=
Number
(
item
.
weight
)
})
})
console
.
log
(
jumlah
)
console
.
log
(
fixNumber
(
jumlah
,
3
)
)
if
(
jumlah
>
100
/
100
)
{
if
(
fixNumber
(
jumlah
,
3
)
>
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight more than 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%'
})
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight less than 100%'
})
}
}
else
{
else
{
...
...
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
View file @
4cd9f815
...
@@ -6,7 +6,7 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
...
@@ -6,7 +6,7 @@ import Autocomplete from '@material-ui/lab/Autocomplete';
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
MuiAlert
from
'@material-ui/lab/Alert'
;
import
api
from
'../../../api'
;
import
api
from
'../../../api'
;
import
*
as
R
from
'ramda'
import
*
as
R
from
'ramda'
import
{
titleCase
}
from
'../../../library/Utils'
;
import
{
fixNumber
,
titleCase
}
from
'../../../library/Utils'
;
import
Images
from
'../../../assets/Images'
;
import
Images
from
'../../../assets/Images'
;
import
Constant
from
'../../../library/Constant'
;
import
Constant
from
'../../../library/Constant'
;
const
Alert
=
withStyles
({
const
Alert
=
withStyles
({
...
@@ -194,10 +194,10 @@ export default class EditMasterDataCAT extends Component {
...
@@ -194,10 +194,10 @@ export default class EditMasterDataCAT extends Component {
getData
.
map
((
item
)
=>
{
getData
.
map
((
item
)
=>
{
jumlah
+=
Number
(
item
.
weight
)
jumlah
+=
Number
(
item
.
weight
)
})
})
console
.
log
(
jumlah
)
console
.
log
(
fixNumber
(
jumlah
,
3
)
)
if
(
jumlah
>
100
/
100
)
{
if
(
fixNumber
(
jumlah
,
3
)
>
100
/
100
)
{
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight more than 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%'
})
this
.
setState
({
errorWeight
:
true
,
msgErrorWeight
:
'Weight less than 100%'
})
}
}
else
{
else
{
...
...
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
View file @
4cd9f815
...
@@ -604,11 +604,11 @@ export default class MasterDataCAT extends Component {
...
@@ -604,11 +604,11 @@ export default class MasterDataCAT extends Component {
return
[
return
[
index
,
index
,
item
.
item_report_id
,
item
.
item_report_id
,
item
.
report_name
,
item
.
item_report_name
,
item
.
item_report_name
,
item
.
years
,
item
.
company_name
,
item
.
company_name
,
item
.
report_name
,
item
.
weight
,
item
.
weight
,
item
.
years
,
item
.
status
,
item
.
status
,
item
.
company_id
item
.
company_id
]
]
...
@@ -848,6 +848,7 @@ export default class MasterDataCAT extends Component {
...
@@ -848,6 +848,7 @@ export default class MasterDataCAT extends Component {
name
:
"Action"
,
name
:
"Action"
,
options
:
{
options
:
{
sort
:
false
,
sort
:
false
,
filter
:
false
,
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
...
@@ -899,7 +900,7 @@ export default class MasterDataCAT extends Component {
...
@@ -899,7 +900,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
1
]
}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -911,7 +912,7 @@ export default class MasterDataCAT extends Component {
...
@@ -911,7 +912,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
4
]}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
2
]}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -923,7 +924,7 @@ export default class MasterDataCAT extends Component {
...
@@ -923,7 +924,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
2
]}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
3
]}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -935,7 +936,7 @@ export default class MasterDataCAT extends Component {
...
@@ -935,7 +936,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
6
]}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
4
]}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -947,7 +948,7 @@ export default class MasterDataCAT extends Component {
...
@@ -947,7 +948,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
3
]}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
5
]}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
@@ -959,7 +960,7 @@ export default class MasterDataCAT extends Component {
...
@@ -959,7 +960,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
5
]}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
tableMeta
.
rowData
[
6
]}
<
/span
>
<
/div
>
<
/div
>
);
);
}
}
...
...
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