feat: customer groups for people and companies with tahesab group sync and bulk register
Multiple groups per contact, legacy group text migrated, excel import/export, contacts filter and column, richer create-in-tahesab, match-first bulk export
This commit is contained in:
@@ -8,6 +8,7 @@ import CustomFieldsSection from '@/components/CustomFieldsSection.vue';
|
||||
import EntityTimeline from '@/components/EntityTimeline.vue';
|
||||
import RelatedTasksPanel from '@/components/routines/RelatedTasksPanel.vue';
|
||||
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
||||
import CustomerGroupPicker from '@/components/CustomerGroupPicker.vue';
|
||||
import { formatLocalDateInput, parseLocalInput } from '@/lib/jalali';
|
||||
import {
|
||||
UiButton,
|
||||
@@ -59,6 +60,7 @@ const city = ref('');
|
||||
const postalCode = ref('');
|
||||
const address = ref('');
|
||||
const groupName = ref('');
|
||||
const groupIds = ref<string[]>([]);
|
||||
const registeredAt = ref('');
|
||||
const notes = ref('');
|
||||
const tagsRaw = ref('');
|
||||
@@ -94,6 +96,7 @@ function fill(c: CompanyDto) {
|
||||
postalCode.value = c.postalCode ?? '';
|
||||
address.value = c.address ?? '';
|
||||
groupName.value = c.groupName ?? '';
|
||||
groupIds.value = (c.groups ?? []).map((g) => g.id);
|
||||
registeredAt.value = c.registeredAt ? formatLocalDateInput(new Date(c.registeredAt)) : '';
|
||||
notes.value = c.notes ?? '';
|
||||
tagsRaw.value = (c.tags ?? []).join('، ');
|
||||
@@ -134,6 +137,7 @@ function payload(): CreateCompanyRequest {
|
||||
postalCode: postalCode.value || null,
|
||||
address: address.value || undefined,
|
||||
groupName: groupName.value || null,
|
||||
groupIds: groupIds.value,
|
||||
registeredAt: parseLocalInput(registeredAt.value)?.toISOString() ?? null,
|
||||
notes: notes.value || undefined,
|
||||
tags: parseTags(tagsRaw.value),
|
||||
@@ -254,8 +258,8 @@ onMounted(load);
|
||||
<UiInput id="sourceRef" v-model="sourceRef" placeholder="مثال: 5277" dir="ltr" />
|
||||
</UiField>
|
||||
|
||||
<UiField label="گروه بندی شرکت">
|
||||
<UiInput id="groupName" v-model="groupName" placeholder="مثال: همکار، عمدهفروش" />
|
||||
<UiField label="گروههای شرکت" class="col-span-2">
|
||||
<CustomerGroupPicker v-model="groupIds" />
|
||||
</UiField>
|
||||
|
||||
<UiField label="تاریخ ثبت شرکت">
|
||||
|
||||
Reference in New Issue
Block a user