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
398f145e
Commit
398f145e
authored
Nov 27, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'
Issue OLPA BS PROD See merge request
!2191
parents
d839e63a
fcc16ad8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+16
-15
No files found.
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
398f145e
...
@@ -483,7 +483,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -483,7 +483,7 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
}
})
})
console
.
log
(
this
.
state
.
dataTable
);
//
console.log(this.state.dataTable);
})
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
@@ -552,6 +552,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -552,6 +552,7 @@ export default class BalanceSheetOLPA extends Component {
balance_sheet
:
data
,
balance_sheet
:
data
,
status
:
type
status
:
type
}
}
console
.
log
(
body
);
// console.log(JSON.stringify(body));
// console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadOLPA
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
uploadOLPA
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
...
@@ -619,7 +620,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -619,7 +620,7 @@ export default class BalanceSheetOLPA extends Component {
let
err
=
false
let
err
=
false
let
dataTable
=
this
.
state
.
dataTable
let
dataTable
=
this
.
state
.
dataTable
let
kansas
=
this
.
state
.
kansas
let
kansas
=
this
.
state
.
kansas
//
console.log(this.state.dataTable)
console
.
log
(
this
.
state
.
dataTable
)
dataTable
.
map
((
i
,
index
)
=>
{
dataTable
.
map
((
i
,
index
)
=>
{
if
(
String
(
i
[
5
])
==
"Control (should be nil)"
)
{
if
(
String
(
i
[
5
])
==
"Control (should be nil)"
)
{
// console.log(this.state.minValue)
// console.log(this.state.minValue)
...
@@ -628,13 +629,13 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -628,13 +629,13 @@ export default class BalanceSheetOLPA extends Component {
// console.log(Number(i[18].value).toFixed(1))
// console.log(Number(i[18].value).toFixed(1))
// console.log(Number(i[19]).toFixed(1))
// console.log(Number(i[19]).toFixed(1))
if
(
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
17
].
value
),
1
)
:
Number
(
i
[
17
].
value
)
<
Number
(
this
.
state
.
minValue
))
||
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
17
].
value
),
1
)
:
Number
(
i
[
17
].
value
)
>
Number
(
this
.
state
.
maxValue
)))
{
if
(
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
17
].
value
),
1
)
<
Number
(
this
.
state
.
minValue
))
:
(
Number
(
i
[
17
].
value
)
<
Number
(
this
.
state
.
minValue
))
||
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
17
].
value
),
1
)
>
Number
(
this
.
state
.
maxValue
))
:
(
Number
(
i
[
17
].
value
)
>
Number
(
this
.
state
.
maxValue
)))
{
console
.
log
(
"masuk selisih control 1"
)
console
.
log
(
"masuk selisih control 1"
)
err
=
true
err
=
true
}
else
if
(
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
18
].
value
),
1
)
:
Number
(
i
[
18
].
value
)
<
Number
(
this
.
state
.
minValue
))
||
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
18
].
value
),
1
)
:
Number
(
i
[
18
].
value
)
>
Number
(
this
.
state
.
maxValue
)))
{
}
else
if
(
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
18
].
value
),
1
)
<
Number
(
this
.
state
.
minValue
))
:
(
Number
(
i
[
18
].
value
)
<
Number
(
this
.
state
.
minValue
))
||
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
18
].
value
),
1
)
>
Number
(
this
.
state
.
maxValue
))
:
(
Number
(
i
[
18
].
value
)
>
Number
(
this
.
state
.
maxValue
)))
{
console
.
log
(
"masuk selisih control 2"
)
console
.
log
(
"masuk selisih control 2"
)
err
=
true
err
=
true
}
else
if
(
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
19
]),
1
)
:
Number
(
i
[
19
])
<
Number
(
this
.
state
.
minValue
))
||
(
this
.
props
.
defaultCurrency
.
id
==
1
?
fixNumber
(
Number
(
i
[
19
]),
1
)
:
Number
(
i
[
19
])
>
Number
(
this
.
state
.
maxValue
)))
{
}
else
if
(
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
19
]),
1
)
<
Number
(
this
.
state
.
minValue
))
:
(
Number
(
i
[
19
])
<
Number
(
this
.
state
.
minValue
))
||
this
.
props
.
defaultCurrency
.
id
==
1
?
(
fixNumber
(
Number
(
i
[
19
]),
1
)
>
Number
(
this
.
state
.
maxValue
))
:
(
Number
(
i
[
19
])
>
Number
(
this
.
state
.
maxValue
)))
{
console
.
log
(
"masuk selisih control 3"
)
console
.
log
(
"masuk selisih control 3"
)
err
=
true
err
=
true
}
}
...
@@ -658,7 +659,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -658,7 +659,7 @@ export default class BalanceSheetOLPA extends Component {
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
19
])),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0.0"
:
String
(
Number
(
i
[
19
])),
})
})
})
})
console
.
log
(
JSON
.
stringify
(
data
))
//
console.log(JSON.stringify(data))
let
payload
=
{
let
payload
=
{
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
@@ -669,26 +670,26 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -669,26 +670,26 @@ export default class BalanceSheetOLPA extends Component {
"status"
:
"submitted"
"status"
:
"submitted"
}
}
api
.
create
().
validateSubmitReportOLPA
(
payload
).
then
((
response
)
=>
{
api
.
create
().
validateSubmitReportOLPA
(
payload
).
then
((
response
)
=>
{
//
console.log(response)
console
.
log
(
response
)
// console.log(response.data.data.result)
// console.log(response.data.data.result)
//
console.log(err);
console
.
log
(
err
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
data
.
result
&&
err
===
false
)
{
if
(
response
.
data
.
data
.
result
&&
err
===
false
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
,
saveDraft
:
false
})
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
,
saveDraft
:
false
})
if
(
kansas
==
0
)
{
if
(
kansas
==
0
)
{
this
.
setState
({
kansas
:
1
,
loading
:
true
},
()
=>
{
//
this.setState({ kansas: 1, loading: true }, () => {
this
.
handleValidate
()
//
this.handleValidate()
})
//
})
}
else
{
}
else
{
this
.
setState
({
kansas
:
0
})
this
.
setState
({
kansas
:
0
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
,
saveDraft
:
true
})
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
,
saveDraft
:
true
})
if
(
kansas
==
0
)
{
if
(
kansas
==
0
)
{
this
.
setState
({
kansas
:
1
,
loading
:
true
},
()
=>
{
//
this.setState({ kansas: 1, loading: true }, () => {
this
.
handleValidate
()
//
this.handleValidate()
})
//
})
}
else
{
}
else
{
this
.
setState
({
kansas
:
0
})
this
.
setState
({
kansas
:
0
})
}
}
...
@@ -2455,4 +2456,4 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -2455,4 +2456,4 @@ export default class BalanceSheetOLPA extends Component {
<
/div
>
<
/div
>
)
)
}
}
}
}
\ No newline at end of file
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