Add editable supply material details
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s

This commit is contained in:
Cauê Faleiros
2026-08-10 10:15:01 -03:00
parent 40737faaa5
commit 5ed91fa36f
8 changed files with 261 additions and 26 deletions

View File

@@ -158,6 +158,7 @@ const Registrations = () => {
useEffect(() => {
const requestedTab = searchParams.get('tab');
const sku = (searchParams.get('sku') || '').trim();
const requestedType: CatalogProductType = searchParams.get('type') === 'raw_material' ? 'raw_material' : 'finished_product';
if (!sku && !(requestedTab === 'products' || requestedTab === 'categories' || requestedTab === 'references')) return;
const prefillKey = `${requestedTab || ''}|${sku}|${searchParams.get('name') || ''}|${searchParams.get('color') || ''}|${catalog.products.length}`;
@@ -210,6 +211,7 @@ const Registrations = () => {
const requestedSize = (searchParams.get('size') || '').trim().toUpperCase();
setProductForm({
...defaultProductForm,
type: requestedType,
sku,
name: searchParams.get('name') || '',
color: searchParams.get('color') || '',