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 = "") => {
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
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
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
const
getAllReportBS
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/get_report_hierarki'
,
body
)
...
...
@@ -728,7 +731,11 @@ const create = (type = "") => {
getRollingOutlookRevision
,
getRollingOutlookIsApprover
,
checkImportRollingOutlookBS
,
importRollingOutlookBS
importRollingOutlookBS
,
createRollingOutlookPL
,
checkImportRollingOutlookPL
,
importRollingOutlookPL
,
getSubmitRollingOutlook
}
}
...
...
src/container/RollingOutlook.js
View file @
fdd589a3
...
...
@@ -212,13 +212,15 @@ export default class RollingOutlook extends Component {
getLatestPeriodSubmit
()
{
let
body
=
{
"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
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
isSubmit
:
true
},
()
=>
{
this
.
setState
({
isSubmit
:
response
.
data
.
data
.
is_can_submit
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})
...
...
@@ -751,9 +753,9 @@ export default class RollingOutlook extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
//
tableMeta.rowData[5] == true ?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
>
{
/* {this.state.isApprover == true ?
...
...
@@ -1242,8 +1244,9 @@ export default class RollingOutlook extends Component {
rollingOutlookID
=
{
this
.
state
.
rollingOutlookID
}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleRollingOutlook
:
true
})}
isApprover
=
{
'false'
}
isApprover
=
{
this
.
state
.
isApprover
}
quarter
=
{
this
.
state
.
quarter
.
value
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
)}
...
...
@@ -1260,7 +1263,8 @@ export default class RollingOutlook extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleRollingOutlook
:
true
})}
refresh
=
{
this
.
getRollingOutlookID
.
bind
(
this
)}
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 {
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
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 {
componentDidMount
()
{
// this.getItemHierarki()
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
()
{
...
...
@@ -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
}
`
)
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
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
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