fix
This commit is contained in:
@@ -246,6 +246,14 @@ export type FixCatalogResult = {
|
||||
/** Alias of categories_backfilled for flash {categories}. */
|
||||
categories?: number;
|
||||
categories_backfilled?: number;
|
||||
/** Alias of mapped_categories_backfilled for flash {mapped_backfilled}. */
|
||||
mapped_backfilled?: number;
|
||||
mapped_categories_backfilled?: number;
|
||||
taxonomy_categories?: number;
|
||||
mapped_with_category?: number;
|
||||
mapped_without_category?: number;
|
||||
processed_with_category?: number;
|
||||
processed_without_category?: number;
|
||||
attributes_sanitized?: number;
|
||||
products_scanned?: number;
|
||||
reprocess_needed_count?: number;
|
||||
|
||||
+1912
-1911
File diff suppressed because it is too large
Load Diff
@@ -842,9 +842,9 @@ export const en: MessageDict = {
|
||||
"admin.users.fixA1": "Fix A1 catalog",
|
||||
"admin.users.fixA1Aria": "Repair AI prompts, categories, and enhance hashes for {name}",
|
||||
"admin.users.fixA1Title": "Fix company catalog",
|
||||
"admin.users.fixA1Desc": "In-place repair: category attribute links, category enhance prompts (with attrs), weak enhance hashes, optional category backfill, attribute sanitize. No mass reprocess.",
|
||||
"admin.users.fixA1Desc": "In-place repair: category attribute links, category enhance prompts, weak enhance hashes, bidirectional category backfill (mapped↔processed when data exists), attribute sanitize. No mass reprocess. Does not invent categories for unmapped SKUs.",
|
||||
"admin.users.fixA1Company": "Company: {name}",
|
||||
"admin.users.fixA1Warning": "Prefer Platform Demo; A1 may be targeted in place with confirm. Never clears the catalog or uses A1 as a clone destination.",
|
||||
"admin.users.fixA1Warning": "Repairs existing category data only. Products UI uses mapped_data.category — Fix cannot invent missing feed categories. For full A1 coverage run seed-a1 -mode backfill-categories with the MySQL dump, then clone A1 → sandbox.",
|
||||
"admin.users.fixA1Cancel": "Cancel",
|
||||
"admin.users.fixA1Confirm": "Fix catalog",
|
||||
"admin.users.noUsers": "No users match this filter.",
|
||||
@@ -2333,9 +2333,10 @@ export const en: MessageDict = {
|
||||
"flash.admin.staffRoleUpdated": "Staff role updated for {email}.",
|
||||
"flash.admin.staffRoleUnavailable": "Staff role updates are not available on this server yet.",
|
||||
"flash.admin.planAssigned": "Plan assigned to {name}.",
|
||||
"flash.admin.catalogCloned": "Copied {source} into {dest}: {products} products, {categories} categories. Open Products and process catalog GTINs (EAN-only API calls need a matching feed product).",
|
||||
"flash.admin.fixA1Success": "Catalog repair finished for {name}: {prompts} category prompts updated, {hashes} hashes cleared, {categories} categories backfilled.",
|
||||
"flash.admin.catalogCloned": "Copied {source} into {dest}: {products} products, {categories} taxonomy categories, {mapped_with} products with mapped category. Open Products — uncategorized SKUs need dump backfill or categorize, not another Fix.",
|
||||
"flash.admin.fixA1Success": "Catalog repair finished for {name}: {prompts} prompts, {hashes} hashes, {categories} processed←mapped, {mapped_backfilled} mapped←processed. Coverage: {mapped_with}/{mapped_total} raw products have mapped categories ({taxonomy} taxonomy rows).",
|
||||
"flash.admin.fixA1Error": "Catalog repair failed for {name}.",
|
||||
"flash.admin.cloneDestMissing": "No sandbox destination. Switch active company to Platform Demo (or your staff home), then clone again. Clone refuses to overwrite A1.",
|
||||
"flash.admin.planAssignedShort": "Plan assigned.",
|
||||
"flash.admin.creditsUpdated": "Credits updated.",
|
||||
"flash.admin.cyclesProcessed": "Billing cycles processed: {count}",
|
||||
|
||||
+2470
-2469
File diff suppressed because it is too large
Load Diff
+3228
-3227
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+5179
-5178
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+3267
-3266
File diff suppressed because it is too large
Load Diff
+2676
-2675
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,16 @@
|
||||
import type { MessageDict } from "./types.ts";
|
||||
import type { MessageDict } from "./types.ts";
|
||||
|
||||
/** Slovenian (sl) UI strings for admin Fix A1 — ready pack. Not registered in UI_LOCALES yet (avoid inventing locale switcher). */
|
||||
/** Slovenian (sl) UI strings for admin Fix A1 — ready pack. Not registered in UI_LOCALES yet (avoid inventing locale switcher). */
|
||||
export const sl: MessageDict = {
|
||||
"admin.users.fixA1": "Popravi katalog A1",
|
||||
"admin.users.fixA1Aria": "Popravi AI pozive, kategorije in zgoščevalne vrednosti za {name}",
|
||||
"admin.users.fixA1Aria": "Popravi AI pozive, kategorije in zgoÅ¡Äevalne vrednosti za {name}",
|
||||
"admin.users.fixA1Title": "Popravi katalog podjetja",
|
||||
"admin.users.fixA1Desc": "Ponovno uporabi popravljene AI pozive, počisti šibke enhance zgoščevalne vrednosti in dopolni kategorije iz mapped podatkov.",
|
||||
"admin.users.fixA1Desc": "Ponovno uporabi popravljene AI pozive, poÄisti Å¡ibke enhance zgoÅ¡Äevalne vrednosti in dopolni kategorije iz mapped podatkov.",
|
||||
"admin.users.fixA1Company": "Podjetje: {name}",
|
||||
"admin.users.fixA1Warning": "Raje Platform Demo ali izrecno podjetje. Ne briše feedov, mapiranj ali surovih izdelkov. Ščiti pravila prepisovanja A1 kohorte.",
|
||||
"admin.users.fixA1Cancel": "Prekliči",
|
||||
"admin.users.fixA1Warning": "Raje Platform Demo ali izrecno podjetje. Ne briÅ¡e feedov, mapiranj ali surovih izdelkov. Å Äiti pravila prepisovanja A1 kohorte.",
|
||||
"admin.users.fixA1Cancel": "PrekliÄi",
|
||||
"admin.users.fixA1Confirm": "Popravi katalog",
|
||||
"flash.admin.fixA1Success": "Popravilo kataloga za {name} končano: posodobljenih pozivov {prompts}, počiščenih zgoščevalnih vrednosti {hashes}, dopolnjenih kategorij {categories}.",
|
||||
"flash.admin.fixA1Success": "Popravilo kataloga za {name}: pozivi {prompts}, zgoščene {hashes}, processed←mapped {categories}, mapped←processed {mapped_backfilled}. Pokritost: {mapped_with}/{mapped_total} ({taxonomy} taksonomija).",
|
||||
"flash.admin.fixA1Error": "Popravilo kataloga za {name} ni uspelo.",
|
||||
"flash.admin.cloneDestMissing": "Ni ciljnega sandbox podjetja. Preklopite na Platform Demo, nato klonirajte.",
|
||||
};
|
||||
|
||||
@@ -384,11 +384,18 @@
|
||||
reprocessSampleLimit: 25
|
||||
});
|
||||
const r = res.result;
|
||||
const mappedWith = Number(r.mapped_with_category ?? 0);
|
||||
const mappedWithout = Number(r.mapped_without_category ?? 0);
|
||||
const mappedTotal = mappedWith + mappedWithout;
|
||||
success = i18n.t("flash.admin.fixA1Success", {
|
||||
name: targetName,
|
||||
prompts: String(r.prompts ?? r.category_prompts_updated ?? 0),
|
||||
hashes: String(r.hashes ?? r.weak_hashes_cleared ?? 0),
|
||||
categories: String(r.categories ?? r.categories_backfilled ?? 0)
|
||||
categories: String(r.categories ?? r.categories_backfilled ?? 0),
|
||||
mapped_backfilled: String(r.mapped_backfilled ?? r.mapped_categories_backfilled ?? 0),
|
||||
mapped_with: String(mappedWith),
|
||||
mapped_total: String(mappedTotal),
|
||||
taxonomy: String(r.taxonomy_categories ?? 0)
|
||||
});
|
||||
fixOpen = false;
|
||||
fixCompany = null;
|
||||
@@ -410,17 +417,23 @@
|
||||
me?.staff_home_company_id?.trim() ||
|
||||
me?.staff_home_company?.id?.trim() ||
|
||||
undefined;
|
||||
if (!destId && me?.company?.id && me.company.id === cloneCompany.id) {
|
||||
error = i18n.t("flash.admin.cloneDestMissing");
|
||||
return;
|
||||
}
|
||||
const res = await cloneAdminCompanyCatalog(cloneCompany.id, {
|
||||
destCompanyId: destId
|
||||
});
|
||||
const products = Number(res.counts?.raw_products ?? 0);
|
||||
const categories = Number(res.counts?.categories ?? 0);
|
||||
const mappedWith = Number(res.counts?.mapped_with_category ?? 0);
|
||||
const activeDest = (res.active_company_id || res.dest_company_id || "").trim();
|
||||
success = i18n.t("flash.admin.catalogCloned", {
|
||||
source: cloneCompany.name,
|
||||
dest: cloneDestLabel,
|
||||
products: String(products),
|
||||
categories: String(categories)
|
||||
categories: String(categories),
|
||||
mapped_with: String(mappedWith)
|
||||
});
|
||||
cloneOpen = false;
|
||||
cloneCompany = null;
|
||||
|
||||
Reference in New Issue
Block a user