Update placeholder texts in CategoryFormModal and ProductForm components for better user guidance. Remove unused category text in ProductGroupedTable. Adjust MediaImageUpload descriptions to clarify thumbnail behavior.

This commit is contained in:
Yoga Pangestu 2026-06-12 11:24:01 +07:00
parent 1d1f0e7941
commit 14719445d1
4 changed files with 11 additions and 11 deletions

View File

@ -94,7 +94,7 @@ function submit() {
<FieldSet class="grid gap-4"> <FieldSet class="grid gap-4">
<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="Nama kategori" <Input id="category-name" v-model="form.name" type="text" placeholder="Contoh: Daster"
autofocus /> autofocus />
<FieldError :errors="form.errors.name ? [form.errors.name] : []" /> <FieldError :errors="form.errors.name ? [form.errors.name] : []" />
</Field> </Field>

View File

@ -280,14 +280,16 @@ function submit() {
<FieldSet class="grid gap-4"> <FieldSet class="grid gap-4">
<Field> <Field>
<FieldLabel for="name" required>Nama Produk</FieldLabel> <FieldLabel for="name" required>Nama Produk</FieldLabel>
<Input id="name" v-model="form.name" type="text" placeholder="Masukkan nama produk" /> <Input id="name" v-model="form.name" type="text"
placeholder="Contoh: Midi Olla Dress" />
<FieldError :errors="form.errors.name ? [form.errors.name] : []" /> <FieldError :errors="form.errors.name ? [form.errors.name] : []" />
</Field> </Field>
<Field> <Field>
<FieldLabel for="description">Deskripsi</FieldLabel> <FieldLabel for="description">Deskripsi</FieldLabel>
<Textarea id="description" v-model="form.description" <Textarea id="description" v-model="form.description"
placeholder="Deskripsi produk (opsional)" rows="4" /> placeholder="Contoh: Hi Sobat, New arrival dari DST dengan Olla Dress. Yuks check detail produk: Detail: * Bahan Cey Flow Bordir * Ld 120 cm * PB 110 cm * Bisa jadi dress..."
rows="4" />
<FieldError :errors="form.errors.description ? [form.errors.description] : []" /> <FieldError :errors="form.errors.description ? [form.errors.description] : []" />
</Field> </Field>
@ -365,7 +367,7 @@ function submit() {
Nama Varian Nama Varian
</FieldLabel> </FieldLabel>
<Input :id="`variant_name_${variant.client_id}`" :model-value="variant.name" type="text" <Input :id="`variant_name_${variant.client_id}`" :model-value="variant.name" type="text"
placeholder="Contoh: Merah / L" placeholder="Contoh: Polkadot"
@update:model-value="setVariantField(variant.client_id, 'name', String($event))" /> @update:model-value="setVariantField(variant.client_id, 'name', String($event))" />
<FieldError <FieldError
:errors="variantError(variant.client_id, 'name') ? [variantError(variant.client_id, 'name')!] : []" /> :errors="variantError(variant.client_id, 'name') ? [variantError(variant.client_id, 'name')!] : []" />
@ -383,7 +385,7 @@ function submit() {
</FieldSet> </FieldSet>
<FieldSet v-if="!useSamePrices || variants.length === 1" <FieldSet v-if="!useSamePrices || variants.length === 1"
class="mt-4 grid gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"> class="grid gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
<Field v-for="type in PRICE_TYPES" :key="`${variant.client_id}_${type}`"> <Field v-for="type in PRICE_TYPES" :key="`${variant.client_id}_${type}`">
<FieldLabel :for="`price_${variant.client_id}_${type}`" required> <FieldLabel :for="`price_${variant.client_id}_${type}`" required>
{{ PRICE_TYPE_LABELS[type] }} {{ PRICE_TYPE_LABELS[type] }}
@ -396,7 +398,7 @@ function submit() {
</Field> </Field>
</FieldSet> </FieldSet>
<div class="mt-4"> <div>
<MediaImageUpload :id="`variant_images_${variant.client_id}`" v-model="variant.media" <MediaImageUpload :id="`variant_images_${variant.client_id}`" v-model="variant.media"
label="Foto Varian" :max-files="5" required label="Foto Varian" :max-files="5" required
:errors="variantError(variant.client_id, 'images') ? [variantError(variant.client_id, 'images')!] : []" /> :errors="variantError(variant.client_id, 'images') ? [variantError(variant.client_id, 'images')!] : []" />

View File

@ -95,9 +95,6 @@ function rowNumber(index: number): number {
{{ category.name }} {{ category.name }}
</Badge> </Badge>
</div> </div>
<p v-else class="text-muted-foreground text-sm">
Tanpa kategori
</p>
</div> </div>
</div> </div>

View File

@ -112,10 +112,11 @@ onBeforeUnmount(() => {
{{ description }} {{ description }}
</FieldDescription> </FieldDescription>
<FieldDescription v-else-if="maxFiles > 1"> <FieldDescription v-else-if="maxFiles > 1">
Maks. {{ maxFiles }} gambar. Klik thumbnail untuk memperbesar. Maks. {{ maxFiles }} gambar. Gambar Pertama akan dijadikan sebagai
thumbnail.
</FieldDescription> </FieldDescription>
<FieldDescription v-else> <FieldDescription v-else>
Klik thumbnail untuk memperbesar. Gambar Pertama akan dijadikan sebagai thumbnail.
</FieldDescription> </FieldDescription>
<div class="flex flex-wrap items-center gap-2"> <div class="flex flex-wrap items-center gap-2">