From 8e733ab4fac14eed7eb900cafa3d6f005e59ca6d Mon Sep 17 00:00:00 2001 From: well Date: Sat, 2 Nov 2024 12:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=20=D0=BF=D0=BE?= =?UTF-8?q?=20=D0=B8=D0=BD=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/views.py | 1 + l2-frontend/src/construct/ConstructCompany.vue | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/views.py b/api/views.py index f86fc25fa6..fa55fada56 100644 --- a/api/views.py +++ b/api/views.py @@ -2963,6 +2963,7 @@ def get_companies(request): { "pk": company.pk, "title": company.title, + "inn": company.inn if isinstance(company, Company) else None } for company in companies ] diff --git a/l2-frontend/src/construct/ConstructCompany.vue b/l2-frontend/src/construct/ConstructCompany.vue index a4e2cdb6c6..9064528c0b 100644 --- a/l2-frontend/src/construct/ConstructCompany.vue +++ b/l2-frontend/src/construct/ConstructCompany.vue @@ -166,7 +166,7 @@
@@ -420,9 +420,10 @@ export default { filteredCompany() { return this.companies.filter(company => { const companyTitle = company.title.toLowerCase(); + const companyInn = company.inn.toLowerCase(); const searchTerm = this.searchCompany.toLowerCase(); - return companyTitle.includes(searchTerm); + return companyTitle.includes(searchTerm) || companyInn.includes(searchTerm); }); }, filteredDepartments() {