Merge branch 'UC-90' of https://github.com/dderbentsov/urban-couscous into UC-90
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
:check="selectedCheck",
|
||||
:client="client",
|
||||
:fetch-data-clients="fetchDataClients",
|
||||
@update-clients="updateDataClient"
|
||||
)
|
||||
client-table-pagination(
|
||||
v-if="pageCount > 1"
|
||||
:length="pageCount",
|
||||
:current-page="currentTablePage",
|
||||
v-if="paginationInfo.length > 1"
|
||||
:pagination-info="paginationInfo"
|
||||
@previous-page="switchPreviousPage",
|
||||
@next-page="switchNextPage",
|
||||
@set-current-page="changeCurrentTablePage"
|
||||
@@ -60,6 +60,10 @@ export default {
|
||||
limit: 4,
|
||||
count: 0,
|
||||
textSearch: "",
|
||||
paginationInfo: {
|
||||
currentPage: 0,
|
||||
length: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -68,6 +72,10 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateDataClient() {
|
||||
if (this.dataClients.length === 1) this.currentTablePage -= 1;
|
||||
else this.fetchDataClients();
|
||||
},
|
||||
saveDataClients(data) {
|
||||
this.dataClients = data.results;
|
||||
this.count = data.count;
|
||||
@@ -96,6 +104,10 @@ export default {
|
||||
);
|
||||
}
|
||||
this.saveDataClients(response);
|
||||
this.paginationInfo = {
|
||||
currentPage: this.currentTablePage,
|
||||
length: this.pageCount,
|
||||
};
|
||||
},
|
||||
selectedCheck(e) {
|
||||
if (e.target.id === "checkbox") {
|
||||
|
||||
Reference in New Issue
Block a user