2026-08-29 21:06:30 +03:30
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
|
import { computed, onMounted, ref } from 'vue';
|
|
|
|
|
|
import { RouterLink, useRoute, useRouter } from 'vue-router';
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
import { api } from '@/lib/api';
|
|
|
|
|
|
import type { CompanyDto, CreateCompanyRequest } from '@mento/shared';
|
|
|
|
|
|
import CustomFieldsSection from '@/components/CustomFieldsSection.vue';
|
|
|
|
|
|
import EntityTimeline from '@/components/EntityTimeline.vue';
|
2026-10-06 19:54:38 +03:30
|
|
|
|
import RelatedTasksPanel from '@/components/routines/RelatedTasksPanel.vue';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
|
|
|
|
|
import { formatLocalDateInput, parseLocalInput } from '@/lib/jalali';
|
2026-09-12 01:33:07 +03:30
|
|
|
|
import {
|
|
|
|
|
|
UiButton,
|
|
|
|
|
|
UiCard,
|
|
|
|
|
|
UiField,
|
|
|
|
|
|
UiInput,
|
|
|
|
|
|
UiPageHeader,
|
|
|
|
|
|
UiTextarea,
|
|
|
|
|
|
} from '@/components/ui';
|
2026-09-05 02:29:41 +03:30
|
|
|
|
import UiIcon from '@/components/UiIcon.vue';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-10 01:22:24 +03:30
|
|
|
|
const props = withDefaults(
|
|
|
|
|
|
defineProps<{
|
|
|
|
|
|
embedded?: boolean;
|
|
|
|
|
|
entityId?: string;
|
|
|
|
|
|
}>(),
|
|
|
|
|
|
{ embedded: false },
|
|
|
|
|
|
);
|
|
|
|
|
|
const emit = defineEmits<{ saved: []; cancel: [] }>();
|
|
|
|
|
|
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
const router = useRouter();
|
2026-09-10 01:22:24 +03:30
|
|
|
|
const id = computed(() => {
|
|
|
|
|
|
if (props.embedded) return props.entityId ?? '';
|
|
|
|
|
|
return typeof route.params.id === 'string' ? route.params.id : '';
|
|
|
|
|
|
});
|
|
|
|
|
|
const isNew = computed(() => (props.embedded ? !props.entityId : route.name === 'company-new'));
|
2026-09-05 02:29:41 +03:30
|
|
|
|
const pageTitle = computed(() => (isNew.value ? 'شرکت جدید' : 'ویرایش شرکت'));
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
|
|
const saving = ref(false);
|
|
|
|
|
|
const error = ref('');
|
|
|
|
|
|
|
|
|
|
|
|
const name = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const code = ref('');
|
|
|
|
|
|
const sourceRef = ref('');
|
|
|
|
|
|
const importSource = ref('manual');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const nationalId = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const economicCode = ref('');
|
|
|
|
|
|
const registrationNumber = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const phone = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const otherPhones = ref('');
|
|
|
|
|
|
const fax = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const email = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const otherEmails = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const website = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const province = ref('');
|
|
|
|
|
|
const city = ref('');
|
|
|
|
|
|
const postalCode = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const address = ref('');
|
2026-10-06 12:25:20 +03:30
|
|
|
|
const groupName = ref('');
|
|
|
|
|
|
const registeredAt = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const notes = ref('');
|
2026-09-26 14:59:48 +03:30
|
|
|
|
const tagsRaw = ref('');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const customFields = ref<Record<string, unknown>>({});
|
|
|
|
|
|
|
2026-09-26 14:59:48 +03:30
|
|
|
|
function parseTags(raw: string): string[] {
|
|
|
|
|
|
return [
|
|
|
|
|
|
...new Set(
|
|
|
|
|
|
raw
|
|
|
|
|
|
.split(/[,،#\n]/)
|
|
|
|
|
|
.map((t) => t.trim())
|
|
|
|
|
|
.filter(Boolean),
|
|
|
|
|
|
),
|
|
|
|
|
|
].slice(0, 40);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-29 21:06:30 +03:30
|
|
|
|
function fill(c: CompanyDto) {
|
|
|
|
|
|
name.value = c.name;
|
2026-10-06 12:25:20 +03:30
|
|
|
|
code.value = c.code ?? '';
|
|
|
|
|
|
sourceRef.value = c.sourceRef ?? '';
|
|
|
|
|
|
importSource.value = c.importSource || 'manual';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
nationalId.value = c.nationalId ?? '';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
economicCode.value = c.economicCode ?? '';
|
|
|
|
|
|
registrationNumber.value = c.registrationNumber ?? '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
phone.value = c.phone ?? '';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
otherPhones.value = c.otherPhones ?? '';
|
|
|
|
|
|
fax.value = c.fax ?? '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
email.value = c.email ?? '';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
otherEmails.value = c.otherEmails ?? '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
website.value = c.website ?? '';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
province.value = c.province ?? '';
|
|
|
|
|
|
city.value = c.city ?? '';
|
|
|
|
|
|
postalCode.value = c.postalCode ?? '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
address.value = c.address ?? '';
|
2026-10-06 12:25:20 +03:30
|
|
|
|
groupName.value = c.groupName ?? '';
|
|
|
|
|
|
registeredAt.value = c.registeredAt ? formatLocalDateInput(new Date(c.registeredAt)) : '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
notes.value = c.notes ?? '';
|
2026-09-26 14:59:48 +03:30
|
|
|
|
tagsRaw.value = (c.tags ?? []).join('، ');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
customFields.value = { ...(c.customFields ?? {}) };
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function load() {
|
|
|
|
|
|
if (isNew.value) return;
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
error.value = '';
|
|
|
|
|
|
try {
|
|
|
|
|
|
const { data } = await api.get<CompanyDto>(`/companies/${id.value}`);
|
|
|
|
|
|
fill(data);
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
error.value = 'بارگذاری شرکت ناموفق بود.';
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function payload(): CreateCompanyRequest {
|
|
|
|
|
|
return {
|
|
|
|
|
|
name: name.value,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
code: code.value || null,
|
|
|
|
|
|
sourceRef: sourceRef.value || null,
|
|
|
|
|
|
...(sourceRef.value && importSource.value === 'manual' ? { importSource: 'didar' } : {}),
|
2026-08-29 21:06:30 +03:30
|
|
|
|
nationalId: nationalId.value || undefined,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
economicCode: economicCode.value || null,
|
|
|
|
|
|
registrationNumber: registrationNumber.value || null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
phone: phone.value || undefined,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
otherPhones: otherPhones.value || null,
|
|
|
|
|
|
fax: fax.value || null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
email: email.value || undefined,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
otherEmails: otherEmails.value || null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
website: website.value || undefined,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
province: province.value || null,
|
|
|
|
|
|
city: city.value || null,
|
|
|
|
|
|
postalCode: postalCode.value || null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
address: address.value || undefined,
|
2026-10-06 12:25:20 +03:30
|
|
|
|
groupName: groupName.value || null,
|
|
|
|
|
|
registeredAt: parseLocalInput(registeredAt.value)?.toISOString() ?? null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
notes: notes.value || undefined,
|
2026-09-26 14:59:48 +03:30
|
|
|
|
tags: parseTags(tagsRaw.value),
|
2026-08-29 21:06:30 +03:30
|
|
|
|
customFields: customFields.value,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function submit() {
|
|
|
|
|
|
saving.value = true;
|
|
|
|
|
|
error.value = '';
|
|
|
|
|
|
try {
|
|
|
|
|
|
if (isNew.value) {
|
|
|
|
|
|
const { data } = await api.post<CompanyDto>('/companies', payload());
|
2026-09-10 01:22:24 +03:30
|
|
|
|
if (props.embedded) {
|
|
|
|
|
|
emit('saved');
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
await router.replace({ name: 'company-detail', params: { id: data.id } });
|
|
|
|
|
|
} else {
|
|
|
|
|
|
await api.patch(`/companies/${id.value}`, payload());
|
2026-09-10 01:22:24 +03:30
|
|
|
|
if (props.embedded) {
|
|
|
|
|
|
emit('saved');
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
await router.push({ name: 'contacts', query: { tab: 'companies' } });
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
if (axios.isAxiosError(e)) {
|
|
|
|
|
|
if (!e.response) {
|
|
|
|
|
|
error.value = 'اتصال به سرور برقرار نشد.';
|
|
|
|
|
|
} else {
|
|
|
|
|
|
const msg = (e.response.data as { message?: string | string[] })?.message;
|
|
|
|
|
|
error.value = Array.isArray(msg) ? msg.join('، ') : (msg ?? 'ذخیره ناموفق بود');
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
error.value = 'ذخیره ناموفق بود';
|
|
|
|
|
|
}
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
saving.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function remove() {
|
|
|
|
|
|
if (!id.value || !confirm('این شرکت حذف شود؟ افراد متصل بدون شرکت میمانند.')) return;
|
|
|
|
|
|
try {
|
|
|
|
|
|
await api.delete(`/companies/${id.value}`);
|
|
|
|
|
|
await router.push({ name: 'contacts', query: { tab: 'companies' } });
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
error.value = 'حذف ناموفق بود';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 02:29:41 +03:30
|
|
|
|
function cancel() {
|
2026-09-10 01:22:24 +03:30
|
|
|
|
if (props.embedded) {
|
|
|
|
|
|
emit('cancel');
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2026-09-05 02:29:41 +03:30
|
|
|
|
void router.push({ name: 'contacts', query: { tab: 'companies' } });
|
|
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
|
|
|
|
|
onMounted(load);
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<section class="crm-page company-form-page" :class="{ embedded }" dir="rtl">
|
|
|
|
|
|
<UiPageHeader
|
|
|
|
|
|
v-if="!embedded"
|
|
|
|
|
|
:title="pageTitle"
|
|
|
|
|
|
description="ثبت و ویرایش مشخصات حقوقی، اطلاعات تماس و فیلدهای سفارشی شرکت"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #breadcrumb>
|
|
|
|
|
|
<RouterLink :to="{ name: 'contacts', query: { tab: 'companies' } }" class="breadcrumb-link">
|
|
|
|
|
|
شرکتها
|
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
<span class="breadcrumb-separator">/</span>
|
|
|
|
|
|
<span>{{ pageTitle }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<template #actions>
|
|
|
|
|
|
<UiButton :loading="saving" @click="submit">
|
|
|
|
|
|
<template #icon>
|
|
|
|
|
|
<UiIcon name="check-plain" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
ذخیره
|
|
|
|
|
|
</UiButton>
|
|
|
|
|
|
<UiButton variant="ghost" :disabled="saving" @click="cancel">
|
|
|
|
|
|
انصراف
|
|
|
|
|
|
</UiButton>
|
|
|
|
|
|
<UiButton v-if="!isNew" variant="danger" :disabled="saving" @click="remove">
|
|
|
|
|
|
<template #icon>
|
|
|
|
|
|
<UiIcon name="trash" />
|
|
|
|
|
|
</template>
|
2026-09-05 02:29:41 +03:30
|
|
|
|
حذف
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiButton>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</UiPageHeader>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<div v-if="error" class="crm-alert crm-alert-danger">{{ error }}</div>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<form class="crm-form" @submit.prevent="submit">
|
|
|
|
|
|
<UiCard title="اطلاعات اصلی شرکت" class="section-card">
|
|
|
|
|
|
<div class="crm-form-grid-2">
|
|
|
|
|
|
<UiField label="نام شرکت" required class="col-span-2">
|
|
|
|
|
|
<UiInput
|
|
|
|
|
|
id="name"
|
|
|
|
|
|
v-model="name"
|
|
|
|
|
|
required
|
|
|
|
|
|
minlength="2"
|
|
|
|
|
|
placeholder="مثال: دادهپردازی سپهر"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiField label="کد شرکت">
|
|
|
|
|
|
<UiInput id="code" v-model="code" placeholder="کد داخلی" dir="ltr" />
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiField label="کد دیدار شرکت">
|
|
|
|
|
|
<UiInput id="sourceRef" v-model="sourceRef" placeholder="مثال: 5277" dir="ltr" />
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiField label="گروه بندی شرکت">
|
|
|
|
|
|
<UiInput id="groupName" v-model="groupName" placeholder="مثال: همکار، عمدهفروش" />
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiField label="تاریخ ثبت شرکت">
|
|
|
|
|
|
<JalaliDateInput id="registeredAt" v-model="registeredAt" />
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-09-26 14:59:48 +03:30
|
|
|
|
<UiField label="برچسبها" class="col-span-2">
|
|
|
|
|
|
<UiInput
|
|
|
|
|
|
id="company-tags"
|
|
|
|
|
|
v-model="tagsRaw"
|
|
|
|
|
|
placeholder="شرکتی، VIP (با کاما جدا کنید)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiField label="توضیحات شرکت" class="col-span-2">
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<UiTextarea
|
|
|
|
|
|
id="notes"
|
|
|
|
|
|
v-model="notes"
|
|
|
|
|
|
:rows="4"
|
|
|
|
|
|
placeholder="توضیحات مهم، حوزههای همکاری..."
|
|
|
|
|
|
/>
|
|
|
|
|
|
</UiField>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-12 01:33:07 +03:30
|
|
|
|
</UiCard>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-10-06 12:25:20 +03:30
|
|
|
|
<UiCard title="اطلاعات تماس و آدرس" class="section-card">
|
|
|
|
|
|
<div class="crm-form-grid-2">
|
|
|
|
|
|
<UiField label="تلفن شرکت">
|
|
|
|
|
|
<UiInput id="phone" v-model="phone" type="tel" placeholder="۰۲۱..." dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="تلفن های دیگر شرکت">
|
|
|
|
|
|
<UiInput id="otherPhones" v-model="otherPhones" placeholder="با کاما جدا کنید" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="ایمیل شرکت">
|
|
|
|
|
|
<UiInput
|
|
|
|
|
|
id="email"
|
|
|
|
|
|
v-model="email"
|
|
|
|
|
|
type="email"
|
|
|
|
|
|
placeholder="info@company.ir"
|
|
|
|
|
|
dir="ltr"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="ایمیل های دیگر شرکت">
|
|
|
|
|
|
<UiInput id="otherEmails" v-model="otherEmails" placeholder="با کاما جدا کنید" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="شماره فکس">
|
|
|
|
|
|
<UiInput id="fax" v-model="fax" type="tel" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="سایت های شرکت">
|
|
|
|
|
|
<UiInput id="website" v-model="website" placeholder="https://..." dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="استان">
|
|
|
|
|
|
<UiInput id="province" v-model="province" placeholder="مثال: تهران" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="شهرستان">
|
|
|
|
|
|
<UiInput id="city" v-model="city" placeholder="مثال: تهران" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="کد پستی">
|
|
|
|
|
|
<UiInput id="postalCode" v-model="postalCode" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="آدرس" class="col-span-2">
|
|
|
|
|
|
<UiInput id="address" v-model="address" placeholder="نشانی، طبقه، پلاک..." />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</UiCard>
|
|
|
|
|
|
|
|
|
|
|
|
<UiCard title="اطلاعات حقوقی و ثبتی" class="section-card">
|
|
|
|
|
|
<div class="crm-form-grid-2">
|
|
|
|
|
|
<UiField label="شناسه ملی">
|
|
|
|
|
|
<UiInput id="nationalId" v-model="nationalId" placeholder="شناسه ملی ۱۱ رقمی" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="شماره اقتصادی">
|
|
|
|
|
|
<UiInput id="economicCode" v-model="economicCode" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
|
|
|
|
|
|
<UiField label="شماره ثبت">
|
|
|
|
|
|
<UiInput id="registrationNumber" v-model="registrationNumber" dir="ltr" />
|
|
|
|
|
|
</UiField>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</UiCard>
|
|
|
|
|
|
|
2026-08-29 21:06:30 +03:30
|
|
|
|
<CustomFieldsSection entity-type="company" v-model="customFields" />
|
2026-10-06 19:54:38 +03:30
|
|
|
|
<RelatedTasksPanel v-if="!isNew && id" :entity="{ type: 'company', id, label: name }" />
|
2026-09-05 02:29:41 +03:30
|
|
|
|
<EntityTimeline v-if="!isNew && id" entity-type="company" :entity-id="id" />
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<div class="form-bottom-actions">
|
|
|
|
|
|
<UiButton type="submit" :loading="saving">
|
|
|
|
|
|
<template #icon>
|
|
|
|
|
|
<UiIcon name="check-plain" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
ذخیره اطلاعات
|
|
|
|
|
|
</UiButton>
|
|
|
|
|
|
<UiButton variant="ghost" type="button" :disabled="saving" @click="cancel">
|
|
|
|
|
|
انصراف
|
|
|
|
|
|
</UiButton>
|
|
|
|
|
|
<UiButton v-if="!isNew" variant="danger" type="button" :disabled="saving" @click="remove">
|
|
|
|
|
|
حذف شرکت
|
|
|
|
|
|
</UiButton>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.company-form-page {
|
2026-09-10 01:22:24 +03:30
|
|
|
|
display: flex;
|
2026-09-12 01:33:07 +03:30
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: var(--sp-6);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
width: 100%;
|
2026-09-12 01:33:07 +03:30
|
|
|
|
max-width: 100%;
|
2026-09-10 23:45:11 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.company-form-page.embedded {
|
|
|
|
|
|
max-width: none;
|
|
|
|
|
|
gap: var(--sp-4);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.embedded-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: var(--sp-2);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.breadcrumb-link {
|
|
|
|
|
|
color: var(--color-text-secondary);
|
|
|
|
|
|
text-decoration: none;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.breadcrumb-link:hover {
|
|
|
|
|
|
color: var(--color-brand-600);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.breadcrumb-separator {
|
|
|
|
|
|
margin: 0 var(--sp-2);
|
|
|
|
|
|
color: var(--color-text-muted);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.section-card {
|
|
|
|
|
|
padding: var(--sp-6);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.col-span-2 {
|
|
|
|
|
|
grid-column: span 2;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.form-bottom-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: var(--sp-3);
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
margin-top: var(--sp-4);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
@media (max-width: 640px) {
|
|
|
|
|
|
.col-span-2 {
|
|
|
|
|
|
grid-column: span 1;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.form-bottom-actions {
|
|
|
|
|
|
flex-direction: column;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</style>
|