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
df9374a9
Commit
df9374a9
authored
Jan 08, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle close
parent
5ba24ef4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
4 deletions
+66
-4
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+33
-2
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+33
-2
No files found.
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
df9374a9
...
...
@@ -48,7 +48,8 @@ export default class FixedAssetsMovementMR extends Component {
visibleFAMMR
:
true
,
updateBy
:
'-'
,
notesUpdate
:
'-'
,
get_for
:
'view'
get_for
:
'view'
,
viewOnly
:
true
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -56,6 +57,7 @@ export default class FixedAssetsMovementMR extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
this
.
handleViewOnly
()
}
handleGetFor
(
type
)
{
...
...
@@ -65,6 +67,35 @@ export default class FixedAssetsMovementMR extends Component {
})
}
handleViewOnly
()
{
let
checkApprover
=
false
let
checkLastStatus
=
false
let
checkStatus
=
false
if
(
this
.
props
.
isApprover
)
{
checkApprover
=
true
}
else
{
checkApprover
=
false
}
if
(
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
{
checkLastStatus
=
true
}
else
{
checkLastStatus
=
false
}
// else if (this.props.prevRevision) {
// viewOnly = false
// }
if
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
{
checkStatus
=
true
}
else
{
checkStatus
=
false
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
})
}
getLatestUpdate
()
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
...
...
@@ -1328,7 +1359,7 @@ export default class FixedAssetsMovementMR extends Component {
<
div
className
=
"col-2"
><
/div>
:
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
5
}}
>
{
this
.
state
.
get_for
==
'view'
&&
<
button
{
this
.
state
.
get_for
==
'view'
&&
this
.
state
.
viewOnly
&&
<
button
className
=
"button"
type
=
"button"
style
=
{{
...
...
src/container/MonthlyReport/TaxPlanningMR.js
View file @
df9374a9
...
...
@@ -54,7 +54,8 @@ export default class TaxPlanningMR extends Component {
handleTekTekTek
:
0
,
saveDraft
:
true
,
buttonError
:
true
,
get_for
:
"view"
get_for
:
"view"
,
viewOnly
:
true
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -64,6 +65,36 @@ export default class TaxPlanningMR extends Component {
this
.
getSettingControl
()
// this.getItemHierarki()
this
.
getLatestUpdate
()
this
.
handleViewOnly
()
}
handleViewOnly
()
{
let
checkApprover
=
false
let
checkLastStatus
=
false
let
checkStatus
=
false
if
(
this
.
props
.
isApprover
)
{
checkApprover
=
true
}
else
{
checkApprover
=
false
}
if
(
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
{
checkLastStatus
=
true
}
else
{
checkLastStatus
=
false
}
// else if (this.props.prevRevision) {
// viewOnly = false
// }
if
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
{
checkStatus
=
true
}
else
{
checkStatus
=
false
}
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
})
}
handleGetFor
(
type
)
{
...
...
@@ -1560,7 +1591,7 @@ export default class TaxPlanningMR extends Component {
<
div
className
=
"col-2"
>
<
/div>
:
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
{
this
.
state
.
get_for
==
'view'
&&
<
button
{
this
.
state
.
get_for
==
'view'
&&
this
.
state
.
viewOnly
&&
<
button
className
=
"button"
type
=
"button"
style
=
{{
...
...
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