From c24c960c020e117eac430ce84b447bbb9a043985 Mon Sep 17 00:00:00 2001 From: Pier Dolique Date: Tue, 3 Dec 2024 23:19:56 +0200 Subject: [PATCH 1/2] feat(equipment): add brand selection and search functionality in equipment forms * Fixes #244 * Fixes #253 --- app/components/ComboBox/ComboBox.vue | 214 ++++++++++++++++++ app/components/PerdInput.vue | 16 +- app/components/equipment/AddEquipmentForm.vue | 15 +- .../equipment/EditEquipmentForm.vue | 78 ++++++- app/pages/equipment/item/[itemId]/edit.vue | 20 +- app/pages/equipment/item/[itemId]/index.vue | 5 + .../api/equipment/items/[itemId]/index.get.ts | 9 + .../equipment/items/[itemId]/index.patch.ts | 13 +- server/api/search/brands.get.ts | 22 ++ 9 files changed, 374 insertions(+), 18 deletions(-) create mode 100644 app/components/ComboBox/ComboBox.vue create mode 100644 server/api/search/brands.get.ts diff --git a/app/components/ComboBox/ComboBox.vue b/app/components/ComboBox/ComboBox.vue new file mode 100644 index 0000000..86b5442 --- /dev/null +++ b/app/components/ComboBox/ComboBox.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/app/components/PerdInput.vue b/app/components/PerdInput.vue index 5d66a5c..4b6a6b1 100644 --- a/app/components/PerdInput.vue +++ b/app/components/PerdInput.vue @@ -12,6 +12,8 @@ :required="required" :type="type" :disabled="disabled" + @focus="onFocus" + @blur="onBlur" >