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
1fe95ff0
Commit
1fe95ff0
authored
Mar 19, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
Ggmac See merge request
!1299
parents
d1d278d9
6f85f133
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
160 additions
and
113 deletions
+160
-113
index.js
src/api/index.js
+8
-1
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 @
1fe95ff0
...
...
@@ -254,8 +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
)
const
getRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_operating_indicator_id'
,
body
)
const
getHierarkiRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/get_report_hierarki'
,
body
)
const
createRollingOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/create_rolling_outlook'
,
body
)
...
...
@@ -734,11 +738,14 @@ const create = (type = "") => {
getRollingOutlookIsApprover
,
checkImportRollingOutlookBS
,
importRollingOutlookBS
,
createRollingOutlookPL
,
checkImportRollingOutlookPL
,
importRollingOutlookPL
,
getSubmitRollingOutlook
,
getRollingOI
,
getHierarkiRollingOI
,
createRollingOI
,
getLastestUpdateROOI
}
}
...
...
src/container/RollingOutlook.js
View file @
1fe95ff0
...
...
@@ -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
()
})
...
...
@@ -760,9 +762,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 ?
...
...
@@ -1251,8 +1253,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
}
/
>
)}
...
...
@@ -1269,7 +1272,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
}
/
>
)}
...
...
@@ -1288,7 +1292,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 @
1fe95ff0
...
...
@@ -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 @
1fe95ff0
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