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
10f664a8
Commit
10f664a8
authored
Jan 26, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
pl banyak See merge request
!1043
parents
23735252
35a4d78c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
797 additions
and
192 deletions
+797
-192
SubHolding.js
src/container/Laporan/SubHolding.js
+74
-32
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+682
-119
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+41
-41
No files found.
src/container/Laporan/SubHolding.js
View file @
10f664a8
This diff is collapsed.
Click to expand it.
src/container/Laporan/TableSubHolding.js
View file @
10f664a8
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/ProfitLossMR.js
View file @
10f664a8
...
...
@@ -376,22 +376,22 @@ export default class ProfitLossMR extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"notes"
:
i
[
6
]
,
"rolling_outlook"
:
i
[
7
]
,
"master_budget"
:
i
[
8
]
,
"rolling_budget"
:
i
[
9
]
,
"actual"
:
i
[
10
]
,
"ytd_actual"
:
i
[
11
]
,
"actual_previous_month"
:
i
[
12
]
,
"amount_act_vs_previous_month"
:
i
[
13
]
,
"percent_act_vs_previous_month"
:
i
[
14
]
,
"amount_act_vs_mb"
:
i
[
15
]
,
"percent_act_vs_mb"
:
i
[
16
]
,
"amount_act_vs_rb"
:
i
[
17
]
,
"percent_act_vs_rb"
:
i
[
18
]
,
"mtd_vs_mb"
:
i
[
19
]
,
"mtd_vs_rb"
:
i
[
20
]
,
"mtd_vs_previous_month"
:
i
[
21
]
,
"notes"
:
String
(
i
[
6
])
,
"rolling_outlook"
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
))
,
"master_budget"
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
))
,
"rolling_budget"
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
))
,
"actual"
:
String
(
Number
(
i
[
10
]).
toFixed
(
1
))
,
"ytd_actual"
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
))
,
"actual_previous_month"
:
String
(
Number
(
i
[
12
]).
toFixed
(
1
))
,
"amount_act_vs_previous_month"
:
String
(
Number
(
i
[
13
]).
toFixed
(
1
))
,
"percent_act_vs_previous_month"
:
String
(
Number
(
i
[
14
]).
toFixed
(
1
))
,
"amount_act_vs_mb"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
))
,
"percent_act_vs_mb"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
))
,
"amount_act_vs_rb"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
))
,
"percent_act_vs_rb"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
))
,
"mtd_vs_mb"
:
String
(
i
[
19
])
,
"mtd_vs_rb"
:
String
(
i
[
20
])
,
"mtd_vs_previous_month"
:
String
(
i
[
21
])
,
})
})
let
payload
=
{
...
...
@@ -405,31 +405,31 @@ export default class ProfitLossMR extends Component {
}
console
.
log
(
payload
);
// console.log(JSON.stringify(payload));
api
.
create
(
'UPLOAD'
).
createMonthlyReportPL
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'PL'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
this
.
props
.
saveToMonthlyReport
()
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleTekTekTek
:
0
})
}
})
//
api.create('UPLOAD').createMonthlyReportPL(payload).then(response => {
//
console.log(response);
//
if (response.data) {
//
if (response.data.status === "success") {
//
if (type == 'submitted') {
//
this.props.saveToMonthlyReport('PL')
//
} else {
//
this.props.saveToMonthlyReport()
//
}
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
//
document.body.style.overflow = 'unset';
//
if (response.data.message.includes("Someone Logged In")) {
//
setTimeout(() => {
//
localStorage.removeItem(Constant.TOKEN)
//
window.location.reload();
//
}, 1000);
//
}
//
this.props.saveToMonthlyReport()
//
})
//
}
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 })
//
}
//
})
}
fileHandler
=
(
event
)
=>
{
...
...
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