<?php

namespace App\Filament\Resources\PurchasingResource\Pages;

use App\Filament\Resources\PurchasingResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreatePurchasing extends CreateRecord
{
    protected static string $resource = PurchasingResource::class;

    protected function mutateFormDataBeforeCreate(array $data): array
    {
        $data['po_number'] = 'PO-' . strtoupper(uniqid());
        $data['status'] = 'Draft'; // Optional jika kamu mau hardcode status awal

        return $data;
    }
}
