feat(catalog): add saved packages, preview and bulk price editing
CI / check (push) Successful in 52s
CI / deploy (push) Successful in 1m23s
CI / publish-container (push) Failing after 27s

This commit is contained in:
Simo committed 2026-09-09 20:04:10 +02:00
1 parent 867113d5d4
commit 047cd9f3dd
48 files changed
+7712

No files matched your search

@@ -0,0 +1,30 @@
import "server-only";
import { getTranslations } from "next-intl/server";
const messages: Record<string, string> = {
"Source categories or offers changed since this package was created. Create a fresh package to include the current data.":
"sourceChanged",
"Package changed. Reload it before saving": "saveConflict",
"Package changed. Refresh the publication preview": "publishConflict",
"Catalog changed. Refresh the publication preview": "catalogChanged",
"Catalog package not found": "missing",
"A package supports at most 200 categories including descendants":
"pageLimit",
"A package supports at most 500 offers": "offerLimit",
"Package data exceeds 8 MB safety limit": "payloadLimit",
"Package membership cannot change": "membership",
"Package hierarchy cannot change": "hierarchy",
"Package furniture references cannot change": "references",
"Package furniture reference no longer exists": "furnitureMissing",
"Package published, but audit logging failed.": "auditWarning",
"Package published, but the hotel update was not delivered.": "hotelWarning",
"Package published, but export scheduling failed.": "exportWarning",
"Package published. Refresh the page to see the latest catalog.":
"refreshWarning",
};
export async function packageMessage(message: string): Promise<string> {
const key = messages[message];
if (!key) return message;
const t = await getTranslations("pages.admin.catalogPackages.backend");
return t(key);
}