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
8b97e209
Commit
8b97e209
authored
Aug 13, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update parameter
parent
ec6fb43a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
index.js
src/api/index.js
+5
-1
Perusahaan.js
src/container/MasterData/Perusahaan/Perusahaan.js
+17
-0
No files found.
src/api/index.js
View file @
8b97e209
...
@@ -83,6 +83,9 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
...
@@ -83,6 +83,9 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
const
updateUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/update_business_unit'
,
body
)
const
updateUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/update_business_unit'
,
body
)
const
searchUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/search_business_unit'
,
body
)
const
searchUnitBisnis
=
(
body
)
=>
api
.
post
(
'/business_unit/search_business_unit'
,
body
)
// Perusahaan
const
getCompany
=
()
=>
api
.
get
(
'company/get_all_company'
)
// ------
// ------
// STEP 3
// STEP 3
// ------
// ------
...
@@ -111,7 +114,8 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
...
@@ -111,7 +114,8 @@ const create = (baseURL = 'https://trftia.eksad.com/tia-reporting-dev/public/')
getUnitBisnis
,
getUnitBisnis
,
createUnitBisnis
,
createUnitBisnis
,
updateUnitBisnis
,
updateUnitBisnis
,
searchUnitBisnis
searchUnitBisnis
,
getCompany
}
}
}
}
...
...
src/container/MasterData/Perusahaan/Perusahaan.js
View file @
8b97e209
...
@@ -7,6 +7,7 @@ import MUIDataTable from "mui-datatables";
...
@@ -7,6 +7,7 @@ import MUIDataTable from "mui-datatables";
import
{
render
}
from
'@testing-library/react'
;
import
{
render
}
from
'@testing-library/react'
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
import
CreatePerusahaan
from
"../Perusahaan/CreatePerusahaan"
;
import
CreatePerusahaan
from
"../Perusahaan/CreatePerusahaan"
;
import
api
from
"../../../api"
;
var
ct
=
require
(
"../../../library/CustomTable"
);
var
ct
=
require
(
"../../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -23,6 +24,22 @@ export default class Perusahaan extends Component {
...
@@ -23,6 +24,22 @@ export default class Perusahaan extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getData
()
}
getData
()
{
api
.
create
().
getCompany
().
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
business_unit_id
,
item
.
business_unit_name
,
item
.
status
]
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
})
}
else
{
alert
(
response
.
data
.
message
)
}
})
}
}
render
()
{
render
()
{
...
...
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