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
cc3294c7
Commit
cc3294c7
authored
Feb 24, 2021
by
Rifka Kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
md cat See merge request
!1208
parents
50065135
a8c4de08
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
135 additions
and
578 deletions
+135
-578
index.js
src/api/index.js
+5
-1
CreateMasterDataCAT.js
...container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
+116
-558
MasterDataCAT.js
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
+14
-19
No files found.
src/api/index.js
View file @
cc3294c7
...
...
@@ -186,7 +186,9 @@ const create = (type = "") => {
const
deleteParameter
=
(
id
)
=>
api
.
post
(
`setting/delete_setting/
${
id
}
`
)
// MASTER DATA - CAT
const
getAllMasterDataCat
=
()
=>
api
.
get
(
'item_report_company/get_all_item_report_company'
)
const
getParentItemReport
=
(
body
)
=>
api
.
post
(
'item_report/get_parent_item_report_default'
,
body
)
const
saveMasterDataCat
=
(
body
)
=>
api
.
post
(
'item_report_company/create_item_report_company'
,
body
)
//Transaction
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_all_report'
,
body
)
...
...
@@ -687,7 +689,9 @@ const create = (type = "") => {
getHierarkiCronJobMRRatio
,
getRollingOutlookID
,
getRollingOutlookBS
,
getParentItemReport
getAllMasterDataCat
,
getParentItemReport
,
saveMasterDataCat
}
}
...
...
src/container/MasterData/MasterDataCAT/CreateMasterDataCAT.js
View file @
cc3294c7
This diff is collapsed.
Click to expand it.
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
View file @
cc3294c7
...
...
@@ -594,8 +594,8 @@ export default class MasterDataCAT extends Component {
getData
()
{
this
.
setState
({
loading
:
true
})
api
.
create
().
get
ReportItems
().
then
((
response
)
=>
{
//
console.log(response)
api
.
create
().
get
AllMasterDataCat
().
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
...
@@ -604,17 +604,11 @@ export default class MasterDataCAT extends Component {
return
[
index
,
item
.
item_report_id
,
item
.
report_name
,
item
.
report_name
,
item
.
company_name
,
item
.
order
,
item
.
description
,
item
.
parent
!==
null
?
`
${
item
.
parent
}
-
${
item
.
parent_name
}
`
:
""
,
item
.
uom
,
item
.
report_name
,
item
.
weight
,
item
.
type_item_report_name
,
item
.
kpi_type
,
item
.
max_ach
,
item
.
formula_ytd
,
item
.
years
,
item
.
status
]
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
},
()
=>
{
...
...
@@ -622,6 +616,7 @@ export default class MasterDataCAT extends Component {
this
.
setState
({
loading
:
false
})
},
2000
);
})
console
.
log
(
this
.
state
.
dataTable
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
@@ -724,7 +719,7 @@ export default class MasterDataCAT extends Component {
createReportItems
=
(
payload
)
=>
{
this
.
setState
({
add
:
false
})
api
.
create
().
createReportItems
(
payload
).
then
(
response
=>
{
api
.
create
().
saveMasterDataCat
(
payload
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
...
...
@@ -896,7 +891,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -908,7 +903,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -920,7 +915,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -932,7 +927,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -944,7 +939,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -956,7 +951,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/div
>
);
}
...
...
@@ -968,7 +963,7 @@ export default class MasterDataCAT extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
13
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
color
:
tableMeta
.
rowData
[
7
]
===
"Active"
?
"#656565"
:
'rgba(0, 0, 0, 0.25)'
}}
>
{
val
}
<
/span
>
<
/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