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
8083f146
Commit
8083f146
authored
May 05, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting Parameter
parent
8f1ec8c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
4 deletions
+114
-4
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+1
-0
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+2
-2
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+111
-2
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
8083f146
...
@@ -221,6 +221,7 @@ export default class BalanceSheet extends Component {
...
@@ -221,6 +221,7 @@ export default class BalanceSheet extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
...
...
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
8083f146
...
@@ -565,7 +565,6 @@ export default class FixedAssetsMovement extends Component {
...
@@ -565,7 +565,6 @@ export default class FixedAssetsMovement extends Component {
if
(
Bfr
!==
undefined
)
{
if
(
Bfr
!==
undefined
)
{
let
data
=
24
let
data
=
24
let
period
=
Number
(
this
.
props
.
periode
)
-
1
let
period
=
Number
(
this
.
props
.
periode
)
-
1
// console.log(dataTable2[tableMeta.rowIndex][data])
anjay
.
push
(
0
)
anjay
.
push
(
0
)
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
data
].
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
period
)
let
indexID
=
dataTable2
[
tableMeta
.
rowIndex
][
data
].
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
period
)
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
...
@@ -952,7 +951,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -952,7 +951,8 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleBfr
(
value
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
// value={Number(handleBfr(value, tableMeta)).toFixed(1)}
/
>
/
>
}
}
/
>
/
>
...
...
src/container/MasterData/Parameter/CreateParameter.js
View file @
8083f146
...
@@ -13,6 +13,7 @@ export default class CreateParameter extends Component {
...
@@ -13,6 +13,7 @@ export default class CreateParameter extends Component {
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
enableParameter
:
false
,
enableParameter
:
false
,
enableReportName
:
false
,
id
:
''
,
id
:
''
,
description
:
''
,
description
:
''
,
value
:
''
,
value
:
''
,
...
@@ -27,6 +28,8 @@ export default class CreateParameter extends Component {
...
@@ -27,6 +28,8 @@ export default class CreateParameter extends Component {
types
:
null
,
types
:
null
,
getTypes
:
null
,
getTypes
:
null
,
perusahaan
:
null
,
perusahaan
:
null
,
reportName
:
null
,
getReportName
:
null
,
getPerusahaan
:
null
,
getPerusahaan
:
null
,
parameter
:
null
,
parameter
:
null
,
getParameter
:
null
,
getParameter
:
null
,
...
@@ -67,6 +70,7 @@ export default class CreateParameter extends Component {
...
@@ -67,6 +70,7 @@ export default class CreateParameter extends Component {
})
})
this
.
getDataGroup
()
this
.
getDataGroup
()
this
.
getDataPerusahaan
()
this
.
getDataPerusahaan
()
this
.
getDataReportName
()
}
}
}
}
...
@@ -109,7 +113,6 @@ export default class CreateParameter extends Component {
...
@@ -109,7 +113,6 @@ export default class CreateParameter extends Component {
getAllGroup
()
{
getAllGroup
()
{
api
.
create
().
getAllGroup
().
then
(
response
=>
{
api
.
create
().
getAllGroup
().
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
@@ -265,6 +268,11 @@ export default class CreateParameter extends Component {
...
@@ -265,6 +268,11 @@ export default class CreateParameter extends Component {
}
}
getParameterByGroup
(
id
)
{
getParameterByGroup
(
id
)
{
if
(
id
===
13
)
{
this
.
setState
({
enableReportName
:
true
})
}
else
{
this
.
setState
({
enableReportName
:
false
})
}
api
.
create
().
getParameterByGroup
(
id
).
then
(
response
=>
{
api
.
create
().
getParameterByGroup
(
id
).
then
(
response
=>
{
// console.log(id, response);
// console.log(id, response);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
...
@@ -302,6 +310,85 @@ export default class CreateParameter extends Component {
...
@@ -302,6 +310,85 @@ export default class CreateParameter extends Component {
})
})
}
}
getDataReportName
()
{
let
reportData
=
[
{
"report_id"
:
12
,
"report_name"
:
"Master Budget"
},
{
"report_id"
:
16
,
"report_name"
:
"Monthly Report - Jan"
},
{
"report_id"
:
17
,
"report_name"
:
"Monthly Report - Feb"
},
{
"report_id"
:
18
,
"report_name"
:
"Monthly Report - Mar"
},
{
"report_id"
:
19
,
"report_name"
:
"Monthly Report - Apr"
},
{
"report_id"
:
20
,
"report_name"
:
"Monthly Report - May"
},
{
"report_id"
:
21
,
"report_name"
:
"Monthly Report - Jun"
},
{
"report_id"
:
22
,
"report_name"
:
"Monthly Report - Jul"
},
{
"report_id"
:
23
,
"report_name"
:
"Monthly Report - Aug"
},
{
"report_id"
:
24
,
"report_name"
:
"Monthly Report - Sep"
},
{
"report_id"
:
25
,
"report_name"
:
"Monthly Report - Oct"
},
{
"report_id"
:
26
,
"report_name"
:
"Monthly Report - Nov"
},
{
"report_id"
:
27
,
"report_name"
:
"Monthly Report - Dec"
},
{
"report_id"
:
13
,
"report_name"
:
"Rolling Outlook Q1"
},
{
"report_id"
:
14
,
"report_name"
:
"Rolling Outlook Q2"
},
{
"report_id"
:
16
,
"report_name"
:
"Rolling Outlook Q3"
},
{
"report_id"
:
11
,
"report_name"
:
"Operating Indicator"
}
]
let
reportProps
=
{
options
:
reportData
.
sort
((
a
,
b
)
=>
a
.
report_id
-
b
.
report_id
),
getOptionLabel
:
(
option
)
=>
option
.
report_name
,
};
this
.
setState
({
reportName
:
reportProps
})
}
handleChange
(
e
,
type
)
{
handleChange
(
e
,
type
)
{
let
data
=
this
.
state
let
data
=
this
.
state
let
isDate
=
type
!==
''
?
true
:
false
let
isDate
=
type
!==
''
?
true
:
false
...
@@ -1111,7 +1198,7 @@ export default class CreateParameter extends Component {
...
@@ -1111,7 +1198,7 @@ export default class CreateParameter extends Component {
{...
this
.
state
.
types
}
{...
this
.
state
.
types
}
debug
debug
id
=
"tipe"
id
=
"tipe"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getTypes
:
newInputValue
},
()
=>
newInputValue
===
null
?
this
.
setState
({
enableParameter
:
false
,
getParameter
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
getParameterByGroup
(
newInputValue
.
setting_group_id
),
this
.
clearMessage
())}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getTypes
:
newInputValue
},
()
=>
newInputValue
===
null
?
this
.
setState
({
enableParameter
:
false
,
enableReportName
:
false
,
getParameter
:
null
},
()
=>
this
.
clearMessage
())
:
this
.
getParameterByGroup
(
newInputValue
.
setting_group_id
),
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
renderInput
=
{(
params
)
=>
<
TextField
<
TextField
{...
params
}
{...
params
}
...
@@ -1175,6 +1262,28 @@ export default class CreateParameter extends Component {
...
@@ -1175,6 +1262,28 @@ export default class CreateParameter extends Component {
>
>
<
/TextField
>
<
/TextField
>
<
/div
>
<
/div
>
{
this
.
state
.
enableReportName
&&
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
reportName
}
debug
id
=
"report"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
getReportName
:
newInputValue
},
()
=>
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
label
=
"Report Name"
// error={this.state.errorPerusahaan}
// helperText={this.state.msgErrorPerusahaan}
/>
}
value
=
{
this
.
state
.
getReportName
}
/
>
<
/div
>
}
<
div
style
=
{{
marginTop
:
'80px'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
marginTop
:
'80px'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
<
TextField
style
=
{{
width
:
'100%'
}}
style
=
{{
width
:
'100%'
}}
...
...
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