Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
reybex-educational-app
Project
Project
Details
Activity
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
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
M. Esat Akpunar
reybex-educational-app
Commits
2193d61d
Commit
2193d61d
authored
Sep 01, 2022
by
esatakpunar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sortDesc added
parent
8de784aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
actions.js
client/src/modules/customers/store/actions.js
+9
-2
No files found.
client/src/modules/customers/store/actions.js
View file @
2193d61d
...
@@ -10,11 +10,18 @@ export default {
...
@@ -10,11 +10,18 @@ export default {
}
}
let
pageLimit
=
`&_page=
${
getters
.
getOptions
.
page
}
&_limit=
${
getters
.
getOptions
.
itemsPerPage
}
`
;
let
pageLimit
=
`&_page=
${
getters
.
getOptions
.
page
}
&_limit=
${
getters
.
getOptions
.
itemsPerPage
}
`
;
let
sort
=
`&_sort=
${
getters
.
getOptions
.
sortBy
}
&_order=
${
getters
.
getOptions
.
sortDesc
}
`
;
if
(
data
.
searchInput
)
{
pageLimit
=
""
;
}
let
sort
=
getters
.
getOptions
.
sortDesc
[
0
]
?
"desc"
:
"asc"
;
let
sortBy
=
`&_sort=
${
getters
.
getOptions
.
sortBy
}
&_order=
${
sort
}
`
;
commit
(
"setLoading"
,
true
);
commit
(
"setLoading"
,
true
);
axios
axios
.
get
(
`http://localhost:3000/customers?
${
query
}${
pageLimit
}${
sort
}
`
)
.
get
(
`http://localhost:3000/customers?
${
query
}${
pageLimit
}${
sort
By
}
`
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
commit
(
"setTotalCustomers"
,
response
.
headers
[
"x-total-count"
]);
commit
(
"setTotalCustomers"
,
response
.
headers
[
"x-total-count"
]);
commit
(
"setCustomerList"
,
response
.
data
);
commit
(
"setCustomerList"
,
response
.
data
);
...
...
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