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
79bfb438
Commit
79bfb438
authored
Feb 24, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
editMasterDataCat
parent
cc3294c7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
490 additions
and
857 deletions
+490
-857
index.js
src/api/index.js
+3
-1
EditMasterDataCAT.js
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
+460
-829
MasterDataCAT.js
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
+27
-27
No files found.
src/api/index.js
View file @
79bfb438
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
...
@@ -189,6 +189,7 @@ const create = (type = "") => {
const
getAllMasterDataCat
=
()
=>
api
.
get
(
'item_report_company/get_all_item_report_company'
)
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
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
saveMasterDataCat
=
(
body
)
=>
api
.
post
(
'item_report_company/create_item_report_company'
,
body
)
// const getDetailMasterDataCat = (id) => api.get(`item_report_company/create_item_report_company/${id}`)
//Transaction
//Transaction
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_all_report'
,
body
)
const
getReportTypeBody
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/get_all_report'
,
body
)
...
@@ -691,7 +692,8 @@ const create = (type = "") => {
...
@@ -691,7 +692,8 @@ const create = (type = "") => {
getRollingOutlookBS
,
getRollingOutlookBS
,
getAllMasterDataCat
,
getAllMasterDataCat
,
getParentItemReport
,
getParentItemReport
,
saveMasterDataCat
saveMasterDataCat
,
// getDetailMasterDataCat
}
}
}
}
...
...
src/container/MasterData/MasterDataCAT/EditMasterDataCAT.js
View file @
79bfb438
This diff is collapsed.
Click to expand it.
src/container/MasterData/MasterDataCAT/MasterDataCAT.js
View file @
79bfb438
...
@@ -775,32 +775,32 @@ export default class MasterDataCAT extends Component {
...
@@ -775,32 +775,32 @@ export default class MasterDataCAT extends Component {
}
}
}
}
updateReportItems
=
(
payload
)
=>
{
//
updateReportItems = (payload) => {
this
.
setState
({
edit
:
false
})
//
this.setState({ edit: false })
api
.
create
().
updateReportItems
(
payload
).
then
(
response
=>
{
//
api.create().updateReportItems(payload).then(response => {
if
(
response
.
data
)
{
//
if (response.data) {
if
(
response
.
ok
)
{
//
if (response.ok) {
if
(
response
.
data
.
status
==
'success'
)
{
//
if (response.data.status == 'success') {
this
.
getData
()
//
this.getData()
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
}
else
{
//
} else {
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
//
if (response.data.message.includes("Someone Logged In")) {
setTimeout
(()
=>
{
//
setTimeout(() => {
localStorage
.
removeItem
(
Constant
.
TOKEN
)
//
localStorage.removeItem(Constant.TOKEN)
window
.
location
.
reload
();
//
window.location.reload();
},
1000
);
//
}, 1000);
}
//
}
})
//
})
}
//
}
}
else
{
//
} else {
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
//
}
}
else
{
//
} else {
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
//
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
//
}
})
//
})
}
//
}
uploadReportItems
()
{
uploadReportItems
()
{
api
.
create
().
uploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
uploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
...
@@ -1163,7 +1163,7 @@ export default class MasterDataCAT extends Component {
...
@@ -1163,7 +1163,7 @@ export default class MasterDataCAT extends Component {
onClickClose
=
{()
=>
this
.
setState
({
edit
:
false
})}
onClickClose
=
{()
=>
this
.
setState
({
edit
:
false
})}
data
=
{
this
.
state
.
rowData
}
data
=
{
this
.
state
.
rowData
}
refresh
=
{
this
.
getData
.
bind
(
this
)}
refresh
=
{
this
.
getData
.
bind
(
this
)}
updateReportItems
=
{
this
.
upd
ateReportItems
.
bind
(
this
)}
updateReportItems
=
{
this
.
cre
ateReportItems
.
bind
(
this
)}
/
>
/
>
)}
)}
{
this
.
state
.
popupError
&&
(
{
this
.
state
.
popupError
&&
(
...
...
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