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
416ea3ee
Commit
416ea3ee
authored
Oct 06, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timbihin
parent
84c32c50
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
index.js
src/api/index.js
+5
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-1
OutlookPA.js
src/container/OutlookPA.js
+3
-3
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+7
-7
No files found.
src/api/index.js
View file @
416ea3ee
...
...
@@ -229,6 +229,8 @@ const create = (type = "") => {
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
)
const
checkUploadOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/check_import'
,
body
)
const
uploadOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/import_outlook_pa'
)
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
...
@@ -395,7 +397,9 @@ const create = (type = "") => {
getOLPAAtt
,
submitOLPA
,
getLastestUpdateOLPA
,
createReportOLPA
createReportOLPA
,
checkUploadOLPA
,
uploadOLPA
}
}
...
...
src/container/BudgetTahunan.js
View file @
416ea3ee
...
...
@@ -614,7 +614,7 @@ export default class BudgetTahunan extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Master Budget
Balance Shee
t.xlsx'
;
a
.
download
=
'Master Budget
Attachmen
t.xlsx'
;
a
.
click
();
}
}
...
...
src/container/OutlookPA.js
View file @
416ea3ee
...
...
@@ -542,10 +542,10 @@ export default class OutlookPA extends Component {
let
length
=
name
.
split
(
"."
).
length
let
fileType
=
name
.
split
(
"."
)[
length
-
1
]
console
.
log
(
fileType
);
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budget
/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
outlook_pa
/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
// console.log(url);
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budget
/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
outlook_pa
/download_attachment?fileName=
${
fileurl
}
&&fileType=
${
fileType
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -553,7 +553,7 @@ export default class OutlookPA extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'
Master Budget Balance Sheet
.xlsx'
;
a
.
download
=
'
Outlook Perfromance Appraisal
.xlsx'
;
a
.
click
();
}
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
416ea3ee
...
...
@@ -201,7 +201,7 @@ export default class BalanceSheetOLPA extends Component {
downloadTemplate
=
async
()
=>
{
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budget
/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
`
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
outlook_pa
/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
`
)
res
=
await
res
.
blob
()
console
.
log
(
res
)
...
...
@@ -209,7 +209,7 @@ export default class BalanceSheetOLPA extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Template
Master Budget
Balance Sheet.xlsx'
;
a
.
download
=
'Template
Outlook PA
Balance Sheet.xlsx'
;
a
.
click
();
}
}
...
...
@@ -263,7 +263,7 @@ export default class BalanceSheetOLPA extends Component {
}
checkUpload
()
{
api
.
create
().
checkUpload
MB
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUpload
OLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -331,7 +331,7 @@ export default class BalanceSheetOLPA extends Component {
})
})
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
outlook_pa_id
:
this
.
props
.
outlook_pa_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
...
...
@@ -339,7 +339,7 @@ export default class BalanceSheetOLPA extends Component {
status
:
type
}
// console.log(data);
api
.
create
(
'UPLOAD'
).
upload
MasterBudget
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
upload
OLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
...
...
@@ -356,10 +356,10 @@ export default class BalanceSheetOLPA extends Component {
}
async
downloadAllData
()
{
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budget/export_master_budget
?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
let
url
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
outlook_pa/export_outlook_pa
?submission_id=
${
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
master_budget/export_master_budget
?submission_id=
${
this
.
props
.
submissionID
===
null
?
""
:
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
`https://tia.eksad.com/tia-reporting-dev/public/transaction/
outlook_pa/export_outlook_pa
?submission_id=
${
this
.
props
.
submissionID
===
null
?
""
:
this
.
props
.
submissionID
}
&&report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
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