fix(purchase): mengubah params nya menjadi b indo

This commit is contained in:
Yoga Pangestu 2025-10-29 19:42:09 +07:00
parent 912e6c2d37
commit 4fbb18b1ce
2 changed files with 6 additions and 6 deletions

View File

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

View File

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