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
439e54c1
Commit
439e54c1
authored
May 11, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak banget (currency)
parent
5d3d6aea
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
312 additions
and
132 deletions
+312
-132
index.js
src/api/index.js
+1
-1
warning.png
src/assets/warning.png
+0
-0
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+1
-1
Company.js
src/container/MasterData/Company/Company.js
+1
-0
CreateCompany.js
src/container/MasterData/Company/CreateCompany.js
+123
-43
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+11
-11
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+3
-2
CreateReportItems.js
src/container/MasterData/ReportItems/CreateReportItems.js
+36
-2
EditReportItems.js
src/container/MasterData/ReportItems/EditReportItems.js
+43
-5
ReportItems.js
src/container/MasterData/ReportItems/ReportItems.js
+93
-67
No files found.
src/api/index.js
View file @
439e54c1
...
...
@@ -186,7 +186,7 @@ const create = (type = "") => {
const
uploadParameter
=
(
body
)
=>
api
.
post
(
'/setting/import_setting'
,
body
)
const
searchParameter
=
(
body
)
=>
api
.
post
(
'setting/search_setting'
,
body
)
const
deleteParameter
=
(
id
)
=>
api
.
post
(
`setting/delete_setting/
${
id
}
`
)
const
getDataReport
=
()
=>
api
.
get
(
'
type_report/get_all_type_report
'
)
const
getDataReport
=
()
=>
api
.
get
(
'
setting_type/get_all_setting_type_by_report_submit_period_group
'
)
// MASTER DATA - CAT
const
getAllMasterDataCat
=
()
=>
api
.
get
(
'item_report_company/get_all_item_report_company'
)
...
...
src/assets/warning.png
0 → 100644
View file @
439e54c1
1.79 KB
src/container/BudgetTahunan/ProfitLoss.js
View file @
439e54c1
...
...
@@ -72,7 +72,7 @@ export default class ProfitLoss extends Component {
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getLatestUpdate
()
//
console.log(this.props);
console
.
log
(
this
.
props
);
}
getLatestUpdate
()
{
...
...
src/container/MasterData/Company/Company.js
View file @
439e54c1
...
...
@@ -415,6 +415,7 @@ export default class Perusahaan extends Component {
createPerusahaan
=
(
payload
)
=>
{
this
.
setState
({
visibleCreate
:
false
})
api
.
create
().
createPerusahaan
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
...
...
src/container/MasterData/Company/CreateCompany.js
View file @
439e54c1
This diff is collapsed.
Click to expand it.
src/container/MasterData/Parameter/CreateParameter.js
View file @
439e54c1
...
...
@@ -89,8 +89,8 @@ export default class CreateParameter extends Component {
getCompanyID
:
data
.
company_id
,
settingType
:
data
.
setting_type
,
getSettingTypeID
:
data
.
setting_type_id
,
typeReport
:
data
.
type_report
_name
,
getTypeReportID
:
data
.
type_report
_id
,
typeReport
:
data
.
setting_type
_name
,
getTypeReportID
:
data
.
setting_type
_id
,
enableReportName
:
data
.
setting_group
===
"CURRENCY"
?
true
:
false
},
()
=>
{
...
...
@@ -205,14 +205,14 @@ export default class CreateParameter extends Component {
let
data
=
response
.
data
.
data
let
reportData
=
data
.
map
((
item
)
=>
{
return
{
type_report_id
:
item
.
type_report
_id
,
type_report_name
:
item
.
type_report
_name
setting_type_id
:
item
.
setting_type
_id
,
setting_type_name
:
item
.
setting_type
_name
}
})
let
index
=
reportData
.
findIndex
((
val
)
=>
val
.
type_report
_id
==
this
.
state
.
getTypeReportID
)
let
index
=
reportData
.
findIndex
((
val
)
=>
val
.
setting_type
_id
==
this
.
state
.
getTypeReportID
)
let
reportProps
=
{
options
:
reportData
,
getOptionLabel
:
(
option
)
=>
option
.
type_report
_name
,
getOptionLabel
:
(
option
)
=>
option
.
setting_type
_name
,
};
this
.
setState
({
reportName
:
reportProps
,
reportData
:
response
.
data
.
data
,
getReportName
:
index
==
-
1
?
reportData
[
0
]
:
reportData
[
index
]
})
}
else
{
...
...
@@ -362,13 +362,13 @@ export default class CreateParameter extends Component {
let
data
=
response
.
data
.
data
let
reportData
=
data
.
map
((
item
)
=>
{
return
{
type_report_id
:
item
.
type_report
_id
,
type_report_name
:
item
.
type_report
_name
setting_type_id
:
item
.
setting_type
_id
,
setting_type_name
:
item
.
setting_type
_name
}
})
let
reportProps
=
{
options
:
reportData
,
getOptionLabel
:
(
option
)
=>
option
.
type_report
_name
,
getOptionLabel
:
(
option
)
=>
option
.
setting_type
_name
,
};
this
.
setState
({
reportName
:
reportProps
,
reportData
:
response
.
data
.
data
})
}
else
{
...
...
@@ -609,7 +609,7 @@ export default class CreateParameter extends Component {
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
"setting_type_id"
:
this
.
state
.
getParameter
.
setting_type_id
,
"company_id"
:
this
.
state
.
getPerusahaan
.
company_id
,
"
type_report_id"
:
this
.
state
.
getReportName
.
type_report
_id
,
"
reference_id"
:
this
.
state
.
getReportName
.
setting_type
_id
,
"description"
:
this
.
state
.
tempData
.
description
,
"orders"
:
this
.
state
.
tempData
.
order
,
"value"
:
this
.
state
.
tempData
.
value
,
...
...
@@ -627,7 +627,7 @@ export default class CreateParameter extends Component {
"setting_group_id"
:
this
.
state
.
getTypes
.
setting_group_id
,
"setting_type_id"
:
this
.
state
.
getParameter
.
setting_type_id
,
"company_id"
:
this
.
state
.
getPerusahaan
.
company_id
,
"
type_report_id"
:
this
.
state
.
getReportName
.
type_report
_id
,
"
reference_id"
:
this
.
state
.
getReportName
.
setting_type
_id
,
"description"
:
this
.
state
.
description
,
"orders"
:
this
.
state
.
order
,
"value"
:
this
.
state
.
value
,
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
439e54c1
...
...
@@ -317,7 +317,7 @@ export default class Parameter extends Component {
group
:
item
[
0
]
===
undefined
?
""
:
item
[
0
],
parameter
:
item
[
1
]
===
undefined
?
""
:
item
[
1
],
company
:
item
[
2
]
===
undefined
?
""
:
item
[
2
],
type_report
:
item
[
3
]
===
undefined
?
""
:
item
[
3
],
reference
:
item
[
3
]
===
undefined
?
""
:
item
[
3
],
description
:
item
[
4
]
===
undefined
?
""
:
item
[
4
],
orders
:
item
[
5
]
===
undefined
?
""
:
item
[
5
],
value
:
item
[
6
]
===
undefined
?
""
:
item
[
6
],
...
...
@@ -349,7 +349,7 @@ export default class Parameter extends Component {
item
.
group
,
item
.
parameter
,
item
.
company
,
item
.
type_report
,
item
.
reference
,
item
.
description
,
item
.
orders
,
item
.
value
,
...
...
@@ -674,6 +674,7 @@ export default class Parameter extends Component {
}
uploadParameter
()
{
console
.
log
(
this
.
state
.
payload
);
api
.
create
().
uploadParameter
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
src/container/MasterData/ReportItems/CreateReportItems.js
View file @
439e54c1
...
...
@@ -72,7 +72,18 @@ export default class CreateReportItems extends Component {
maxAchValue
:
null
,
formulaYTDValue
:
null
,
kpiDisable
:
true
,
maxAchDisable
:
true
maxAchDisable
:
true
,
convertible
:
null
,
listConvert
:
[
{
"id"
:
0
,
"value"
:
"No"
},
{
"id"
:
1
,
"value"
:
"Yes"
}
],
}
}
...
...
@@ -209,7 +220,8 @@ export default class CreateReportItems extends Component {
"max_ach"
:
this
.
state
.
maxAchValue
?
this
.
state
.
maxAchValue
.
value
:
null
,
"formula_ytd"
:
this
.
state
.
formulaYTDValue
,
"start_date"
:
this
.
state
.
startDate
,
"end_date"
:
this
.
state
.
endDate
"end_date"
:
this
.
state
.
endDate
,
"is_can_convert_value"
:
this
.
state
.
convertible
.
id
}
// console.log(payload)
this
.
props
.
createReportItems
(
payload
)
...
...
@@ -1047,6 +1059,28 @@ export default class CreateReportItems extends Component {
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
debug
id
=
"tipe"
options
=
{
this
.
state
.
listConvert
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
convertible
:
newInputValue
},
()
=>
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Convertible"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
marginTop
:
7
}}
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
...
...
src/container/MasterData/ReportItems/EditReportItems.js
View file @
439e54c1
...
...
@@ -72,7 +72,18 @@ export default class EditReportItems extends Component {
formulaYtd
:
[
'SUM'
,
'AVG'
,
'LAST'
,
'FORMULA'
],
kpiTypeValue
:
null
,
maxAchValue
:
null
,
formulaYTDValue
:
null
formulaYTDValue
:
null
,
convertible
:
null
,
listConvert
:
[
{
"id"
:
0
,
"value"
:
"No"
},
{
"id"
:
1
,
"value"
:
"Yes"
}
],
}
}
...
...
@@ -183,7 +194,8 @@ export default class EditReportItems extends Component {
"max_ach"
:
this
.
state
.
tempData
.
max_ach
,
"formula_ytd"
:
this
.
state
.
tempData
.
formula_ytd
,
"start_date"
:
this
.
state
.
tempData
.
start_date
,
"end_date"
:
this
.
state
.
tempData
.
end_date
"end_date"
:
this
.
state
.
tempData
.
end_date
,
"is_can_convert_value"
:
this
.
state
.
convertible
.
id
}
// console.log(payload)
this
.
props
.
updateReportItems
(
payload
)
...
...
@@ -191,17 +203,20 @@ export default class EditReportItems extends Component {
getDetailReportItems
()
{
api
.
create
().
getDetailReportItems
(
this
.
props
.
data
[
1
]).
then
((
response
)
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
index
=
this
.
state
.
listConvert
.
findIndex
((
val
)
=>
val
.
id
===
data
.
is_can_convert_value
)
this
.
setState
({
tempData
:
response
.
data
.
data
,
getCompanyID
:
data
.
company_id
getCompanyID
:
data
.
company_id
,
convertible
:
index
===
-
1
?
null
:
this
.
state
.
listConvert
[
index
]
},
()
=>
this
.
getInputType
(),
this
.
getPerusahaan
(),
this
.
getReportType
())
// console.log(
response.data.data
)
// console.log(
this.state.convertible
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -328,7 +343,7 @@ export default class EditReportItems extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
let
index
=
inputKPI
.
findIndex
((
val
)
=>
val
.
value
===
this
.
state
.
tempData
.
kpi_type
)
this
.
setState
({
listKPI
:
defaultProps
,
inputKPI
:
response
.
data
.
data
,
KPIValue
:
index
===
-
1
?
null
:
inputKPI
[
index
]})
this
.
setState
({
listKPI
:
defaultProps
,
inputKPI
:
response
.
data
.
data
,
KPIValue
:
index
===
-
1
?
null
:
inputKPI
[
index
]
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -1017,6 +1032,29 @@ export default class EditReportItems extends Component {
<
/div
>
<
div
className
=
"grid grid-2x grid-mobile-none gap-15px"
style
=
{{
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
debug
id
=
"tipe"
options
=
{
this
.
state
.
listConvert
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
value
=
{
this
.
state
.
convertible
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
convertible
:
newInputValue
},
()
=>
this
.
clearMessage
())}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Convertible"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
}
/
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
...
...
src/container/MasterData/ReportItems/ReportItems.js
View file @
439e54c1
This diff is collapsed.
Click to expand it.
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