feat: propagate PL24 part metadata, improve auth UX with Google sign-in prominence

- Add unavailable/remark/modelCodes/presel fields to categories and parts DB schema
- Pass PL24 unavailable flag through pipeline instead of filtering out records
- Show unavailable categories/parts at reduced opacity in grid, tree, and parts panel
- Display part remark and model codes as secondary info in parts table
- Move Google sign-in button above email form on login/register pages with branded icon
- Add public email existence check endpoint for better login error messages
- Update INDEX.md documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sase Dev
2026-02-20 11:11:28 +00:00
parent 87f03f66ac
commit f3f3f57756
15 changed files with 561 additions and 328 deletions

View File

@@ -908,8 +908,7 @@ export class PL24Service {
records = responseData.groups as Array<Record<string, unknown>>;
}
const availableRecords = records.filter((record) => {
if (record.unavailable) return false;
const validRecords = records.filter((record) => {
const link = (record.link as Record<string, unknown>) || {};
// Servicepart records have no link.path but can use bomBaseLink
if (!link.path && !bomBasePath) return false;
@@ -918,7 +917,7 @@ export class PL24Service {
return true;
});
return availableRecords.map((record) => {
return validRecords.map((record) => {
const values = (record.values as Record<string, string>) || {};
const link = (record.link as Record<string, unknown>) || {};
@@ -950,11 +949,21 @@ export class PL24Service {
);
let name = separatorMatch ? separatorMatch[1].trim() : rawCaption;
const remarks = values.remarks || "";
const remarks = (values.remarks || "").replace(/\r?\n/g, " ").trim();
if (remarks) {
name = `${name} (${remarks})`;
}
const modelDesc = (values.modelDescriptions || "").replace(/\r?\n/g, " ").trim();
if (modelDesc) {
name = `${name} [${modelDesc}]`;
}
const illusNum = (values.illustrationNumber || "").replace(/\\-/g, "-").trim();
if (illusNum) {
name = `${name} {${illusNum}}`;
}
if (!name) name = code;
// Construct linkPath: use record's own link.path, or bomBaseLink + record id
@@ -972,6 +981,7 @@ export class PL24Service {
partCount: undefined,
linkPath: constructedPath,
linkWid: (link.wid as string) || (bomBasePath ? "servicePartsItemsTable" : undefined),
unavailable: !!record.unavailable,
};
});
}
@@ -1042,6 +1052,8 @@ export class PL24Service {
positionCode: String(part.pos || values.pos || ""),
modelCodes,
notes: modelCodes,
unavailable: !!part.unavailable,
presel: !!part.presel,
superseded,
hotspotId: (part.hotspotId as string) || undefined,
linkPath: (part.link as Record<string, string>)?.path,
@@ -1324,6 +1336,7 @@ export class PL24Service {
hotspotId: record.hotspotId || record.pos || undefined,
quantity: parseInt(values.qty || "1", 10) || 1,
modelCodes: values.restrictions || undefined,
presel: !!record.presel,
};
});
}

View File

@@ -462,6 +462,7 @@ export interface PL24MainGroup {
subGroups?: PL24SubGroup[];
linkPath?: string;
linkWid?: string;
unavailable?: boolean;
}
export interface PL24SubGroup {
@@ -471,6 +472,7 @@ export interface PL24SubGroup {
description?: string;
imageUrl?: string;
partCount?: number;
unavailable?: boolean;
}
export interface PL24Part {
@@ -484,6 +486,8 @@ export interface PL24Part {
positionCode?: string;
modelCodes?: string;
notes?: string;
unavailable?: boolean;
presel?: boolean;
superseded?: {
oldCode: string;
newCode: string;