diff --git a/app/Filament/Resources/Feed/FeedPurchases/Traits/HasCart.php b/app/Filament/Resources/Feed/FeedPurchases/Traits/HasCart.php index 34833e5..40820c9 100644 --- a/app/Filament/Resources/Feed/FeedPurchases/Traits/HasCart.php +++ b/app/Filament/Resources/Feed/FeedPurchases/Traits/HasCart.php @@ -43,8 +43,12 @@ public function openQtyModal(int $feedId): void $this->dispatch('open-modal', id: 'qty-modal'); } - public function saveQtyModal(): void + public function saveQtyModal($qty = null): void { + if ($qty !== null) { + $this->modalQty = $qty; + } + if ($this->modalFeedId) { $this->updateQty($this->modalFeedId, (int) $this->modalQty); } diff --git a/resources/views/filament/resources/manage/feed-purchases/feed-items-grid.blade.php b/resources/views/filament/resources/manage/feed-purchases/feed-items-grid.blade.php index 64b4548..cc503c2 100644 --- a/resources/views/filament/resources/manage/feed-purchases/feed-items-grid.blade.php +++ b/resources/views/filament/resources/manage/feed-purchases/feed-items-grid.blade.php @@ -53,28 +53,28 @@ class="w-8 h-8 rounded-full flex items-center justify-center text-white text-lg Atur Jumlah: {{ $this->modalFeedName }} -
- - - -
+
+
+ + + +
- -
+
Batal - + Simpan
- +