diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a456d9a8..7b3f6525 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -8,7 +8,7 @@ diff --git a/frontend/src/components/ViewSettings.vue b/frontend/src/components/ViewSettings.vue index abc54514..8bb90127 100644 --- a/frontend/src/components/ViewSettings.vue +++ b/frontend/src/components/ViewSettings.vue @@ -268,6 +268,7 @@ function apply(reload = false, isDefault = false, reset = false) { emit('update', obj) if (reload) { + // will have think of a better way to do this setTimeout(() => { is_default.value = reset ? oldValues.value.isDefault : isDefault columnsUpdated.value = !reset diff --git a/frontend/src/stores/contacts.js b/frontend/src/stores/contacts.js index a3d2a9e2..4f5dcead 100644 --- a/frontend/src/stores/contacts.js +++ b/frontend/src/stores/contacts.js @@ -10,6 +10,7 @@ export const contactsStore = defineStore('crm-contacts', () => { url: 'crm.api.session.get_contacts', cache: 'contacts', initialData: [], + auto: true, transform(contacts) { for (let contact of contacts) { contactsByPhone[contact.mobile_no] = contact @@ -23,7 +24,6 @@ export const contactsStore = defineStore('crm-contacts', () => { } }, }) - contacts.fetch() function getContact(mobile_no) { return contactsByPhone[mobile_no] diff --git a/frontend/src/stores/organizations.js b/frontend/src/stores/organizations.js index 15712231..6de91e69 100644 --- a/frontend/src/stores/organizations.js +++ b/frontend/src/stores/organizations.js @@ -9,6 +9,7 @@ export const organizationsStore = defineStore('crm-organizations', () => { url: 'crm.api.session.get_organizations', cache: 'organizations', initialData: [], + auto: true, transform(organizations) { for (let organization of organizations) { organizationsByName[organization.name] = organization @@ -21,7 +22,6 @@ export const organizationsStore = defineStore('crm-organizations', () => { } }, }) - organizations.fetch() function getOrganization(name) { return organizationsByName[name]