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
cc178e9e
Commit
cc178e9e
authored
Apr 13, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
2911e85a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
23 deletions
+30
-23
OutlookPA.js
src/container/OutlookPA.js
+4
-4
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+1
-1
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+25
-18
No files found.
src/container/OutlookPA.js
View file @
cc178e9e
...
...
@@ -67,6 +67,7 @@ export default class OutlookPA extends Component {
btnApprove
:
false
,
listStatus
:
[],
selectedStatus
:
[],
prevRevision
:
false
}
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -552,10 +553,9 @@ export default class OutlookPA extends Component {
}
clickDetail
(
item
,
id
,
revision
,
status
)
{
// console.log(this.state.dataForRevision);
this
.
state
.
dataForRevision
.
map
(
i
=>
{
if
(
i
.
report_name
===
item
)
{
if
(
i
.
revision
!
==
revision
)
{
if
(
i
.
revision
==
revision
)
{
this
.
setState
({
prevRevision
:
true
})
}
else
{
this
.
setState
({
prevRevision
:
false
})
...
...
@@ -873,9 +873,9 @@ export default class OutlookPA extends Component {
borderColor
:
'transparent'
}}
onClick
=
{()
=>
//
tableMeta.rowData[5] == true ?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
>
{
/* {this.state.isApprover == true ?
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
cc178e9e
...
...
@@ -1911,7 +1911,7 @@ export default class BalanceSheetOLPA 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/OutlookPA/ProfitLossOLPA.js
View file @
cc178e9e
...
...
@@ -128,6 +128,7 @@ export default class ProfitLossOLPA extends Component {
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
}
api
.
create
().
getLastestUpdateOLPA
(
payload
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
...
...
@@ -584,10 +585,10 @@ export default class ProfitLossOLPA extends Component {
total
+=
Number
(
valItem
)
}
})
if
(
tableMeta
.
rowData
[
1
]
===
19865
)
{
console
.
log
(
total
);
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
]);
}
//
if (tableMeta.rowData[1] === 19865) {
//
console.log(total);
//
console.log(dataTable2[tableMeta.rowIndex]);
//
}
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
])
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
...
...
@@ -1876,7 +1877,8 @@ export default class ProfitLossOLPA 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
=
{{
...
...
@@ -1923,17 +1925,20 @@ export default class ProfitLossOLPA extends Component {
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default
'
,
cursor
:
'pointer
'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
disabled
=
{
this
.
state
.
buttonDraft
}
//
disabled={this.state.buttonDraft}
onClick
=
{()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToOLPA
(
'draft'
)
})
this
.
state
.
editable
===
true
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToOLPA
(
'draft'
)
})
}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
...
...
@@ -1942,9 +1947,9 @@ export default class ProfitLossOLPA extends Component {
<
/button>
}
{
this
.
state
.
get_for
==
'edit'
&&
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
//
disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'
warning
'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'
error
'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
...
...
@@ -1952,7 +1957,7 @@ export default class ProfitLossOLPA extends Component {
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
}}
...
...
@@ -2011,7 +2016,7 @@ export default class ProfitLossOLPA extends Component {
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
...
...
@@ -2032,14 +2037,15 @@ export default class ProfitLossOLPA extends Component {
type
=
"button"
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default
'
,
cursor
:
'pointer
'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
...
...
@@ -2064,7 +2070,8 @@ export default class ProfitLossOLPA extends Component {
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
...
...
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