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
62961a4a
Commit
62961a4a
authored
Feb 24, 2021
by
Rifka Kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
delete master data cat See merge request
!1209
parents
cc3294c7
e9162c5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
index.js
src/api/index.js
+3
-1
MasterDataCAT.js
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
+21
-11
No files found.
src/api/index.js
View file @
62961a4a
...
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
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
)
const
deleteMasterDataCat
=
(
idCompany
,
years
)
=>
api
.
post
(
`item_report_company/delete_item_report_company/
${
idCompany
}
/
${
years
}
`
)
//Transaction
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_all_report'
,
body
)
...
...
@@ -691,7 +692,8 @@ const create = (type = "") => {
getRollingOutlookBS
,
getAllMasterDataCat
,
getParentItemReport
,
saveMasterDataCat
saveMasterDataCat
,
deleteMasterDataCat
}
}
...
...
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
View file @
62961a4a
...
...
@@ -609,7 +609,9 @@ export default class MasterDataCAT extends Component {
item
.
report_name
,
item
.
weight
,
item
.
years
,
item
.
status
]
item
.
status
,
item
.
item_report_company_id
]
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
},
()
=>
{
setTimeout
(()
=>
{
...
...
@@ -637,9 +639,11 @@ export default class MasterDataCAT extends Component {
}
deleteReport
(
payload
)
{
// console.log(payload);
let
id
=
String
(
payload
[
1
])
api
.
create
().
deleteReportItems
(
id
).
then
(
response
=>
{
console
.
log
(
payload
);
let
idCompany
=
payload
[
8
]
let
years
=
payload
[
6
]
api
.
create
().
deleteMasterDataCat
(
idCompany
,
years
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -673,7 +677,7 @@ export default class MasterDataCAT extends Component {
}
else
if
(
type
===
'delete'
)
{
this
.
setState
({
rowData
:
index
,
reportNameDelete
:
"["
+
String
(
index
[
2
])
+
" - "
+
String
(
index
[
3
])
+
" - "
+
String
(
index
[
5
])
+
"]
"
,
reportNameDelete
:
"["
+
String
(
index
[
3
])
+
" - "
+
String
(
index
[
6
])
+
"]
"
,
visibleDelete
:
true
})
}
else
{
...
...
@@ -968,6 +972,12 @@ export default class MasterDataCAT extends Component {
);
}
}
},
{
name
:
"company id"
,
options
:
{
display
:
false
}
}
]
const
data
=
[
...
...
@@ -1013,7 +1023,7 @@ export default class MasterDataCAT extends Component {
/>
</div> */
}
<
div
style
=
{{
width
:
'50%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
{
/*
<a data-tip={'Download Template'} data-for="template">
<button
style={{
backgroundColor: 'transparent',
...
...
@@ -1026,8 +1036,8 @@ export default class MasterDataCAT extends Component {
<img src={Images.template} />
</button>
</a>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{
this
.
state
.
buttonCreate
&&
(
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
*/
}
{
/* {
this.state.buttonCreate && (
<a data-tip={'Upload'} data-for="upload">
<button
style={{
...
...
@@ -1042,7 +1052,7 @@ export default class MasterDataCAT extends Component {
</button>
</a>
)}
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
*/
}
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
style
=
{{
...
...
@@ -1057,7 +1067,7 @@ export default class MasterDataCAT extends Component {
<
/button
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"download"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Visualization'
}
data
-
for
=
"visualisasi"
>
{
/*
<a data-tip={'Visualization'} data-for="visualisasi">
<button
style={{
backgroundColor: 'transparent',
...
...
@@ -1070,7 +1080,7 @@ export default class MasterDataCAT extends Component {
<img src={Images.visualisasi} />
</button>
</a>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<ReactTooltip border={true} id="visualisasi" place="bottom" type="light" effect="solid" />
*/
}
{
this
.
state
.
buttonCreate
&&
(
<
a
data
-
tip
=
{
'Add New'
}
data
-
for
=
"tambah"
>
<
button
...
...
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