diff --git a/frontend/src/views/warranty/WarrantiesList.vue b/frontend/src/views/warranty/WarrantiesList.vue index fa30afa..8e3252d 100644 --- a/frontend/src/views/warranty/WarrantiesList.vue +++ b/frontend/src/views/warranty/WarrantiesList.vue @@ -82,12 +82,11 @@
- - - - Who backs the warranty. Pick a known vendor or type a new one. + + Who backs the warranty. Manage the list under Vendors.
@@ -202,8 +201,15 @@ const form = ref(blankForm()) const selectedAssets = ref([]) const assetQuery = ref('') const assetResults = ref([]) -// Suggestions for the Vendor combobox, pulled from the site vendor catalog. +// Vendor dropdown options, pulled from the site vendor catalog. const vendorNames = ref([]) +// Keep an existing warranty's vendor selectable even if it is not (or no longer) +// in the catalog, so editing never silently blanks it. +const vendorOptions = computed(() => { + const current = (form.value.vendor || '').trim() + if (current && !vendorNames.value.includes(current)) return [current, ...vendorNames.value] + return vendorNames.value +}) function blankForm() { return { vendor: '', provider: 'manual', servicetag: '', servicelevel: '', startdate: '', enddate: '', notes: '' }