diff --git a/frontend/src/api.js b/frontend/src/api.js index a71f8e2..910362d 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -396,6 +396,7 @@ class Api { static async getCompanyNames() { const companies = await this.getDocsList("Company", ["name"]); + const companyNames = companies.map((company) => company.name); console.log("DEBUG: API - Fetched Company Names: ", companyNames); return companyNames; } diff --git a/frontend/src/components/modals/CreateEstimateModal.vue b/frontend/src/components/modals/CreateEstimateModal.vue index 4c602c3..463b4f2 100644 --- a/frontend/src/components/modals/CreateEstimateModal.vue +++ b/frontend/src/components/modals/CreateEstimateModal.vue @@ -94,7 +94,7 @@ const formFields = computed(() => [ { name: "company", label: "Company Name", - type: "select", // Changed from 'select' to 'autocomplete' + type: "autocomplete", // Changed from 'select' to 'autocomplete' required: true, placeholder: "Select Company", cols: 12, @@ -122,7 +122,10 @@ const formFields = computed(() => [ placeholder: "Select Customer or Business", cols: 12, md: 6, - options: ["Customer", "Business"], + options: [ + {"label": "Customer", "value": "Customer"}, + {"label": "Business", "value": "Business"} + ] }, { name: "partyName",