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
88be97c6
Commit
88be97c6
authored
Dec 07, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pl
parent
45ae943f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+11
-10
No files found.
src/container/MonthlyReport/ProfitLossMR.js
View file @
88be97c6
...
@@ -251,7 +251,7 @@ export default class ProfitLossMR extends Component {
...
@@ -251,7 +251,7 @@ export default class ProfitLossMR extends Component {
}
}
backToMonthlyReport
(
type
)
{
backToMonthlyReport
(
type
)
{
// console.log(this.state.dataTable
);
console
.
log
(
"masuk"
);
let
data
=
[]
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
data
.
push
({
...
@@ -275,7 +275,7 @@ export default class ProfitLossMR extends Component {
...
@@ -275,7 +275,7 @@ export default class ProfitLossMR extends Component {
})
})
})
})
let
payload
=
{
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
submissionID
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
this
.
props
.
report_id
,
...
@@ -415,7 +415,7 @@ export default class ProfitLossMR extends Component {
...
@@ -415,7 +415,7 @@ export default class ProfitLossMR extends Component {
})
})
})
})
let
body
=
{
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
monthly_report_id
:
this
.
props
.
monthlyReportId
,
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
...
@@ -423,14 +423,15 @@ export default class ProfitLossMR extends Component {
...
@@ -423,14 +423,15 @@ export default class ProfitLossMR extends Component {
status
:
type
,
status
:
type
,
profit_loss
:
data
profit_loss
:
data
}
}
//
console.log(data);
console
.
log
(
data
);
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportPL
(
body
).
then
(
response
=>
{
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportPL
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
saveToMonthlyReport
()
this
.
props
.
getReport
()
// this.props.onClickClose()
// this.props.getReport()
}
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
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
@@ -1856,7 +1857,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1856,7 +1857,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
this
.
backToMonthlyReport
(
'submitted'
)
})}
})}
style
=
{{
style
=
{{
...
@@ -1974,7 +1975,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1974,7 +1975,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
uploadProfitLossMR
(
'submitted'
)
this
.
uploadProfitLossMR
(
'submitted'
)
})}
})}
style
=
{{
style
=
{{
...
@@ -2023,7 +2024,7 @@ export default class ProfitLossMR extends Component {
...
@@ -2023,7 +2024,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"MONTHLY REPORT - PROFIT LOSS"
?
String
(
this
.
state
.
judul
).
includes
(
"MONTHLY"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"REPORT"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"PROFIT"
)
&&
String
(
this
.
state
.
judul
).
includes
(
"LOSS"
)
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
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