fix: style

This commit is contained in:
2026-03-13 16:25:29 +01:00
parent 836b6a3bfe
commit 8ff8ffa50e
2 changed files with 44 additions and 17 deletions

View File

@@ -42,6 +42,22 @@ export const useProductStore = defineStore('product', () => {
loading.value = false
}
}
async function getProductDescriptionTranslations() {
loading.value = true
error.value = null
try {
const response = await useFetchJson('api/v1/restricted/product-description/translate-product-description?productID=51&productShopID=1&productFromLangID=1&productToLangID=2')
productDescription.value = response
} catch (e: any) {
error.value = e?.message || 'Failed to load product description'
console.error('Failed to fetch product description:', e)
} finally {
loading.value = false
}
}
// Fetch single product by ID
async function fetchProductById(id: number) {
loading.value = true
@@ -102,6 +118,7 @@ export const useProductStore = defineStore('product', () => {
getProductDescription,
fetchProductById,
clearCurrentProduct,
saveProductDescription
saveProductDescription,
getProductDescriptionTranslations
}
})