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
2e70f3b1
Commit
2e70f3b1
authored
Mar 19, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
c72dc7e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+5
-13
No files found.
src/container/RollingOutlook/OperatingIndicatorRO.js
View file @
2e70f3b1
...
@@ -333,7 +333,7 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -333,7 +333,7 @@ export default class OperatingIndicatorRO extends Component {
downloadTemplate
=
async
()
=>
{
downloadTemplate
=
async
()
=>
{
let
res
=
await
fetch
(
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/download_template?report_id=
${
this
.
props
.
data
.
report_id
}
&&company_id=
${
this
.
props
.
data
.
company
.
company_id
}
&&year=
${
this
.
props
.
data
.
periode
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/download_template?report_id=
${
this
.
props
.
data
.
report_id
}
&&company_id=
${
this
.
props
.
data
.
company
.
company_id
}
&&year=
${
this
.
props
.
data
.
periode
}
&&quartal=
${
this
.
props
.
quartal
}
`
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
// // console.log(res)
// // console.log(res)
...
@@ -341,7 +341,7 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -341,7 +341,7 @@ export default class OperatingIndicatorRO extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
href
=
url
;
a
.
download
=
'Template
Master Budget
Operating Indicator.xlsx'
;
a
.
download
=
'Template
Rolling Outlook
Operating Indicator.xlsx'
;
a
.
click
();
a
.
click
();
}
}
}
}
...
@@ -520,14 +520,6 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -520,14 +520,6 @@ export default class OperatingIndicatorRO extends Component {
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
total
=
0
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
// dataTable2[tableMeta.rowIndex].map((item,index) => {
// if (index >= 8 && index <= 19) {
// let valItem = item == undefined || item == ""? 0 : item
// total += Number(valItem)
// }
// })
// dataTable2[tableMeta.rowIndex][20] = total
// // console.log(dataTable2[tableMeta.rowIndex])
}
}
const
handleValue
=
(
value
,
tableMeta
)
=>
{
const
handleValue
=
(
value
,
tableMeta
)
=>
{
...
@@ -535,12 +527,12 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -535,12 +527,12 @@ export default class OperatingIndicatorRO extends Component {
let
total
=
0
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
8
&&
index
<=
19
)
{
if
(
index
>=
7
&&
index
<=
19
)
{
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
let
valItem
=
item
==
undefined
||
item
==
""
?
0
:
item
total
+=
Number
(
valItem
)
total
+=
Number
(
valItem
)
}
}
})
})
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
return
total
return
total
}
}
...
@@ -572,7 +564,7 @@ export default class OperatingIndicatorRO extends Component {
...
@@ -572,7 +564,7 @@ export default class OperatingIndicatorRO extends Component {
}
else
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
}
else
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
arrayFormulaConvert
.
push
(
item
)
arrayFormulaConvert
.
push
(
item
)
}
else
{
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
1
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
0
]
==
item
)
if
(
tambahan
)
{
if
(
tambahan
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
opet
=
item
opet
=
item
...
...
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