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
446c51ff
Commit
446c51ff
authored
Sep 01, 2022
by
esatakpunar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search event changed state
parent
da371342
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
index.vue
client/src/modules/products/index.vue
+25
-4
mutations.js
client/src/modules/products/store/mutations.js
+3
-0
state.js
client/src/modules/products/store/state.js
+2
-1
No files found.
client/src/modules/products/index.vue
View file @
446c51ff
...
...
@@ -7,7 +7,6 @@ export default {
return
{
selected
:
[],
column
:
"all"
,
search
:
""
,
};
},
computed
:
{
...
...
@@ -24,6 +23,8 @@ export default {
"editedIndex"
,
"getOptions"
,
"totalProducts"
,
"getSearch"
,
"filterColumn"
,
]),
indexofColumn
()
{
...
...
@@ -58,6 +59,15 @@ export default {
this
.
setSingleExpand
(
data
);
},
},
search
:
{
get
()
{
return
this
.
getSearch
;
},
set
(
data
)
{
this
.
setSearch
(
data
);
},
},
},
methods
:
{
...
mapActions
(
"products"
,
[
...
...
@@ -70,6 +80,7 @@ export default {
"setExpanded"
,
"setSingleExpand"
,
"setOptions"
,
"setSearch"
,
]),
},
created
()
{
...
...
@@ -122,9 +133,11 @@ export default {
<v-btn
icon
large
color=
"blue
-grey
"
color=
"blue"
class=
"white--text"
@
click=
"fetchProductData"
@
click=
"
fetchProductData(
{ searchInput: search, filterColumn: column })
"
>
<v-icon>
refresh
</v-icon>
</v-btn>
...
...
@@ -167,7 +180,15 @@ export default {
<v-btn
color=
"blue darken-1"
@
click=
"closeDialog()"
>
Cancel
</v-btn
>
<v-btn
color=
"blue darken-1"
@
click=
"saveProduct()"
>
<v-btn
color=
"blue darken-1"
@
click=
"
saveProduct(
{
searchInput: search,
filterColumn: column,
})
"
>
Save
</v-btn
>
</
template
>
...
...
client/src/modules/products/store/mutations.js
View file @
446c51ff
...
...
@@ -30,4 +30,7 @@ export default {
setTotalProducts
(
state
,
data
)
{
state
.
totalProducts
=
data
;
},
setSearch
(
state
,
data
)
{
state
.
search
=
data
;
},
};
client/src/modules/products/store/state.js
View file @
446c51ff
...
...
@@ -7,6 +7,7 @@ export default () => ({
editedItem
:
{},
dialog
:
false
,
loading
:
false
,
options
:
{},
options
:
{
sortDesc
:
[
false
]
},
totalProducts
:
0
,
search
:
""
,
});
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