Ver código fonte

Merge branch 'MergeProblem1' of http://svn.2fi-solutions.com:8300/derek/FPSMS-frontend into MergeProblem1

MergeProblem1
CANCERYS\kw093 22 horas atrás
pai
commit
6720687726
10 arquivos alterados com 1561 adições e 33 exclusões
  1. +97
    -1
      package-lock.json
  2. +54
    -0
      src/app/(main)/chart/purchase/exportPurchaseChartMaster.ts
  3. +1080
    -23
      src/app/(main)/chart/purchase/page.tsx
  4. +21
    -0
      src/app/(main)/jo/testing/page.tsx
  5. +0
    -2
      src/app/(main)/layout.tsx
  6. +1
    -1
      src/app/(main)/report/page.tsx
  7. +304
    -4
      src/app/api/chart/client.ts
  8. +1
    -0
      src/components/Breadcrumb/Breadcrumb.tsx
  9. +2
    -2
      src/components/SearchResults/SearchResults.tsx
  10. +1
    -0
      src/routes.ts

+ 97
- 1
package-lock.json Ver arquivo

@@ -64,7 +64,8 @@
"reactstrap": "^9.2.2",
"styled-components": "^6.1.8",
"sweetalert2": "^11.10.3",
"xlsx": "^0.18.5"
"xlsx": "^0.18.5",
"xlsx-js-style": "^1.2.0"
},
"devDependencies": {
"@types/lodash": "^4.14.202",
@@ -6320,6 +6321,15 @@
"node": ">=0.8.x"
}
},
"node_modules/exit-on-epipe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
"integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==",
"license": "Apache-2.0",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
@@ -6381,6 +6391,12 @@
"reusify": "^1.0.4"
}
},
"node_modules/fflate": {
"version": "0.3.11",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.3.11.tgz",
"integrity": "sha512-Rr5QlUeGN1mbOHlaqcSYMKVpPbgLy0AWT/W0EHxA6NGI12yO1jpoui2zBBvU2G824ltM6Ut8BFgfHSBGfkmS0A==",
"license": "MIT"
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -8938,6 +8954,18 @@
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz",
"integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew=="
},
"node_modules/printj": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
"integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==",
"license": "Apache-2.0",
"bin": {
"printj": "bin/printj.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
@@ -11788,6 +11816,74 @@
"node": ">=0.8"
}
},
"node_modules/xlsx-js-style": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/xlsx-js-style/-/xlsx-js-style-1.2.0.tgz",
"integrity": "sha512-DDT4FXFSWfT4DXMSok/m3TvmP1gvO3dn0Eu/c+eXHW5Kzmp7IczNkxg/iEPnImbG9X0Vb8QhROda5eatSR/97Q==",
"license": "Apache-2.0",
"dependencies": {
"adler-32": "~1.2.0",
"cfb": "^1.1.4",
"codepage": "~1.14.0",
"commander": "~2.17.1",
"crc-32": "~1.2.0",
"exit-on-epipe": "~1.0.1",
"fflate": "^0.3.8",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xlsx-js-style/node_modules/adler-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
"integrity": "sha512-/vUqU/UY4MVeFsg+SsK6c+/05RZXIHZMGJA+PX5JyWI0ZRcBpupnRuPLU/NXXoFwMYCPCoxIfElM2eS+DUXCqQ==",
"license": "Apache-2.0",
"dependencies": {
"exit-on-epipe": "~1.0.1",
"printj": "~1.1.0"
},
"bin": {
"adler32": "bin/adler32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xlsx-js-style/node_modules/codepage": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
"integrity": "sha512-iz3zJLhlrg37/gYRWgEPkaFTtzmnEv1h+r7NgZum2lFElYQPi0/5bnmuDfODHxfp0INEfnRqyfyeIJDbb7ahRw==",
"license": "Apache-2.0",
"dependencies": {
"commander": "~2.14.1",
"exit-on-epipe": "~1.0.1"
},
"bin": {
"codepage": "bin/codepage.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xlsx-js-style/node_modules/codepage/node_modules/commander": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
"integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
"license": "MIT"
},
"node_modules/xlsx-js-style/node_modules/commander": {
"version": "2.17.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
"integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
"license": "MIT"
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",


+ 54
- 0
src/app/(main)/chart/purchase/exportPurchaseChartMaster.ts Ver arquivo

@@ -0,0 +1,54 @@
/**
* Multi-sheet 總表 export for the 採購 chart page — mirrors on-screen charts and drill-down data.
*/
import { exportMultiSheetToXlsx, type MultiSheetSpec } from "../_components/exportChartToXlsx";

export type PurchaseChartMasterExportPayload = {
/** ISO timestamp for audit */
exportedAtIso: string;
/** 篩選與情境 — key-value rows */
metaRows: Record<string, unknown>[];
/** 預計送貨 donut (依預計到貨日、上方篩選) */
estimatedDonutRows: Record<string, unknown>[];
/** 實際已送貨 donut (依訂單日期、上方篩選) */
actualStatusDonutRows: Record<string, unknown>[];
/** 貨品摘要表 (當前 drill) */
itemSummaryRows: Record<string, unknown>[];
/** 供應商分佈 (由採購單明細彙總) */
supplierDistributionRows: Record<string, unknown>[];
/** 採購單列表 */
purchaseOrderListRows: Record<string, unknown>[];
/** 全量採購單行明細 (每張 PO 所有行) */
purchaseOrderLineRows: Record<string, unknown>[];
};

function sheetOrPlaceholder(name: string, rows: Record<string, unknown>[], emptyMessage: string): MultiSheetSpec {
if (rows.length > 0) return { name, rows };
return {
name,
rows: [{ 說明: emptyMessage }],
};
}

/**
* Build worksheet specs (used by {@link exportPurchaseChartMasterToFile}).
*/
export function buildPurchaseChartMasterSheets(payload: PurchaseChartMasterExportPayload): MultiSheetSpec[] {
return [
{ name: "篩選條件與情境", rows: payload.metaRows },
sheetOrPlaceholder("預計送貨", payload.estimatedDonutRows, "無資料(請確認訂單日期與篩選)"),
sheetOrPlaceholder("實際已送貨", payload.actualStatusDonutRows, "無資料"),
sheetOrPlaceholder("貨品摘要", payload.itemSummaryRows, "無資料(可能為篩選交集為空或未載入)"),
sheetOrPlaceholder("供應商分佈", payload.supplierDistributionRows, "無資料"),
sheetOrPlaceholder("採購單列表", payload.purchaseOrderListRows, "無採購單明細可匯出"),
sheetOrPlaceholder("採購單行明細", payload.purchaseOrderLineRows, "無行資料(採購單列表為空)"),
];
}

export function exportPurchaseChartMasterToFile(
payload: PurchaseChartMasterExportPayload,
filenameBase: string
): void {
const sheets = buildPurchaseChartMasterSheets(payload);
exportMultiSheetToXlsx(sheets, filenameBase);
}

+ 1080
- 23
src/app/(main)/chart/purchase/page.tsx
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 21
- 0
src/app/(main)/jo/testing/page.tsx Ver arquivo

@@ -0,0 +1,21 @@
"use client";

import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography";

/**
* Dev / R&D sandbox for Job Order. Not listed in NavigationContent — open via /jo/testing only.
* Later: call APIs with clientAuthFetch + NEXT_PUBLIC_API_URL like src/app/(main)/testing/page.tsx.
*/
export default function JoTestingPage() {
return (
<Box sx={{ p: 4 }}>
<Typography variant="h5" gutterBottom fontWeight="bold">
Job order testing
</Typography>
<Typography color="text.secondary">
Empty page. This route is intentionally omitted from the navigation bar.
</Typography>
</Box>
);
}

+ 0
- 2
src/app/(main)/layout.tsx Ver arquivo

@@ -5,7 +5,6 @@ import { redirect } from "next/navigation";
import Box from "@mui/material/Box";
import { NAVIGATION_CONTENT_WIDTH } from "@/config/uiConfig";
import Stack from "@mui/material/Stack";
import Breadcrumb from "@/components/Breadcrumb";
import { AxiosProvider } from "@/app/(main)/axios/AxiosProvider";
import { SetupAxiosInterceptors } from "@/app/(main)/axios/axiosInstance";
import { CameraProvider } from "@/components/Cameras/CameraProvider";
@@ -54,7 +53,6 @@ export default async function MainLayout({
>
<Stack spacing={2}>
<I18nProvider namespaces={["common"]}>
{/* <Breadcrumb /> */}
{children}
</I18nProvider>
</Stack>


+ 1
- 1
src/app/(main)/report/page.tsx Ver arquivo

@@ -504,7 +504,7 @@ export default function ReportPage() {
setLoading={setLoading}
reportTitle={currentReport.title}
/>
) : currentReport.id === 'rep-013' ? (
) : currentReport.id === 'rep-013' || currentReport.id === 'rep-009' ? (
<>
<Button
variant="contained"


+ 304
- 4
src/app/api/chart/client.ts Ver arquivo

@@ -29,6 +29,81 @@ export interface PurchaseOrderByStatusRow {
count: number;
}

/** Multi-select filters for purchase charts (repeated `supplierId` / `itemCode` / `purchaseOrderNo` query params). */
export type PurchaseOrderChartFilters = {
supplierIds?: number[];
itemCodes?: string[];
purchaseOrderNos?: string[];
/** Single supplier code (drill when row has no supplier id); not used with `supplierIds`. */
supplierCode?: string;
};

function appendPurchaseOrderListParams(p: URLSearchParams, filters?: PurchaseOrderChartFilters) {
(filters?.supplierIds ?? []).forEach((id) => {
if (Number.isFinite(id) && id > 0) p.append("supplierId", String(id));
});
(filters?.itemCodes ?? []).forEach((c) => {
const t = String(c).trim();
if (t) p.append("itemCode", t);
});
(filters?.purchaseOrderNos ?? []).forEach((n) => {
const t = String(n).trim();
if (t) p.append("purchaseOrderNo", t);
});
const sc = filters?.supplierCode?.trim();
if (sc) p.set("supplierCode", sc);
}

export interface PoFilterSupplierOption {
supplierId: number;
code: string;
name: string;
}

export interface PoFilterItemOption {
itemCode: string;
itemName: string;
}

export interface PoFilterPoNoOption {
poNo: string;
}

export interface PurchaseOrderFilterOptions {
suppliers: PoFilterSupplierOption[];
items: PoFilterItemOption[];
poNos: PoFilterPoNoOption[];
}

export interface PurchaseOrderEstimatedArrivalRow {
bucket: string;
count: number;
}

export interface PurchaseOrderDetailByStatusRow {
purchaseOrderId: number;
purchaseOrderNo: string;
status: string;
orderDate: string;
estimatedArrivalDate: string;
/** Shop / supplier FK; use for grouping when code is blank */
supplierId: number | null;
supplierCode: string;
supplierName: string;
itemCount: number;
totalQty: number;
}

export interface PurchaseOrderItemRow {
purchaseOrderLineId: number;
itemCode: string;
itemName: string;
orderedQty: number;
uom: string;
receivedQty: number;
pendingQty: number;
}

export interface StockInOutByDateRow {
date: string;
inQty: number;
@@ -317,11 +392,13 @@ export async function fetchDeliveryOrderByDate(
}

export async function fetchPurchaseOrderByStatus(
targetDate?: string
targetDate?: string,
filters?: PurchaseOrderChartFilters
): Promise<PurchaseOrderByStatusRow[]> {
const q = targetDate
? buildParams({ targetDate })
: "";
const p = new URLSearchParams();
if (targetDate) p.set("targetDate", targetDate);
appendPurchaseOrderListParams(p, filters);
const q = p.toString();
const res = await clientAuthFetch(
q ? `${BASE}/purchase-order-by-status?${q}` : `${BASE}/purchase-order-by-status`
);
@@ -333,6 +410,229 @@ export async function fetchPurchaseOrderByStatus(
}));
}

export async function fetchPurchaseOrderFilterOptions(
targetDate?: string
): Promise<PurchaseOrderFilterOptions> {
const p = new URLSearchParams();
if (targetDate) p.set("targetDate", targetDate);
const q = p.toString();
const res = await clientAuthFetch(
q ? `${BASE}/purchase-order-filter-options?${q}` : `${BASE}/purchase-order-filter-options`
);
if (!res.ok) throw new Error("Failed to fetch purchase order filter options");
const data = await res.json();
const row = (data ?? {}) as Record<string, unknown>;
const suppliers = (Array.isArray(row.suppliers) ? row.suppliers : []) as Record<string, unknown>[];
const items = (Array.isArray(row.items) ? row.items : []) as Record<string, unknown>[];
const poNos = (Array.isArray(row.poNos) ? row.poNos : []) as Record<string, unknown>[];
return {
suppliers: suppliers.map((r) => ({
supplierId: Number(r.supplierId ?? r.supplierid ?? 0),
code: String(r.code ?? ""),
name: String(r.name ?? ""),
})),
items: items.map((r) => ({
itemCode: String(r.itemCode ?? r.itemcode ?? ""),
itemName: String(r.itemName ?? r.itemname ?? ""),
})),
poNos: poNos.map((r) => ({
poNo: String(r.poNo ?? r.pono ?? ""),
})),
};
}

export async function fetchPurchaseOrderEstimatedArrivalSummary(
targetDate?: string,
filters?: PurchaseOrderChartFilters
): Promise<PurchaseOrderEstimatedArrivalRow[]> {
const p = new URLSearchParams();
if (targetDate) p.set("targetDate", targetDate);
appendPurchaseOrderListParams(p, filters);
const q = p.toString();
const res = await clientAuthFetch(
q
? `${BASE}/purchase-order-estimated-arrival-summary?${q}`
: `${BASE}/purchase-order-estimated-arrival-summary`
);
if (!res.ok) throw new Error("Failed to fetch estimated arrival summary");
const data = await res.json();
return ((Array.isArray(data) ? data : []) as Record<string, unknown>[]).map((r: Record<string, unknown>) => ({
bucket: String(r.bucket ?? ""),
count: Number(r.count ?? 0),
}));
}

export interface EstimatedArrivalBreakdownSupplierRow {
supplierId: number | null;
supplierCode: string;
supplierName: string;
poCount: number;
}

export interface EstimatedArrivalBreakdownItemRow {
itemCode: string;
itemName: string;
poCount: number;
totalQty: number;
}

export interface EstimatedArrivalBreakdownPoRow {
purchaseOrderId: number;
purchaseOrderNo: string;
status: string;
orderDate: string;
supplierId: number | null;
supplierCode: string;
supplierName: string;
}

export interface PurchaseOrderEstimatedArrivalBreakdown {
suppliers: EstimatedArrivalBreakdownSupplierRow[];
items: EstimatedArrivalBreakdownItemRow[];
purchaseOrders: EstimatedArrivalBreakdownPoRow[];
}

/** Related suppliers / items / POs for one 預計送貨 bucket (same bar filters as the donut). */
export async function fetchPurchaseOrderEstimatedArrivalBreakdown(
targetDate: string,
estimatedArrivalBucket: string,
filters?: PurchaseOrderChartFilters
): Promise<PurchaseOrderEstimatedArrivalBreakdown> {
const p = new URLSearchParams();
p.set("targetDate", targetDate);
p.set("estimatedArrivalBucket", estimatedArrivalBucket.trim().toLowerCase());
appendPurchaseOrderListParams(p, filters);
const res = await clientAuthFetch(`${BASE}/purchase-order-estimated-arrival-breakdown?${p.toString()}`);
if (!res.ok) throw new Error("Failed to fetch estimated arrival breakdown");
const data = await res.json();
const row = (data ?? {}) as Record<string, unknown>;
const suppliers = (Array.isArray(row.suppliers) ? row.suppliers : []) as Record<string, unknown>[];
const items = (Array.isArray(row.items) ? row.items : []) as Record<string, unknown>[];
const purchaseOrders = (Array.isArray(row.purchaseOrders) ? row.purchaseOrders : []) as Record<string, unknown>[];
return {
suppliers: suppliers.map((r) => ({
supplierId: (() => {
const v = r.supplierId ?? r.supplierid;
if (v == null || v === "") return null;
const n = Number(v);
return Number.isFinite(n) ? n : null;
})(),
supplierCode: String(r.supplierCode ?? r.suppliercode ?? ""),
supplierName: String(r.supplierName ?? r.suppliername ?? ""),
poCount: Number(r.poCount ?? r.pocount ?? 0),
})),
items: items.map((r) => ({
itemCode: String(r.itemCode ?? r.itemcode ?? ""),
itemName: String(r.itemName ?? r.itemname ?? ""),
poCount: Number(r.poCount ?? r.pocount ?? 0),
totalQty: Number(r.totalQty ?? r.totalqty ?? 0),
})),
purchaseOrders: purchaseOrders.map((r) => ({
purchaseOrderId: Number(r.purchaseOrderId ?? r.purchaseorderid ?? 0),
purchaseOrderNo: String(r.purchaseOrderNo ?? r.purchaseorderno ?? ""),
status: String(r.status ?? ""),
orderDate: String(r.orderDate ?? r.orderdate ?? ""),
supplierId: (() => {
const v = r.supplierId ?? r.supplierid;
if (v == null || v === "") return null;
const n = Number(v);
return Number.isFinite(n) ? n : null;
})(),
supplierCode: String(r.supplierCode ?? r.suppliercode ?? ""),
supplierName: String(r.supplierName ?? r.suppliername ?? ""),
})),
};
}

export type PurchaseOrderDrillQuery = PurchaseOrderChartFilters & {
/** order = PO order date; complete = PO complete date (for received/completed on a day) */
dateFilter?: "order" | "complete";
/** delivered | not_delivered | cancelled | other — same as 預計送貨 donut buckets */
estimatedArrivalBucket?: string;
};

export async function fetchPurchaseOrderDetailsByStatus(
status: string,
targetDate?: string,
opts?: PurchaseOrderDrillQuery
): Promise<PurchaseOrderDetailByStatusRow[]> {
const p = new URLSearchParams();
p.set("status", status.trim().toLowerCase());
if (targetDate) p.set("targetDate", targetDate);
if (opts?.dateFilter) p.set("dateFilter", opts.dateFilter);
if (opts?.estimatedArrivalBucket?.trim()) {
p.set("estimatedArrivalBucket", opts.estimatedArrivalBucket.trim().toLowerCase());
}
appendPurchaseOrderListParams(p, opts);
const q = p.toString();
const res = await clientAuthFetch(`${BASE}/purchase-order-details-by-status?${q}`);
if (!res.ok) throw new Error("Failed to fetch purchase order details by status");
const data = await res.json();
return ((Array.isArray(data) ? data : []) as Record<string, unknown>[]).map((r: Record<string, unknown>) => ({
purchaseOrderId: Number(r.purchaseOrderId ?? 0),
purchaseOrderNo: String(r.purchaseOrderNo ?? ""),
status: String(r.status ?? ""),
orderDate: String(r.orderDate ?? ""),
estimatedArrivalDate: String(r.estimatedArrivalDate ?? ""),
supplierId: (() => {
const v = r.supplierId;
if (v == null || v === "") return null;
const n = Number(v);
return Number.isFinite(n) && n > 0 ? n : null;
})(),
supplierCode: String(r.supplierCode ?? ""),
supplierName: String(r.supplierName ?? ""),
itemCount: Number(r.itemCount ?? 0),
totalQty: Number(r.totalQty ?? 0),
}));
}

export async function fetchPurchaseOrderItems(
purchaseOrderId: number
): Promise<PurchaseOrderItemRow[]> {
const q = buildParams({ purchaseOrderId });
const res = await clientAuthFetch(`${BASE}/purchase-order-items?${q}`);
if (!res.ok) throw new Error("Failed to fetch purchase order items");
const data = await res.json();
return ((Array.isArray(data) ? data : []) as Record<string, unknown>[]).map((r: Record<string, unknown>) => ({
purchaseOrderLineId: Number(r.purchaseOrderLineId ?? 0),
itemCode: String(r.itemCode ?? ""),
itemName: String(r.itemName ?? ""),
orderedQty: Number(r.orderedQty ?? 0),
uom: String(r.uom ?? ""),
receivedQty: Number(r.receivedQty ?? 0),
pendingQty: Number(r.pendingQty ?? 0),
}));
}

export async function fetchPurchaseOrderItemsByStatus(
status: string,
targetDate?: string,
opts?: PurchaseOrderDrillQuery
): Promise<PurchaseOrderItemRow[]> {
const p = new URLSearchParams();
p.set("status", status.trim().toLowerCase());
if (targetDate) p.set("targetDate", targetDate);
if (opts?.dateFilter) p.set("dateFilter", opts.dateFilter);
if (opts?.estimatedArrivalBucket?.trim()) {
p.set("estimatedArrivalBucket", opts.estimatedArrivalBucket.trim().toLowerCase());
}
appendPurchaseOrderListParams(p, opts);
const q = p.toString();
const res = await clientAuthFetch(`${BASE}/purchase-order-items-by-status?${q}`);
if (!res.ok) throw new Error("Failed to fetch purchase order items by status");
const data = await res.json();
return ((Array.isArray(data) ? data : []) as Record<string, unknown>[]).map((r: Record<string, unknown>) => ({
purchaseOrderLineId: 0,
itemCode: String(r.itemCode ?? ""),
itemName: String(r.itemName ?? ""),
orderedQty: Number(r.orderedQty ?? 0),
uom: String(r.uom ?? ""),
receivedQty: Number(r.receivedQty ?? 0),
pendingQty: Number(r.pendingQty ?? 0),
}));
}

export async function fetchStockInOutByDate(
startDate?: string,
endDate?: string


+ 1
- 0
src/components/Breadcrumb/Breadcrumb.tsx Ver arquivo

@@ -41,6 +41,7 @@ const pathToLabelMap: { [path: string]: string } = {
"/dashboard": "dashboard",
"/jo": "Job Order",
"/jo/edit": "Edit Job Order",
"/jo/testing": "Job order testing",
"/putAway": "Put Away",
"/stockIssue": "Stock Issue",
"/report": "Report",


+ 2
- 2
src/components/SearchResults/SearchResults.tsx Ver arquivo

@@ -176,7 +176,7 @@ function handleIconIcons<T extends ResultWithId>(
}
export const defaultPagingController: { pageNum: number; pageSize: number } = {
pageNum: 1,
pageSize: 10,
pageSize: 100,
};

export type defaultSetPagingController = Dispatch<
@@ -200,7 +200,7 @@ function SearchResults<T extends ResultWithId>({
}: Props<T>) {
const { t } = useTranslation();
const [page, setPage] = React.useState(0);
const [rowsPerPage, setRowsPerPage] = React.useState(10);
const [rowsPerPage, setRowsPerPage] = React.useState(100);
/// this
const handleChangePage: TablePaginationProps["onPageChange"] = (


+ 1
- 0
src/routes.ts Ver arquivo

@@ -2,6 +2,7 @@ export const PRIVATE_ROUTES = [
"/analytics",
"/dashboard",
"/testing",
"/jo/testing",
"/ps",
"/bagPrint",
"/report",


Carregando…
Cancelar
Salvar