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
755119ba
Commit
755119ba
authored
Jan 26, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
f8e9d478
709526c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
18 deletions
+36
-18
SubHolding.js
src/container/Laporan/SubHolding.js
+36
-18
No files found.
src/container/Laporan/SubHolding.js
View file @
755119ba
...
...
@@ -1087,7 +1087,7 @@ export default class SubHolding extends Component {
}
}
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
fals
e
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
tru
e
})
// this.setState({ dataTable }, () => {
// console.log(this.state.dataTable)
...
...
@@ -2272,7 +2272,7 @@ export default class SubHolding extends Component {
}
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_profit_loss
_detail/export_master_budge
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_profit_loss
/export_repor
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -2284,10 +2284,10 @@ export default class SubHolding extends Component {
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
4
)
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
/db_ratio/export_master_budge
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
db_ratio/export_repor
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
/db_ratio/export_master_budge
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
db_ratio/export_repor
t?submission_id=
${
this
.
state
.
submissionID
===
null
?
""
:
this
.
state
.
submissionID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
&&revision=
${
this
.
state
.
revisionType
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
...
...
@@ -2298,6 +2298,21 @@ export default class SubHolding extends Component {
a
.
download
=
'Report DB Financial Ratio.xlsx'
;
a
.
click
();
}
}
else
if
(
this
.
state
.
report
.
value
===
21
)
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_operating_indicator/export_report?operating_indicator_id=
${
this
.
state
.
OPID
===
null
?
""
:
this
.
state
.
OPID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/db_operating_indicator/export_report?operating_indicator_id=
${
this
.
state
.
OPID
===
null
?
""
:
this
.
state
.
OPID
}
&&report_id=
${
this
.
state
.
report
.
value
}
&&company_id=
${
this
.
state
.
company
.
company_id
}
&&year=
${
this
.
state
.
periode
.
periode
}
`
)
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
'Report DB Operating Indicator.xlsx'
;
a
.
click
();
}
}
else
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
...
...
@@ -2364,7 +2379,7 @@ export default class SubHolding extends Component {
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Company"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
company
}
/
>
{
this
.
state
.
report
!=
null
?
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
<
Autocomplete
{
/* {
this.state.report != null ? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete
{...this.state.listUom}
// getOptionLabel={(option) => titleCase(option.label)}
id="uom"
...
...
@@ -2375,7 +2390,7 @@ export default class SubHolding extends Component {
style={{ width: 250, marginLeft: 10 }}
renderInput={(params) => <TextField {...params} label="Uom" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.uom}
/> : null : null
}
/> : null : null}
*/
}
<
/div
>
<
div
style
=
{{
marginTop
:
15
,
display
:
'flex'
}}
>
<
Autocomplete
...
...
@@ -2392,18 +2407,7 @@ export default class SubHolding extends Component {
/>
}
value
=
{
this
.
state
.
periode
}
/
>
{
this
.
state
.
report
!=
null
?
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
<
Autocomplete
{...
this
.
state
.
listMonths
}
// getOptionLabel={(option) => titleCase(option.label)}
id
=
"months"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
month
:
newInputValue
,
loading
:
true
,
previewTable
:
false
},
()
=>
{
this
.
getReportType
()
})}
disableClearable
style
=
{{
width
:
250
,
marginLeft
:
10
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Months"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
month
}
/> : null : null
}
{
/* {this.state.report != null ? String(this.state.report.label).toLocaleLowerCase().includes('summary') ? <Autocomplete
{...this.state.listQuarter}
// getOptionLabel={(option) => titleCase(option.label)}
...
...
@@ -2417,6 +2421,20 @@ export default class SubHolding extends Component {
value={this.state.quarter}
/> : null : null} */
}
<
/div
>
{
this
.
state
.
report
!=
null
?
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
<
div
style
=
{{
marginTop
:
15
,
display
:
'flex'
}}
>
<
Autocomplete
{...
this
.
state
.
listMonths
}
// getOptionLabel={(option) => titleCase(option.label)}
id
=
"months"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
month
:
newInputValue
,
loading
:
true
,
previewTable
:
false
},
()
=>
{
this
.
getReportType
()
})}
disableClearable
style
=
{{
width
:
250
,
marginLeft
:
10
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Months"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
month
}
/
>
<
/div> : null : null
}
<
/div
>
<
div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
padding
:
'0px 20px 10px 20px'
}}
>
...
...
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