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
0ca967e6
Commit
0ca967e6
authored
Aug 29, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update duplicate CAT
parent
841c77e5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
12 deletions
+37
-12
index.js
src/api/index.js
+7
-1
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+13
-2
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+17
-9
No files found.
src/api/index.js
View file @
0ca967e6
...
@@ -541,6 +541,10 @@ const create = (type = "") => {
...
@@ -541,6 +541,10 @@ const create = (type = "") => {
const
uploadSimulasiMROI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing'
,
body
)
const
uploadSimulasiMROI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing'
,
body
)
const
uploadSimulasiROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing'
,
body
)
const
uploadSimulasiROOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing'
,
body
)
// Delete Duplicate CAT
const
deleteDuplicateSubmitCAT
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_duplicate_submit_item_report'
,
body
)
const
deleteDuplicateImportCAT
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_duplicate_import_item_report'
,
body
)
// Superadmin Approve
// Superadmin Approve
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
...
@@ -935,7 +939,9 @@ const create = (type = "") => {
...
@@ -935,7 +939,9 @@ const create = (type = "") => {
createSimulasiOLPACF
,
createSimulasiOLPACF
,
uploadSimulasiOperatingInd
,
uploadSimulasiOperatingInd
,
uploadSimulasiMROI
,
uploadSimulasiMROI
,
uploadSimulasiROOI
uploadSimulasiROOI
,
deleteDuplicateSubmitCAT
,
deleteDuplicateImportCAT
}
}
}
}
...
...
src/container/BudgetTahunan/BudgetTahunan.js
View file @
0ca967e6
...
@@ -2346,18 +2346,29 @@ export default class BudgetTahunan extends Component {
...
@@ -2346,18 +2346,29 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
type
===
"PL"
||
type
===
"DraftPL"
)
{
if
(
type
===
"PL"
||
type
===
"DraftPL"
)
{
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
getSubmission
(
type
)
}
else
if
(
type
===
"TP"
||
type
===
"DraftTP"
)
{
}
else
if
(
type
===
"TP"
||
type
===
"DraftTP"
)
{
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
getSubmission
(
type
)
}
else
if
(
type
===
"BS"
||
type
===
"DraftBS"
)
{
}
else
if
(
type
===
"BS"
||
type
===
"DraftBS"
)
{
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
getSubmission
(
type
)
}
else
if
(
type
===
"FAM"
||
type
===
"DraftFAM"
)
{
}
else
if
(
type
===
"FAM"
||
type
===
"DraftFAM"
)
{
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
this
.
getSubmission
(
type
)
}
else
if
(
type
===
"CAT"
||
type
===
"DraftCAT"
)
{
}
else
if
(
type
===
"CAT"
||
type
===
"DraftCAT"
)
{
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
,
loading
:
false
})
api
.
create
().
deleteDuplicateSubmitCAT
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
status
===
"success"
)
{
this
.
setState
({
loading
:
false
,
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})
this
.
getSubmission
(
type
)
}
})
}
else
{
}
else
{
this
.
setState
({
visibleBudgetTahunan
:
true
,
visiblePL
:
false
,
visibleTP
:
false
,
visibleBS
:
false
,
visibleFAM
:
false
,
visibleCAT
:
false
,
loading
:
false
})
this
.
setState
({
visibleBudgetTahunan
:
true
,
visiblePL
:
false
,
visibleTP
:
false
,
visibleBS
:
false
,
visibleFAM
:
false
,
visibleCAT
:
false
,
loading
:
false
})
}
this
.
getSubmission
(
type
)
this
.
getSubmission
(
type
)
}
// this.getSubmission(type)
}
else
{
}
else
{
console
.
log
(
response
.
data
);
console
.
log
(
response
.
data
);
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
0ca967e6
...
@@ -661,6 +661,9 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -661,6 +661,9 @@ export default class CorporateAnnualTarget extends Component {
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
api
.
create
().
deleteDuplicateImportCAT
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
getReport
(
body
,
'CAT'
)
this
.
props
.
getReport
(
body
,
'CAT'
)
...
@@ -669,6 +672,8 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -669,6 +672,8 @@ export default class CorporateAnnualTarget extends Component {
}
}
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
}
})
// this.props.getReport()
// this.props.getReport()
}
else
{
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
...
@@ -904,7 +909,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -904,7 +909,7 @@ export default class CorporateAnnualTarget extends Component {
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
if
(
this
.
state
.
dataDelete
.
length
>
0
)
{
api
.
create
().
deleteAllItemReport
(
payload
).
then
((
response
)
=>
{
api
.
create
().
deleteAllItemReport
(
payload
).
then
((
response
)
=>
{
// // // //
console.log(response)
console
.
log
(
response
)
// api.create().validateSubmitReport(payloadBro).then((response) => {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// // // // // console.log(response)
...
@@ -912,8 +917,10 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -912,8 +917,10 @@ export default class CorporateAnnualTarget extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
// this.props.onClickClose()
}
else
{
}
else
{
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'DraftCAT'
)
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'DraftCAT'
)
// this.props.onClickClose()
}
}
}
else
{
}
else
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
...
@@ -938,11 +945,12 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -938,11 +945,12 @@ export default class CorporateAnnualTarget extends Component {
// })
// })
})
})
}
else
{
}
else
{
console
.
log
(
"kesini bukan?"
);
// // // // // console.log('sini jing')
// // // // // console.log('sini jing')
// api.create().validateSubmitReport(payloadBro).then((response) => {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// // // // // console.log(response)
// if (response.data.data.result) {
// if (response.data.data.result) {
this
.
props
.
saveToMasterBudget
(
payloadBro
)
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
this
.
props
.
onClickClose
()
this
.
props
.
onClickClose
()
// } else {
// } 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