feat(bom): add LLM prompt modal and fix product name resolution

This commit is contained in:
Your Name committed 2026-10-18 10:54:19 +07:00
1 parent a647c9682d
commit 3c05562ae6
3 files changed
+366 -7

No files matched your search

+3 -3
View File
@@ -471,9 +471,9 @@ export const productsRoute = new Elysia({ prefix: "/products" })
if (!product || (!includeDeleted && product.isDeleted)) return status(404, { message: "Product not found" });
if (lang === 'all') {
const nameObj: any = {};
const descObj: any = {};
const detailsObj: any = {};
const nameObj: any = product.name ? { th: product.name } : {};
const descObj: any = product.description ? { th: product.description } : {};
const detailsObj: any = product.details ? { th: product.details } : {};
product.translations.forEach((t: any) => {
nameObj[t.langCode] = t.name;
descObj[t.langCode] = t.description;