Add activity detail, Jalali pickers, and customer/user profiles.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,8 @@ import { RouterLink, useRoute, useRouter } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { api } from '@/lib/api';
|
||||
import { formatMoney as formatMoneyLib } from '@/lib/money';
|
||||
import { formatLocalDateInput } from '@/lib/jalali';
|
||||
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
||||
import type {
|
||||
CompanyDto,
|
||||
CreateInvoiceRequest,
|
||||
@@ -66,7 +68,7 @@ const payAmount = ref('');
|
||||
const payMethod = ref<PaymentMethod>('transfer');
|
||||
const payNotes = ref('');
|
||||
const payInstallmentId = ref('');
|
||||
const payDate = ref(new Date().toISOString().slice(0, 10));
|
||||
const payDate = ref(formatLocalDateInput(new Date()));
|
||||
|
||||
const statusLabel: Record<InvoiceStatus, string> = {
|
||||
draft: 'پیشنویس',
|
||||
@@ -137,7 +139,7 @@ function splitInstallments(count: number) {
|
||||
d.setMonth(d.getMonth() + i + 1);
|
||||
return {
|
||||
key: `split-${i}-${Date.now()}`,
|
||||
dueDate: d.toISOString().slice(0, 10),
|
||||
dueDate: formatLocalDateInput(d),
|
||||
amount: String(base + (i === count - 1 ? remainder : 0)),
|
||||
};
|
||||
});
|
||||
@@ -414,7 +416,7 @@ onMounted(load);
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>سررسید</label>
|
||||
<input v-model="dueDate" type="date" />
|
||||
<JalaliDateInput v-model="dueDate" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>ارز</label>
|
||||
@@ -512,7 +514,7 @@ onMounted(load);
|
||||
:key="item.key"
|
||||
class="installment-row"
|
||||
>
|
||||
<input v-model="item.dueDate" type="date" />
|
||||
<JalaliDateInput v-model="item.dueDate" />
|
||||
<input
|
||||
v-model="item.amount"
|
||||
type="number"
|
||||
@@ -561,7 +563,7 @@ onMounted(load);
|
||||
{{ label }}
|
||||
</option>
|
||||
</select>
|
||||
<input v-model="payDate" type="date" />
|
||||
<JalaliDateInput v-model="payDate" />
|
||||
<select v-model="payInstallmentId">
|
||||
<option value="">بدون اتصال به قسط</option>
|
||||
<option
|
||||
|
||||
Reference in New Issue
Block a user