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
7b182df8
Commit
7b182df8
authored
Feb 04, 2026
by
Hardiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhance history approval
parent
adebe2b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
26 deletions
+41
-26
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+41
-26
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
7b182df8
...
...
@@ -119,7 +119,10 @@ export default class BudgetTahunan extends Component {
approverIDCAT
:
null
,
picCAT
:
null
,
btnApproveCAT
:
false
,
lastStatusCat
:
null
lastStatusCat
:
null
,
rowData
:
[],
dataTableHistoryCAT
:
[],
visibleTableHistoryCAT
:
false
,
}
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -402,6 +405,7 @@ export default class BudgetTahunan extends Component {
loading
:
false
,
dataTable
:
resultDataTableFinance
,
dataTableCAT
:
resultDataTableCAT
,
rowDataFinance
,
rowDataCAT
,
rowData
:
listData
,
dataTableRevision
:
dataTableRevision
,
dataForRevision
:
rowDataTableFinance
,
dataTableRevisionCAT
:
dataTableRevisionCAT
,
...
...
@@ -2159,14 +2163,21 @@ export default class BudgetTahunan extends Component {
}
historyApproval
()
{
const
uniqueTypeIds
=
this
.
state
.
rowData
?.
length
?
[...
new
Set
(
this
.
state
.
rowData
.
map
(
item
=>
item
.
master_report_type_id
))]
:
[
1
,
2
];
uniqueTypeIds
.
forEach
((
master_report_type_id
)
=>
{
let
body
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
,
master_report_type_id
}
api
.
create
().
historyApproval
(
body
).
then
(
response
=>
{
// // // console.log(response);
if
(
response
.
data
.
data
.
length
>
0
)
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
const
dataTable
=
response
.
data
.
data
.
forEach
(
item
=>
{
let
indexC
=
String
(
item
.
status_approval
).
toLocaleUpperCase
().
indexOf
(
'C'
)
let
status_approv
=
''
if
(
String
(
item
.
status_approval
).
toLocaleUpperCase
().
includes
(
'CC'
))
{
...
...
@@ -2182,9 +2193,14 @@ export default class BudgetTahunan extends Component {
item
.
history_approval_date
]
})
this
.
setState
({
dataTableHistory
,
visibleTableHistory
:
true
})
if
(
master_report_type_id
===
2
)
{
this
.
setState
({
dataTableHistoryCAT
:
dataTable
,
visibleTableHistoryCAT
:
true
})
}
else
{
this
.
setState
({
dataTableHistory
:
dataTable
,
visibleTableHistory
:
true
})
}
}
})
});
}
async
setHeaderTokenSuperadmin
(
type
)
{
...
...
@@ -2953,7 +2969,6 @@ export default class BudgetTahunan extends Component {
renderBtnSubmit
=
(
master_report_type_id
)
=>
{
const
obj
=
this
.
getSubmissionObj
(
master_report_type_id
)
console
.
log
(
this
.
state
.
isAdmin
,
obj
.
lastStatus
,
this
.
state
.
isSubmit
,
this
.
state
.
checkApprover
,
obj
.
btnApprove
,
obj
.
submitter
);
return
(
this
.
state
.
isAdmin
&&
obj
.
lastStatus
==
'APPROVED'
?
<
div
className
=
"grid grid-2x"
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
}}
>
...
...
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