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
7ad4de88
Commit
7ad4de88
authored
May 17, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
470a10a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
24 deletions
+49
-24
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+49
-24
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
7ad4de88
...
@@ -109,8 +109,9 @@ export default class BudgetTahunan extends Component {
...
@@ -109,8 +109,9 @@ export default class BudgetTahunan extends Component {
document
.
body
.
style
.
overflow
=
'hidden'
;
document
.
body
.
style
.
overflow
=
'hidden'
;
})
})
this
.
props
.
selectIndex
(
'Master Budget & CAT'
)
this
.
props
.
selectIndex
(
'Master Budget & CAT'
)
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
if
(
this
.
props
.
location
.
state
!==
undefined
)
{
//
console.log(this.props);
console
.
log
(
this
.
props
);
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
.
periode
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
setState
({
userType
:
this
.
props
.
location
.
state
.
userType
,
intent
:
'Home'
,
lastPeriod
:
this
.
props
.
location
.
state
.
rawData
.
periode
,
rawData
:
this
.
props
.
location
.
state
.
rawData
},
()
=>
{
this
.
getPermission
()
this
.
getPermission
()
// this.checkApprover()
// this.checkApprover()
...
@@ -188,10 +189,9 @@ export default class BudgetTahunan extends Component {
...
@@ -188,10 +189,9 @@ export default class BudgetTahunan extends Component {
checkApprover
()
{
checkApprover
()
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
//
console.log(response.data.data)
console
.
log
(
response
.
data
.
data
)
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
({
truelyApprover
:
true
,
isApprover
:
true
,
permissionhandle
:
true
,
checkApprover
:
true
},
()
=>
{
this
.
setState
({
truelyApprover
:
true
,
isApprover
:
true
,
permissionhandle
:
true
,
checkApprover
:
true
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
...
@@ -452,7 +452,7 @@ export default class BudgetTahunan extends Component {
...
@@ -452,7 +452,7 @@ export default class BudgetTahunan extends Component {
getLastPeriod
()
{
getLastPeriod
()
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
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
:
this
.
state
.
userType
!==
''
?
this
.
state
.
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
setState
({
lastPeriod
:
this
.
state
.
userType
!==
''
?
this
.
state
.
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
...
@@ -463,6 +463,7 @@ export default class BudgetTahunan extends Component {
...
@@ -463,6 +463,7 @@ export default class BudgetTahunan extends Component {
getPeriode
()
{
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
console
.
log
(
response
);
// let dateNow = new Date
// let dateNow = new Date
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
let
currentYear
=
new
Date
().
getFullYear
()
let
currentYear
=
new
Date
().
getFullYear
()
...
@@ -2876,7 +2877,8 @@ export default class BudgetTahunan extends Component {
...
@@ -2876,7 +2877,8 @@ export default class BudgetTahunan extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Master
Budget
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
style
=
{{
display
:
"flex"
}}
>
<
div
style
=
{{
marginRight
:
50
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
...
@@ -2897,6 +2899,29 @@ export default class BudgetTahunan extends Component {
...
@@ -2897,6 +2899,29 @@ export default class BudgetTahunan extends Component {
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
/
>
/
>
<
/div
>
<
/div
>
<
div
>
<
Autocomplete
{...
this
.
state
.
listPeriode
}
id
=
"currency"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
}
})}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Currency"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
periode
}
/
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
<
Autocomplete
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
...
...
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