Add thousand separators to all CRM price and amount inputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 02:13:39 +03:30
co-authored by Cursor
parent 36e47e8af3
commit 20a9ac0d34
9 changed files with 239 additions and 25 deletions
+4 -5
View File
@@ -9,6 +9,7 @@ import { currencySuffix, formatMoney } from '@/lib/money';
import CustomFieldsSection from '@/components/CustomFieldsSection.vue';
import EntityTimeline from '@/components/EntityTimeline.vue';
import JalaliDateInput from '@/components/JalaliDateInput.vue';
import MoneyInput from '@/components/MoneyInput.vue';
import UiIcon from '@/components/UiIcon.vue';
import UserAvatar from '@/components/UserAvatar.vue';
import type {
@@ -531,12 +532,10 @@ onMounted(load);
<div class="field">
<label for="amount">پیش‌بینی مبلغ فروش به مشتری</label>
<div class="amount">
<input
<MoneyInput
id="amount"
v-model="amount"
type="number"
min="0"
step="1"
:decimals="0"
:readonly="lines.length > 0"
:placeholder="lines.length ? 'جمع ردیف‌ها' : 'مبلغ را وارد کنید'"
/>
@@ -708,7 +707,7 @@ onMounted(load);
</select>
<input v-model="line.name" placeholder="نام ردیف" />
<input v-model="line.quantity" type="number" min="0.01" step="0.01" placeholder="تعداد" />
<input v-model="line.unitPrice" type="number" min="0" step="1" placeholder="قیمت واحد" />
<MoneyInput v-model="line.unitPrice" :decimals="0" placeholder="قیمت واحد" />
<button class="linkish danger" type="button" @click="removeLine(line.key)">حذف</button>
</div>
<p v-if="!lines.length" class="muted">