fix(purchase): mengubah params nya menjadi b indo
This commit is contained in:
parent
912e6c2d37
commit
4fbb18b1ce
@ -13,19 +13,19 @@ trait WithAddItem
|
|||||||
public function addItem(string $type)
|
public function addItem(string $type)
|
||||||
{
|
{
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'perfume':
|
case 'parfum':
|
||||||
$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 'product':
|
case 'produk':
|
||||||
$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 'bottle':
|
case 'botol':
|
||||||
$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);
|
||||||
|
|||||||
@ -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('perfume')">
|
<flux:button variant="primary" color="zinc" wire:click="addItem('parfum')">
|
||||||
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('product')">
|
<flux:button variant="primary" color="zinc" wire:click="addItem('produk')">
|
||||||
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('bottle')">
|
<flux:button variant="primary" color="zinc" wire:click="addItem('botol')">
|
||||||
Tambah
|
Tambah
|
||||||
</flux:button>
|
</flux:button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user