fix: dynamic currency symbols and integrated datetime picker
- Replace all hardcoded prefix="$" with :prefix="getCurrencySymbol()" in Settings, Projects, and Invoices views - Replace hardcoded ($) labels with dynamic currency symbol - Extend AppDatePicker with showTime prop + hour/minute v-models for integrated date+time selection - Simplify Entries.vue to use single AppDatePicker with showTime instead of separate hour/minute inputs
This commit is contained in:
@@ -166,31 +166,13 @@
|
||||
<!-- Start Date & Time -->
|
||||
<div>
|
||||
<label class="block text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1.5">Start Date & Time</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex-1">
|
||||
<AppDatePicker
|
||||
v-model="editDate"
|
||||
placeholder="Date"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex items-center gap-1">
|
||||
<input
|
||||
v-model="editHour"
|
||||
type="number"
|
||||
min="0"
|
||||
max="23"
|
||||
class="w-12 px-2 py-2 bg-bg-inset border border-border-subtle rounded-lg text-[0.8125rem] text-text-primary text-center font-mono focus:outline-none focus:border-border-visible [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
||||
/>
|
||||
<span class="text-text-tertiary text-sm font-mono">:</span>
|
||||
<input
|
||||
v-model="editMinute"
|
||||
type="number"
|
||||
min="0"
|
||||
max="59"
|
||||
class="w-12 px-2 py-2 bg-bg-inset border border-border-subtle rounded-lg text-[0.8125rem] text-text-primary text-center font-mono focus:outline-none focus:border-border-visible [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<AppDatePicker
|
||||
v-model="editDate"
|
||||
:show-time="true"
|
||||
v-model:hour="editHour"
|
||||
v-model:minute="editMinute"
|
||||
placeholder="Date & Time"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
@@ -168,13 +168,13 @@
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1.5">Discount ($)</label>
|
||||
<label class="block text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1.5">Discount ({{ getCurrencySymbol() }})</label>
|
||||
<AppNumberInput
|
||||
v-model="createForm.discount"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:precision="2"
|
||||
prefix="$"
|
||||
:prefix="getCurrencySymbol()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -339,7 +339,7 @@ import { useInvoicesStore, type Invoice } from '../stores/invoices'
|
||||
import { useClientsStore } from '../stores/clients'
|
||||
import { useToastStore } from '../stores/toast'
|
||||
import { generateInvoicePdf } from '../utils/invoicePdf'
|
||||
import { formatDate, formatCurrency } from '../utils/locale'
|
||||
import { formatDate, formatCurrency, getCurrencySymbol } from '../utils/locale'
|
||||
|
||||
const invoicesStore = useInvoicesStore()
|
||||
const clientsStore = useClientsStore()
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
|
||||
<!-- Hourly Rate -->
|
||||
<div>
|
||||
<label class="block text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1.5">Hourly Rate ($)</label>
|
||||
<label class="block text-[0.6875rem] text-text-tertiary uppercase tracking-[0.08em] mb-1.5">Hourly Rate ({{ getCurrencySymbol() }})</label>
|
||||
<AppNumberInput
|
||||
v-model="formData.hourly_rate"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:precision="2"
|
||||
prefix="$"
|
||||
:prefix="getCurrencySymbol()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -200,7 +200,7 @@ import AppSelect from '../components/AppSelect.vue'
|
||||
import { useProjectsStore, type Project } from '../stores/projects'
|
||||
import { useClientsStore } from '../stores/clients'
|
||||
import { useSettingsStore } from '../stores/settings'
|
||||
import { formatCurrency } from '../utils/locale'
|
||||
import { formatCurrency, getCurrencySymbol } from '../utils/locale'
|
||||
|
||||
const colorPresets = ['#D97706', '#3B82F6', '#8B5CF6', '#EC4899', '#10B981', '#EF4444', '#06B6D4', '#6B7280']
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
:min="0"
|
||||
:step="1"
|
||||
:precision="2"
|
||||
prefix="$"
|
||||
:prefix="getCurrencySymbol()"
|
||||
@update:model-value="saveSettings"
|
||||
/>
|
||||
</div>
|
||||
@@ -241,7 +241,7 @@ import { useSettingsStore } from '../stores/settings'
|
||||
import { useToastStore } from '../stores/toast'
|
||||
import AppNumberInput from '../components/AppNumberInput.vue'
|
||||
import AppSelect from '../components/AppSelect.vue'
|
||||
import { LOCALES, getCurrencies } from '../utils/locale'
|
||||
import { LOCALES, getCurrencies, getCurrencySymbol } from '../utils/locale'
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const toastStore = useToastStore()
|
||||
|
||||
Reference in New Issue
Block a user