refactor: remove autofocus attribute from input fields in various forms for consistent user experience
This commit is contained in:
parent
9e0188c9ef
commit
b4f26c56cf
@ -150,7 +150,7 @@ const placeholder = computed(() =>
|
|||||||
<FieldSet class="grid gap-4">
|
<FieldSet class="grid gap-4">
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="cash-amount" required>Jumlah</FieldLabel>
|
<FieldLabel for="cash-amount" required>Jumlah</FieldLabel>
|
||||||
<RupiahInput id="cash-amount" v-model="form.amount" autofocus />
|
<RupiahInput id="cash-amount" v-model="form.amount" />
|
||||||
<FieldError :errors="formErrors(form, 'amount')" />
|
<FieldError :errors="formErrors(form, 'amount')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
@ -118,7 +118,7 @@ function submit() {
|
|||||||
<FieldSet class="grid gap-4">
|
<FieldSet class="grid gap-4">
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="employee-advance-amount" required>Jumlah</FieldLabel>
|
<FieldLabel for="employee-advance-amount" required>Jumlah</FieldLabel>
|
||||||
<RupiahInput id="employee-advance-amount" v-model="form.amount" autofocus />
|
<RupiahInput id="employee-advance-amount" v-model="form.amount" />
|
||||||
<FieldError :errors="formErrors(form, 'amount')" />
|
<FieldError :errors="formErrors(form, 'amount')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
@ -77,7 +77,7 @@ function submit() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="reject-reason" required>Alasan Penolakan</FieldLabel>
|
<FieldLabel for="reject-reason" required>Alasan Penolakan</FieldLabel>
|
||||||
<Textarea id="reject-reason" v-model="form.reason" placeholder="Tuliskan alasan penolakan"
|
<Textarea id="reject-reason" v-model="form.reason" placeholder="Tuliskan alasan penolakan"
|
||||||
rows="3" autofocus :maxlength="FIELD_LIMITS.reason" />
|
rows="3" :maxlength="FIELD_LIMITS.reason" />
|
||||||
<FieldError :errors="formErrors(form, 'reason')" />
|
<FieldError :errors="formErrors(form, 'reason')" />
|
||||||
</Field>
|
</Field>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
|
|||||||
@ -125,7 +125,7 @@ function submit() {
|
|||||||
<FieldSet class="grid gap-4">
|
<FieldSet class="grid gap-4">
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="expense-amount" required>Jumlah</FieldLabel>
|
<FieldLabel for="expense-amount" required>Jumlah</FieldLabel>
|
||||||
<RupiahInput id="expense-amount" v-model="form.amount" autofocus />
|
<RupiahInput id="expense-amount" v-model="form.amount" />
|
||||||
<FieldError :errors="formErrors(form, 'amount')" />
|
<FieldError :errors="formErrors(form, 'amount')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
@ -98,7 +98,7 @@ function submit() {
|
|||||||
</p>
|
</p>
|
||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="leave-start-date" required>Tanggal Mulai</FieldLabel>
|
<FieldLabel for="leave-start-date" required>Tanggal Mulai</FieldLabel>
|
||||||
<DatePicker id="leave-start-date" v-model="form.start_date" autofocus />
|
<DatePicker id="leave-start-date" v-model="form.start_date" />
|
||||||
<FieldError :errors="formErrors(form, 'start_date')" />
|
<FieldError :errors="formErrors(form, 'start_date')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
@ -77,7 +77,7 @@ function submit() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="reject-reason" required>Alasan Penolakan</FieldLabel>
|
<FieldLabel for="reject-reason" required>Alasan Penolakan</FieldLabel>
|
||||||
<Textarea id="reject-reason" v-model="form.reason"
|
<Textarea id="reject-reason" v-model="form.reason"
|
||||||
placeholder="Masukkan alasan penolakan" rows="3" autofocus
|
placeholder="Masukkan alasan penolakan" rows="3"
|
||||||
:maxlength="FIELD_LIMITS.reason" />
|
:maxlength="FIELD_LIMITS.reason" />
|
||||||
<FieldError :errors="formErrors(form, 'reason')" />
|
<FieldError :errors="formErrors(form, 'reason')" />
|
||||||
</Field>
|
</Field>
|
||||||
|
|||||||
@ -68,7 +68,7 @@ function submitReject() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="cutting-reject-reason" required>Alasan Penolakan</FieldLabel>
|
<FieldLabel for="cutting-reject-reason" required>Alasan Penolakan</FieldLabel>
|
||||||
<Textarea id="cutting-reject-reason" v-model="rejectForm.reason"
|
<Textarea id="cutting-reject-reason" v-model="rejectForm.reason"
|
||||||
placeholder="Masukkan alasan penolakan" rows="3" autofocus
|
placeholder="Masukkan alasan penolakan" rows="3"
|
||||||
:maxlength="FIELD_LIMITS.reason" />
|
:maxlength="FIELD_LIMITS.reason" />
|
||||||
<FieldError :errors="rejectForm.errors.reason
|
<FieldError :errors="rejectForm.errors.reason
|
||||||
? [rejectForm.errors.reason]
|
? [rejectForm.errors.reason]
|
||||||
|
|||||||
@ -101,7 +101,7 @@ async function submit() {
|
|||||||
v-model="form.name"
|
v-model="form.name"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Masukkan nama pelanggan"
|
placeholder="Masukkan nama pelanggan"
|
||||||
autofocus
|
|
||||||
:maxlength="FIELD_LIMITS.name"
|
:maxlength="FIELD_LIMITS.name"
|
||||||
/>
|
/>
|
||||||
<FieldError
|
<FieldError
|
||||||
|
|||||||
@ -95,7 +95,7 @@ function submit() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="category-name" required>Nama</FieldLabel>
|
<FieldLabel for="category-name" required>Nama</FieldLabel>
|
||||||
<Input id="category-name" v-model="form.name" type="text" placeholder="Masukkan nama kategori"
|
<Input id="category-name" v-model="form.name" type="text" placeholder="Masukkan nama kategori"
|
||||||
autofocus :maxlength="FIELD_LIMITS.categoryName" />
|
:maxlength="FIELD_LIMITS.categoryName" />
|
||||||
<FieldError :errors="formErrors(form, 'name')" />
|
<FieldError :errors="formErrors(form, 'name')" />
|
||||||
</Field>
|
</Field>
|
||||||
</FieldSet>
|
</FieldSet>
|
||||||
|
|||||||
@ -101,7 +101,7 @@ function submit() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="customer-name" required>Nama</FieldLabel>
|
<FieldLabel for="customer-name" required>Nama</FieldLabel>
|
||||||
<Input id="customer-name" v-model="form.name" type="text" placeholder="Masukkan nama pelanggan"
|
<Input id="customer-name" v-model="form.name" type="text" placeholder="Masukkan nama pelanggan"
|
||||||
autofocus :maxlength="FIELD_LIMITS.name" />
|
:maxlength="FIELD_LIMITS.name" />
|
||||||
<FieldError :errors="formErrors(form, 'name')" />
|
<FieldError :errors="formErrors(form, 'name')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
@ -101,7 +101,7 @@ function submit() {
|
|||||||
<Field>
|
<Field>
|
||||||
<FieldLabel for="supplier-name" required>Nama</FieldLabel>
|
<FieldLabel for="supplier-name" required>Nama</FieldLabel>
|
||||||
<Input id="supplier-name" v-model="form.name" type="text"
|
<Input id="supplier-name" v-model="form.name" type="text"
|
||||||
placeholder="Masukkan nama supplier" autofocus :maxlength="FIELD_LIMITS.name" />
|
placeholder="Masukkan nama supplier" :maxlength="FIELD_LIMITS.name" />
|
||||||
<FieldError :errors="formErrors(form, 'name')" />
|
<FieldError :errors="formErrors(form, 'name')" />
|
||||||
</Field>
|
</Field>
|
||||||
<Field>
|
<Field>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user