- Remove "Pasar Desa" as a separate entity; products are now strictly linked to UMKM. - Delete redundant Pasar Desa API endpoints and state management. - Update Admin UI: remove "Pasar Desa" menu and unified product management under UMKM. - Update Public UI: replace "Pasar Desa" with "UMKM" in navbar and unified hub at /darmasaba/ekonomi/umkm. - Implement mandatory umkmId in PasarDesa model and update seeders accordingly. - Fix UI bugs, missing imports, and invalid API filters for mandatory umkmId. - Increment version to 0.1.18.
1.3 KiB
1.3 KiB
Plan: Refactor UMKM and Pasar Desa (Consolidation)
Objective
Consolidate "Pasar Desa" into the UMKM module. Pasar Desa is no longer a separate entity; it is now strictly a collection of products belonging to UMKM entities.
Steps:
- Cleanup API: Remove
PasarDesaandKategoriProduk(frompasar-desafolder) imports fromsrc/app/api/[[...slugs]]/_lib/ekonomi/index.ts. - Admin UI:
- Remove "Pasar Desa" menu from
src/app/admin/_com/list_PageAdmin.tsx. - Ensure "UMKM" menu handles all product management.
- Remove "Pasar Desa" menu from
- Public UI:
- Remove "Pasar Desa" from
src/con/navbar-list-menu.ts. - Refactor
src/app/darmasaba/(pages)/ekonomi/pasar-desa/page.tsxto remove the "Produk Pasar Desa" tab. - Rename the page or adjust its purpose to be the unified UMKM/Product hub.
- Remove "Pasar Desa" from
- Prisma Schema:
- Ensure
umkmIdis mandatory inPasarDesamodel (already seems to be). - (Optional) Rename
PasarDesatoProdukUmkmif requested, but user said it's optional. For now, keep it asPasarDesato minimize breaking changes.
- Ensure
- Build & Verify: Run
bun run buildand check for any broken references.
Verification:
- No "Pasar Desa" menu in Admin.
- No "Pasar Desa" menu in Public Navbar.
- Public page
/darmasaba/ekonomi/pasar-desa(or new path) shows UMKM products only. - Successful build.