Add activity detail, Jalali pickers, and customer/user profiles.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { RouterLink, useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { api } from '@/lib/api';
|
||||
import { formatMoney as formatMoneyLib } from '@/lib/money';
|
||||
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
||||
import type {
|
||||
CompanyDto,
|
||||
CreateQuoteRequest,
|
||||
@@ -148,8 +149,15 @@ async function load() {
|
||||
} else if (fromDealId) {
|
||||
dealId.value = fromDealId;
|
||||
title.value = 'پیشفاکتور';
|
||||
} else if (!lines.value.length) {
|
||||
lines.value = [newLine()];
|
||||
} else {
|
||||
if (typeof route.query.personId === 'string' && route.query.personId) {
|
||||
personId.value = route.query.personId;
|
||||
const person = people.value.find((p) => p.id === personId.value);
|
||||
if (person?.company?.id) companyId.value = person.company.id;
|
||||
}
|
||||
if (!lines.value.length) {
|
||||
lines.value = [newLine()];
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
error.value = 'بارگذاری فرم پیشفاکتور ناموفق بود.';
|
||||
@@ -257,7 +265,7 @@ onMounted(load);
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>اعتبار تا</label>
|
||||
<input v-model="validUntil" type="date" />
|
||||
<JalaliDateInput v-model="validUntil" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>ارز</label>
|
||||
|
||||
Reference in New Issue
Block a user