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
482e9445
Commit
482e9445
authored
Oct 02, 2020
by
a.bairuha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
59a43758
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
index.js
src/api/index.js
+1
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+10
-3
No files found.
src/api/index.js
View file @
482e9445
...
@@ -193,7 +193,7 @@ const create = (type = "") => {
...
@@ -193,7 +193,7 @@ const create = (type = "") => {
const
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getDetailReportMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_report_hierarki'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
const
getLastestUpdateMB
=
(
body
)
=>
api
.
post
(
'/transaction/master_budget/get_latest_update'
,
body
)
const
createSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/create_submission_report'
,
body
)
const
createSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/create_submission_report'
,
body
)
const
getSubmission
=
(
body
)
=>
api
.
post
(
'transaction/get_submission_id'
,
body
)
const
getSubmission
=
(
body
)
=>
api
.
post
(
'transaction/
master_budget/
get_submission_id'
,
body
)
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
body
)
const
checkUploadMB
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/check_import'
,
body
)
const
uploadMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/import_master_budget'
,
body
)
const
uploadMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/import_master_budget'
,
body
)
const
validateSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/validate_save'
,
body
)
const
validateSubmitReport
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/validate_save'
,
body
)
...
...
src/container/BudgetTahunan.js
View file @
482e9445
...
@@ -60,7 +60,9 @@ export default class BudgetTahunan extends Component {
...
@@ -60,7 +60,9 @@ export default class BudgetTahunan extends Component {
submitter
:
false
,
submitter
:
false
,
detailRevisiCheck
:
[],
detailRevisiCheck
:
[],
lastRevision
:
""
,
lastRevision
:
""
,
checkApprover
:
false
checkApprover
:
false
,
lastPeriod
:
''
,
latestPeriode
:
''
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -254,7 +256,7 @@ export default class BudgetTahunan extends Component {
...
@@ -254,7 +256,7 @@ export default class BudgetTahunan extends Component {
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
api
.
create
().
getLastPeriod
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
},
()
=>
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
})
})
}
}
...
@@ -267,7 +269,12 @@ export default class BudgetTahunan extends Component {
...
@@ -267,7 +269,12 @@ export default class BudgetTahunan extends Component {
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
let
data
=
[]
response
.
data
.
data
.
map
((
item
)
=>
{
if
((
item
==
this
.
state
.
latestPeriode
||
item
>
this
.
state
.
latestPeriode
)
&&
(
item
==
this
.
state
.
lastPeriod
))
{
data
.
push
(
item
)
}
})
let
periodeData
=
data
.
map
((
item
)
=>
{
let
periodeData
=
data
.
map
((
item
)
=>
{
return
{
return
{
periode
:
item
,
periode
:
item
,
...
...
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