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
7bbde81a
Commit
7bbde81a
authored
Dec 16, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
b25c41af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
BudgetTahunan.js
src/container/BudgetTahunan.js
+12
-7
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+6
-1
No files found.
src/container/BudgetTahunan.js
View file @
7bbde81a
...
@@ -69,7 +69,8 @@ export default class BudgetTahunan extends Component {
...
@@ -69,7 +69,8 @@ export default class BudgetTahunan extends Component {
btnApprove
:
false
,
btnApprove
:
false
,
isAdmin
:
false
,
isAdmin
:
false
,
btncreate
:
false
,
btncreate
:
false
,
loadview
:
false
loadview
:
false
,
permissionhandle
:
false
}
}
this
.
myRef
=
React
.
createRef
()
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -166,10 +167,12 @@ export default class BudgetTahunan extends Component {
...
@@ -166,10 +167,12 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// // console.log(response);
// // 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
,
permissionhandle
:
true
,
checkApprover
:
true
},
()
=>
this
.
getPeriode
())
{
this
.
getPeriode
()
})
}
else
{
}
else
{
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
setState
({
isApprover
:
false
,
permissionhandle
:
false
,
checkApprover
:
false
},
()
=>
this
.
getDetailUser
())
this
.
getDetailUser
())
}
}
}
else
{
}
else
{
...
@@ -489,7 +492,7 @@ export default class BudgetTahunan extends Component {
...
@@ -489,7 +492,7 @@ export default class BudgetTahunan extends Component {
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"is_approver"
:
this
.
state
.
isApprover
"is_approver"
:
this
.
state
.
permissionhandle
?
this
.
state
.
permissionhandle
:
this
.
state
.
isApprover
}
}
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
response
)
...
@@ -504,11 +507,13 @@ export default class BudgetTahunan extends Component {
...
@@ -504,11 +507,13 @@ export default class BudgetTahunan extends Component {
btnApprove
:
response
.
data
.
data
.
is_submit
,
btnApprove
:
response
.
data
.
data
.
is_submit
,
// loading: false
// loading: false
},
()
=>
{
},
()
=>
{
// // console.log(this.state.lastStatus);
// console.log(response.data.data.is_submit);
// console.log(this.state.btnApprove)
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getLatestPeriodSubmit
()
this
.
getLatestPeriodSubmit
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
// // console.log(response);
// console.log(this.state.btncreate);
// console.log(this.state.btnedit)
if
(
this
.
state
.
btncreate
===
true
&&
this
.
state
.
btnedit
===
true
)
{
if
(
this
.
state
.
btncreate
===
true
&&
this
.
state
.
btnedit
===
true
)
{
this
.
setState
({
isApprover
:
false
},
()
=>
{
this
.
setState
({
isApprover
:
false
},
()
=>
{
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
7bbde81a
...
@@ -85,7 +85,9 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -85,7 +85,9 @@ export default class CorporateAnnualTargetMR extends Component {
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
"months"
:
this
.
props
.
month
.
month_id
}
}
// console.log(payload)
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(response))
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -102,6 +104,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -102,6 +104,7 @@ export default class CorporateAnnualTargetMR extends Component {
})
})
}
}
}
else
{
}
else
{
// console.log('brrrrrrrr')
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
})
})
...
@@ -203,6 +206,8 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -203,6 +206,8 @@ export default class CorporateAnnualTargetMR extends Component {
})
})
}
}
}
else
{
}
else
{
// console.log('terrrr')
//
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
console
.
log
(
dataTable
);
console
.
log
(
dataTable
);
...
@@ -509,7 +514,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -509,7 +514,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
//
this.getSubmission()
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
})
})
}
}
...
...
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