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
5d3d6aea
Commit
5d3d6aea
authored
May 10, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardcode Company
parent
ee725aba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
1 deletion
+78
-1
index.js
src/api/index.js
+3
-0
CreateCompany.js
src/container/MasterData/Company/CreateCompany.js
+75
-1
No files found.
src/api/index.js
View file @
5d3d6aea
...
...
@@ -127,6 +127,8 @@ const create = (type = "") => {
const
uploadPerusahaan
=
(
body
)
=>
api
.
post
(
'company/import_company'
,
body
)
const
searchPerusahaan
=
(
body
)
=>
api
.
post
(
'company/search_company'
,
body
)
const
deletePerusahaan
=
(
id
)
=>
api
.
post
(
`company/delete_company/
${
id
}
`
)
const
getDataCurrency
=
()
=>
api
.
get
(
'multi_currency/get_all_currency'
)
// APPROVAL MATRIX
const
getAM
=
()
=>
api
.
get
(
'approval_matrix/get_all_approval_matrix'
)
...
...
@@ -611,6 +613,7 @@ const create = (type = "") => {
deleteParameter
,
getDataReport
,
deletePerusahaan
,
getDataCurrency
,
deleteReportItems
,
getCarfmDocumentBySubmenu
,
getDocumentCategory
,
...
...
src/container/MasterData/Company/CreateCompany.js
View file @
5d3d6aea
...
...
@@ -44,6 +44,18 @@ export default class CreatePerusahaan extends Component {
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
listCurrency
:
[
{
"currency_id"
:
0
,
"currency_name"
:
"IDR"
},
{
"currency_id"
:
1
,
"currency_name"
:
"USD"
}
],
selectedCurrency
:
null
,
listDefault
:
[]
}
}
...
...
@@ -85,7 +97,8 @@ export default class CreatePerusahaan extends Component {
endDate
:
response
.
data
.
data
.
end_date
,
totalReport
:
response
.
data
.
data
.
total_report
,
created
:
response
.
data
.
data
.
created
,
updated
:
response
.
data
.
data
.
updated
===
null
?
""
:
response
.
data
.
data
.
updated
updated
:
response
.
data
.
data
.
updated
===
null
?
""
:
response
.
data
.
data
.
updated
,
currencyID
:
response
.
data
.
data
.
currency_id
,
},
()
=>
{
// setTimeout(() => {
this
.
getAllUnitBisnis
()
...
...
@@ -211,6 +224,10 @@ export default class CreatePerusahaan extends Component {
})
}
getDefaultCurrency
(
data
)
{
this
.
setState
({
listDefault
:
data
})
}
// getParentCompany() {
// api.create().getPerusahaanActive().then((response) => {
// if (response.data.status === 'success') {
...
...
@@ -617,6 +634,32 @@ export default class CreatePerusahaan extends Component {
/
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
multiple
id
=
"tags-standard"
options
=
{
this
.
state
.
listCurrency
}
getOptionLabel
=
{(
option
)
=>
option
.
currency_name
}
onChange
=
{(
event
,
newInputValue
)
=>
{
this
.
setState
({
selectedCurrency
:
newInputValue
},
()
=>
{
this
.
getDefaultCurrency
(
newInputValue
)
})
}}
renderInput
=
{(
params
)
=>
(
<
TextField
{...
params
}
variant
=
"standard"
label
=
"Currency"
margin
=
"normal"
style
=
{{
marginTop
:
0
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
)}
value
=
{
this
.
state
.
getCurrency
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
...
...
@@ -713,6 +756,37 @@ export default class CreatePerusahaan extends Component {
value
=
{
this
.
state
.
perusahaan
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Autocomplete
{...
this
.
state
.
listDefault
}
debug
id
=
"tipe"
options
=
{
this
.
state
.
listDefault
}
getOptionLabel
=
{(
option
)
=>
option
.
currency_name
}
onChange
=
{(
event
,
newInputValue
)
=>
{
this
.
setState
({
selectedCurrency
:
newInputValue
},
()
=>
{
this
.
getDefaultCurrency
(
newInputValue
)
})
}}
onChange
=
{(
event
,
newInputValue
)
=>
{
this
.
setState
({
getDefault
:
newInputValue
},
()
=>
{
console
.
log
(
newInputValue
);
this
.
clearError
()
})
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Default Currency"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
InputProps
=
{{
...
params
.
InputProps
,
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
}
/
>
<
/div
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
...
...
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