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
a1c8d7d3
Commit
a1c8d7d3
authored
Dec 08, 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
337e7878
1685d4fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
31 deletions
+47
-31
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+2
-2
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+45
-29
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
a1c8d7d3
...
...
@@ -318,7 +318,7 @@ export default class BalanceSheetMR extends Component {
item
.
mtd_vs_mb
===
""
?
""
:
item
.
mtd_vs_mb
,
item
.
mtd_vs_rb
===
""
?
""
:
item
.
mtd_vs_rb
===
null
?
0
:
item
.
mtd_vs_rb
,
item
.
actual_formula
,
item
.
order
s
,
item
.
order
,
item
.
error
]
})
...
...
@@ -2018,7 +2018,7 @@ export default class BalanceSheetMR extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"MONTHLY REPORT - BALANCE SHEET"
?
String
(
this
.
state
.
judul
).
includes
(
"MONTHLY REPORT - BALANCE SHEET"
)
?
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
a1c8d7d3
...
...
@@ -63,6 +63,7 @@ export default class ProfitLossMR extends Component {
maxValue
:
0
,
updateBy
:
'-'
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
componentDidMount
()
{
...
...
@@ -122,7 +123,18 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
updateBy
:
response
.
data
.
data
.
latest_update
===
null
?
'-'
:
response
.
data
.
data
.
latest_update
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
,
loading
:
false
})
}
})
}
...
...
@@ -251,7 +263,7 @@ export default class ProfitLossMR extends Component {
}
backToMonthlyReport
(
type
)
{
//
console.log(this.state.dataTable);
//
this.setState({ loading: true })
let
data
=
[]
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
...
...
@@ -275,7 +287,7 @@ export default class ProfitLossMR extends Component {
})
})
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
submissionID
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
...
...
@@ -294,10 +306,7 @@ export default class ProfitLossMR extends Component {
})
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
document
.
body
.
style
.
overflow
=
'unset'
;
})
this
.
setState
({
loading
:
false
})
}
})
}
...
...
@@ -306,7 +315,7 @@ export default class ProfitLossMR extends Component {
console
.
log
(
event
);
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
console
.
log
(
resp
)
//
console.log(resp)
if
(
err
)
{
// console.log(err);
}
...
...
@@ -363,12 +372,18 @@ export default class ProfitLossMR extends Component {
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
,
0
,
0
,
0
,
0
,
0
,
0
,
// 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
,
...
...
@@ -415,22 +430,23 @@ export default class ProfitLossMR extends Component {
})
})
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
months
:
this
.
props
.
month
.
month_id
,
status
:
type
,
profit_loss
:
data
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"months"
:
this
.
props
.
month
.
month_id
,
"status"
:
type
,
"profit_loss"
:
data
}
//
console.log(data);
console
.
log
(
data
);
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportPL
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
this
.
props
.
saveToMonthlyReport
()
// this.props.onClickClose()
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
@@ -1839,7 +1855,7 @@ export default class ProfitLossMR extends Component {
this
.
state
.
saveDraft
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
})
}
...
...
@@ -1856,7 +1872,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
})}
style
=
{{
...
...
@@ -1957,7 +1973,7 @@ export default class ProfitLossMR extends Component {
this
.
state
.
saveDraft
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
uploadProfitLossMR
(
'draft'
)
})
}
...
...
@@ -1974,7 +1990,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data is not complete !'
,
tipeAlert
:
'warning'
})
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
uploadProfitLossMR
(
'submitted'
)
})}
style
=
{{
...
...
@@ -2023,7 +2039,7 @@ export default class ProfitLossMR extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
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
.
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