@metron-labs/quote-react 0.1.68 → 0.1.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,12 +17,7 @@ const HEADER = [
17
17
  "Installation clues",
18
18
  "System clues",
19
19
  "Component requirements",
20
- "Technical classification",
21
- "Include in quote",
22
- "Approval required",
23
- "Approval type",
24
- "Missing information",
25
- "Adjudicator confidence",
20
+ "Review required",
26
21
  "Decision reason",
27
22
  "Selected candidate ID",
28
23
  "Selected candidate description",
@@ -36,15 +31,7 @@ const TOTAL_COL = HEADER.indexOf("Line total");
36
31
  function verdictLabel(row) {
37
32
  if (row.unmatchable)
38
33
  return "Not matched (labour/plant/referential)";
39
- if (row.decision?.include_in_quote === true && row.decision.approval_required === true)
40
- return "Approval required";
41
- if (row.decision?.include_in_quote === true)
42
- return "Quoted";
43
- if (row.decision?.technical_classification === "no_suitable_candidate")
44
- return "No suitable candidate";
45
- if (!row.best)
46
- return "No match";
47
- return "No match";
34
+ return row.best ? "Selected" : "Needs review";
48
35
  }
49
36
  /** Client-side export so on-screen overrides (candidate pick, qty) always match the download — mirrors exportExcel.ts for the BoQ path. */
50
37
  export async function exportScheduleExcel(rows) {
@@ -74,12 +61,7 @@ export async function exportScheduleExcel(rows) {
74
61
  item.installation_clues.join(", "),
75
62
  item.system_clues.join(", "),
76
63
  item.component_requirements.join(", "),
77
- decision?.technical_classification ?? "",
78
- decision?.include_in_quote == null ? "" : decision.include_in_quote ? "yes" : "no",
79
- decision?.approval_required == null ? "" : decision.approval_required ? "yes" : "no",
80
- decision?.approval_type ?? "",
81
- decision?.missing_information.join(", ") ?? "",
82
- decision?.confidence ?? "",
64
+ best ? "no" : "yes",
83
65
  decision?.reason ?? "",
84
66
  unmatchable ? "-" : (best?.product_id ?? decision?.selected_candidate_id ?? "-"),
85
67
  unmatchable ? "-" : (best?.description ?? "-"),
@@ -214,25 +214,15 @@ export interface RetrievalDebugQuery {
214
214
  candidates: RetrievalDebugCandidate[];
215
215
  }
216
216
  export interface RerankVerdict {
217
- technicalClassification: "exact" | "equivalent" | "alternative" | "product_family_candidate" | "supplier_designed_item" | "component_only" | "no_suitable_candidate";
218
217
  selectedCandidateId: string | null;
219
218
  recommendedCandidateIds?: string[];
220
- includeInQuote: boolean;
221
- approvalRequired: boolean;
222
- approvalType: string | null;
223
- missingInformation: string[];
224
- confidence: "high" | "medium" | "low";
225
219
  reason: string;
226
220
  }
227
221
  export interface MatchDecision {
228
- technical_classification: "exact" | "equivalent" | "alternative" | "product_family_candidate" | "supplier_designed_item" | "component_only" | "no_suitable_candidate" | null;
229
222
  selected_candidate_id: string | null;
230
- include_in_quote: boolean | null;
231
- approval_required: boolean | null;
232
- approval_type: string | null;
233
- missing_information: string[];
223
+ /** Derived from selection: no selected product means the line needs human review. */
224
+ approval_required: boolean;
234
225
  reason: string | null;
235
- confidence: "high" | "medium" | "low" | null;
236
226
  source_list: string | null;
237
227
  }
238
228
  export interface MatchResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metron-labs/quote-react",
3
- "version": "0.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "Metron Labs quote and estimating calculator components for React",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": [