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
d251b13d
Commit
d251b13d
authored
Nov 26, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
b3463922
b44f0123
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
46 deletions
+40
-46
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+5
-5
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+35
-41
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
d251b13d
...
@@ -103,7 +103,7 @@ export default class ProfitLoss extends Component {
...
@@ -103,7 +103,7 @@ export default class ProfitLoss extends Component {
"submission_id"
:
this
.
props
.
submissionID
"submission_id"
:
this
.
props
.
submissionID
}
}
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
let
dataTable
=
[]
let
dataTable
=
[]
this
.
setState
({
visibleProfitLoss
:
true
})
this
.
setState
({
visibleProfitLoss
:
true
})
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -289,7 +289,7 @@ export default class ProfitLoss extends Component {
...
@@ -289,7 +289,7 @@ export default class ProfitLoss extends Component {
fileHandler
=
(
event
)
=>
{
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
resp
)
//
console.log(resp)
if
(
err
)
{
if
(
err
)
{
// console.log(err);
// console.log(err);
}
}
...
@@ -329,7 +329,7 @@ export default class ProfitLoss extends Component {
...
@@ -329,7 +329,7 @@ export default class ProfitLoss extends Component {
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
profit_loss
:
payload
profit_loss
:
payload
}
}
console
.
log
(
isi
)
//
console.log(isi)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
}
});
});
...
@@ -338,7 +338,7 @@ export default class ProfitLoss extends Component {
...
@@ -338,7 +338,7 @@ export default class ProfitLoss extends Component {
checkUpload
()
{
checkUpload
()
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
//
console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
...
@@ -465,7 +465,7 @@ export default class ProfitLoss extends Component {
...
@@ -465,7 +465,7 @@ export default class ProfitLoss extends Component {
handleValidate
()
{
handleValidate
()
{
let
data
=
[]
let
data
=
[]
console
.
log
(
JSON
.
stringify
(
this
.
state
.
dataTable
))
//
console.log(JSON.stringify(this.state.dataTable))
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
item_report_id
:
i
[
1
],
item_report_id
:
i
[
1
],
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
d251b13d
...
@@ -281,47 +281,41 @@ export default class ProfitLossMR extends Component {
...
@@ -281,47 +281,41 @@ export default class ProfitLossMR extends Component {
api
.
create
().
checkUploadMonthlyReportPL
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadMonthlyReportPL
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
console
.
log
(
response
)
// if (response.data) {
if
(
response
.
data
)
{
// if (response.data.status === 'success') {
if
(
response
.
data
.
status
===
'success'
)
{
// this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
// let dataTable = response.data.data.map((item, index) => {
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
// return [
return
[
// item.item_report_id,
item
.
item_report_id
,
// item.type_report_id,
item
.
item_report
,
// item.item_report,
item
.
type_report_id
,
// item.parent,
item
.
formula
,
// item.formula,
item
.
level
,
// item.level,
item
.
parent
,
// item.notes,
item
.
notes
,
// item.rolling_outlook,
item
.
rolling_outlook
,
// item.master_budget,
item
.
master_budget
,
// item.rolling_budget,
item
.
rolling_budget
,
// item.actual,
item
.
actual
,
// item.ytd_actual,
item
.
ytd_actual
,
// item.actual_previous_month,
item
.
actual_previous_month
,
// item.amount_act_vs_previous_month,
item
.
mtd_vs_mb
,
// item.percent_act_vs_previous_month,
item
.
mtd_vs_rb
,
// item.amount_act_vs_mb,
item
.
orders
,
// item.percent_act_vs_mb,
item
.
error
// item.amount_act_vs_rb,
]
// item.percent_act_vs_rb,
})
// item.mtd_vs_previous_month,
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
// item.mtd_vs_mb,
this
.
state
.
dataTable
.
map
(
item
=>
{
// item.mtd_vs_rb,
if
(
item
[
16
].
length
>
0
)
{
// item.orders
// console.log('masuk')
// ]
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
// })
}
// this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
})
// this.state.dataTable.map(item => {
// console.log(this.state.buttonError)
// if (item[24].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