1
0
forked from test/crm

chore: minor changes

This commit is contained in:
Shariq Ansari 2024-01-03 16:18:03 +05:30
parent e6da9a3ef2
commit 3c27169d12
7 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@
</template>
<script setup>
import DesktopLayout from '@/components/DesktopLayout.vue'
import DesktopLayout from '@/components/Layouts/DesktopLayout.vue'
import { Dialogs } from '@/utils/dialogs'
import { sessionStore as session } from '@/stores/session'
import { Toasts } from 'frappe-ui'

View File

@ -10,6 +10,6 @@
</div>
</template>
<script setup>
import AppSidebar from '@/components/AppSidebar.vue'
import AppHeader from '@/components/AppHeader.vue'
import AppSidebar from '@/components/Layouts/AppSidebar.vue'
import AppHeader from '@/components/Layouts/AppHeader.vue'
</script>

View File

@ -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

View File

@ -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]

View File

@ -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]