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
fdd589a3
Commit
fdd589a3
authored
Mar 19, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak
parent
3531f4d8
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
161 additions
and
114 deletions
+161
-114
index.js
src/api/index.js
+9
-2
RollingOutlook.js
src/container/RollingOutlook.js
+13
-8
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+35
-1
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+104
-103
No files found.
src/api/index.js
View file @
fdd589a3
...
@@ -254,9 +254,12 @@ const create = (type = "") => {
...
@@ -254,9 +254,12 @@ const create = (type = "") => {
const
importRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/import_rolling_outlook'
,
body
)
const
importRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/import_rolling_outlook'
,
body
)
const
createRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/create_rolling_outlook'
,
body
)
const
createRollingOutlookBS
=
(
body
)
=>
api
.
post
(
'transaction/balance_sheet/rolling_outlook/create_rolling_outlook'
,
body
)
const
getRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
getRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
createRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/create_rolling_outlook'
,
body
)
const
checkImportRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/check_import'
,
body
)
const
importRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/import_rolling_outlook'
,
body
)
const
getRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/get_report_hierarki'
,
body
)
const
getRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/get_report_hierarki'
,
body
)
const
createRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/store_ro_tax_planning'
,
body
)
const
createRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/store_ro_tax_planning'
,
body
)
const
getSubmitRollingOutlook
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_latest_periode_submit'
,
body
)
//REPORT NEW
//REPORT NEW
const
getAllReportBS
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/get_report_hierarki'
,
body
)
const
getAllReportBS
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/get_report_hierarki'
,
body
)
...
@@ -728,7 +731,11 @@ const create = (type = "") => {
...
@@ -728,7 +731,11 @@ const create = (type = "") => {
getRollingOutlookRevision
,
getRollingOutlookRevision
,
getRollingOutlookIsApprover
,
getRollingOutlookIsApprover
,
checkImportRollingOutlookBS
,
checkImportRollingOutlookBS
,
importRollingOutlookBS
importRollingOutlookBS
,
createRollingOutlookPL
,
checkImportRollingOutlookPL
,
importRollingOutlookPL
,
getSubmitRollingOutlook
}
}
}
}
...
...
src/container/RollingOutlook.js
View file @
fdd589a3
...
@@ -212,13 +212,15 @@ export default class RollingOutlook extends Component {
...
@@ -212,13 +212,15 @@ export default class RollingOutlook extends Component {
getLatestPeriodSubmit
()
{
getLatestPeriodSubmit
()
{
let
body
=
{
let
body
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
,
"is_approver"
:
this
.
state
.
isApprover
,
"quartal"
:
this
.
state
.
quarter
.
value
}
}
api
.
create
().
getSubmit
MasterBudget
(
body
).
then
(
response
=>
{
api
.
create
().
getSubmit
RollingOutlook
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
isSubmit
:
true
},
()
=>
{
this
.
setState
({
isSubmit
:
response
.
data
.
data
.
is_can_submit
},
()
=>
{
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
})
})
...
@@ -751,9 +753,9 @@ export default class RollingOutlook extends Component {
...
@@ -751,9 +753,9 @@ export default class RollingOutlook extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
//
tableMeta.rowData[5] == true ?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
}
>
>
{
/* {this.state.isApprover == true ?
{
/* {this.state.isApprover == true ?
...
@@ -1242,8 +1244,9 @@ export default class RollingOutlook extends Component {
...
@@ -1242,8 +1244,9 @@ export default class RollingOutlook extends Component {
rollingOutlookID
=
{
this
.
state
.
rollingOutlookID
}
rollingOutlookID
=
{
this
.
state
.
rollingOutlookID
}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleRollingOutlook
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleRollingOutlook
:
true
})}
isApprover
=
{
'false'
}
isApprover
=
{
this
.
state
.
isApprover
}
quarter
=
{
this
.
state
.
quarter
.
value
}
quarter
=
{
this
.
state
.
quarter
.
value
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)}
...
@@ -1260,7 +1263,8 @@ export default class RollingOutlook extends Component {
...
@@ -1260,7 +1263,8 @@ export default class RollingOutlook extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleRollingOutlook
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleRollingOutlook
:
true
})}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
quarter
=
{
this
.
state
.
quarter
.
value
}
quarter
=
{
this
.
state
.
quarter
.
value
}
isApprover
=
{
'false'
}
isApprover
=
{
this
.
state
.
isApprover
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)}
...
@@ -1279,7 +1283,8 @@ export default class RollingOutlook extends Component {
...
@@ -1279,7 +1283,8 @@ export default class RollingOutlook extends Component {
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
lastStatus
=
{
this
.
state
.
lastStatus
}
quarter
=
{
this
.
state
.
quarter
.
value
}
quarter
=
{
this
.
state
.
quarter
.
value
}
isApprover
=
{
'false'
}
isApprover
=
{
this
.
state
.
isApprover
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
/
>
)}
)}
...
...
src/container/RollingOutlook/BalanceSheetRO.js
View file @
fdd589a3
...
@@ -64,6 +64,40 @@ export default class BalanceSheetRO extends Component {
...
@@ -64,6 +64,40 @@ export default class BalanceSheetRO extends Component {
componentDidMount
()
{
componentDidMount
()
{
// this.getItemHierarki()
// this.getItemHierarki()
this
.
getSettingControl
()
this
.
getSettingControl
()
this
.
handleViewOnly
()
}
handleViewOnly
()
{
let
checkApprover
=
false
let
checkLastStatus
=
false
let
checkStatus
=
false
let
checkPrevRev
=
false
if
(
this
.
props
.
isApprover
)
{
checkApprover
=
true
}
else
{
checkApprover
=
false
}
if
(
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
{
checkLastStatus
=
true
}
else
{
checkLastStatus
=
false
}
if
(
this
.
props
.
prevRevision
)
{
checkPrevRev
=
true
}
else
{
checkPrevRev
=
false
}
if
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
{
checkStatus
=
true
}
else
{
checkStatus
=
false
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
}
}
getSettingControl
()
{
getSettingControl
()
{
...
@@ -212,7 +246,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -212,7 +246,7 @@ export default class BalanceSheetRO extends Component {
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/balance_sheet/rolling_outlook/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&quartal=
${
this
.
props
.
quarter
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/balance_sheet/rolling_outlook/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&quartal=
${
this
.
props
.
quarter
}
`
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
// console.log(res
)
console
.
log
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/balance_sheet/rolling_outlook/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&quartal=
${
this
.
props
.
quarter
}
`
)
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
...
...
src/container/RollingOutlook/ProfitLossRO.js
View file @
fdd589a3
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