From b62b86a6aeae06495b53a125815b8dcba160b797 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Sat, 4 Oct 2025 20:52:43 +0700 Subject: [PATCH] feat(item): menambahkan format untuk stok di table --- app/Livewire/Datatable/Studio/Catalog/BottlesTable.php | 2 +- app/Livewire/Datatable/Studio/Catalog/PerfumesTable.php | 2 +- app/Livewire/Datatable/Studio/Catalog/ProductsTable.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Livewire/Datatable/Studio/Catalog/BottlesTable.php b/app/Livewire/Datatable/Studio/Catalog/BottlesTable.php index 0b3aef9..440fb6c 100644 --- a/app/Livewire/Datatable/Studio/Catalog/BottlesTable.php +++ b/app/Livewire/Datatable/Studio/Catalog/BottlesTable.php @@ -58,7 +58,7 @@ public function columns(): array ->data( fn ($value, $row) => $row->outlets->map(fn ($outlet) => [ 'name' => $outlet->name, - 'stock' => $outlet->pivot->stock, + 'stock' => currency($outlet->pivot->stock, ''), ])->toArray() ) ->outputFormat(fn ($index, $value) => Blade::render(' diff --git a/app/Livewire/Datatable/Studio/Catalog/PerfumesTable.php b/app/Livewire/Datatable/Studio/Catalog/PerfumesTable.php index a6671c8..cfcc6f8 100644 --- a/app/Livewire/Datatable/Studio/Catalog/PerfumesTable.php +++ b/app/Livewire/Datatable/Studio/Catalog/PerfumesTable.php @@ -67,7 +67,7 @@ public function columns(): array ->data( fn ($value, $row) => $row->outlets->map(fn ($outlet) => [ 'name' => $outlet->name, - 'stock' => $outlet->pivot->stock, + 'stock' => currency($outlet->pivot->stock, ''), ])->toArray() ) ->outputFormat(fn ($index, $value) => Blade::render(' diff --git a/app/Livewire/Datatable/Studio/Catalog/ProductsTable.php b/app/Livewire/Datatable/Studio/Catalog/ProductsTable.php index ede5fc9..115e73a 100644 --- a/app/Livewire/Datatable/Studio/Catalog/ProductsTable.php +++ b/app/Livewire/Datatable/Studio/Catalog/ProductsTable.php @@ -50,7 +50,7 @@ public function columns(): array ->data( fn ($value, $row) => $row->outlets->map(fn ($outlet) => [ 'name' => $outlet->name, - 'stock' => $outlet->pivot->stock, + 'stock' => currency($outlet->pivot->stock, ''), ])->toArray() ) ->outputFormat(fn ($index, $value) => Blade::render('