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
206f5f5a
Commit
206f5f5a
authored
Nov 26, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check upload monthly pl
parent
71684786
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
41 deletions
+35
-41
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+35
-41
No files found.
src/container/MonthlyReport/ProfitLossMR.js
View file @
206f5f5a
...
...
@@ -281,47 +281,41 @@ export default class ProfitLossMR extends Component {
api
.
create
().
checkUploadMonthlyReportPL
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
// if (response.data) {
// if (response.data.status === 'success') {
// this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
// let dataTable = response.data.data.map((item, index) => {
// return [
// item.item_report_id,
// item.type_report_id,
// item.item_report,
// item.parent,
// item.formula,
// item.level,
// item.notes,
// item.rolling_outlook,
// item.master_budget,
// item.rolling_budget,
// item.actual,
// item.ytd_actual,
// item.actual_previous_month,
// item.amount_act_vs_previous_month,
// item.percent_act_vs_previous_month,
// item.amount_act_vs_mb,
// item.percent_act_vs_mb,
// item.amount_act_vs_rb,
// item.percent_act_vs_rb,
// item.mtd_vs_previous_month,
// item.mtd_vs_mb,
// item.mtd_vs_rb,
// item.orders
// ]
// })
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
// this.state.dataTable.map(item => {
// if (item[24].length > 0) {
// // console.log('masuk')
// this.setState({ buttonError: true, errorPreview: true, editable: true })
// }
// })
// // console.log(this.state.buttonError)
// })
// }
// }
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
item
.
item_report_id
,
item
.
item_report
,
item
.
type_report_id
,
item
.
formula
,
item
.
level
,
item
.
parent
,
item
.
notes
,
item
.
rolling_outlook
,
item
.
master_budget
,
item
.
rolling_budget
,
item
.
actual
,
item
.
ytd_actual
,
item
.
actual_previous_month
,
item
.
mtd_vs_mb
,
item
.
mtd_vs_rb
,
item
.
orders
,
item
.
error
]
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
16
].
length
>
0
)
{
// console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
})
// console.log(this.state.buttonError)
})
}
}
})
}
...
...
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