From 23daeb6f7e172ef067b598fdd87d8b994e77b665 Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Mon, 19 Jan 2026 09:09:09 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B8=D1=81=D0=BA=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=80=D1=82=D1=8B=20=D0=BF=D1=80=D0=B8=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20#1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/ArchiveHistoryCreateModal/Index.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/resources/js/Pages/Home/ArchiveHistoryCreateModal/Index.vue b/resources/js/Pages/Home/ArchiveHistoryCreateModal/Index.vue index 8ee71a2..584a822 100644 --- a/resources/js/Pages/Home/ArchiveHistoryCreateModal/Index.vue +++ b/resources/js/Pages/Home/ArchiveHistoryCreateModal/Index.vue @@ -167,6 +167,22 @@ const updateValueSearch = async (value) => { }) } +const onFilter = (pattern, option) => { + if (!pattern) return true + + const normalizeText = (text) => { + return text + .toLowerCase() + .replace(/[-\s]/g, '') // удаляем дефисы и пробелы + .trim(); + } + + const normalizedPattern = normalizeText(pattern) + const normalizedLabel = normalizeText(option.label || '') + + return normalizedLabel.includes(normalizedPattern) +} + watch(() => isCardInArchive.value, (val) => { if (val) onResetArchiveInfo({ @@ -193,6 +209,7 @@ watch(() => isCardInArchive.value, (val) => { filterable :loading="loadingFilterPatients" :options="filteredPatients" + :filter="(pattern, option) => onFilter(pattern, option)" v-model:value="archiveInfo.id" @update:value="(val) => updateValueSearch(val)" @search="handleSearchCard"