feat(apbdes): make image and file optional for edit page too
Changes: Backend (updt.ts, index.ts): - Update FormUpdateBody: imageId?: string | null - Update Elysia schema: t.Optional(t.String()) - Handle null/undefined values when updating UI (edit/page.tsx): - Remove mandatory validation for imageId and fileId - Update labels to show '(Opsional)' - Simplify handleSubmit logic (no validation check) - Keep existing file IDs if no new upload User Flow: Before: Edit required imageId and fileId to be present After: Can update APBDes without files, preserve existing or set to null Files changed: - src/app/api/[[...slugs]]/_lib/landing_page/apbdes/updt.ts - src/app/api/[[...slugs]]/_lib/landing_page/apbdes/index.ts - src/app/admin/(dashboard)/landing-page/apbdes/[id]/edit/page.tsx Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -134,7 +134,7 @@ export default function FixedPlayerBar() {
|
||||
p="sm"
|
||||
shadow="lg"
|
||||
style={{
|
||||
zIndex: 1000,
|
||||
zIndex: 1,
|
||||
borderTop: '1px solid rgba(0,0,0,0.1)',
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user