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
29774163
Commit
29774163
authored
Oct 06, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
++ See merge request
!463
parents
9278f9ea
84c32c50
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
133 additions
and
108 deletions
+133
-108
index.js
src/api/index.js
+23
-1
OutlookPA.js
src/container/OutlookPA.js
+31
-31
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+79
-76
No files found.
src/api/index.js
View file @
29774163
...
...
@@ -218,6 +218,18 @@ const create = (type = "") => {
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
//OUTLOOK PA
const
getOutlookPAID
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_outlook_pa_id'
,
body
)
const
getLastPeriodOLPA
=
(
idCompany
)
=>
api
.
get
(
`/transaction/outlook_pa/get_last_periode/
${
idCompany
}
`
)
const
getCompanySubmittedOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_company_submitted'
,
body
)
const
getRevisionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_revision'
,
body
)
const
historyApprovalOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/history_approval'
,
body
)
const
getSubmitOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_latest_periode_submit'
,
body
)
const
getOLPAAtt
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_report_attachment'
,
body
)
const
submitOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/submit_outlook_pa'
,
body
)
const
getLastestUpdateOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_latest_update'
,
body
)
const
createReportOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/create_outlook_report'
,
body
)
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
...
@@ -373,7 +385,17 @@ const create = (type = "") => {
getCompanySubmitted
,
getLastPeriod
,
getSubmitMasterBudget
,
createPeriodeRevision
createPeriodeRevision
,
getOutlookPAID
,
getLastPeriodOLPA
,
getCompanySubmittedOLPA
,
getRevisionOLPA
,
historyApprovalOLPA
,
getSubmitOLPA
,
getOLPAAtt
,
submitOLPA
,
getLastestUpdateOLPA
,
createReportOLPA
}
}
...
...
src/container/OutlookPA.js
View file @
29774163
...
...
@@ -43,7 +43,7 @@ export default class OutlookPA extends Component {
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
submissionID
:
null
,
outlook_pa_id
:
null
,
isSubmit
:
false
,
visibleTableHistory
:
false
,
isApprover
:
false
,
...
...
@@ -91,7 +91,7 @@ export default class OutlookPA extends Component {
let
body
=
{
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getCompanySubmitted
(
body
).
then
(
response
=>
{
api
.
create
().
getCompanySubmitted
OLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
...
@@ -138,7 +138,7 @@ export default class OutlookPA extends Component {
"periode"
:
this
.
state
.
periode
.
periode
,
"revision"
:
this
.
state
.
revision
.
revision
,
}
api
.
create
().
get
MasterBudget
Att
(
payload
).
then
(
response
=>
{
api
.
create
().
get
OLPA
Att
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -191,7 +191,7 @@ export default class OutlookPA extends Component {
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getSubmit
MasterBudget
(
body
).
then
(
response
=>
{
api
.
create
().
getSubmit
OLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -266,7 +266,7 @@ export default class OutlookPA extends Component {
}
getLastPeriod
()
{
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
api
.
create
().
getLastPeriod
OLPA
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
...
...
@@ -342,26 +342,26 @@ export default class OutlookPA extends Component {
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
}
}
})
}
get
Submission
()
{
get
OutlookPAID
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"is_approver"
:
this
.
state
.
isApprover
}
api
.
create
().
get
Submission
(
payload
).
then
(
response
=>
{
api
.
create
().
get
OutlookPAID
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission
_id
,
outlook_pa_id
:
response
.
data
.
data
.
outlook_pa
_id
,
submitter
:
response
.
data
.
data
.
submitter
,
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
,
...
...
@@ -382,7 +382,7 @@ export default class OutlookPA extends Component {
})
})
}
else
{
this
.
setState
({
submissionID
:
null
,
loading
:
false
})
this
.
setState
({
outlook_pa_id
:
null
,
loading
:
false
})
}
}
})
...
...
@@ -393,7 +393,7 @@ export default class OutlookPA extends Component {
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
historyApproval
(
body
).
then
(
response
=>
{
api
.
create
().
historyApproval
OLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
data
.
length
>
0
)
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
...
...
@@ -420,7 +420,7 @@ export default class OutlookPA extends Component {
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
})
}
...
...
@@ -496,7 +496,7 @@ export default class OutlookPA extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleUpload
:
false
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
}
}
...
...
@@ -507,7 +507,7 @@ export default class OutlookPA extends Component {
api
.
create
().
deleteAttachment
(
item
.
attachment_id
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
}
}
})
...
...
@@ -517,22 +517,22 @@ export default class OutlookPA extends Component {
this
.
setState
({
alert
:
false
})
}
saveTo
MasterBudget
(
data
)
{
saveTo
OLPA
(
data
)
{
this
.
setState
({
loading
:
true
})
// console.log(JSON.stringify(data));
api
.
create
(
'UPLOAD'
).
create
SubmitReport
(
data
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
create
ReportOLPA
(
data
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
}
})
...
...
@@ -577,13 +577,13 @@ export default class OutlookPA extends Component {
})
if
(
canSubmit
===
true
)
{
let
body
=
{
submission_id
:
this
.
state
.
submissionID
outlook_pa_id
:
this
.
state
.
outlook_pa_id
}
api
.
create
().
submit
MasterBudget
(
body
).
then
(
response
=>
{
api
.
create
().
submit
OLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"Success"
)
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
}
}
})
...
...
@@ -1147,10 +1147,10 @@ export default class OutlookPA extends Component {
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
submissionID
=
{
this
.
state
.
submissionID
}
saveTo
MasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
saveTo
OLPA
=
{
this
.
saveToOLPA
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleOutlookPA
:
true
})}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
getReport
=
{
this
.
get
OutlookPAID
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
...
...
@@ -1166,10 +1166,10 @@ export default class OutlookPA extends Component {
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
submissionID
=
{
this
.
state
.
submissionID
}
saveTo
MasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
saveTo
OLPA
=
{
this
.
saveToOLPA
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleOutlookPA
:
true
})}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
getReport
=
{
this
.
get
OutlookPAID
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
...
...
@@ -1186,10 +1186,10 @@ export default class OutlookPA extends Component {
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
submissionID
=
{
this
.
state
.
submissionID
}
saveTo
MasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
saveTo
OLPA
=
{
this
.
saveToOLPA
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleOutlookPA
:
true
})}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
getReport
=
{
this
.
get
OutlookPAID
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
lastStatus
=
{
this
.
state
.
lastStatus
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
29774163
This diff is collapsed.
Click to expand it.
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