fix: openEdit fetch ProductTypeDetail antes de abrir dialog (closes #37) #42
Reference in New Issue
Block a user
Delete Branch "fix/issue-37-openedit-fetch-detail"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ProductTypesPage.openEdit()ahora llamaqueryClient.fetchQuerycongetProductTypeByIdantes de abrir el dialog en modo editmaxImages,maxImageSizeMB,maxImageWidth,maxImageHeight) se populan desde backend real, no stubs nulltoast.error+ dialog NO se abre si el fetch fallaBug fixeado
Pre-fix: Edit en un
ProductTypeconallowImages: true, maxImages: 5, ...abría el dialog con multimedia fields vacíos. Submit sin tocar esos fields sobreescribía la config con null silenciosamente.Test plan
ProductTypesPage.test.tsx: fetch+open con multimedia populados, botón disabled durante fetch, error toast, preserve multimedia en submitnpx vitest run: 434 tests (431 pre-fix + 3 nuevos)Closes
Closes #37
Artifacts
sdd/prd-001-product-type-flags-multimedia/verify-report)