parfum/app/Livewire/Studio/Stock/StockOpname/Show.php
Yoga Pangestu 293dd7d1fd refactor: restructure stock management components and update routes
- Removed legacy stock management components including PurchaseForm, RestockForm, StockOpnameForm, and StockTransferForm.
- Updated routes to reflect new structure under 'studio.stock' namespace for better organization.
- Adjusted view files for stock management to align with the new routing and component structure.
- Modified action routes in the ViewServiceProvider to ensure proper access control and navigation.
- Cleaned up related test files to remove references to deleted components.
2026-01-09 21:57:06 +07:00

38 lines
886 B
PHP

<?php
namespace App\Livewire\Studio\Stock\StockOpname;
use App\Models\StockOpname;
use App\Models\StockOpnameItem;
use App\Traits\Authorization\WithAuthorization;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Livewire\Attributes\Title;
use Livewire\Component;
#[Title('Lihat Stock Opname')]
class Show extends Component
{
use WithAuthorization;
public Collection $items;
public StockOpname $stockOpname;
public function mount(StockOpname $stockOpname): void
{
$this->items = StockOpnameItem::with('itemable')
->where('stock_opname_id', $stockOpname->id)
->get();
$this->stockOpname = $stockOpname;
}
public function render(): View
{
return view('livewire.studio.stock.stock-opname.show', [
'pageTitle' => 'Lihat Stock Opname',
]);
}
}