chore(purchase): mengubah params untuk add barang jadi menggunakan bahasa inggris

This commit is contained in:
Yoga Pangestu 2025-10-29 18:44:25 +07:00
parent 08eb7e3076
commit 100aff8403
2 changed files with 6 additions and 6 deletions

View File

@ -13,19 +13,19 @@ trait WithAddItem
public function addItem(string $type) public function addItem(string $type)
{ {
switch ($type) { switch ($type) {
case 'parfum': case 'perfume':
$model = Perfume::class; $model = Perfume::class;
$id = $this->form->perfume_id; $id = $this->form->perfume_id;
$quantity = replaceCurrency($this->form->quantity_perfume); $quantity = replaceCurrency($this->form->quantity_perfume);
break; break;
case 'produk': case 'product':
$model = Product::class; $model = Product::class;
$id = $this->form->product_id; $id = $this->form->product_id;
$quantity = replaceCurrency($this->form->quantity_product); $quantity = replaceCurrency($this->form->quantity_product);
break; break;
case 'botol': case 'bottle':
$model = Bottle::class; $model = Bottle::class;
$id = $this->form->bottle_id; $id = $this->form->bottle_id;
$quantity = replaceCurrency($this->form->quantity_bottle); $quantity = replaceCurrency($this->form->quantity_bottle);

View File

@ -66,7 +66,7 @@
autocomplete="off" x-mask:dynamic="$money($input, ',')" /> autocomplete="off" x-mask:dynamic="$money($input, ',')" />
<div class="flex justify-end"> <div class="flex justify-end">
<flux:button variant="primary" color="zinc" wire:click="addItem('parfum')"> <flux:button variant="primary" color="zinc" wire:click="addItem('perfume')">
Tambah Tambah
</flux:button> </flux:button>
</div> </div>
@ -83,7 +83,7 @@
autocomplete="off" x-mask:dynamic="$money($input, ',')" /> autocomplete="off" x-mask:dynamic="$money($input, ',')" />
<div class="flex justify-end"> <div class="flex justify-end">
<flux:button variant="primary" color="zinc" wire:click="addItem('produk')"> <flux:button variant="primary" color="zinc" wire:click="addItem('product')">
Tambah Tambah
</flux:button> </flux:button>
</div> </div>
@ -101,7 +101,7 @@
x-mask:dynamic="$money($input, ',')" /> x-mask:dynamic="$money($input, ',')" />
<div class="flex justify-end"> <div class="flex justify-end">
<flux:button variant="primary" color="zinc" wire:click="addItem('botol')"> <flux:button variant="primary" color="zinc" wire:click="addItem('bottle')">
Tambah Tambah
</flux:button> </flux:button>
</div> </div>