feat(web): share the page header and icon finance fields.
Remaining screens and finance use the shared page header, tab icons sit closer to their labels, and the active workspace tab no longer paints a broken corner. Treasury selects and the money field show a leading icon. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,15 +9,16 @@ import type {
|
||||
VoipCallLogDto,
|
||||
VoipConnectionDto,
|
||||
} from '@mento/shared';
|
||||
import { LinkOutlined, PhoneOutlined, ReloadOutlined } from '@/icons/ant-bridge';
|
||||
import { PageHeader } from '@/components/page';
|
||||
import type { PageHeaderTab } from '@/components/page';
|
||||
import {
|
||||
UiButton,
|
||||
UiCard,
|
||||
UiEmptyState,
|
||||
UiField,
|
||||
UiInput,
|
||||
UiPageHeader,
|
||||
} from '@/components/ui';
|
||||
import UiIcon from '@/components/UiIcon.vue';
|
||||
import { formatJalaliNumeric, rewriteGregorianDates, toFaDigits } from '@/lib/jalali';
|
||||
|
||||
type TabKey = 'generic' | 'daftareshoma';
|
||||
@@ -29,6 +30,15 @@ const ok = ref('');
|
||||
const items = ref<VoipConnectionDto[]>([]);
|
||||
const calls = ref<VoipCallLogDto[]>([]);
|
||||
const tab = ref<TabKey>('daftareshoma');
|
||||
const voipTabs: PageHeaderTab[] = [
|
||||
{ key: 'daftareshoma', label: 'دفتر شما', icon: PhoneOutlined },
|
||||
{ key: 'generic', label: 'وبهوک عمومی', icon: LinkOutlined },
|
||||
];
|
||||
|
||||
function onVoipTab(key: string | number | undefined) {
|
||||
const next = String(key ?? '');
|
||||
if (next === 'generic' || next === 'daftareshoma') tab.value = next;
|
||||
}
|
||||
const callFilters = reactive({
|
||||
direction: '',
|
||||
status: '',
|
||||
@@ -268,34 +278,21 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
<UiPageHeader
|
||||
<PageHeader
|
||||
title="تلفن سازمانی"
|
||||
description="ثبت خودکار تماس، خلاصه گفتگو و اعلان تماس ورودی"
|
||||
subtitle="ثبت خودکار تماس، خلاصه گفتگو و اعلان تماس ورودی"
|
||||
:icon="PhoneOutlined"
|
||||
:tabs="voipTabs"
|
||||
:active-tab="tab"
|
||||
@update:active-tab="onVoipTab"
|
||||
>
|
||||
<template #actions>
|
||||
<UiButton variant="secondary" :disabled="loading" @click="load">
|
||||
<UiIcon name="refresh" />
|
||||
<a-button :disabled="loading" @click="load">
|
||||
<template #icon><ReloadOutlined /></template>
|
||||
بروزرسانی
|
||||
</UiButton>
|
||||
</a-button>
|
||||
</template>
|
||||
</UiPageHeader>
|
||||
|
||||
<nav class="tabs" aria-label="نوع اتصال تلفن">
|
||||
<button
|
||||
type="button"
|
||||
:class="{ on: tab === 'daftareshoma' }"
|
||||
@click="tab = 'daftareshoma'"
|
||||
>
|
||||
دفتر شما
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
:class="{ on: tab === 'generic' }"
|
||||
@click="tab = 'generic'"
|
||||
>
|
||||
وبهوک عمومی
|
||||
</button>
|
||||
</nav>
|
||||
</PageHeader>
|
||||
|
||||
<p v-if="error" class="error">{{ error }}</p>
|
||||
<p v-if="ok" class="ok">{{ ok }}</p>
|
||||
@@ -567,28 +564,6 @@ onMounted(async () => {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
.tabs {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
gap: 1.75rem;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
.tabs button {
|
||||
appearance: none;
|
||||
background: none;
|
||||
border: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
margin-bottom: -1px;
|
||||
padding: 0.55rem 0.15rem;
|
||||
color: #94a3b8;
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tabs button.on {
|
||||
color: #0d9488;
|
||||
border-bottom-color: #14b8a6;
|
||||
}
|
||||
.hint,
|
||||
.muted {
|
||||
color: #64748b;
|
||||
|
||||
Reference in New Issue
Block a user