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
3dfbaea9
Commit
3dfbaea9
authored
Aug 27, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
periode
parent
4226d84b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
BudgetTahunan.js
src/container/BudgetTahunan.js
+27
-16
No files found.
src/container/BudgetTahunan.js
View file @
3dfbaea9
...
@@ -15,11 +15,12 @@ export default class BudgetTahunan extends Component {
...
@@ -15,11 +15,12 @@ export default class BudgetTahunan extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
periode
:
'2021'
,
perusahaan
:
'TAP Group'
,
perusahaan
:
'TAP Group'
,
revisi
:
'0'
,
revisi
:
'0'
,
visibleBudgetTahunan
:
true
,
visibleBudgetTahunan
:
true
,
visibleBS
:
false
,
visibleBS
:
false
,
listPeriode
:
null
,
periode
:
null
,
listCompany
:
null
,
listCompany
:
null
,
company
:
null
,
company
:
null
,
report_id
:
null
,
report_id
:
null
,
...
@@ -36,7 +37,7 @@ export default class BudgetTahunan extends Component {
...
@@ -36,7 +37,7 @@ export default class BudgetTahunan extends Component {
getReport
()
{
getReport
()
{
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
,
"periode"
:
this
.
state
.
periode
.
periode
,
"report_type"
:
"Master Budget"
,
"report_type"
:
"Master Budget"
,
}
}
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
api
.
create
().
getReportTypeBody
(
payload
).
then
(
response
=>
{
...
@@ -75,13 +76,27 @@ export default class BudgetTahunan extends Component {
...
@@ -75,13 +76,27 @@ export default class BudgetTahunan extends Component {
options
:
companyData
,
options
:
companyData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
this
.
get
Report
())
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
this
.
get
Periode
())
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
}
}
})
})
}
}
getPeriode
()
{
let
data
=
[
"2021"
,
"2020"
,
"2019"
]
let
periodeData
=
data
.
map
((
item
)
=>
{
return
{
periode
:
item
,
}
})
let
defaultProps
=
{
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
periodeData
[
0
]
},
()
=>
this
.
getReport
())
}
clickDetail
(
item
,
id
)
{
clickDetail
(
item
,
id
)
{
this
.
setState
({
report_id
:
id
})
this
.
setState
({
report_id
:
id
})
if
(
item
===
'Balance Sheet'
)
{
if
(
item
===
'Balance Sheet'
)
{
...
@@ -279,20 +294,16 @@ export default class BudgetTahunan extends Component {
...
@@ -279,20 +294,16 @@ export default class BudgetTahunan extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
>
<
TextField
<
Autocomplete
style
=
{{
width
:
250
,
}
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
select
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
this
.
getReport
())}
label
=
"Periode"
debug
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Periode"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
periode
}
value
=
{
this
.
state
.
periode
}
onChange
=
{(
e
)
=>
this
.
setState
({
periode
:
e
.
target
.
value
})}
/
>
>
{
periode
.
map
((
option
)
=>
(
<
MenuItem
key
=
{
option
.
value
}
value
=
{
option
.
value
}
>
{
option
.
label
}
<
/MenuItem
>
))}
<
/TextField
>
<
/div
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
<
Autocomplete
...
...
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