feat: send one SMS from a person or lead and keep the dashboard inside the phone frame
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import UiIcon from '@/components/UiIcon.vue';
|
||||
import CustomerMoodFace from '@/components/CustomerMoodFace.vue';
|
||||
import MentoAiAvatar from '@/components/brand/MentoAiAvatar.vue';
|
||||
import { brand } from '@mento/shared';
|
||||
import SmsComposeModal from '@/components/SmsComposeModal.vue';
|
||||
import MentoMemoryPanel from '@/components/MentoMemoryPanel.vue';
|
||||
import AskMentoPanel from '@/components/AskMentoPanel.vue';
|
||||
import ProfileEmptyState from '@/components/person-profile/ProfileEmptyState.vue';
|
||||
@@ -104,6 +105,7 @@ const cards = ref<ProjectCardDto[]>([]);
|
||||
const tahesabMoshtariCode = ref<number | null>(null);
|
||||
|
||||
const moreOpen = ref(false);
|
||||
const smsOpen = ref(false);
|
||||
const mobMoreOpen = ref(false);
|
||||
const filterOpen = ref(false);
|
||||
const historyFilter = ref<HistoryFilter>('all');
|
||||
@@ -117,10 +119,12 @@ const moreItems = computed<ProfileMoreItem[]>(() => [
|
||||
{ key: 'quote', label: 'پیشفاکتور جدید', to: { name: 'quote-new', query: { personId: id.value } } },
|
||||
{ key: 'ticket', label: 'تیکت جدید', to: { name: 'ticket-new', query: { personId: id.value } } },
|
||||
{ key: 'note', label: 'یادداشت جدید', to: { name: 'notes', query: { personId: id.value } } },
|
||||
{ key: 'sms', label: 'ارسال پیامک' },
|
||||
{ key: 'delete', label: 'حذف شخص', danger: true },
|
||||
]);
|
||||
|
||||
function onMoreSelect(key: string) {
|
||||
if (key === 'sms') smsOpen.value = true;
|
||||
if (key === 'delete') void removePerson();
|
||||
}
|
||||
|
||||
@@ -676,6 +680,10 @@ watch(() => route.query.tab, readTab, { immediate: true });
|
||||
<UiIcon name="phone" :size="15" />
|
||||
{{ phoneDisplay }}
|
||||
</a>
|
||||
<button class="contact-pill sms" type="button" :disabled="!phoneNumber" @click="smsOpen = true">
|
||||
<UiIcon name="chat" :size="15" />
|
||||
پیامک
|
||||
</button>
|
||||
<a v-if="person.email" class="contact-pill" :href="mailHref || undefined" dir="ltr">
|
||||
<UiIcon name="mail" :size="15" />
|
||||
{{ person.email }}
|
||||
@@ -1033,6 +1041,18 @@ watch(() => route.query.tab, readTab, { immediate: true });
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<SmsComposeModal
|
||||
v-if="person"
|
||||
:open="smsOpen"
|
||||
title="ارسال پیامک"
|
||||
:endpoint="`/people/${id}/sms`"
|
||||
:name="fullName"
|
||||
:phone="phoneNumber"
|
||||
:record-title="fullName"
|
||||
:company="person.company?.name ?? ''"
|
||||
@close="smsOpen = false"
|
||||
/>
|
||||
|
||||
<div v-if="person" class="dock">
|
||||
<button class="fab-item call" type="button" :disabled="!telHref" @click="goCall">
|
||||
<span class="fab-circle">
|
||||
@@ -1275,6 +1295,17 @@ watch(() => route.query.tab, readTab, { immediate: true });
|
||||
background: #f0fdfa;
|
||||
}
|
||||
|
||||
button.contact-pill {
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.contact-pill:disabled {
|
||||
opacity: 0.55;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.facts-grid {
|
||||
margin: 0;
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user