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
1b74fbec
Commit
1b74fbec
authored
Oct 04, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
last but not least See merge request
!443
parents
4b74ba4c
78d155a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
BudgetTahunan.js
src/container/BudgetTahunan.js
+24
-23
No files found.
src/container/BudgetTahunan.js
View file @
1b74fbec
...
...
@@ -170,7 +170,7 @@ export default class BudgetTahunan extends Component {
item
.
number
,
item
.
report_name
,
item
.
revision
,
item
.
current_status
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
item
.
revision
...
...
@@ -184,9 +184,7 @@ export default class BudgetTahunan extends Component {
]
})
// console.log(dataTable);
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
},
()
=>
{
this
.
getLatestPeriodSubmit
()
})
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
})
}
}
else
{
this
.
setState
({
loading
:
false
})
...
...
@@ -203,7 +201,10 @@ export default class BudgetTahunan extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
isSubmit
:
response
.
data
.
data
.
is_can_submit
})
this
.
setState
({
isSubmit
:
response
.
data
.
data
.
is_can_submit
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
})
...
...
@@ -375,8 +376,7 @@ export default class BudgetTahunan extends Component {
},
()
=>
{
console
.
log
(
this
.
state
.
lastStatus
);
this
.
historyApproval
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getLatestPeriodSubmit
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
...
...
@@ -539,8 +539,7 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleUpload
:
false
},
()
=>
{
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
})
}
}
...
...
@@ -551,8 +550,7 @@ export default class BudgetTahunan extends Component {
api
.
create
().
deleteAttachment
(
item
.
attachment_id
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
}
}
})
...
...
@@ -696,7 +694,9 @@ export default class BudgetTahunan extends Component {
<
span
>
APPROVAL
REVIEW
<
/span>
:
val
===
"not-yet"
?
<
span
>
OPEN
<
/span>
:
<
img
src
=
{
Images
.
cross
}
style
=
{{
width
:
31
,
height
:
24
}}
/
>
val
===
"CLOSED"
?
<
span
>
CLOSED
<
/span>
:
<
img
src
=
{
Images
.
cross
}
style
=
{{
width
:
31
,
height
:
24
}}
/
>
}
<
/div
>
);
...
...
@@ -712,20 +712,21 @@ export default class BudgetTahunan extends Component {
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
cursor
:
t
his
.
state
.
isSubmit
===
false
?
'default'
:
t
ableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
}}
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
this
.
state
.
isSubmit
===
false
?
null
:
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
}
>
{
/* {this.state.isApprover == true ?
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[3] !== 'submitted' ? '#5198ea' : 'GrayText'))} */
}
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
t
his
.
state
.
isSubmit
===
false
?
'GrayText'
:
t
ableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
/button
>
<
/div
>
);
...
...
@@ -952,13 +953,13 @@ export default class BudgetTahunan extends Component {
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
onClick
=
{()
=>
this
.
setState
({
visibleUpload
:
true
})}
onClick
=
{()
=>
this
.
s
tate
.
isSubmit
===
false
?
null
:
this
.
s
etState
({
visibleUpload
:
true
})}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'#5198ea'
}}
>
Upload
File
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
this
.
state
.
isSubmit
===
false
?
'GrayText'
:
'#5198ea'
}}
>
Upload
File
<
/Typography
>
<
/button
>
<
/div
>
)}
...
...
@@ -1001,14 +1002,14 @@ export default class BudgetTahunan extends Component {
<
button
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
display
:
'grid'
}}
onClick
=
{()
=>
this
.
deleteAttachment
(
item
)}
onClick
=
{()
=>
this
.
state
.
isSubmit
===
false
?
null
:
this
.
deleteAttachment
(
item
)}
>
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'13px'
,
color
:
this
.
state
.
isSubmit
===
false
?
'GrayText'
:
'#ff3939'
}}
>
Delete
<
/Typography
>
<
/button
>
)
})
...
...
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