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
4ea7657f
Commit
4ea7657f
authored
Dec 07, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
e79b130d
3b42c7fd
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
375 additions
and
298 deletions
+375
-298
index.js
src/api/index.js
+1
-2
BudgetTahunan.js
src/container/BudgetTahunan.js
+162
-157
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+11
-0
MonthlyReport.js
src/container/MonthlyReport.js
+17
-15
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+150
-122
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+34
-2
No files found.
src/api/index.js
View file @
4ea7657f
...
@@ -226,8 +226,6 @@ const create = (type = "") => {
...
@@ -226,8 +226,6 @@ const create = (type = "") => {
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/db_report_detail/get_report_hierarki'
,
body
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/db_report_detail/get_report_hierarki'
,
body
)
const
getLastestUpdateMR
=
(
body
)
=>
api
.
post
(
'/transaction/monthly_report/get_latest_update'
,
body
)
const
getLastestUpdateMROI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_latest_update'
,
body
)
const
getLastestUpdateMROI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_latest_update'
,
body
)
//CASH FLOW
//CASH FLOW
...
@@ -259,6 +257,7 @@ const create = (type = "") => {
...
@@ -259,6 +257,7 @@ const create = (type = "") => {
const
getMonthlyReportID
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_monthly_report_id'
,
body
)
const
getMonthlyReportID
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_monthly_report_id'
,
body
)
const
getHierarkiMontlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportBS
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportOI
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_oi/get_report_hierarki'
,
body
)
const
getLastestUpdateMR
=
(
body
)
=>
api
.
post
(
'/transaction/monthly_report/get_latest_update'
,
body
)
const
getHierarkiMontlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportTP
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_tp/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportLOCF
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_locf/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportLOCF
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_locf/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/get_report_hierarki'
,
body
)
const
getHierarkiMontlyReportFAM
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/fam/get_report_hierarki'
,
body
)
...
...
src/container/BudgetTahunan.js
View file @
4ea7657f
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
4ea7657f
...
@@ -73,7 +73,18 @@ export default class FixedAssetsMovement extends Component {
...
@@ -73,7 +73,18 @@ export default class FixedAssetsMovement extends Component {
this
.
setState
({
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
typeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
})
})
}
}
...
...
src/container/MonthlyReport.js
View file @
4ea7657f
...
@@ -54,7 +54,7 @@ export default class MonthlyReport extends Component {
...
@@ -54,7 +54,7 @@ export default class MonthlyReport extends Component {
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
messageAlert
:
''
,
messageAlert
:
''
,
btn
c
reate
:
false
,
btn
C
reate
:
false
,
loadview
:
false
loadview
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -69,8 +69,10 @@ export default class MonthlyReport extends Component {
...
@@ -69,8 +69,10 @@ export default class MonthlyReport extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
btncreate
:
response
.
data
.
data
.
create
,
btnCreate
:
response
.
data
.
data
.
create
,
loadview
:
response
.
data
.
data
.
view
btnEdit
:
response
.
data
.
data
.
edit
},
()
=>
{
this
.
getChecApprover
()
})
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
@@ -89,7 +91,6 @@ export default class MonthlyReport extends Component {
...
@@ -89,7 +91,6 @@ export default class MonthlyReport extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getChecApprover
()
this
.
getPermission
()
this
.
getPermission
()
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
// this.getCompanyActive()
// this.getCompanyActive()
...
@@ -100,14 +101,13 @@ export default class MonthlyReport extends Component {
...
@@ -100,14 +101,13 @@ export default class MonthlyReport extends Component {
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
// if (response.data.data.is_approver === true) {
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
},
()
=>
// this.setState({ isApprover: true, checkApprover: true }, () =>
this
.
getPeriode
())
// this.getPeriode())
}
else
{
// } else {
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
getCompanyActive
())
this
.
getCompanyActive
())
//
}
}
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
@@ -455,12 +455,13 @@ export default class MonthlyReport extends Component {
...
@@ -455,12 +455,13 @@ export default class MonthlyReport extends Component {
this
.
getReportAttachment
()
this
.
getReportAttachment
()
api
.
create
().
checkApproverMonthly
().
then
(
response
=>
{
api
.
create
().
checkApproverMonthly
().
then
(
response
=>
{
// // console.log(response);
// // console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
this
.
state
.
btnCreate
===
true
&&
this
.
state
.
btnEdit
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
console
.
log
(
'editable'
);
}
else
{
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
})
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
})
}
else
{
console
.
log
(
'just view'
);
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
})
}
}
})
})
})
})
}
else
{
}
else
{
...
@@ -1106,6 +1107,7 @@ export default class MonthlyReport extends Component {
...
@@ -1106,6 +1107,7 @@ export default class MonthlyReport extends Component {
month
=
{
this
.
state
.
month
}
month
=
{
this
.
state
.
month
}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleMonthlyReport
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleMonthlyReport
:
true
})}
isApprover
=
{
this
.
state
.
isApprover
}
// getReport={this.getCompanyActive.bind(this)}
// getReport={this.getCompanyActive.bind(this)}
/
>
/
>
)}
)}
...
@@ -1139,7 +1141,7 @@ export default class MonthlyReport extends Component {
...
@@ -1139,7 +1141,7 @@ export default class MonthlyReport extends Component {
month
=
{
this
.
state
.
month
}
month
=
{
this
.
state
.
month
}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
saveToMonthlyReport
=
{
this
.
saveToMonthlyReport
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleMonthlyReport
:
true
})}
btn
create
=
{
this
.
state
.
btnc
reate
}
btn
Create
=
{
this
.
state
.
btnC
reate
}
loadview
=
{
this
.
state
.
loadview
}
loadview
=
{
this
.
state
.
loadview
}
// getReport={this.getCompanyActive.bind(this)}
// getReport={this.getCompanyActive.bind(this)}
/
>
/
>
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
4ea7657f
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
4ea7657f
...
@@ -52,6 +52,38 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -52,6 +52,38 @@ export default class FixedAssetsMovementMR extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
}
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
typeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
}
getItemHierarki
()
{
getItemHierarki
()
{
...
@@ -131,7 +163,7 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -131,7 +163,7 @@ export default class FixedAssetsMovementMR extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
);
//
console.log(dataTable);
this
.
setState
({
dataTable
,
loading
:
false
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
@@ -407,7 +439,7 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -407,7 +439,7 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(tableMeta);
// console.log(tableMeta);
// console.log(tst);
// console.log(tst);
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
16
].
findIndex
((
val
)
=>
val
.
item_formula
==
tst
)
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
16
].
findIndex
((
val
)
=>
val
.
item_formula
==
tst
)
console
.
log
(
indexID
);
//
console.log(indexID);
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
tableMeta
.
rowIndex
][
16
][
indexID
].
value
let
valuezz
=
dataTable2
[
tableMeta
.
rowIndex
][
16
][
indexID
].
value
...
...
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