Commit 23126899 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(client side search for datatable): client side search for datatable

Closes KRN-48
parent 09feed9b
...@@ -66,6 +66,19 @@ ...@@ -66,6 +66,19 @@
</v-row> </v-row>
<v-row justify="center" dense class="flex-wrap mt-6"> <v-row justify="center" dense class="flex-wrap mt-6">
<v-col md="9" cols="12"> <v-col md="9" cols="12">
<v-card>
<v-card-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
style="width:400px"
class="flex-grow-0"
></v-text-field>
</v-card-title>
<v-data-table <v-data-table
v-model="selectedItemInTable" v-model="selectedItemInTable"
:headers="headerOfTable" :headers="headerOfTable"
...@@ -82,7 +95,9 @@ ...@@ -82,7 +95,9 @@
:sort-desc.sync="sortDescTable" :sort-desc.sync="sortDescTable"
height="73vh" height="73vh"
@click:row="clickRow" @click:row="clickRow"
:search="search"
></v-data-table> ></v-data-table>
</v-card>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
...@@ -108,7 +123,8 @@ export default { ...@@ -108,7 +123,8 @@ export default {
snackbar: false, snackbar: false,
alertSnackbar: false, alertSnackbar: false,
alertText: "", alertText: "",
loading: false loading: false,
search: ""
}; };
}, },
computed: { computed: {
......
...@@ -86,6 +86,19 @@ ...@@ -86,6 +86,19 @@
</v-row> </v-row>
<v-row justify="center" dense class="flex-wrap mt-6"> <v-row justify="center" dense class="flex-wrap mt-6">
<v-col md="9" cols="12"> <v-col md="9" cols="12">
<v-card>
<v-card-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
style="width:400px"
class="flex-grow-0"
></v-text-field>
</v-card-title>
<v-data-table <v-data-table
v-model="selectedItemInTable" v-model="selectedItemInTable"
:headers="headerOfTable" :headers="headerOfTable"
...@@ -102,7 +115,9 @@ ...@@ -102,7 +115,9 @@
:sort-desc.sync="sortDescTable" :sort-desc.sync="sortDescTable"
height="73vh" height="73vh"
@click:row="clickRow" @click:row="clickRow"
:search="search"
></v-data-table> ></v-data-table>
</v-card>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
...@@ -134,7 +149,8 @@ export default { ...@@ -134,7 +149,8 @@ export default {
snackbar: false, snackbar: false,
alertSnackbar: false, alertSnackbar: false,
alertText: "", alertText: "",
loading: false loading: false,
search: ""
}; };
}, },
computed: { computed: {
...@@ -170,7 +186,7 @@ export default { ...@@ -170,7 +186,7 @@ export default {
if ( if (
hislink != undefined && hislink != undefined &&
hislink != null && hislink != null &&
hislink.length > 0 && // hislink.length > 0 &&
hislink[0].Name != undefined hislink[0].Name != undefined
) )
currentDevicemap.push({ ...devicemap, HisName: hislink[0].Name }); currentDevicemap.push({ ...devicemap, HisName: hislink[0].Name });
......
...@@ -130,6 +130,19 @@ ...@@ -130,6 +130,19 @@
</v-row> </v-row>
<v-row justify="center" dense class="flex-wrap mt-6"> <v-row justify="center" dense class="flex-wrap mt-6">
<v-col md="9" cols="12"> <v-col md="9" cols="12">
<v-card>
<v-card-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
style="width:400px"
class="flex-grow-0"
></v-text-field>
</v-card-title>
<v-data-table <v-data-table
v-model="selectedItemInTable" v-model="selectedItemInTable"
:headers="headerOfTable" :headers="headerOfTable"
...@@ -146,7 +159,9 @@ ...@@ -146,7 +159,9 @@
:sort-desc.sync="sortDescTable" :sort-desc.sync="sortDescTable"
height="73vh" height="73vh"
@click:row="clickRow" @click:row="clickRow"
:search="search"
></v-data-table> ></v-data-table>
</v-card>
</v-col> </v-col>
</v-row> </v-row>
<his-worklist <his-worklist
...@@ -192,7 +207,8 @@ export default { ...@@ -192,7 +207,8 @@ export default {
alertText: "", alertText: "",
loading: false, loading: false,
HisWorklistDialog: false, HisWorklistDialog: false,
selectedBrand: null selectedBrand: null,
search: ""
}; };
}, },
mounted() { mounted() {
...@@ -397,7 +413,6 @@ export default { ...@@ -397,7 +413,6 @@ export default {
let Brand = this.selectedItemInTable[0].Brand; let Brand = this.selectedItemInTable[0].Brand;
this.selectedBrand = Brand; this.selectedBrand = Brand;
this.HisWorklistDialog = true; this.HisWorklistDialog = true;
} }
}, },
meteor: { meteor: {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
v-if="!$vuetify.rtl" v-if="!$vuetify.rtl"
>{{newOrEdit=="new"?$t("Users.newText"):$t("Users.editText")}} {{$t("Users.UserName")}}</span> >{{newOrEdit=="new"?$t("Users.newText"):$t("Users.editText")}} {{$t("Users.UserName")}}</span>
<template v-if="$vuetify.rtl"> <template v-if="$vuetify.rtl">
<span v-if="newOrEdit=='new'">{{$t("Users.UserName")}} {{$t("Users.newText")}} </span> <span v-if="newOrEdit=='new'">{{$t("Users.UserName")}} {{$t("Users.newText")}}</span>
<span v-if="newOrEdit=='edit'">{{$t("Users.editText")}} {{$t("Users.UserName")}}</span> <span v-if="newOrEdit=='edit'">{{$t("Users.editText")}} {{$t("Users.UserName")}}</span>
</template> </template>
</v-card-title> </v-card-title>
...@@ -111,6 +111,19 @@ ...@@ -111,6 +111,19 @@
</v-row> </v-row>
<v-row justify="center" dense class="flex-wrap mt-6"> <v-row justify="center" dense class="flex-wrap mt-6">
<v-col md="9" cols="12"> <v-col md="9" cols="12">
<v-card>
<v-card-title>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
style="width:400px"
class="flex-grow-0"
></v-text-field>
</v-card-title>
<v-data-table <v-data-table
v-model="selectedItemInTable" v-model="selectedItemInTable"
:headers="headerOfTable" :headers="headerOfTable"
...@@ -127,7 +140,9 @@ ...@@ -127,7 +140,9 @@
:sort-desc.sync="sortDescTable" :sort-desc.sync="sortDescTable"
height="73vh" height="73vh"
@click:row="clickRow" @click:row="clickRow"
:search="search"
></v-data-table> ></v-data-table>
</v-card>
</v-col> </v-col>
</v-row> </v-row>
</v-container> </v-container>
...@@ -171,7 +186,8 @@ export default { ...@@ -171,7 +186,8 @@ export default {
showPassword2: false, showPassword2: false,
secondPass: null, secondPass: null,
secondPassAlert: false secondPassAlert: false,
search: ""
}; };
}, },
computed: { computed: {
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
:sort-by.sync="sortByTable" :sort-by.sync="sortByTable"
:sort-desc.sync="sortDescTable" :sort-desc.sync="sortDescTable"
height="61vh" height="61vh"
:search="search"
> >
<template v-slot:top> <template v-slot:top>
<div> <div>
...@@ -83,6 +84,16 @@ ...@@ -83,6 +84,16 @@
<strong>{{$t('WorkList.editBtn')}}</strong> <strong>{{$t('WorkList.editBtn')}}</strong>
</v-btn> </v-btn>
<v-divider class="mx-4" inset vertical></v-divider> <v-divider class="mx-4" inset vertical></v-divider>
<v-spacer></v-spacer>
<v-text-field
v-model="search"
append-icon="search"
label="Search"
single-line
hide-details
style="width:400px"
class="flex-grow-0"
></v-text-field>
<v-dialog v-model="editDialog" max-width="900px"> <v-dialog v-model="editDialog" max-width="900px">
<v-card class="grey lighten-4"> <v-card class="grey lighten-4">
...@@ -724,7 +735,8 @@ export default { ...@@ -724,7 +735,8 @@ export default {
FarsiLastNameParts2: "FarsiLastNameParts2" FarsiLastNameParts2: "FarsiLastNameParts2"
}, },
selectedItem: undefined, selectedItem: undefined,
sortedItems: undefined sortedItems: undefined,
search: ""
}), }),
computed: { computed: {
clientsItems() { clientsItems() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment