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
1e7354b1
Commit
1e7354b1
authored
Apr 13, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
Riri See merge request
!1400
parents
2a4fc862
963e6004
Changes
3
Show 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 @
1e7354b1
...
@@ -67,6 +67,7 @@ export default class OutlookPA extends Component {
...
@@ -67,6 +67,7 @@ export default class OutlookPA extends Component {
btnApprove
:
false
,
btnApprove
:
false
,
listStatus
:
[],
listStatus
:
[],
selectedStatus
:
[],
selectedStatus
:
[],
prevRevision
:
false
}
}
this
.
myRef
=
React
.
createRef
()
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -552,10 +553,9 @@ export default class OutlookPA extends Component {
...
@@ -552,10 +553,9 @@ export default class OutlookPA extends Component {
}
}
clickDetail
(
item
,
id
,
revision
,
status
)
{
clickDetail
(
item
,
id
,
revision
,
status
)
{
// console.log(this.state.dataForRevision);
this
.
state
.
dataForRevision
.
map
(
i
=>
{
this
.
state
.
dataForRevision
.
map
(
i
=>
{
if
(
i
.
report_name
===
item
)
{
if
(
i
.
report_name
===
item
)
{
if
(
i
.
revision
!
==
revision
)
{
if
(
i
.
revision
==
revision
)
{
this
.
setState
({
prevRevision
:
true
})
this
.
setState
({
prevRevision
:
true
})
}
else
{
}
else
{
this
.
setState
({
prevRevision
:
false
})
this
.
setState
({
prevRevision
:
false
})
...
@@ -873,9 +873,9 @@ export default class OutlookPA extends Component {
...
@@ -873,9 +873,9 @@ export default class OutlookPA extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
//
tableMeta.rowData[5] == true ?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
}
>
>
{
/* {this.state.isApprover == true ?
{
/* {this.state.isApprover == true ?
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
1e7354b1
...
@@ -1911,7 +1911,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -1911,7 +1911,7 @@ export default class BalanceSheetOLPA extends Component {
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
<
/div>
:
<
/div>
:
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
5
}}
>
<
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"
className
=
"button"
type
=
"button"
type
=
"button"
style
=
{{
style
=
{{
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
1e7354b1
...
@@ -128,6 +128,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -128,6 +128,7 @@ export default class ProfitLossOLPA extends Component {
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
}
}
api
.
create
().
getLastestUpdateOLPA
(
payload
).
then
(
response
=>
{
api
.
create
().
getLastestUpdateOLPA
(
payload
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -584,10 +585,10 @@ export default class ProfitLossOLPA extends Component {
...
@@ -584,10 +585,10 @@ export default class ProfitLossOLPA extends Component {
total
+=
Number
(
valItem
)
total
+=
Number
(
valItem
)
}
}
})
})
if
(
tableMeta
.
rowData
[
1
]
===
19865
)
{
//
if (tableMeta.rowData[1] === 19865) {
console
.
log
(
total
);
//
console.log(total);
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
]);
//
console.log(dataTable2[tableMeta.rowIndex]);
}
//
}
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
])
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
...
@@ -1876,7 +1877,8 @@ export default class ProfitLossOLPA extends Component {
...
@@ -1876,7 +1877,8 @@ export default class ProfitLossOLPA extends Component {
<
div
className
=
"col-2"
>
<
div
className
=
"col-2"
>
<
/div>
:
<
/div>
:
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
5
}}
>
<
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"
className
=
"button"
type
=
"button"
type
=
"button"
style
=
{{
style
=
{{
...
@@ -1923,13 +1925,16 @@ export default class ProfitLossOLPA extends Component {
...
@@ -1923,13 +1925,16 @@ export default class ProfitLossOLPA extends Component {
type
=
"button"
type
=
"button"
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default
'
,
cursor
:
'pointer
'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
marginRight
:
20
}}
}}
disabled
=
{
this
.
state
.
buttonDraft
}
//
disabled={this.state.buttonDraft}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete !'
,
tipeAlert
:
'error'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
backToOLPA
(
'draft'
)
this
.
backToOLPA
(
'draft'
)
...
@@ -1942,9 +1947,9 @@ export default class ProfitLossOLPA extends Component {
...
@@ -1942,9 +1947,9 @@ export default class ProfitLossOLPA extends Component {
<
/button>
}
<
/button>
}
{
this
.
state
.
get_for
==
'edit'
&&
<
button
{
this
.
state
.
get_for
==
'edit'
&&
<
button
type
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
//
disabled={this.state.buttonError}
onClick
=
{()
=>
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
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
...
@@ -1952,7 +1957,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -1952,7 +1957,7 @@ export default class ProfitLossOLPA extends Component {
})}
})}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
}}
}}
...
@@ -2011,7 +2016,7 @@ export default class ProfitLossOLPA extends Component {
...
@@ -2011,7 +2016,7 @@ export default class ProfitLossOLPA extends Component {
disabled
=
{
this
.
state
.
buttonError
}
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
marginRight
:
20
...
@@ -2032,14 +2037,15 @@ export default class ProfitLossOLPA extends Component {
...
@@ -2032,14 +2037,15 @@ export default class ProfitLossOLPA extends Component {
type
=
"button"
type
=
"button"
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default
'
,
cursor
:
'pointer
'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
marginRight
:
20
marginRight
:
20
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
...
@@ -2064,7 +2070,8 @@ export default class ProfitLossOLPA extends Component {
...
@@ -2064,7 +2070,8 @@ export default class ProfitLossOLPA extends Component {
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
this
.
state
.
editable
===
true
?
null
:
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'error'
})
:
this
.
setState
({
loading
:
true
},
()
=>
this
.
setState
({
loading
:
true
},
()
=>
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
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