WIP Прикрутила поиск по совпадению от 3 символов
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<template lang="pug">
|
||||
.wrapper-table.relative.flex.flex-col.gap-y-8.px-6.py-6.h-full.w-full
|
||||
clients-table-hat(:is-open-actions="marked.length" :open-form="openForm")
|
||||
clients-table-hat(
|
||||
:is-open-actions="marked.length",
|
||||
:open-form="openForm",
|
||||
@search="filterDataClients",
|
||||
@reset-search="fetchDataClients"
|
||||
)
|
||||
.flex.flex-col.h-full.gap-y-2.table-container.w-full
|
||||
clients-table-header(:check="selectedCheck" :is-check="selectAll")
|
||||
.flex.flex-col
|
||||
@@ -40,7 +45,6 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
isOpenFormCreate: false,
|
||||
selectAll: false,
|
||||
marked: [],
|
||||
dataClients: [],
|
||||
@@ -50,6 +54,11 @@ export default {
|
||||
saveDataClients(data) {
|
||||
this.dataClients = data.results;
|
||||
},
|
||||
filterDataClients(text) {
|
||||
fetchWrapper
|
||||
.get(`general/person/?last_name=${text}`)
|
||||
.then((data) => this.saveDataClients(data));
|
||||
},
|
||||
fetchDataClients() {
|
||||
fetchWrapper
|
||||
.get("general/person/")
|
||||
|
||||
Reference in New Issue
Block a user