Keep previous import source and code when a person is re-imported from another source
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -655,7 +655,13 @@ onMounted(load);
|
||||
قبلی: {{ p.previousFullName }}
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ sourceLabel(p.importSource || 'manual') }}</td>
|
||||
<td>
|
||||
{{ sourceLabel(p.importSource || 'manual') }}
|
||||
<div v-if="p.previousImportSource" class="muted tiny">
|
||||
قبلاً: {{ sourceLabel(p.previousImportSource) }}
|
||||
<bdi v-if="p.previousSourceRef">{{ toFaDigits(p.previousSourceRef) }}</bdi>
|
||||
</div>
|
||||
</td>
|
||||
<td dir="ltr">{{ externalCodeLabel(p) }}</td>
|
||||
<td>{{ p.position || '—' }}</td>
|
||||
<td>
|
||||
|
||||
@@ -148,18 +148,25 @@ const externalCode = computed(() => {
|
||||
}
|
||||
return '';
|
||||
});
|
||||
const SOURCE_LABELS: Record<string, string> = {
|
||||
manual: 'دستی',
|
||||
tahesab: 'تهحساب',
|
||||
didar: 'دیدار',
|
||||
excel: 'اکسل',
|
||||
phone: 'مخاطبین گوشی',
|
||||
lead_form: 'فرم لید',
|
||||
other: 'سایر',
|
||||
};
|
||||
|
||||
const importSourceLabel = computed(() => {
|
||||
const src = person.value?.importSource || 'manual';
|
||||
const map: Record<string, string> = {
|
||||
manual: 'دستی',
|
||||
tahesab: 'تهحساب',
|
||||
didar: 'دیدار',
|
||||
excel: 'اکسل',
|
||||
phone: 'مخاطبین گوشی',
|
||||
lead_form: 'فرم لید',
|
||||
other: 'سایر',
|
||||
};
|
||||
return map[src] || src;
|
||||
return SOURCE_LABELS[src] || src;
|
||||
});
|
||||
|
||||
const previousSourceLabel = computed(() => {
|
||||
const src = person.value?.previousImportSource;
|
||||
if (!src) return '';
|
||||
return SOURCE_LABELS[src] || src;
|
||||
});
|
||||
|
||||
const lastCallAt = computed(() => {
|
||||
@@ -643,6 +650,12 @@ watch(() => route.query.tab, readTab, { immediate: true });
|
||||
<span v-if="person.previousFullName" class="meta-chip">
|
||||
نام قبلی: {{ person.previousFullName }}
|
||||
</span>
|
||||
<span v-if="previousSourceLabel" class="meta-chip prev">
|
||||
قبلاً در {{ previousSourceLabel }}
|
||||
<template v-if="person.previousSourceRef">
|
||||
— کد <bdi>{{ toFaDigits(person.previousSourceRef) }}</bdi>
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-side">
|
||||
@@ -1185,6 +1198,11 @@ watch(() => route.query.tab, readTab, { immediate: true });
|
||||
color: #0f766e;
|
||||
}
|
||||
|
||||
.meta-chip.prev {
|
||||
background: #fef3c7;
|
||||
color: #92400e;
|
||||
}
|
||||
|
||||
.hero-side {
|
||||
display: grid;
|
||||
justify-items: end;
|
||||
|
||||
Reference in New Issue
Block a user