import { PutAwayLine } from "@/app/api/po/actions"
import { QcData } from "@/app/api/qc"

// export interface QcData {
//     qcItemId: number,
//     qcItem: string,
//     qcDescription: string,
//     isPassed: boolean | undefined
//     failQty: number | undefined
//     remarks: string | undefined
// }

export const dummyQcData_A1: QcData[] = [
    {
        id: 1,
        qcItemId: 4,
        code: "包裝",
        description: "有破爛、污糟、脹袋、積水、與實物不符等任何一種情況，則不合格",
        name: "包裝",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 2,
        qcItemId: 5,
        code: "肉質",
        description: "肉質鬆散，則不合格",
        name: "肉質",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 3,
        qcItemId: 6,
        code: "顔色",
        description: "不是食材應有的顔色、顔色不均匀、出現其他顔色、腌料/醬顔色不均匀，油脂部分變綠色、黃色，則不合格",
        name: "顔色",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 4,
        qcItemId: 7,
        code: "狀態",
        description: "有結晶、結霜、解凍跡象、發霉、散發異味等任何一種情況，則不合格",
        name: "狀態",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 5,
        qcItemId: 8,
        code: "異物",
        description: "有不屬於本食材的雜質，則不合格",
        name: "異物",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
]

export const dummyQcHeader_A1: any = {
    name: "收貨要求 A1 - 急凍貨類 (QCA1-MEAT01)",
    type: "IQC",
    description: <>記錄探測溫度的時間，請在1小時内完成卸貨盤點入庫，以保障食品安全<br/>監察方法：目視檢查、嗅覺檢查和使用適當的食物溫度計，檢查食物溫度是否符合指標</>,

}

export const dummyQcHeader_E1: any = {
    name: "收貨要求 E1 - 通過加熱製成的醬汁或食物 (QCE1-HEAT01)",
    type: "EPQC",
    description: "包裝後需用冷卻水池降溫",

}

export const dummyQcHeader_E2: any = {
    name: "收貨要求 E2 - 室溫攪拌混合製成的醬汁或食物（無需加熱烹調） (QCA1-MIX01)",
    type: "EPQC",
    description: "不需使用冷卻水池降溫",

}

// For DEMO 2025/10/03
export const dummyQcData_E1: QcData[] = [
    {
        id: 1,
        qcItemId: 25,
        code: "包裝",
        description: "包裝不嚴密，液體滲漏。包裝不乾淨，則不合格",
        name: "包裝",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 2,
        qcItemId: 26,
        code: "標籤",
        description: "標籤名稱或日期錯誤、不清晰或缺失，則不合格",
        name: "標籤",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 3,
        qcItemId: 27,
        code: "肉質",
        description: "肉質生熟程度不一致，或裁切尺寸不一致，則不合格",
        name: "肉質",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 4,
        qcItemId: 28,
        code: "異物",
        description: "有異物，無法通過金屬探測器，則不合格",
        name: "異物",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 5,
        qcItemId: 29,
        code: "重量",
        description: "超過製程要求的誤差+/-5%，則不合格",
        name: "重量",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 6,
        qcItemId: 30,
        code: "冷卻水池",
        description: "未能於2小時內冷卻至20°C以下。冷卻水池水溫太高，或冷卻池中的成品太多，則不合格",
        name: "冷卻水池",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 7,
        qcItemId: 31,
        code: "冷庫",
        description: "2小時內，未能及時入冷庫，冷卻至4°C或以下，則不合格",
        name: "冷庫",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
]
// For PP2277 - 23293
export const dummyQcData_E2: QcData[] = [
    {
        id: 1,
        qcItemId: 25,
        code: "包裝",
        description: "包裝不嚴密，液體滲漏。包裝不乾淨，則不合格",
        name: "包裝",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 2,
        qcItemId: 26,
        code: "標籤",
        description: "標籤名稱或日期錯誤、不清晰或缺失，則不合格",
        name: "標籤",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 3,
        qcItemId: 32,
        code: "顔色",
        description: "食材有破損、缺口、變質或醬汁有異常顏色狀態，則不合格",
        name: "顔色",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 4,
        qcItemId: 28,
        code: "異物",
        description: "有異物，無法通過金屬探測器，則不合格",
        name: "異物",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
    {
        id: 5,
        qcItemId: 33,
        code: "重量",
        description: "沒有達到或超出重量要求，則不合格",
        name: "重量",
        qcPassed: undefined,
        failQty: undefined,
        remarks: undefined,
    },
]

export interface EscalationData {
    id: number,
    escalation: string,
    supervisor: string,
}


export const dummyEscalationHistory: EscalationData[] = [
    {
        id: 1,
        escalation: "上報1",
        supervisor: "陳大文"
    },
]

export const dummyPutAwayLine: PutAwayLine[] = [
    {
        id: 1,
        qty: 100,
        warehouseId: 1,
        warehouse: "W001 - 憶兆 3樓A倉",
        printQty: 1
    }
]