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
952dcca9
Commit
952dcca9
authored
Aug 16, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sorting unitbisnis
parent
48b74075
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
UnitBisnis.js
src/container/MasterData/UnitBisnis.js
+10
-10
No files found.
src/container/MasterData/UnitBisnis.js
View file @
952dcca9
...
...
@@ -50,12 +50,14 @@ export default class UnitBisnis extends Component {
let
isi
=
resp
.
rows
.
slice
(
3
)
let
payload
=
[]
isi
.
map
((
item
,
index
)
=>
{
payload
.
push
({
id
:
index
+
1
,
business_unit_name
:
item
[
0
],
start_date
:
item
[
1
],
end_date
:
item
[
2
],
})
if
(
item
.
length
>
0
)
{
payload
.
push
({
id
:
index
+
1
,
business_unit_name
:
item
[
0
],
start_date
:
item
[
1
],
end_date
:
item
[
2
],
})
}
})
let
body
=
{
business_unit
:
payload
...
...
@@ -170,8 +172,6 @@ export default class UnitBisnis extends Component {
})
// console.log(JSON.stringify(payload));
}
});
}
...
...
@@ -185,7 +185,7 @@ export default class UnitBisnis extends Component {
console
.
log
(
response
)
if
(
response
.
data
.
status
==
'success'
)
{
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
let
listData
=
data
.
sort
((
a
,
b
)
=>
a
.
business_unit_id
-
b
.
business_unit_id
).
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
business_unit_id
,
item
.
business_unit_name
,
item
.
status
]
})
this
.
setState
({
dataTable
:
listData
,
listData
:
response
.
data
.
data
})
...
...
@@ -287,7 +287,7 @@ export default class UnitBisnis extends Component {
this
.
setState
({
visibleUnitBisnis
:
true
})
})
}
render
()
{
const
columns
=
[{
name
:
"Action"
,
...
...
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