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
76e382ce
Commit
76e382ce
authored
Oct 20, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
fc4a97ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
12 deletions
+30
-12
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+27
-10
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+2
-1
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+1
-1
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
76e382ce
...
@@ -6,6 +6,7 @@ import ReactTooltip from 'react-tooltip';
...
@@ -6,6 +6,7 @@ import ReactTooltip from 'react-tooltip';
import
api
from
'../../api'
;
import
api
from
'../../api'
;
import
Images
from
'../../assets/Images'
;
import
Images
from
'../../assets/Images'
;
import
*
as
R
from
'ramda'
import
*
as
R
from
'ramda'
import
{
PropagateLoader
}
from
'react-spinners'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
...
@@ -35,7 +36,8 @@ export default class CashFlow extends Component {
...
@@ -35,7 +36,8 @@ export default class CashFlow extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
dataTable
:
[]
dataTable
:
[],
loading
:
false
}
}
}
}
...
@@ -142,22 +144,19 @@ export default class CashFlow extends Component {
...
@@ -142,22 +144,19 @@ export default class CashFlow extends Component {
// console.log(url);
// console.log(url);
let
resReal
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/cash_flow/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
&&report_id=
${
this
.
props
.
report_id
}
`
let
resReal
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/cash_flow/export_master_budget?submission_id=
${
this
.
props
.
submissionID
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
&&report_id=
${
this
.
props
.
report_id
}
`
let
resNull
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/cash_flow/export_master_budget?submission_id=&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
&&report_id=
${
this
.
props
.
report_id
}
`
let
resNull
=
`https://tia.eksad.com/tia-reporting-dev/public/transaction/cash_flow/export_master_budget?submission_id=&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&revision=
${
this
.
props
.
revision
}
&&report_id=
${
this
.
props
.
report_id
}
`
if
(
this
.
props
.
submissionID
==
null
)
{
console
.
log
(
resNull
)
}
else
{
console
.
log
(
resReal
)
}
let
res
=
await
fetch
(
let
res
=
await
fetch
(
this
.
props
.
submissionID
==
null
?
resNull
:
resReal
this
.
props
.
submissionID
==
null
?
resNull
:
resReal
)
)
res
=
await
res
.
blob
()
res
=
await
res
.
blob
()
this
.
setState
({
loading
:
false
})
if
(
res
.
size
>
0
)
{
if
(
res
.
size
>
0
)
{
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
=
'Master Budget Cash Flow.xlsx'
;
a
.
download
=
'Master Budget Cash Flow.xlsx'
;
a
.
click
();
a
.
click
();
this
.
setState
({
loading
:
false
})
}
else
{
this
.
setState
({
loading
:
false
})
}
}
}
}
...
@@ -2143,6 +2142,18 @@ export default class CashFlow extends Component {
...
@@ -2143,6 +2142,18 @@ export default class CashFlow extends Component {
}
}
},
},
]
]
const
loadingComponent
=
(
<
div
style
=
{{
position
:
'absolute'
,
zIndex
:
110
,
top
:
0
,
left
:
0
,
width
:
'100%'
,
height
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
background
:
'rgba(255,255,255,0.8)'
}}
>
<
PropagateLoader
// css={override}
size
=
{
20
}
color
=
{
"#274B80"
}
loading
=
{
this
.
state
.
loading
}
/
>
<
/div
>
);
return
(
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
...
@@ -2170,7 +2181,12 @@ export default class CashFlow extends Component {
...
@@ -2170,7 +2181,12 @@ export default class CashFlow extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
margin
:
5
margin
:
5
}}
}}
onClick
=
{()
=>
this
.
downloadAllData
()}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
downloadAllData
()
// setTimeout(() => {
// this.setState({loading: false})
// }, 500);
})}
>
>
<
img
src
=
{
Images
.
download
}
/
>
<
img
src
=
{
Images
.
download
}
/
>
<
/button
>
<
/button
>
...
@@ -2181,13 +2197,14 @@ export default class CashFlow extends Component {
...
@@ -2181,13 +2197,14 @@ export default class CashFlow extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
{
!
this
.
state
.
loading
&&
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
dataTable2
}
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
<
/MuiThemeProvider>
}
<
/MuiThemeProvider
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/Paper
>
<
/Paper
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
76e382ce
...
@@ -90,6 +90,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -90,6 +90,7 @@ export default class CorporateAnnualTarget extends Component {
this
.
getKPIType
()
this
.
getKPIType
()
this
.
getMaxAch
()
this
.
getMaxAch
()
this
.
getLatestUpdate
()
this
.
getLatestUpdate
()
console
.
log
(
this
.
props
.
status
)
// // console.log(this.props.lastStatus);
// // console.log(this.props.lastStatus);
}
}
...
@@ -1119,7 +1120,7 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -1119,7 +1120,7 @@ export default class CorporateAnnualTarget extends Component {
setCellProps
:
()
=>
({
style
}),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
tableMeta
.
rowData
[
1
]
==
""
?
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
],
tableMeta
)
&&
(
tableMeta
.
rowData
[
1
]
==
""
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'draft'
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'submitted'
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'revision'
)
?
<
div
style
=
{{
textAlign
:
'left'
,
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
div
style
=
{{
textAlign
:
'left'
,
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
!
this
.
state
.
loading
&&
<
FormControlLabel
{
!
this
.
state
.
loading
&&
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
76e382ce
...
@@ -1989,7 +1989,7 @@ export default class BalanceSheet extends Component {
...
@@ -1989,7 +1989,7 @@ export default class BalanceSheet extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
{
this
.
state
.
dataLoaded
&&
(
{
this
.
state
.
dataLoaded
&&
(
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
,
height
:
this
.
props
.
height
-
400
}}
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)}}
>
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
...
...
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