feat(dashboard): restructure create product flow (#7374)

This commit is contained in:
Frane Polić
2024-05-28 13:59:02 +02:00
committed by GitHub
parent 76ec10f375
commit 6117af2704
46 changed files with 3161 additions and 395 deletions
@@ -51,6 +51,16 @@ async function updateVariant(
)
}
async function updateVariantsBatch(
productId: string,
payload: { add: any[]; update: any[]; remove: any[] }
) {
return postRequest<any>(
`/admin/products/${productId}/variants/batch`,
payload
)
}
async function deleteVariant(productId: string, variantId: string) {
return deleteRequest<any>(
`/admin/products/${productId}/variants/${variantId}`
@@ -82,6 +92,7 @@ export const products = {
listVariants,
createVariant,
updateVariant,
updateVariantsBatch,
deleteVariant,
createOption,
updateOption,