diff --git a/src/pages/Account/Card/AccountDescriptor.vue b/src/pages/Account/Card/AccountDescriptor.vue index 3850ef210..b19c1f619 100644 --- a/src/pages/Account/Card/AccountDescriptor.vue +++ b/src/pages/Account/Card/AccountDescriptor.vue @@ -25,78 +25,19 @@ const salixUrl = ref(); const entityId = computed(() => { return $props.id || route.params.id; }); - const filter = { - include: [ - { - relation: 'client', - scope: { - include: [ - { relation: 'salesPersonUser' }, - { - relation: 'accountsRatio', - scope: { - fields: ['accountingRate'], - limit: 1, - }, - }, - ], - }, - }, - { - relation: 'accountState', - }, - { - relation: 'ticket', - scope: { - include: [ - { relation: 'zone' }, - { - relation: 'address', - scope: { - include: { relation: 'province' }, - }, - }, - ], - }, - }, - { - relation: 'worker', - scope: { - include: { relation: 'user' }, - }, - }, - ], + where: { id: entityId }, + fields: ['id', 'nickname', 'name', 'role'], + include: { relation: 'role', scope: { fields: ['id', 'name'] } }, }; - -const STATE_COLOR = { - pending: 'warning', - incomplete: 'info', - resolved: 'positive', - canceled: 'negative', -}; -function stateColor(code) { - return STATE_COLOR[code]; -} -const data = ref(useCardDescription()); -const setData = (entity) => { - if (!entity) return; - data.value = useCardDescription(entity.client.name, entity.id); - state.set('AccountDescriptor', entity); -}; -onMounted(async () => { - salixUrl.value = await getUrl(''); -});