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
4bd3c389
Commit
4bd3c389
authored
Jan 08, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
viewOnly See merge request
!925
parents
2062074a
91694f5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
3 deletions
+96
-3
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+32
-1
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+32
-1
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+32
-1
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
4bd3c389
...
...
@@ -54,6 +54,7 @@ export default class BalanceSheetMR extends Component {
notes
:
""
,
judulColumn
:
null
,
get_for
:
"view"
,
viewOnly
:
true
,
kansas
:
0
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -62,6 +63,36 @@ export default class BalanceSheetMR extends Component {
componentDidMount
()
{
this
.
getSettingControl
()
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
})
}
getLatestUpdate
()
{
...
...
@@ -2598,7 +2629,7 @@ export default class BalanceSheetMR 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/OperatingIndicatorMR.js
View file @
4bd3c389
...
...
@@ -65,6 +65,7 @@ export default class OperatingIndicatorMR extends Component {
templateNull
:
true
,
judulColumn
:
null
,
saveDraft
:
true
,
viewOnly
:
true
,
get_for
:
'view'
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -73,9 +74,39 @@ export default class OperatingIndicatorMR extends Component {
componentDidMount
()
{
// this.getItemHierarki()
this
.
getSettingControl
()
this
.
handleViewOnly
()
// this.getLatestUpdate()
}
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
)
{
this
.
setState
({
get_for
:
type
},
()
=>
{
this
.
getSettingControl
()
...
...
@@ -1678,7 +1709,7 @@ export default class OperatingIndicatorMR extends Component {
<
/button
>
<
/div
>
{
!
this
.
state
.
emptyData
&&
(
this
.
props
.
permission
.
create
||
this
.
props
.
permission
.
edit
)
&&
this
.
props
.
isSubmit
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
2
}}
>
{
this
.
state
.
get_for
==
'view'
&&
<
button
{
this
.
state
.
get_for
==
'view'
&&
this
.
state
.
viewOnly
&&
<
button
type
=
"button"
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
4bd3c389
...
...
@@ -92,6 +92,7 @@ export default class ProfitLossMR extends Component {
handleTekTekTek
:
0
,
saveDraft
:
true
,
buttonError
:
true
,
viewOnly
:
true
,
get_for
:
'view'
}
...
...
@@ -102,6 +103,36 @@ export default class ProfitLossMR extends Component {
// this.getItemHierarki()
this
.
getLatestUpdate
()
this
.
getSettingControl
()
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
)
{
...
...
@@ -2118,7 +2149,7 @@ export default class ProfitLossMR 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
=
{{
...
...
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