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 {
...
@@ -170,7 +170,7 @@ export default class BudgetTahunan extends Component {
item
.
number
,
item
.
number
,
item
.
report_name
,
item
.
report_name
,
item
.
revision
,
item
.
revision
,
item
.
current_status
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
item
.
revision
item
.
revision
...
@@ -184,9 +184,7 @@ export default class BudgetTahunan extends Component {
...
@@ -184,9 +184,7 @@ export default class BudgetTahunan extends Component {
]
]
})
})
// console.log(dataTable);
// console.log(dataTable);
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
})
this
.
getLatestPeriodSubmit
()
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
@@ -203,7 +201,10 @@ export default class BudgetTahunan extends Component {
...
@@ -203,7 +201,10 @@ export default class BudgetTahunan extends Component {
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
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 {
...
@@ -375,8 +376,7 @@ export default class BudgetTahunan extends Component {
},
()
=>
{
},
()
=>
{
console
.
log
(
this
.
state
.
lastStatus
);
console
.
log
(
this
.
state
.
lastStatus
);
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getReport
()
this
.
getLatestPeriodSubmit
()
this
.
getReportAttachment
()
api
.
create
().
checkApprover
().
then
(
response
=>
{
api
.
create
().
checkApprover
().
then
(
response
=>
{
// console.log(response);
// console.log(response);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
...
@@ -539,8 +539,7 @@ export default class BudgetTahunan extends Component {
...
@@ -539,8 +539,7 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleUpload
:
false
},
()
=>
{
this
.
setState
({
visibleUpload
:
false
},
()
=>
{
this
.
getReport
()
this
.
getSubmission
()
this
.
getReportAttachment
()
})
})
}
}
}
}
...
@@ -551,8 +550,7 @@ export default class BudgetTahunan extends Component {
...
@@ -551,8 +550,7 @@ export default class BudgetTahunan extends Component {
api
.
create
().
deleteAttachment
(
item
.
attachment_id
).
then
(
response
=>
{
api
.
create
().
deleteAttachment
(
item
.
attachment_id
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getReport
()
this
.
getSubmission
()
this
.
getReportAttachment
()
}
}
}
}
})
})
...
@@ -696,7 +694,9 @@ export default class BudgetTahunan extends Component {
...
@@ -696,7 +694,9 @@ export default class BudgetTahunan extends Component {
<
span
>
APPROVAL
REVIEW
<
/span>
:
<
span
>
APPROVAL
REVIEW
<
/span>
:
val
===
"not-yet"
?
val
===
"not-yet"
?
<
span
>
OPEN
<
/span>
:
<
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
>
<
/div
>
);
);
...
@@ -712,20 +712,21 @@ export default class BudgetTahunan extends Component {
...
@@ -712,20 +712,21 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
cursor
:
t
his
.
state
.
isSubmit
===
false
?
'default'
:
t
ableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
==
true
?
this
.
state
.
isSubmit
===
false
?
null
:
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
tableMeta
.
rowData
[
5
]
==
true
?
:
null
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
}
}
>
>
{
/* {this.state.isApprover == true ?
{
/* {this.state.isApprover == true ?
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(this.state.lastRevision == 0 ? (tableMeta.rowData[5] ? '#5198ea' : 'GrayText') :
(tableMeta.rowData[3] !== 'submitted' ? '#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
>
<
/button
>
<
/div
>
<
/div
>
);
);
...
@@ -952,13 +953,13 @@ export default class BudgetTahunan extends Component {
...
@@ -952,13 +953,13 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
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
>
<
/button
>
<
/div
>
<
/div
>
)}
)}
...
@@ -1001,14 +1002,14 @@ export default class BudgetTahunan extends Component {
...
@@ -1001,14 +1002,14 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
cursor
:
this
.
state
.
isSubmit
===
false
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
display
:
'grid'
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
>
<
/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