refactor(ekonomi): consolidate Pasar Desa into UMKM module
- 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.
This commit is contained in:
@@ -167,6 +167,20 @@ export const umkmState = proxy({
|
||||
} catch (e) { console.error(e); } finally { this.loading = false; }
|
||||
}
|
||||
},
|
||||
findUnique: {
|
||||
data: null as any,
|
||||
loading: false,
|
||||
async load(id: string) {
|
||||
this.loading = true;
|
||||
try {
|
||||
const res = await fetch(`/api/ekonomi/umkm/produk/${id}`);
|
||||
const result = await res.json();
|
||||
if (result.success) {
|
||||
this.data = result.data;
|
||||
}
|
||||
} catch (e) { console.error(e); } finally { this.loading = false; }
|
||||
}
|
||||
},
|
||||
create: {
|
||||
form: { ...defaultProdukForm },
|
||||
loading: false,
|
||||
|
||||
Reference in New Issue
Block a user