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EAAAC,KAAA,OACT,MAAW,MASZ,CARG,GAAOD,EAAAC,KAAA,OACT,MAAW,SAOZ,CANG,GAAOD,EAAAC,KAAA,OACT,MAAW,gBACT,GAAOD,EAAAC,KAAA,OACT,MAAO,cAEN,eACF,CAEsD,SACrDC,EAAQC,CAAA,SACNA,GAAK,IACH,QACF,OAAK,MACH,QACF,OAAK,MACH,QACF,OAAK,MACH,OACF,OAAK,MACH,OACF,OAAK,MACH,UACF,OAAK,MACH,WACF,OAAK,MACH,SACF,iBAEF,QACD,CAEM,CAuB0C,SAC/CC,EAAQD,CAAA,SACNA,GAAK,IACH,QACF,MAAK,QACH,QACF,MAAK,QACH,QACF,MAAK,QACH,OACF,MAAK,QACH,OACF,MAAK,QACH,MACF,MAAK,QACH,UACF,MAAK,QACH,WACF,MAAK,QACH,SACF,kBAEF,SACD,CAEM,CAAuC,SAC5CE,EAAQF,CAAA,SACNA,GAAK,IACH,QACF,MAAK,SACH,QACF,MAAK,SACH,QACF,MAAK,SACH,OACF,MAAK,SACH,OACF,MAAK,SACH,MACF,MAAK,UACH,UACF,MAAK,SACH,WACF,MAAK,SACH,SACF,mBAEF,SACD,CAEM,CDsCL9f,EAAAC,CAAA,CAAAF,EAAA,sBAAA8f,CAAA,uBAAAE,CAAA,uBAAAD,CAAA,uBAAAJ,CAAA,uBAAAM,CAAA,ICNoB,IACpBF,EAAA,EAAkBta,MAAO,QAAKkC,MAAA,IAC9B,GAAkBlC,MAAO,QAAKkC,MAAA,IAC9B,GAAkBlC,MAAO,QAAKkC,MAAA,IAC9B,GAAiBlC,MAAO,OAAKkC,MAAA,IAC7B,GAAiBlC,MAAO,OAAKkC,MAAA,IAC7B,GAAoBlC,MAAO,UAAKkC,MAAA,IAChC,GAAqBlC,MAAO,WAAKkC,MAAA,IACjC,GAAmBlC,MAAO,SAAKkC,MAAA,IAC/B","sources":["webpack://_N_E/./src/components/LicenseNotValid.tsx","webpack://_N_E/./src/contexts/users.tsx","webpack://_N_E/./src/utils/cookie.ts","webpack://_N_E/./src/utils/date.ts","webpack://_N_E/./src/utils/license.ts","webpack://_N_E/./src/utils/report/render/docx.ts","webpack://_N_E/./src/utils/report/render/xlsx.ts","webpack://_N_E/./src/utils/report/data/docx/project.ts","webpack://_N_E/./src/utils/report/data/docx/quote.ts","webpack://_N_E/./src/utils/report/data/docx/service.ts","webpack://_N_E/./src/utils/report/data/docx/invoice.ts","webpack://_N_E/./src/utils/report/data/docx/index.ts","webpack://_N_E/./src/utils/report/data/xlsx/project.ts","webpack://_N_E/./src/utils/report/data/xlsx/quote.ts","webpack://_N_E/./src/utils/report/data/elements.ts","webpack://_N_E/./src/utils/report/data/xlsx/product.ts","webpack://_N_E/./src/utils/report/data/xlsx/service.ts","webpack://_N_E/./src/utils/report/data/xlsx/productSummary.ts","webpack://_N_E/./src/utils/report/data/xlsx/invoice.ts","webpack://_N_E/./src/utils/report/data/xlsx/index.ts","webpack://_N_E/./src/utils/report/data/index.ts","webpack://_N_E/./src/utils/report/index.ts","webpack://_N_E/./src/utils/status.ts","webpack://_N_E/"],"sourcesContent":["import { Button } from \"@mui/material\";\n\nimport { useAuth } from \"contexts/auth\";\nexport default function AccessGate() {\n const { logout } = useAuth();\n return (\n \n

ライセンスエラー

\n

システム管理者に連絡して下さい

\n \n \n );\n}\n","import {\n ReactNode,\n createContext,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport { useAuth } from \"./auth\";\nimport { useTenant } from \"./tenant\";\n\nimport type { User, UsersTenants } from \"API\";\nimport { GraphQLInput } from \"hooks/data\";\nimport useDatalist from \"hooks/datalist\";\nimport { LicenseEnum } from \"utils/license\";\n\nexport interface TenantUser extends User {\n license: LicenseEnum;\n usersTenantsId: string;\n active: boolean;\n}\n\ninterface UsersContextValue {\n loading: boolean;\n users: TenantUser[];\n managerUsers: TenantUser[];\n mobileUsers: TenantUser[];\n unlincensedUsers: TenantUser[];\n supportUsers: TenantUser[];\n isLicenseValid: boolean;\n isLicenseValidForMobile: boolean;\n isLicenseValidForManager: boolean;\n isLicenseValidForMe: boolean;\n myLicense: LicenseEnum;\n canRemoveAdmin: boolean; // システム管理者権限を持つユーザーが1人のみの場合は削除できない\n invite: (input: any) => Promise;\n update: (input: any) => Promise;\n refetch: () => Promise;\n set: (input: GraphQLInput) => void;\n}\n\ninterface UsersContextProps {\n children: ReactNode;\n}\n\nconst UsersContext = createContext({\n users: [],\n managerUsers: [],\n mobileUsers: [],\n supportUsers: [],\n unlincensedUsers: [],\n isLicenseValid: false,\n isLicenseValidForMobile: false,\n isLicenseValidForManager: false,\n isLicenseValidForMe: true,\n myLicense: LicenseEnum.MANAGER,\n canRemoveAdmin: false,\n loading: false,\n invite: () => Promise.resolve(),\n update: () => Promise.resolve(),\n refetch: () => Promise.resolve(),\n set: () => {},\n});\n\nexport const UsersProvider = ({ children }: UsersContextProps) => {\n const { user } = useAuth();\n const { tenant } = useTenant();\n const { data, loading, create, update, refetch, set, nextToken, appendNext } =\n useDatalist({\n query: user?.disableMultiTenant\n ? \"legacyUsersByTenantId\"\n : \"usersByTenantId\",\n variables: {\n tenantId: user?.tenantId,\n },\n });\n\n // FIXME: 全件取得するようにしている、ページネーションを実装する必要がある\n // appendNextの実行状態を管理しないとデータが重複する\n const [fetchingNext, setFetchingNext] = useState(false);\n\n // nextTokenがnullになるまでappendNextを実行する\n useEffect(() => {\n if (nextToken && !fetchingNext) {\n // 既にフェッチ中でなければappendNextを呼び出す\n setFetchingNext(true); // フェッチ中の状態をtrueに設定\n appendNext().finally(() => setFetchingNext(false)); // フェッチが終わったらフェッチ中の状態をfalseに設定\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [nextToken]);\n\n const users: TenantUser[] = data.map((d: UsersTenants) => ({\n ...d.user,\n ...d,\n usersTenantsId: d.id,\n groups: d.user?.groups,\n id: d.user?.id,\n }));\n\n const managerUsers = users.filter(\n (user) => user.license === LicenseEnum.MANAGER\n );\n\n const mobileUsers = users.filter(\n (user) => user.license === LicenseEnum.MOBILE\n );\n\n const unlincensedUsers = users.filter(\n (user) => user.license === LicenseEnum.NONE || !user.license\n );\n\n const supportUsers = users.filter(\n (user) => user.license === LicenseEnum.SUPPORT\n );\n\n const canRemoveAdmin =\n users.filter(\n (user) =>\n user.isAdmin &&\n user.active &&\n !!user.license &&\n user.license !== LicenseEnum.SUPPORT\n ).length > 1;\n\n const isLicenseValidForManager =\n users.filter((user) => user.license === LicenseEnum.MANAGER).length <=\n (tenant?.maxManagerLicense || 0);\n\n const isLicenseValidForMobile =\n users.filter((user) => user.license === LicenseEnum.MOBILE).length <=\n (tenant?.maxMobileLicense || 0);\n\n const isLicenseValid = isLicenseValidForManager && isLicenseValidForMobile;\n\n const me = users.find((usr) => usr.id === user?.id);\n\n const myLicense = me?.license || LicenseEnum.NONE;\n\n const isLicenseValidForMe =\n me && tenant\n ? (myLicense === LicenseEnum.MANAGER &&\n isLicenseValidForManager &&\n me.active) ||\n (myLicense === LicenseEnum.SUPPORT && me.active)\n : true;\n\n const inviteMember = async (input: GraphQLInput) => {\n await create(\"inviteUser\", {\n ...input,\n tenantId: user?.tenantId,\n multiTenant: true,\n });\n };\n\n const updateMember = async (input: GraphQLInput) => {\n await update(\"updateUsersTenants\", {\n ...input,\n });\n };\n\n const values = useMemo(\n () => ({\n users,\n invite: inviteMember,\n update: updateMember,\n loading,\n refetch: () => refetch({ tenantId: user?.tenantId }),\n set,\n managerUsers,\n mobileUsers,\n supportUsers,\n unlincensedUsers,\n isLicenseValid,\n isLicenseValidForMobile,\n isLicenseValidForManager,\n isLicenseValidForMe,\n myLicense,\n canRemoveAdmin,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n inviteMember,\n loading,\n set,\n updateMember,\n users,\n managerUsers,\n mobileUsers,\n supportUsers,\n unlincensedUsers,\n isLicenseValid,\n isLicenseValidForMobile,\n isLicenseValidForManager,\n isLicenseValidForMe,\n myLicense,\n canRemoveAdmin,\n ]\n );\n\n return (\n {children}\n );\n};\n\nexport const useUsers = () => {\n const usersContext = useContext(UsersContext);\n\n if (usersContext === undefined) {\n throw new Error(\"useUsers must be within UsersProvider\");\n }\n\n return usersContext;\n};\n","export const defaultCookieOptions = {\n sameSite: \"lax\" as boolean | \"lax\" | \"strict\" | \"none\" | undefined,\n secure: true,\n maxAge: 60 * 60 * 24 * 365,\n path: \"/\",\n};\n\nexport function parseCookieBooleanValue(value: string | undefined): boolean {\n return value === \"true\";\n}\n","// タイムゾーン付きの日付文字列を日本ロケールの日付文字列(フォーマットは2006年01月02日)に変換する\nexport const dateStringToJaDateStr = (dateString: string): string | Error => {\n // Date型に変換\n const date = new Date(dateString);\n\n // 変換に失敗したらエラーを返す\n if (isNaN(date.getTime())) {\n return new Error(\"Invalid Date\");\n }\n\n // option指定\n const options: Intl.DateTimeFormatOptions = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n };\n\n // 日本ロケールの日付文字列に変換\n const jaDateStr = date.toLocaleDateString(\"ja-JP\", options);\n\n // \"/\"を\"年\"と\"月\"に置換\n return jaDateStr.replace(\"/\", \"年\").replace(\"/\", \"月\") + \"日\";\n};\n\n// タイムゾーン付きの日付文字列を日本ロケールの日付時刻文字列(フォーマットは2006年01月02日 15時04分05秒)に変換する\nexport const dateStringToJaDateTimeStr = (\n dateString: string\n): string | null => {\n // Date型に変換\n const date = new Date(dateString);\n\n // 変換に失敗したらエラーを返す\n if (isNaN(date.getTime())) {\n return null;\n }\n\n // option指定\n const options: Intl.DateTimeFormatOptions = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour12: false,\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n };\n\n // 日本ロケールの日付文字列に変換\n const jaDateTimeStr = date.toLocaleDateString(\"ja-JP\", options);\n\n // \"/\"を\"年\"と\"月\"に置換\n return (\n jaDateTimeStr\n .replace(\"/\", \"年\")\n .replace(\"/\", \"月\")\n .replace(\" \", \"日 \")\n .replace(\":\", \"時\")\n .replace(\":\", \"分\") + \"秒\"\n );\n};\n\n/**\n * date1とdate2を比較して、新しい方の日付文字列を返す\n * @param date1 比較対象1(YYYY/MM/DD HH:mm:ss)\n * @param date2 比較対象2(YYYY/MM/DD HH:mm:ss)\n */\nexport const pickLatestDateString = (\n date1: string | undefined,\n date2: string | undefined\n): string => {\n // どちらもundefinedか空文字だったら空文字を返す\n if (!date1 && !date2) return \"\";\n\n // どちらかがundefined or 空文字だったらもう片方を返す\n if (!date1) return date2 ?? \"\";\n if (!date2) return date1 ?? \"\";\n\n // Dateにして比較して新しい方を返す\n return new Date(date1) > new Date(date2) ? date1 : date2;\n};\n","export enum LicenseEnum {\n MANAGER = \"MANAGER\",\n MOBILE = \"MOBILE\",\n SUPPORT = \"SUPPORT\",\n NONE = \"NONE\",\n}\n\nexport function getLicenseName(license: LicenseEnum): string {\n switch (license) {\n case LicenseEnum.MANAGER:\n return \"標準\";\n case LicenseEnum.MOBILE:\n return \"モバイル\";\n case LicenseEnum.SUPPORT:\n return \"サポート\";\n case LicenseEnum.NONE:\n return \"無効\";\n default:\n return \"-\";\n }\n}\n\nexport function getLicenseOptions(): { value: LicenseEnum; label: string }[] {\n return [\n { value: LicenseEnum.NONE, label: getLicenseName(LicenseEnum.NONE) },\n { value: LicenseEnum.MANAGER, label: getLicenseName(LicenseEnum.MANAGER) },\n { value: LicenseEnum.MOBILE, label: getLicenseName(LicenseEnum.MOBILE) },\n ];\n}\n","import Docxtemplater from \"docxtemplater\";\nimport PizZip from \"pizzip\";\nlet PizZipUtils: any = null;\nif (typeof window !== \"undefined\") {\n import(\"pizzip/utils/index.js\").then(function (r) {\n PizZipUtils = r;\n });\n}\n\n// https://docxtemplater.com/docs/get-started-browser/\n\nfunction loadFile(blob: Blob) {\n return new Promise((resolve, reject) => {\n const url = URL.createObjectURL(blob);\n PizZipUtils.getBinaryContent(url, (err: any, data: any) => {\n if (err) reject(err);\n resolve(data);\n });\n });\n}\n\n//The error thrown here contains additional information when logged with JSON.stringify (it contains a properties object containing all suberrors).\n//function replaceErrors(key: any, value: any) {\n//if (value instanceof Error) {\n//return Object.getOwnPropertyNames(value).reduce(function (\n//error: any,\n//key: any\n//) {\n//error[key] = (value as any)[key];\n//return error;\n//},\n//{});\n//}\n//return value;\n//}\n\nfunction modifyContent(content: any, data: any) {\n var zip = new PizZip(content);\n var doc = new Docxtemplater().loadZip(zip);\n doc.setData(data);\n try {\n // render the document\n doc.render();\n } catch (error: any) {\n if (error.properties && error.properties.errors instanceof Array) {\n const errorMessages = error.properties.errors\n .map(function (error: any) {\n return error.properties.explanation;\n })\n .join(\"\\n\");\n throw Error(errorMessages);\n // errorMessages is a humanly readable message looking like this :\n // 'The tag beginning with \"foobar\" is unopened'\n }\n throw error;\n }\n var blob = doc.getZip().generate({\n type: \"blob\",\n mimeType:\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n });\n // Output the document using Data-URI\n return blob;\n}\n\nexport async function renderDocument(blob: Blob, data: any) {\n const file = await loadFile(blob);\n return modifyContent(file, data);\n}\n","import axios from \"axios\";\n\nimport { Report } from \"API\";\n\nexport async function renderSpreadsheet(blob: Blob, data: any, report: Report) {\n const body = new FormData();\n\n body.append(\"file\", blob);\n body.append(\"data\", JSON.stringify(data));\n body.append(\"report\", JSON.stringify(report));\n\n // 帳票のセルが多すぎるとaxiosの10secのタイムアウトを越すので拡張\n const res = await axios.post(\"/api/xlsx\", body, {\n timeout: 120 * 1000,\n });\n\n return res.data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { Schedule } from \"API\";\nimport { getProject } from \"graphql/queries\";\nimport { getProjectTypeName } from \"utils/project\";\n\nexport async function getProjectData(projectId: string) {\n const p = (\n await API.graphql({\n query: getProject,\n variables: { id: projectId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getProject;\n\n const project = {\n \"project.id\": p.id,\n \"project.name\": p.name || \"-\",\n \"project.accountName\": p.accountName || \"-\",\n \"project.contactName\": p.contactName || \"-\",\n \"project.contactTitle\": p.contactTitle || \"-\",\n \"project.reference\": p.reference || \"-\",\n \"project.alert\": p.alert || \"\",\n \"project.qrcode\": \"qrcode\",\n \"project.userName\": p.user.name || \"-\",\n \"project.managerName\": p.managerName || \"-\",\n \"project.quoterName\": p.quoterName || \"-\",\n \"project.operatorName\": p.operatorName || \"-\",\n \"project.type\": getProjectTypeName(p.type),\n };\n\n const ss = p.schedules.items;\n\n const schedules = ss.map((s: Schedule, idx: number) => ({\n number: idx + 1,\n id: s.id,\n name: s.name || \"-\",\n m3: s.m3 || \"-\",\n case: s.case || \"-\",\n shipType: s.shipType || \"-\",\n stockingDate: s.stockingDate || \"-\",\n packagingDate: s.packagingDate || \"-\",\n shippingDate: s.shippingDate || \"-\",\n cutDate: s.cutDate || \"-\",\n }));\n\n const g = p.group;\n\n const group = {\n \"group.name\": g.name || \"-\",\n \"group.phone\": g.phone || \"-\",\n \"group.fax\": g.fax || \"-\",\n \"group.email\": g.email || \"-\",\n \"group.taxRate\": g.taxRate || \"-\",\n };\n\n const ga = p.group.groupAddress;\n\n const groupAddress = {\n \"groupAddress.postalCode\": ga.postalCode || \"-\",\n \"groupAddress.country\": ga.country || \"-\",\n \"groupAddress.state\": ga.state || \"-\",\n \"groupAddress.city\": ga.city || \"-\",\n \"groupAddress.street\": ga.street || \"-\",\n };\n\n const gb = p.group.bank;\n\n const groupBank = {\n \"groupBank.name\": gb.name || \"-\",\n \"groupBank.branchName\": gb.branchName || \"-\",\n \"groupBank.branchNumber\": gb.branchNumber || \"-\",\n \"groupBank.type\": gb.type || \"-\",\n \"groupBank.accountNumber\": gb.accountNumber || \"-\",\n };\n\n const account = {\n \"account.name\": p.accountName || \"-\",\n \"account.contactName\": p.contactName || \"-\",\n \"account.contactTitle\": p.contactTitle || \"-\",\n \"account.billingPostalCode\": p.account.billingPostalCode || \"-\",\n \"account.billingState\": p.account.billingState || \"-\",\n \"account.billingStreet\": p.account.billingStreet || \"-\",\n };\n\n const data = {\n ...project,\n schedules,\n ...group,\n ...groupAddress,\n ...groupBank,\n ...account,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { QuoteLine } from \"API\";\nimport { getQuote, quoteSummariesByQuoteId } from \"graphql/queries\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getQuoteData(quoteId: string) {\n const q = (\n await API.graphql({\n query: getQuote,\n variables: { id: quoteId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getQuote;\n\n const qss = (\n await API.graphql({\n query: quoteSummariesByQuoteId,\n variables: { input: { quoteId } },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.quoteSummariesByQuoteId.items;\n\n const quote = {\n \"quote.id\": q.id,\n \"quote.name\": q.name || \"-\",\n \"quote.quoteNumber\": q.quoteNumber || \"-\",\n \"quote.expiryDate\": q.expiryDate || \"-\",\n \"quote.description\": q.description || \"\",\n \"quote.destination\": q.destination || \"-\",\n \"quote.greeting\": q.greeting || \"\",\n \"quote.totalNumOfCases\": q.totalNumOfCases || \"-\",\n \"quote.totalNetWeight\": q.totalNetWeight || \"-\",\n \"quote.totalGrossWeight\": q.totalGrossWeight || \"-\",\n \"quote.totalM3\": q.totalM3 || \"-\",\n \"quote.revenue\": q.revenue || \"-\",\n \"quote.createdAt\": q.createdAt\n ? dateStringToJaDateTimeStr(q.createdAt)\n : \"-\",\n \"quote.updatedAt\": q.updatedAt\n ? dateStringToJaDateTimeStr(q.updatedAt)\n : \"-\",\n };\n\n const qls = q.quoteLines.items;\n\n const sortedQls = [\n ...qls\n .filter((ql: QuoteLine) => ql.showInQuoteSummary)\n .sort((a: QuoteLine, b: QuoteLine) => {\n return a.order > b.order ? 1 : -1;\n }),\n ...qls\n .filter((ql: QuoteLine) => !ql.showInQuoteSummary)\n .sort((a: QuoteLine, b: QuoteLine) => {\n return a.order > b.order ? 1 : -1;\n }),\n ];\n\n const quoteLines = sortedQls.map((ql: QuoteLine, idx: number) => ({\n number: idx + 1,\n index: ql.index || \"-\",\n name: ql.name || \"-\",\n packageTypeName: ql.packageTypeName || \"-\",\n pricingName: ql.pricingName || \"-\",\n quantity: ql.quantity || \"-\",\n amount: ql.amount || \"-\",\n outerLength: ql.outerLength || \"-\",\n outerWidth: ql.outerWidth || \"-\",\n outerHeight: ql.outerHeight || \"-\",\n productLength: ql.productLength || \"-\",\n productWidth: ql.productWidth || \"-\",\n productHeight: ql.productHeight || \"-\",\n unit: ql.unit || \"-\",\n unitNW: ql.unitNW || \"-\",\n NW: ql.NW || \"-\",\n unitPrice: ql.unitPrice || \"-\",\n taxType: ql.taxType || \"-\",\n taxRate: ql.taxRate || \"-\",\n subtotal: ql.subtotal || \"-\",\n total: ql.total || \"-\",\n notes: ql.notes || \"-\",\n estimatedUnitGrossWeight: ql.estimatedUnitGrossWeight || \"-\",\n estimatedGrossWeight: ql.estimatedGrossWeight || \"-\",\n estimatedUnitM3: ql.estimatedUnitM3?.toFixed(3) || \"-\",\n estimatedM3: ql.estimatedM3?.toFixed(3) || \"-\",\n estimatedUnitCost: ql.estimatedUnitCost || \"-\",\n estimatedCost: ql.estimatedCost || \"-\",\n estimatedProfit: ql.estimatedProfit || \"-\",\n createdAt: ql.createdAt ? dateStringToJaDateTimeStr(ql.createdAt) : \"-\",\n updatedAt: ql.updatedAt ? dateStringToJaDateTimeStr(ql.updatedAt) : \"-\",\n showInQuoteSummary: ql.showInQuoteSummary || false,\n }));\n\n const quoteSummaries = qss.map((qs: any, idx: number) => ({\n number: idx + 1,\n name: qs.name || \"-\",\n pricingName: qs.pricingName || \"-\",\n amount: qs.amount || 0,\n unit: qs.unit || \"-\",\n unitPrice: qs.unitPrice || 0,\n subtotal: qs.subtotal || 0,\n taxType: qs.taxType || \"-\",\n notes: qs.notes || \"\",\n }));\n\n const data = {\n ...quote,\n quoteLines,\n quoteSummaries,\n otherQuoteLines: quoteLines.filter((l) => !(l.showInQuoteSummary ?? false)),\n packQuoteLines: quoteLines.filter((l) => l.showInQuoteSummary ?? false),\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { getAllProduct } from \"graphql/product\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getServiceData(productId: string) {\n const p = (\n await API.graphql({\n query: getAllProduct,\n variables: { id: productId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getProduct;\n\n const service = {\n \"service.id\": p.id,\n \"service.productNumber\": p.productNumber || \"-\",\n \"service.name\": p.name || \"-\",\n \"service.quantity\": p.quantity || \"-\",\n \"service.stockingDate\": p.schedule.stockingDate || \"-\",\n \"service.shippingDate\": p.schedule.shippingDate || \"-\",\n \"service.createdAt\": p.createdAt\n ? dateStringToJaDateTimeStr(p.createdAt)\n : \"-\",\n \"service.updatedAt\": p.updatedAt\n ? dateStringToJaDateTimeStr(p.updatedAt)\n : \"-\",\n };\n\n const data = {\n ...service,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { InvoiceLine } from \"API\";\nimport { invoicesByProjectId } from \"graphql/queries\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getInvoiceData(projectId: string) {\n const i = (\n await API.graphql({\n query: invoicesByProjectId,\n variables: { projectId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.invoicesByProjectId.items[0];\n\n const invoice = {\n \"invoice.id\": i.id,\n \"invoice.name\": i.name || \"-\",\n \"invoice.invoiceNo\": i.invoiceNo || \"-\",\n \"invoice.issueDate\": i.issueDate || \"-\",\n \"invoice.billingDate\": i.billingDate || \"-\",\n \"invoice.recordingDate\": i.recordingDate || \"-\",\n \"invoice.billingType\": i.billingType || \"-\",\n \"invoice.fax\": i.fax || \"-\",\n \"invoice.phone\": i.phone || \"-\",\n \"invoice.taxed\": i.taxed || \"-\",\n \"invoice.untaxed\": i.untaxed || \"-\",\n \"invoice.subtotal\": i.subtotal || \"-\",\n \"invoice.taxTotal\": i.taxTotal || \"-\",\n \"invoice.taxableTotal\": i.taxableTotal || \"-\",\n \"invoice.total\": i.total || \"-\",\n \"invoice.description\": i.description || \"-\",\n \"invoice.createdAt\": i.createdAt || \"-\",\n \"invoice.updatedAt\": i.updatedAt || \"-\",\n \"invoice.accountName\": i.accountName || \"-\",\n \"invoice.contactName\": i.contactName || \"-\",\n \"invoice.contactTitle\": i.contactTitle || \"-\",\n \"invoice.accountPostalCode\": i.accountAddress.postalCode || \"-\",\n \"invoice.accountState\": i.accountAddress.state || \"-\",\n \"invoice.accountCity\": i.accountAddress.city || \"-\",\n \"invoice.accountStreet\": i.accountAddress.street || \"-\",\n \"invoice.groupName\": i.groupName || \"-\",\n \"invoice.groupPostalCode\": i.groupAddress.postalCode || \"-\",\n \"invoice.groupState\": i.groupAddress.state || \"-\",\n \"invoice.groupCity\": i.groupAddress.city || \"-\",\n \"invoice.groupStreet\": i.groupAddress.street || \"-\",\n \"invoice.bankName\": i.groupBank.name || \"-\",\n \"invoice.bankBranchName\": i.groupBank.branchName || \"-\",\n \"invoice.bankBranchNumber\": i.groupBank.branchNumber || \"-\",\n \"invoice.bankAccountType\": i.groupBank.type || \"-\",\n \"invoice.bankAccountNumber\": i.groupBank.accountNumber || \"-\",\n };\n\n const ils = i.invoiceLines.items;\n\n const invoiceLines = ils.map((il: InvoiceLine, idx: number) => ({\n number: idx + 1,\n order: il.order + 1 || \"-\",\n name: il.name || \"-\",\n shippingDate: il.shippingDate\n ? dateStringToJaDateTimeStr(il.shippingDate)\n : \"-\",\n pricingName: il.pricingName || \"-\",\n quantity: il.quantity || \"-\",\n m3: il.m3 || \"-\",\n minimumAmount: il.minimumAmount || \"-\",\n grossWeight: il.grossWeight || \"-\",\n amount: il.amount || \"-\",\n description: il.description || \"-\",\n unit: il.unit || \"-\",\n unitPrice: il.unitPrice || \"-\",\n taxRate: il.taxRate || \"-\",\n taxTotal: il.taxTotal || \"-\",\n taxType: il.taxType || \"-\",\n subtotal: il.subtotal || \"-\",\n total: il.total || \"-\",\n createdAt: il.createdAt ? dateStringToJaDateTimeStr(il.createdAt) : \"-\",\n updatedAt: il.updatedAt ? dateStringToJaDateTimeStr(il.updatedAt) : \"-\",\n }));\n\n const data = {\n invoice,\n invoiceLines,\n };\n\n return data;\n}\n","import { getProjectData } from \"./project\";\nimport { getQuoteData } from \"./quote\";\nimport { getServiceData } from \"./service\";\nimport { getInvoiceData } from \"./invoice\";\n\nimport type { ReportOptions, TemplateType } from \"utils/report/types\";\n\nexport async function getDocxData(\n templateType: TemplateType,\n projectId: string,\n options?: ReportOptions\n) {\n let promises = [];\n promises.push(getProjectData(projectId));\n if (templateType === \"QUOTE\" && options?.quoteId) {\n promises.push(getQuoteData(options.quoteId));\n }\n if (templateType === \"SERVICE\" && options?.productId) {\n promises.push(getServiceData(options.productId));\n }\n if (templateType === \"INVOICE\") {\n promises.push(getInvoiceData(projectId));\n }\n let [projectData, secondaryData] = await Promise.all(promises);\n return { ...projectData, ...secondaryData };\n}\n","import { API } from \"aws-amplify\";\nimport moment from \"moment\";\n\nimport { Schedule } from \"API\";\nimport { getProject } from \"graphql/queries\";\nimport { getProjectTypeName } from \"utils/project\";\n\nexport async function getProjectData(projectId: string) {\n const p = (\n await API.graphql({\n query: getProject,\n variables: { id: projectId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getProject;\n\n let isExternalShareEnabled = false;\n if (\n p.externalShareExpirationDate &&\n p.externalShareEnabled &&\n p.externalSharePassword &&\n p.externalShareUrl\n ) {\n const isExpired = moment()\n .startOf(\"day\")\n .isAfter(moment(p.externalShareExpirationDate));\n isExternalShareEnabled = !isExpired;\n }\n\n const project = {\n id: p.id,\n name: p.name || \"-\",\n type: getProjectTypeName(p.type),\n accountName: p.accountName || \"-\",\n contactName: p.contactName || \"-\",\n contactTitle: p.contactTitle || \"-\",\n reference: p.reference || \"-\",\n alert: p.alert || \"\",\n qrcode: \"qrcode\",\n userName: p.user.name || \"-\",\n managerName: p.managerName || \"-\",\n quoterName: p.quoterName || \"-\",\n operatorName: p.operatorName || \"-\",\n account: p.account.name || \"-\",\n externalShareUrl: isExternalShareEnabled ? p.externalShareUrl || \"-\" : \"-\",\n externalSharePassword: isExternalShareEnabled\n ? p.externalSharePassword || \"-\"\n : \"-\",\n externalShareEnabled: isExternalShareEnabled ? \"TRUE\" : \"FALSE\",\n externalShareExpirationDate: isExternalShareEnabled\n ? p.externalShareExpirationDate || \"-\"\n : \"-\",\n category: p.category?.name || \"-\",\n };\n\n const sortByCreatedDate = (a: Schedule, b: Schedule) => {\n return moment(a.createdAt).isBefore(b.createdAt) ? -1 : 1;\n };\n\n const ss = p.schedules.items;\n\n const schedules = ss\n .sort(sortByCreatedDate)\n .map((s: Schedule, idx: number) => ({\n number: idx + 1,\n id: s.id,\n name: s.name || \"-\",\n m3: s.m3 || \"-\",\n case: s.case || \"-\",\n shipType: s.shipType || \"-\",\n stockingDate: s.stockingDate || \"-\",\n packagingDate: s.packagingDate || \"-\",\n shippingDate: s.shippingDate || \"-\",\n cutDate: s.cutDate || \"-\",\n }));\n\n const g = p.group || {};\n\n const group = {\n name: g.name || \"-\",\n phone: g.phone || \"-\",\n fax: g.fax || \"-\",\n email: g.email || \"-\",\n taxRate: g.taxRate || \"-\",\n };\n\n const ga = p.group.groupAddress || {};\n\n const groupAddress = {\n postalCode: ga.postalCode || \"-\",\n country: ga.country || \"-\",\n state: ga.state || \"-\",\n city: ga.city || \"-\",\n street: ga.street || \"-\",\n };\n\n const gb = p.group.bank || {};\n\n const groupBank = {\n name: gb.name || \"-\",\n branchName: gb.branchName || \"-\",\n branchNumber: gb.branchNumber || \"-\",\n type: gb.type || \"-\",\n accountNumber: gb.accountNumber || \"-\",\n };\n\n const account = {\n name: p.accountName || \"-\",\n contactName: p.contactName || \"-\",\n contactTitle: p.contactTitle || \"-\",\n billingPostalCode: p.account.billingPostalCode || \"-\",\n billingState: p.account.billingState || \"-\",\n billingStreet: p.account.billingStreet || \"-\",\n };\n\n const data = {\n project,\n schedules,\n group,\n groupAddress,\n groupBank,\n account,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { QuoteLine } from \"API\";\nimport { getQuote, quoteSummariesByQuoteId } from \"graphql/queries\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getQuoteData(quoteId: string) {\n const q = (\n await API.graphql({\n query: getQuote,\n variables: { id: quoteId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getQuote;\n\n const qss = (\n await API.graphql({\n query: quoteSummariesByQuoteId,\n variables: { input: { quoteId } },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.quoteSummariesByQuoteId.items;\n\n const quote = {\n id: q.id,\n name: q.name || \"-\",\n quoteNumber: q.quoteNumber || \"-\",\n expiryDate: q.expiryDate || \"-\",\n description: q.description || \"\",\n destination: q.destination || \"-\",\n greeting: q.greeting || \"\",\n totalNumOfCases: q.totalNumOfCases || \"-\",\n totalNetWeight: q.totalNetWeight || \"-\",\n totalGrossWeight: q.totalGrossWeight || \"-\",\n totalM3: q.totalM3 || \"-\",\n revenue: q.revenue || \"-\",\n paymentMethod: q.paymentMethod || \"-\",\n createdAt: q.createdAt ? dateStringToJaDateTimeStr(q.createdAt) : \"-\",\n updatedAt: q.updatedAt ? dateStringToJaDateTimeStr(q.updatedAt) : \"-\",\n };\n\n const qls = q.quoteLines.items;\n\n const sortedQls = [\n ...qls\n .filter((ql: QuoteLine) => ql.showInQuoteSummary)\n .sort((a: QuoteLine, b: QuoteLine) => {\n return a.order > b.order ? 1 : -1;\n }),\n ...qls\n .filter((ql: QuoteLine) => !ql.showInQuoteSummary)\n .sort((a: QuoteLine, b: QuoteLine) => {\n return a.order > b.order ? 1 : -1;\n }),\n ];\n\n const quoteLines = sortedQls.map((ql: QuoteLine, idx: number) => ({\n number: idx + 1,\n index: ql.index || \"-\",\n name: ql.name || \"-\",\n packageTypeName: ql.packageTypeName || \"-\",\n pricingName: ql.pricingName || \"-\",\n quantity: ql.quantity || \"-\",\n amount: ql.amount || \"-\",\n outerLength: ql.outerLength || \"-\",\n outerWidth: ql.outerWidth || \"-\",\n outerHeight: ql.outerHeight || \"-\",\n productLength: ql.productLength || \"-\",\n productWidth: ql.productWidth || \"-\",\n productHeight: ql.productHeight || \"-\",\n unit: ql.unit || \"-\",\n unitNW: ql.unitNW || \"-\",\n NW: ql.NW || \"-\",\n unitPrice: ql.unitPrice || \"-\",\n taxType: ql.taxType || \"-\",\n taxRate: ql.taxRate || \"-\",\n subtotal: ql.subtotal || \"-\",\n total: ql.total || \"-\",\n notes: ql.notes || \"-\",\n estimatedUnitGrossWeight: ql.estimatedUnitGrossWeight || \"-\",\n estimatedGrossWeight: ql.estimatedGrossWeight || \"-\",\n estimatedUnitM3: ql.estimatedUnitM3?.toFixed(3) || \"-\",\n estimatedM3: ql.estimatedM3?.toFixed(3) || \"-\",\n estimatedUnitCost: ql.estimatedUnitCost || \"-\",\n estimatedCost: ql.estimatedCost || \"-\",\n estimatedProfit: ql.estimatedProfit || \"-\",\n estimatedWood: ql.estimatedWood || \"-\",\n estimatedLvl: ql.estimatedLvl || \"-\",\n estimatedPanel: ql.estimatedPanel || \"-\",\n estimatedInterior: ql.estimatedInterior || \"-\",\n estimatedExterior: ql.estimatedExterior || \"-\",\n estimatedCostM3: ql.estimatedCostM3 || \"-\",\n estimatedOther: ql.estimatedOther || \"-\",\n createdAt: ql.createdAt ? dateStringToJaDateTimeStr(ql.createdAt) : \"-\",\n updatedAt: ql.updatedAt ? dateStringToJaDateTimeStr(ql.updatedAt) : \"-\",\n showInQuoteSummary: ql.showInQuoteSummary || false,\n }));\n\n const quoteSummaries = qss.map((qs: any, idx: number) => ({\n number: idx + 1,\n name: qs.name || \"-\",\n pricingName: qs.pricingName || \"-\",\n amount: qs.amount || 0,\n unit: qs.unit || \"-\",\n unitPrice: qs.unitPrice || 0,\n subtotal: qs.subtotal || 0,\n taxType: qs.taxType || \"-\",\n notes: qs.notes || \"\",\n }));\n\n const data = {\n quote,\n quoteLines,\n quoteSummaries,\n otherQuoteLines: quoteLines.filter((l) => !(l.showInQuoteSummary ?? false)),\n packQuoteLines: quoteLines.filter((l) => l.showInQuoteSummary ?? false),\n };\n\n return data;\n}\n","import { Material } from \"API\";\n\nexport function getMaterial(ms: Material[], elements: any) {\n const materialElement = elements.filter((e: any) =>\n e.slug.includes(\"materialId\")\n )[0];\n const material = ms.filter((ms) => ms.id === materialElement.value)[0];\n if (!material) return \"-\";\n return material.name;\n}\n\nexport function getValue(elements: any, slug: string) {\n const filteredElements = elements.filter((e: any) => e.slug.includes(slug));\n if (filteredElements.length == 0) return null;\n const element = filteredElements[0];\n if (element.type === \"number\" && isNaN(Number(element.value))) {\n return 0;\n }\n return element.value;\n}\n","import { API } from \"aws-amplify\";\n\nimport { getMaterial, getValue } from \"../elements\";\n\nimport { Area, Case, DecorationComponent, Component, PackPhase } from \"API\";\nimport { materialsByGroupId } from \"graphql/queries\";\nimport { getAllProduct } from \"graphql/product\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\nimport { calcM3 } from \"utils/product\";\n\nexport async function getProductData(productId: string, groupId: string) {\n const M2_TO_CM2 = 10_000; //PAX-622 定数に修正\n const M3_TO_CM3 = 10_000;\n\n const p = (\n await API.graphql({\n query: getAllProduct,\n variables: { id: productId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getProduct;\n\n const as = p.areas.items;\n\n const ms = (\n await API.graphql({\n query: materialsByGroupId,\n variables: {\n groupId,\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.materialsByGroupId.items;\n\n const e = p.elements;\n\n const packPhases = !p.packPhases\n ? []\n : p.packPhases\n .filter((p: PackPhase) => !!p.showInKanBan)\n .map((p: PackPhase) => p.name)\n .join(\", \");\n\n if (!p.schedule) {\n throw new Error(\"スケジュールが設定されていないため、帳票を出力できません\");\n }\n\n const product = {\n id: p.id,\n productNumber: p.productNumber || \"-\",\n name: p.name || \"-\",\n packageTypeName: p.packageTypeName || \"-\",\n material: p.material || \"\",\n destination: p.destination || \"-\",\n stamp: p.stamp || \"\",\n description: p.description || \"-\",\n quantity: p.quantity || \"-\",\n productLength: getValue(e, \"productLength\") || \"-\",\n productWidth: getValue(e, \"productWidth\") || \"-\",\n productHeight: getValue(e, \"productHeight\") || \"-\",\n innerLength: getValue(e, \"innerLength\") || \"-\",\n innerWidth: getValue(e, \"innerWidth\") || \"-\",\n innerHeight: getValue(e, \"innerHeight\") || \"-\",\n outerLength: getValue(e, \"outerLength\") || \"-\",\n outerWidth: getValue(e, \"outerWidth\") || \"-\",\n outerHeight: getValue(e, \"outerHeight\") || \"-\",\n m3:\n calcM3(\n isNaN(getValue(e, \"outerLength\")) ? 0 : getValue(e, \"outerLength\"),\n isNaN(getValue(e, \"outerWidth\")) ? 0 : getValue(e, \"outerWidth\"),\n isNaN(getValue(e, \"outerHeight\")) ? 0 : getValue(e, \"outerHeight\")\n ) || \"-\",\n NW: getValue(e, \"NW\") || \"-\",\n clearanceLengthLeft: getValue(e, \"clearanceLengthLeft\") || \"-\",\n clearanceLengthRight: getValue(e, \"clearanceLengthRight\") || \"-\",\n clearanceWidthLeft: getValue(e, \"clearanceWidthLeft\") || \"-\",\n clearanceWidthRight: getValue(e, \"clearanceWidthRight\") || \"-\",\n clearanceHeightTop: getValue(e, \"clearanceHeightTop\") || \"-\",\n clearanceHeightTopUnderBeam:\n getValue(e, \"clearanceHeightTopUnderBeam\") || \"-\",\n clearanceHeightBottom: getValue(e, \"clearanceHeightBottom\") || \"-\",\n verticalClearance: getValue(e, \"verticalClearance\") || \"-\",\n grossWeight: p.grossWeight || \"-\",\n panelM2: Math.round(p.panelM2 * M2_TO_CM2) / M2_TO_CM2 || \"-\", //PAX-622 10倍になっていたので修正\n woodM3: Math.round(p.woodM3 * M3_TO_CM3) / M3_TO_CM3 || \"-\",\n note: p.note || \"-\",\n tareWeight: getValue(e, \"tareWeight\") || p.tareWeight || \"-\",\n stockingDate: p.schedule.stockingDate || \"-\",\n packagingDate: p.schedule.packagingDate || \"-\",\n shippingDate: p.schedule.shippingDate || \"-\",\n shipType: p.schedule.shipType || \"-\",\n packPhases,\n createdAt: p.createdAt ? dateStringToJaDateTimeStr(p.createdAt) : \"-\",\n updatedAt: p.updatedAt ? dateStringToJaDateTimeStr(p.updatedAt) : \"-\",\n };\n\n const components = as\n .sort((a: any, b: any) => a.order - b.order)\n .reduce((r: any, area: Area) => {\n const cs = area.components?.items\n .sort((a: any, b: any) => a.order - b.order)\n .map((c: Component | null) => {\n return {\n areaName: area.name,\n name: c?.name,\n order: c?.order,\n material: getMaterial(ms, c?.elements) || \"-\",\n length: getValue(c?.elements, \"length\"),\n width: getValue(c?.elements, \"width\"),\n height: getValue(c?.elements, \"height\"),\n quantity: getValue(c?.elements, \"quantity\"),\n m2: getValue(c?.elements, \"m2\"),\n m3: getValue(c?.elements, \"m3\"),\n lengthNominal: getValue(c?.elements, \"lengthNominal\"),\n widthNominal: getValue(c?.elements, \"widthNominal\"),\n heightNominal: getValue(c?.elements, \"heightNominal\"),\n notes: getValue(c?.elements, \"notes\") || \"\",\n createdAt: c?.createdAt\n ? dateStringToJaDateTimeStr(c?.createdAt)\n : \"\",\n updatedAt: c?.updatedAt\n ? dateStringToJaDateTimeStr(c?.updatedAt)\n : \"\",\n };\n });\n return r.concat(cs);\n }, []);\n\n const is = p.decorations.items.filter(\n (d: DecorationComponent) => d.type === \"INTERIOR\"\n );\n const es = p.decorations.items.filter(\n (d: DecorationComponent) => d.type === \"EXTERIOR\"\n );\n\n const interiors = is.map((i: DecorationComponent) => ({\n name: i.name,\n order: i.order,\n material: getMaterial(ms, i.elements),\n quantity: getValue(i.elements, \"quantity\"),\n createdAt: i.createdAt ? dateStringToJaDateTimeStr(i.createdAt) : \"\",\n updatedAt: i.updatedAt ? dateStringToJaDateTimeStr(i.updatedAt) : \"\",\n }));\n\n const exteriors = es.map((e: DecorationComponent) => ({\n name: e.name,\n order: e.order,\n material: getMaterial(ms, e.elements),\n quantity: getValue(e.elements, \"quantity\"),\n createdAt: e.createdAt ? dateStringToJaDateTimeStr(e.createdAt) : \"\",\n updatedAt: e.updatedAt ? dateStringToJaDateTimeStr(e.updatedAt) : \"\",\n }));\n\n const cs = p.cases;\n\n const cases = cs.map((c: Case) => ({\n name: c.name || `${p.name}-${c.order}`,\n order: c.order,\n outerLength: c.outerLength,\n outerWidth: c.outerWidth,\n outerHeight: c.outerHeight,\n netWeight: c.netWeight,\n grossWeight: c.grossWeight,\n note: c.note,\n packPhases,\n }));\n\n const data = {\n product,\n interiors,\n exteriors,\n cases,\n components,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { getAllProduct } from \"graphql/product\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getServiceData(productId: string) {\n const p = (\n await API.graphql({\n query: getAllProduct,\n variables: { id: productId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getProduct;\n\n const service = {\n id: p.id,\n productNumber: p.productNumber || \"-\",\n name: p.name || \"-\",\n quantity: p.quantity || \"-\",\n stockingDate: p.schedule.stockingDate || \"-\",\n shippingDate: p.schedule.shippingDate || \"-\",\n scheduleName: p.schedule.name || \"-\",\n createdAt: p.createdAt ? dateStringToJaDateTimeStr(p.createdAt) : \"-\",\n updatedAt: p.updatedAt ? dateStringToJaDateTimeStr(p.updatedAt) : \"-\",\n };\n\n const data = {\n service,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { productSummariesByProjectId } from \"graphql/queries\";\nimport {\n makeProductSummaryId,\n ProductSummariesFilter,\n sortSummariesBySummaryOrder,\n} from \"utils/productSummary\";\n\nexport async function getProductSummaryData(\n projectId: string,\n filter: ProductSummariesFilter | undefined,\n summaryOrderMapping: { [key: string]: number } | undefined = undefined\n) {\n const p = (\n await API.graphql({\n query: productSummariesByProjectId,\n variables: {\n input: { projectId, filter },\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.productSummariesByProjectId.items;\n\n if (summaryOrderMapping === undefined) {\n p.sort(\n // ここのsortの部分を持ってきた順番の物を使うようにする\n (a: any, b: any) => {\n if (a.order !== b.order) {\n return a.order - b.order;\n }\n\n return 0;\n }\n );\n } else {\n p.map((productSummary: any) => {\n const productIdOrderPair = makeProductSummaryId(productSummary);\n productSummary.number = summaryOrderMapping[productIdOrderPair];\n productSummary.order = summaryOrderMapping[productIdOrderPair];\n return productSummary;\n });\n sortSummariesBySummaryOrder(p);\n }\n\n const summaryLines = p.map((s: any, idx: number) => {\n return {\n ...s,\n // numberは表示順の通し番号にしたいのでここで上書きする(そのままだとデフォルトの9999とかが入っちゃう)\n number: idx + 1,\n phaseName: s.phaseName === \"complete\" ? \"完了\" : s.phaseName,\n };\n });\n\n const summary = p.reduce(\n (r: any, s: any) => {\n r.totalQuantity += s.quantity || 0;\n r.totalNetWeight += s.netWeight || 0;\n r.totalGrossWeight += s.grossWeight || 0;\n r.totalM3 += s.m3 || 0;\n\n return r;\n },\n {\n totalQuantity: 0,\n totalNetWeight: 0,\n totalGrossWeight: 0,\n totalM3: 0,\n }\n );\n\n const data = {\n summary,\n summaryLines,\n };\n\n return data;\n}\n","import { API } from \"aws-amplify\";\n\nimport { InvoiceLine } from \"API\";\nimport { getInvoice } from \"graphql/queries\";\nimport { dateStringToJaDateTimeStr } from \"utils/date\";\n\nexport async function getInvoiceData(invoiceId: string, projectId: string) {\n const i = (\n await API.graphql({\n query: getInvoice,\n variables: { id: invoiceId },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getInvoice;\n\n const invoice = {\n id: i.id,\n name: i.name || \"-\",\n invoiceNo: i.invoiceNo || \"-\",\n issueDate: i.issueDate || \"-\",\n billingDate: i.billingDate || \"-\",\n recordingDate: i.recordingDate || \"-\",\n billingType: i.billingType || \"-\",\n fax: i.fax || \"-\",\n phone: i.phone || \"-\",\n taxableSubtotal: i.taxableSubtotal || \"-\",\n nonTaxableTotal: i.nonTaxableTotal || \"-\",\n subtotal: i.subtotal || \"-\",\n taxTotal: i.taxTotal || \"-\",\n taxableTotal: i.taxableTotal || \"-\",\n total: i.total || \"-\",\n description: i.description || \"-\",\n createdAt: i.createdAt || \"-\",\n updatedAt: i.updatedAt || \"-\",\n accountName: i.accountName || \"-\",\n accountSite: i.accountSite || \"\",\n contactName: i.contactName || \"-\",\n contactFirstName: i.contactFirstName || \"\",\n contactLastName: i.contactLastName || i.contactName || \"-\",\n contactTitle: i.contactTitle || \"\",\n contactDepartment: i.contactDepartment || \"\",\n accountPostalCode: i.accountAddress?.postalCode || \"-\",\n accountState: i.accountAddress?.state || \"-\",\n accountCity: i.accountAddress?.city || \"-\",\n accountStreet: i.accountAddress?.street || \"-\",\n groupName: i.groupName || \"-\",\n groupPostalCode: i.groupAddress?.postalCode || \"-\",\n groupState: i.groupAddress?.state || \"-\",\n groupCity: i.groupAddress?.city || \"-\",\n groupStreet: i.groupAddress?.street || \"-\",\n bankName: i.groupBank?.name || \"-\",\n bankBranchName: i.groupBank?.branchName || \"-\",\n bankBranchNumber: i.groupBank?.branchNumber || \"-\",\n bankAccountType: i.groupBank?.type || \"-\",\n bankAccountNumber: i.groupBank?.accountNumber || \"-\",\n };\n\n const ils = i.invoiceLines.items;\n\n const invoiceLines = ils\n .sort((a: InvoiceLine, b: InvoiceLine) => a.order - b.order)\n .map((il: InvoiceLine, idx: number) => ({\n number: idx + 1,\n order: il.order === 0 ? 0 : il.order || \"-\",\n name: il.name || \"-\",\n shippingDate: il.shippingDate\n ? dateStringToJaDateTimeStr(il.shippingDate)\n : \"-\",\n pricingName: il.pricingName || \"-\",\n quantity: il.quantity || \"-\",\n m3: il.m3 || \"-\",\n minimumAmount: il.minimumAmount || \"-\",\n grossWeight: il.grossWeight || \"-\",\n salesType: il.salesType || \"-\",\n amount: il.amount || \"-\",\n description: il.description || \"-\",\n unit: il.unit || \"-\",\n unitPrice: il.unitPrice || \"-\",\n taxRate: il.taxRate || \"-\",\n taxTotal: il.taxTotal || \"-\",\n taxType: il.taxType || \"-\",\n subtotal: il.subtotal || \"-\",\n total: il.total || \"-\",\n createdAt: il.createdAt ? dateStringToJaDateTimeStr(il.createdAt) : \"-\",\n updatedAt: il.updatedAt ? dateStringToJaDateTimeStr(il.updatedAt) : \"-\",\n }));\n\n const data = {\n invoice,\n invoiceLines,\n };\n\n return data;\n}\n","import { getProjectData } from \"./project\";\nimport { getQuoteData } from \"./quote\";\nimport { getProductData } from \"./product\";\nimport { getServiceData } from \"./service\";\nimport { getProductSummaryData } from \"./productSummary\";\nimport { getInvoiceData } from \"./invoice\";\n\nimport type { ReportOptions, TemplateType } from \"utils/report/types\";\n\nexport async function getXlsxData(\n templateType: TemplateType,\n projectId: string,\n groupId: string,\n options?: ReportOptions\n) {\n const promises = [];\n promises.push(getProjectData(projectId));\n if (templateType === \"QUOTE\" && options?.quoteId) {\n promises.push(getQuoteData(options.quoteId));\n }\n if (templateType === \"SERVICE\") {\n promises.push(getServiceData(options?.productId as string));\n }\n if (templateType === \"PRODUCT\" || templateType === \"CASE\") {\n promises.push(getProductData(options?.productId as string, groupId));\n }\n if (templateType === \"PRODUCTS\") {\n promises.push(\n getProductSummaryData(\n projectId as string,\n options?.productSummariesFilter,\n options?.summaryOrderMapping\n )\n );\n }\n if (templateType === \"INVOICE\") {\n promises.push(getInvoiceData(options?.invoiceId as string, projectId));\n }\n const [projectData, secondaryData] = await Promise.all(promises);\n return { ...projectData, ...secondaryData };\n}\n","import { getDocxData } from \"./docx\";\nimport { getXlsxData } from \"./xlsx\";\n\nimport type { ReportOptions, TemplateType } from \"utils/report/types\";\n\nexport async function getData(\n type: string,\n templateType: TemplateType,\n projectId: string,\n groupId: string,\n options?: ReportOptions\n) {\n if (type === \"DOCUMENT\") return getDocxData(templateType, projectId, options);\n if (type === \"SPREADSHEET\")\n return getXlsxData(templateType, projectId, groupId, options);\n}\n","import { Storage } from \"aws-amplify\";\nimport moment from \"moment\";\nimport JSZip from \"jszip\";\n\nimport { renderDocument } from \"./render/docx\";\nimport { renderSpreadsheet } from \"./render/xlsx\";\nimport type { ReportOptions, ReportsOptions, TemplateType } from \"./types\";\nimport { getData } from \"./data\";\n\nimport { downloadFile, convertDataUrl } from \"utils/files\";\nimport { GroupReport, Report } from \"API\";\nimport { isDownloadedS3ImageObject } from \"utils/image\";\n\nexport * from \"./types\";\n\nexport async function download(\n report: Report,\n projectId: string,\n groupId: string,\n options?: ReportOptions\n) {\n try {\n const type = report.type;\n const dataType = report.data;\n\n const [data, file] = await Promise.all([\n getData(type, dataType as TemplateType, projectId, groupId, options),\n Storage.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\",\n }) as unknown,\n ]);\n\n if (!isDownloadedS3ImageObject(file)) {\n throw Error(\"帳票が見つかりません\");\n }\n const fileName = `${report.name}_${moment().format(\"YYYYMMDDHHmmss\")}`;\n\n if (type === \"DOCUMENT\") {\n const blob = await renderDocument(file.Body as Blob, data);\n await downloadFile(fileName, blob);\n }\n if (type === \"SPREADSHEET\") {\n const renderData = await renderSpreadsheet(\n file.Body as Blob,\n data,\n report\n );\n await downloadFile(\n replaceFileName(renderData.customName || fileName),\n renderData.base64,\n \"base64\"\n );\n }\n } catch (e: any) {\n const msg = e.message + \": \" + (e.response?.data?.message || \"\");\n throw Error(msg);\n }\n}\n\nexport async function downloadMultipleReports(\n reports: Report[],\n projectId: string,\n groupId: string,\n options?: ReportsOptions\n) {\n try {\n const products = options?.products;\n if (!products) return;\n\n const dataPromises: Promise[] = [];\n const filePromises: Promise[] = [];\n const fileNames: string[] = [];\n const reportList: Report[] = [];\n const dataTypes: string[] = [];\n\n products.forEach((product) => {\n const option = { productId: product.id };\n reports.forEach((report) => {\n const type = report.type;\n const dataType = report.data;\n dataPromises.push(\n getData(type, dataType as TemplateType, projectId, groupId, option)\n );\n filePromises.push(\n Storage.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\",\n })\n );\n if (type === \"DOCUMENT\") {\n fileNames.push(\n `${product.name}_${report.name}_${moment().format(\n \"YYYYMMDDHHmmss\"\n )}.docx`\n );\n }\n if (type === \"SPREADSHEET\") {\n fileNames.push(\n `${product.name}_${report.name}_${moment().format(\n \"YYYYMMDDHHmmss\"\n )}.xlsx`\n );\n }\n reportList.push(report);\n dataTypes.push(dataType);\n });\n });\n\n const data = await Promise.all(dataPromises);\n const files = await Promise.all(filePromises);\n\n const blobsBase64sPromises: Promise[] = [];\n\n data.forEach((d, idx) => {\n if (reportList[idx].type === \"DOCUMENT\") {\n blobsBase64sPromises.push(renderDocument(files[idx].Body as Blob, d));\n }\n if (reportList[idx].type === \"SPREADSHEET\") {\n blobsBase64sPromises.push(\n renderSpreadsheet(files[idx].Body as Blob, d, reportList[idx])\n );\n }\n });\n\n const blobsBase64s = await Promise.all(blobsBase64sPromises);\n const blobsPromises = blobsBase64s.map((b, idx) => {\n if (reportList[idx].type === \"SPREADSHEET\") {\n return convertDataUrl(b.base64 as string);\n }\n return b;\n });\n\n const blobs = await Promise.all(blobsPromises);\n const zip = new JSZip();\n fileNames.forEach((f, idx) => {\n zip.file(f, blobs[idx] as Blob);\n });\n const zipBlob = await zip.generateAsync({ type: \"blob\" });\n await downloadFile(`pax_${moment().format(\"YYYYMMDDHHmmss\")}`, zipBlob);\n } catch (e: any) {\n throw Error(e);\n }\n}\n\nexport async function downloadTemplate(report: Report | GroupReport) {\n try {\n const file = (await Storage.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\",\n })) as unknown;\n\n if (!isDownloadedS3ImageObject(file)) {\n throw Error(\"帳票が見つかりません\");\n }\n\n const fileName = `${report.name}_template_${moment().format(\n \"YYYYMMDDHHmmss\"\n )}`;\n\n await downloadFile(fileName, file.Body as Blob);\n } catch (e: any) {\n throw Error(e);\n }\n}\n\n/** ファイル名で使用できない文字を置換する */\nexport const replaceFileName = (name: string) => {\n return name.replace(/[\\\\./:*?\"<>|]/g, \"\");\n};\n","export type Status =\n | \"QUOTE\"\n | \"ORDER\"\n | \"STOCK\"\n | \"PACK\"\n | \"SHIP\"\n | \"INVOICE\"\n | \"COMPLETE\"\n | \"CANCEL\"\n | string\n | null\n | undefined;\n\nexport function getStatus(text: string) {\n if (text.match(/見積/)) {\n return \"QUOTE\";\n } else if (text.match(/受注/)) {\n return \"ORDER\";\n } else if (text.match(/入荷/)) {\n return \"STOCK\";\n } else if (text.match(/梱包/)) {\n return \"PACK\";\n } else if (text.match(/出荷/)) {\n return \"SHIP\";\n } else if (text.match(/請求/)) {\n return \"INVOICE\";\n } else if (text.match(/完了/)) {\n return \"COMPLETE\";\n } else if (text.match(/失注/)) {\n return \"CANCEL\";\n } else {\n return \"UNKNOWN\";\n }\n}\n\nexport function getStatusIndex(status: Status): number {\n switch (status) {\n case \"QUOTE\":\n return 0;\n case \"ORDER\":\n return 1;\n case \"STOCK\":\n return 2;\n case \"PACK\":\n return 3;\n case \"SHIP\":\n return 4;\n case \"INVOICE\":\n return 5;\n case \"COMPLETE\":\n return 6;\n case \"CANCEL\":\n return 7;\n default:\n return 8;\n }\n}\n\nexport function getStatusColor(status: Status) {\n switch (status) {\n case \"QUOTE\":\n return \"#777\";\n case \"ORDER\":\n return \"#3e6eb3\";\n case \"STOCK\":\n return \"#29BF12\";\n case \"PACK\":\n return \"#3e6eb3\";\n case \"SHIP\":\n return \"#d18643\";\n case \"CUT\":\n return \"#bd3993\";\n case \"INVOICE\":\n return \"#bd3993\";\n case \"CANCEL\":\n return \"#e53935\";\n default:\n return \"#000\";\n }\n}\n\nexport function getStatusInitial(status: Status) {\n switch (status) {\n case \"QUOTE\":\n return \"見\";\n case \"ORDER\":\n return \"受\";\n case \"STOCK\":\n return \"入\";\n case \"PACK\":\n return \"梱\";\n case \"SHIP\":\n return \"出\";\n case \"CUT\":\n return \"C\";\n case \"INVOICE\":\n return \"請\";\n case \"COMPLETE\":\n return \"完\";\n case \"CANCEL\":\n return \"失\";\n default:\n return \"?\";\n }\n}\n\nexport function getStatusText(status: Status) {\n switch (status) {\n case \"QUOTE\":\n return \"見積\";\n case \"ORDER\":\n return \"受注\";\n case \"STOCK\":\n return \"入荷\";\n case \"PACK\":\n return \"梱包\";\n case \"SHIP\":\n return \"出荷\";\n case \"CUT\":\n return \"CUT\";\n case \"INVOICE\":\n return \"請求\";\n case \"COMPLETE\":\n return \"完了\";\n case \"CANCEL\":\n return \"失注\";\n default:\n return \"?\";\n }\n}\n\nexport function getStatusFromTabIndex(index: number) {\n switch (index) {\n case 1:\n return \"STOCK\";\n case 2:\n return \"PACK\";\n case 3:\n return \"SHIP\";\n default:\n return \"DETAIL\";\n }\n}\n\nexport function getTabIndex(status: Status) {\n switch (status) {\n case \"QUOTE\":\n return 0;\n case \"ORDER\":\n return 0;\n case \"STOCK\":\n return 1;\n case \"PACK\":\n return 2;\n case \"SHIP\":\n return 3;\n case \"INVOICE\":\n return 0;\n default:\n return 0;\n }\n}\n\nexport const status = [\n { value: \"QUOTE\", label: \"見積\" },\n { value: \"ORDER\", label: \"受注\" },\n { value: \"STOCK\", label: \"入荷\" },\n { value: \"PACK\", label: \"梱包\" },\n { value: \"SHIP\", label: \"出荷\" },\n { value: \"INVOICE\", label: \"請求\" },\n { value: \"COMPLETE\", label: \"完了\" },\n { value: \"CANCEL\", label: \"失注\" },\n];\n","\"use strict\";\n(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[3171],{\n\n/***/ 17696:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Z\": function() { return /* binding */ AccessGate; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69417);\n/* harmony import */ var contexts_auth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17297);\n\n\n\nfunction AccessGate() {\n const { logout } = (0,contexts_auth__WEBPACK_IMPORTED_MODULE_1__/* .useAuth */ .a)();\n return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", {\n role: \"alert\",\n className: \"w-full mt-24 flex flex-col justify-center items-center\",\n children: [\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"h1\", {\n className: \"text-3xl font-bold mb-3\",\n children: \"ライセンスエラー\"\n }),\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"p\", {\n className: \"mb-4\",\n children: \"システム管理者に連絡して下さい\"\n }),\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material__WEBPACK_IMPORTED_MODULE_2__/* [\"default\"] */ .Z, {\n onClick: logout,\n variant: \"outlined\",\n children: \"ログアウト\"\n })\n ]\n });\n}\n\n\n/***/ }),\n\n/***/ 32623:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"K\": function() { return /* binding */ UsersProvider; },\n/* harmony export */ \"U\": function() { return /* binding */ useUsers; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67294);\n/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17297);\n/* harmony import */ var _tenant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27349);\n/* harmony import */ var hooks_datalist__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32380);\n/* harmony import */ var utils_license__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10798);\n\n\n\n\n\n\nconst UsersContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({\n users: [],\n managerUsers: [],\n mobileUsers: [],\n supportUsers: [],\n unlincensedUsers: [],\n isLicenseValid: false,\n isLicenseValidForMobile: false,\n isLicenseValidForManager: false,\n isLicenseValidForMe: true,\n myLicense: utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MANAGER */ .y$.MANAGER,\n canRemoveAdmin: false,\n loading: false,\n invite: ()=>Promise.resolve(),\n update: ()=>Promise.resolve(),\n refetch: ()=>Promise.resolve(),\n set: ()=>{}\n});\nconst UsersProvider = (param)=>{\n let { children } = param;\n const { user } = (0,_auth__WEBPACK_IMPORTED_MODULE_2__/* .useAuth */ .a)();\n const { tenant } = (0,_tenant__WEBPACK_IMPORTED_MODULE_3__/* .useTenant */ .S)();\n const { data , loading , create , update , refetch , set , nextToken , appendNext } = (0,hooks_datalist__WEBPACK_IMPORTED_MODULE_4__/* [\"default\"] */ .Z)({\n query: (user === null || user === void 0 ? void 0 : user.disableMultiTenant) ? \"legacyUsersByTenantId\" : \"usersByTenantId\",\n variables: {\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n }\n });\n // FIXME: 全件取得するようにしている、ページネーションを実装する必要がある\n // appendNextの実行状態を管理しないとデータが重複する\n const [fetchingNext, setFetchingNext] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n // nextTokenがnullになるまでappendNextを実行する\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (nextToken && !fetchingNext) {\n // 既にフェッチ中でなければappendNextを呼び出す\n setFetchingNext(true); // フェッチ中の状態をtrueに設定\n appendNext().finally(()=>setFetchingNext(false)); // フェッチが終わったらフェッチ中の状態をfalseに設定\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n nextToken\n ]);\n const users = data.map((d)=>{\n var ref, ref1;\n return {\n ...d.user,\n ...d,\n usersTenantsId: d.id,\n groups: (ref = d.user) === null || ref === void 0 ? void 0 : ref.groups,\n id: (ref1 = d.user) === null || ref1 === void 0 ? void 0 : ref1.id\n };\n });\n const managerUsers = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MANAGER */ .y$.MANAGER);\n const mobileUsers = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MOBILE */ .y$.MOBILE);\n const unlincensedUsers = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.NONE */ .y$.NONE || !user.license);\n const supportUsers = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.SUPPORT */ .y$.SUPPORT);\n const canRemoveAdmin = users.filter((user)=>user.isAdmin && user.active && !!user.license && user.license !== utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.SUPPORT */ .y$.SUPPORT).length > 1;\n const isLicenseValidForManager = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MANAGER */ .y$.MANAGER).length <= ((tenant === null || tenant === void 0 ? void 0 : tenant.maxManagerLicense) || 0);\n const isLicenseValidForMobile = users.filter((user)=>user.license === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MOBILE */ .y$.MOBILE).length <= ((tenant === null || tenant === void 0 ? void 0 : tenant.maxMobileLicense) || 0);\n const isLicenseValid = isLicenseValidForManager && isLicenseValidForMobile;\n const me = users.find((usr)=>{\n return usr.id === (user === null || user === void 0 ? void 0 : user.id);\n });\n const myLicense = (me === null || me === void 0 ? void 0 : me.license) || utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.NONE */ .y$.NONE;\n const isLicenseValidForMe = me && tenant ? myLicense === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.MANAGER */ .y$.MANAGER && isLicenseValidForManager && me.active || myLicense === utils_license__WEBPACK_IMPORTED_MODULE_5__/* .LicenseEnum.SUPPORT */ .y$.SUPPORT && me.active : true;\n const inviteMember = async (input)=>{\n await create(\"inviteUser\", {\n ...input,\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId,\n multiTenant: true\n });\n };\n const updateMember = async (input)=>{\n await update(\"updateUsersTenants\", {\n ...input\n });\n };\n const values = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n return {\n users,\n invite: inviteMember,\n update: updateMember,\n loading,\n refetch: ()=>{\n return refetch({\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n });\n },\n set,\n managerUsers,\n mobileUsers,\n supportUsers,\n unlincensedUsers,\n isLicenseValid,\n isLicenseValidForMobile,\n isLicenseValidForManager,\n isLicenseValidForMe,\n myLicense,\n canRemoveAdmin\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n inviteMember,\n loading,\n set,\n updateMember,\n users,\n managerUsers,\n mobileUsers,\n supportUsers,\n unlincensedUsers,\n isLicenseValid,\n isLicenseValidForMobile,\n isLicenseValidForManager,\n isLicenseValidForMe,\n myLicense,\n canRemoveAdmin\n ]);\n return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(UsersContext.Provider, {\n value: values,\n children: children\n });\n};\nconst useUsers = ()=>{\n const usersContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(UsersContext);\n if (usersContext === undefined) {\n throw new Error(\"useUsers must be within UsersProvider\");\n }\n return usersContext;\n};\n\n\n/***/ }),\n\n/***/ 41392:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"R\": function() { return /* binding */ defaultCookieOptions; },\n/* harmony export */ \"u\": function() { return /* binding */ parseCookieBooleanValue; }\n/* harmony export */ });\nconst defaultCookieOptions = {\n sameSite: \"lax\",\n secure: true,\n maxAge: 60 * 60 * 24 * 365,\n path: \"/\"\n};\nfunction parseCookieBooleanValue(value) {\n return value === \"true\";\n}\n\n\n/***/ }),\n\n/***/ 46870:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DB\": function() { return /* binding */ dateStringToJaDateTimeStr; },\n/* harmony export */ \"LY\": function() { return /* binding */ pickLatestDateString; },\n/* harmony export */ \"PI\": function() { return /* binding */ dateStringToJaDateStr; }\n/* harmony export */ });\n// タイムゾーン付きの日付文字列を日本ロケールの日付文字列(フォーマットは2006年01月02日)に変換する\nconst dateStringToJaDateStr = (dateString)=>{\n // Date型に変換\n const date = new Date(dateString);\n // 変換に失敗したらエラーを返す\n if (isNaN(date.getTime())) {\n return new Error(\"Invalid Date\");\n }\n // option指定\n const options = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\"\n };\n // 日本ロケールの日付文字列に変換\n const jaDateStr = date.toLocaleDateString(\"ja-JP\", options);\n // \"/\"を\"年\"と\"月\"に置換\n return jaDateStr.replace(\"/\", \"年\").replace(\"/\", \"月\") + \"日\";\n};\n// タイムゾーン付きの日付文字列を日本ロケールの日付時刻文字列(フォーマットは2006年01月02日 15時04分05秒)に変換する\nconst dateStringToJaDateTimeStr = (dateString)=>{\n // Date型に変換\n const date = new Date(dateString);\n // 変換に失敗したらエラーを返す\n if (isNaN(date.getTime())) {\n return null;\n }\n // option指定\n const options = {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour12: false,\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n };\n // 日本ロケールの日付文字列に変換\n const jaDateTimeStr = date.toLocaleDateString(\"ja-JP\", options);\n // \"/\"を\"年\"と\"月\"に置換\n return jaDateTimeStr.replace(\"/\", \"年\").replace(\"/\", \"月\").replace(\" \", \"日 \").replace(\":\", \"時\").replace(\":\", \"分\") + \"秒\";\n};\n/**\n * date1とdate2を比較して、新しい方の日付文字列を返す\n * @param date1 比較対象1(YYYY/MM/DD HH:mm:ss)\n * @param date2 比較対象2(YYYY/MM/DD HH:mm:ss)\n */ const pickLatestDateString = (date1, date2)=>{\n // どちらもundefinedか空文字だったら空文字を返す\n if (!date1 && !date2) return \"\";\n // どちらかがundefined or 空文字だったらもう片方を返す\n if (!date1) return date2 !== null && date2 !== void 0 ? date2 : \"\";\n if (!date2) return date1 !== null && date1 !== void 0 ? date1 : \"\";\n // Dateにして比較して新しい方を返す\n return new Date(date1) > new Date(date2) ? date1 : date2;\n};\n\n\n/***/ }),\n\n/***/ 10798:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"vK\": function() { return /* binding */ getLicenseOptions; },\n/* harmony export */ \"y$\": function() { return /* binding */ LicenseEnum; }\n/* harmony export */ });\n/* unused harmony export getLicenseName */\nvar LicenseEnum;\n(function(LicenseEnum) {\n LicenseEnum[\"MANAGER\"] = \"MANAGER\";\n LicenseEnum[\"MOBILE\"] = \"MOBILE\";\n LicenseEnum[\"SUPPORT\"] = \"SUPPORT\";\n LicenseEnum[\"NONE\"] = \"NONE\";\n})(LicenseEnum || (LicenseEnum = {}));\nfunction getLicenseName(license) {\n switch(license){\n case LicenseEnum.MANAGER:\n return \"標準\";\n case LicenseEnum.MOBILE:\n return \"モバイル\";\n case LicenseEnum.SUPPORT:\n return \"サポート\";\n case LicenseEnum.NONE:\n return \"無効\";\n default:\n return \"-\";\n }\n}\nfunction getLicenseOptions() {\n return [\n {\n value: LicenseEnum.NONE,\n label: getLicenseName(LicenseEnum.NONE)\n },\n {\n value: LicenseEnum.MANAGER,\n label: getLicenseName(LicenseEnum.MANAGER)\n },\n {\n value: LicenseEnum.MOBILE,\n label: getLicenseName(LicenseEnum.MOBILE)\n }\n ];\n}\n\n\n/***/ }),\n\n/***/ 73228:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"LR\": function() { return /* binding */ download; },\n \"k5\": function() { return /* binding */ downloadMultipleReports; },\n \"fQ\": function() { return /* binding */ downloadTemplate; },\n \"Lz\": function() { return /* binding */ replaceFileName; }\n});\n\n// EXTERNAL MODULE: ./node_modules/@aws-amplify/storage/lib-esm/index.js + 94 modules\nvar lib_esm = __webpack_require__(7370);\n// EXTERNAL MODULE: ./node_modules/moment/moment.js\nvar moment = __webpack_require__(30381);\nvar moment_default = /*#__PURE__*/__webpack_require__.n(moment);\n// EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js\nvar jszip_min = __webpack_require__(55733);\nvar jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);\n// EXTERNAL MODULE: ./node_modules/docxtemplater/js/docxtemplater.js\nvar docxtemplater = __webpack_require__(14522);\nvar docxtemplater_default = /*#__PURE__*/__webpack_require__.n(docxtemplater);\n// EXTERNAL MODULE: ./node_modules/pizzip/js/index.js\nvar js = __webpack_require__(51344);\nvar js_default = /*#__PURE__*/__webpack_require__.n(js);\n;// CONCATENATED MODULE: ./src/utils/report/render/docx.ts\n\n\nlet PizZipUtils = null;\nif (true) {\n __webpack_require__.e(/* import() */ 2294).then(__webpack_require__.t.bind(__webpack_require__, 72294, 23)).then(function(r) {\n PizZipUtils = r;\n });\n}\n// https://docxtemplater.com/docs/get-started-browser/\nfunction loadFile(blob) {\n return new Promise((resolve, reject)=>{\n const url = URL.createObjectURL(blob);\n PizZipUtils.getBinaryContent(url, (err, data)=>{\n if (err) reject(err);\n resolve(data);\n });\n });\n}\n//The error thrown here contains additional information when logged with JSON.stringify (it contains a properties object containing all suberrors).\n//function replaceErrors(key: any, value: any) {\n//if (value instanceof Error) {\n//return Object.getOwnPropertyNames(value).reduce(function (\n//error: any,\n//key: any\n//) {\n//error[key] = (value as any)[key];\n//return error;\n//},\n//{});\n//}\n//return value;\n//}\nfunction modifyContent(content, data) {\n var zip = new (js_default())(content);\n var doc = new (docxtemplater_default())().loadZip(zip);\n doc.setData(data);\n try {\n // render the document\n doc.render();\n } catch (error) {\n if (error.properties && error.properties.errors instanceof Array) {\n const errorMessages = error.properties.errors.map(function(error) {\n return error.properties.explanation;\n }).join(\"\\n\");\n throw Error(errorMessages);\n // errorMessages is a humanly readable message looking like this :\n // 'The tag beginning with \"foobar\" is unopened'\n }\n throw error;\n }\n var blob = doc.getZip().generate({\n type: \"blob\",\n mimeType: \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n });\n // Output the document using Data-URI\n return blob;\n}\nasync function renderDocument(blob, data) {\n const file = await loadFile(blob);\n return modifyContent(file, data);\n}\n\n// EXTERNAL MODULE: ./node_modules/axios/lib/axios.js + 42 modules\nvar axios = __webpack_require__(5121);\n;// CONCATENATED MODULE: ./src/utils/report/render/xlsx.ts\n\nasync function renderSpreadsheet(blob, data, report) {\n const body = new FormData();\n body.append(\"file\", blob);\n body.append(\"data\", JSON.stringify(data));\n body.append(\"report\", JSON.stringify(report));\n // 帳票のセルが多すぎるとaxiosの10secのタイムアウトを越すので拡張\n const res = await axios/* default.post */.Z.post(\"/api/xlsx\", body, {\n timeout: 120 * 1000\n });\n return res.data;\n}\n\n// EXTERNAL MODULE: ./node_modules/@aws-amplify/api/lib-esm/API.js + 1 modules\nvar API = __webpack_require__(10552);\n// EXTERNAL MODULE: ./src/graphql/queries.ts\nvar queries = __webpack_require__(18490);\n// EXTERNAL MODULE: ./src/utils/project.ts\nvar utils_project = __webpack_require__(25180);\n;// CONCATENATED MODULE: ./src/utils/report/data/docx/project.ts\n\n\n\nasync function getProjectData(projectId) {\n const p = (await API/* API.graphql */.b.graphql({\n query: queries.getProject,\n variables: {\n id: projectId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getProject;\n const project = {\n \"project.id\": p.id,\n \"project.name\": p.name || \"-\",\n \"project.accountName\": p.accountName || \"-\",\n \"project.contactName\": p.contactName || \"-\",\n \"project.contactTitle\": p.contactTitle || \"-\",\n \"project.reference\": p.reference || \"-\",\n \"project.alert\": p.alert || \"\",\n \"project.qrcode\": \"qrcode\",\n \"project.userName\": p.user.name || \"-\",\n \"project.managerName\": p.managerName || \"-\",\n \"project.quoterName\": p.quoterName || \"-\",\n \"project.operatorName\": p.operatorName || \"-\",\n \"project.type\": (0,utils_project/* getProjectTypeName */.m)(p.type)\n };\n const ss = p.schedules.items;\n const schedules = ss.map((s, idx)=>({\n number: idx + 1,\n id: s.id,\n name: s.name || \"-\",\n m3: s.m3 || \"-\",\n case: s.case || \"-\",\n shipType: s.shipType || \"-\",\n stockingDate: s.stockingDate || \"-\",\n packagingDate: s.packagingDate || \"-\",\n shippingDate: s.shippingDate || \"-\",\n cutDate: s.cutDate || \"-\"\n }));\n const g = p.group;\n const group = {\n \"group.name\": g.name || \"-\",\n \"group.phone\": g.phone || \"-\",\n \"group.fax\": g.fax || \"-\",\n \"group.email\": g.email || \"-\",\n \"group.taxRate\": g.taxRate || \"-\"\n };\n const ga = p.group.groupAddress;\n const groupAddress = {\n \"groupAddress.postalCode\": ga.postalCode || \"-\",\n \"groupAddress.country\": ga.country || \"-\",\n \"groupAddress.state\": ga.state || \"-\",\n \"groupAddress.city\": ga.city || \"-\",\n \"groupAddress.street\": ga.street || \"-\"\n };\n const gb = p.group.bank;\n const groupBank = {\n \"groupBank.name\": gb.name || \"-\",\n \"groupBank.branchName\": gb.branchName || \"-\",\n \"groupBank.branchNumber\": gb.branchNumber || \"-\",\n \"groupBank.type\": gb.type || \"-\",\n \"groupBank.accountNumber\": gb.accountNumber || \"-\"\n };\n const account = {\n \"account.name\": p.accountName || \"-\",\n \"account.contactName\": p.contactName || \"-\",\n \"account.contactTitle\": p.contactTitle || \"-\",\n \"account.billingPostalCode\": p.account.billingPostalCode || \"-\",\n \"account.billingState\": p.account.billingState || \"-\",\n \"account.billingStreet\": p.account.billingStreet || \"-\"\n };\n const data = {\n ...project,\n schedules,\n ...group,\n ...groupAddress,\n ...groupBank,\n ...account\n };\n return data;\n}\n\n// EXTERNAL MODULE: ./src/utils/date.ts\nvar date = __webpack_require__(46870);\n;// CONCATENATED MODULE: ./src/utils/report/data/docx/quote.ts\n\n\n\nasync function getQuoteData(quoteId) {\n const q = (await API/* API.graphql */.b.graphql({\n query: queries.getQuote,\n variables: {\n id: quoteId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getQuote;\n const qss = (await API/* API.graphql */.b.graphql({\n query: queries.quoteSummariesByQuoteId,\n variables: {\n input: {\n quoteId\n }\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.quoteSummariesByQuoteId.items;\n const quote = {\n \"quote.id\": q.id,\n \"quote.name\": q.name || \"-\",\n \"quote.quoteNumber\": q.quoteNumber || \"-\",\n \"quote.expiryDate\": q.expiryDate || \"-\",\n \"quote.description\": q.description || \"\",\n \"quote.destination\": q.destination || \"-\",\n \"quote.greeting\": q.greeting || \"\",\n \"quote.totalNumOfCases\": q.totalNumOfCases || \"-\",\n \"quote.totalNetWeight\": q.totalNetWeight || \"-\",\n \"quote.totalGrossWeight\": q.totalGrossWeight || \"-\",\n \"quote.totalM3\": q.totalM3 || \"-\",\n \"quote.revenue\": q.revenue || \"-\",\n \"quote.createdAt\": q.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(q.createdAt) : \"-\",\n \"quote.updatedAt\": q.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(q.updatedAt) : \"-\"\n };\n const qls = q.quoteLines.items;\n const sortedQls = [\n ...qls.filter((ql)=>ql.showInQuoteSummary).sort((a, b)=>{\n return a.order > b.order ? 1 : -1;\n }),\n ...qls.filter((ql)=>!ql.showInQuoteSummary).sort((a, b)=>{\n return a.order > b.order ? 1 : -1;\n })\n ];\n const quoteLines = sortedQls.map((ql, idx)=>{\n var ref, ref1;\n return {\n number: idx + 1,\n index: ql.index || \"-\",\n name: ql.name || \"-\",\n packageTypeName: ql.packageTypeName || \"-\",\n pricingName: ql.pricingName || \"-\",\n quantity: ql.quantity || \"-\",\n amount: ql.amount || \"-\",\n outerLength: ql.outerLength || \"-\",\n outerWidth: ql.outerWidth || \"-\",\n outerHeight: ql.outerHeight || \"-\",\n productLength: ql.productLength || \"-\",\n productWidth: ql.productWidth || \"-\",\n productHeight: ql.productHeight || \"-\",\n unit: ql.unit || \"-\",\n unitNW: ql.unitNW || \"-\",\n NW: ql.NW || \"-\",\n unitPrice: ql.unitPrice || \"-\",\n taxType: ql.taxType || \"-\",\n taxRate: ql.taxRate || \"-\",\n subtotal: ql.subtotal || \"-\",\n total: ql.total || \"-\",\n notes: ql.notes || \"-\",\n estimatedUnitGrossWeight: ql.estimatedUnitGrossWeight || \"-\",\n estimatedGrossWeight: ql.estimatedGrossWeight || \"-\",\n estimatedUnitM3: ((ref = ql.estimatedUnitM3) === null || ref === void 0 ? void 0 : ref.toFixed(3)) || \"-\",\n estimatedM3: ((ref1 = ql.estimatedM3) === null || ref1 === void 0 ? void 0 : ref1.toFixed(3)) || \"-\",\n estimatedUnitCost: ql.estimatedUnitCost || \"-\",\n estimatedCost: ql.estimatedCost || \"-\",\n estimatedProfit: ql.estimatedProfit || \"-\",\n createdAt: ql.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(ql.createdAt) : \"-\",\n updatedAt: ql.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(ql.updatedAt) : \"-\",\n showInQuoteSummary: ql.showInQuoteSummary || false\n };\n });\n const quoteSummaries = qss.map((qs, idx)=>({\n number: idx + 1,\n name: qs.name || \"-\",\n pricingName: qs.pricingName || \"-\",\n amount: qs.amount || 0,\n unit: qs.unit || \"-\",\n unitPrice: qs.unitPrice || 0,\n subtotal: qs.subtotal || 0,\n taxType: qs.taxType || \"-\",\n notes: qs.notes || \"\"\n }));\n var _showInQuoteSummary, _showInQuoteSummary1;\n const data = {\n ...quote,\n quoteLines,\n quoteSummaries,\n otherQuoteLines: quoteLines.filter((l)=>!((_showInQuoteSummary = l.showInQuoteSummary) !== null && _showInQuoteSummary !== void 0 ? _showInQuoteSummary : false)),\n packQuoteLines: quoteLines.filter((l)=>(_showInQuoteSummary1 = l.showInQuoteSummary) !== null && _showInQuoteSummary1 !== void 0 ? _showInQuoteSummary1 : false)\n };\n return data;\n}\n\n// EXTERNAL MODULE: ./src/graphql/product.ts\nvar graphql_product = __webpack_require__(95479);\n;// CONCATENATED MODULE: ./src/utils/report/data/docx/service.ts\n\n\n\nasync function getServiceData(productId) {\n const p = (await API/* API.graphql */.b.graphql({\n query: graphql_product/* getAllProduct */.de,\n variables: {\n id: productId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getProduct;\n const service = {\n \"service.id\": p.id,\n \"service.productNumber\": p.productNumber || \"-\",\n \"service.name\": p.name || \"-\",\n \"service.quantity\": p.quantity || \"-\",\n \"service.stockingDate\": p.schedule.stockingDate || \"-\",\n \"service.shippingDate\": p.schedule.shippingDate || \"-\",\n \"service.createdAt\": p.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.createdAt) : \"-\",\n \"service.updatedAt\": p.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.updatedAt) : \"-\"\n };\n const data = {\n ...service\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/docx/invoice.ts\n\n\n\nasync function getInvoiceData(projectId) {\n const i = (await API/* API.graphql */.b.graphql({\n query: queries.invoicesByProjectId,\n variables: {\n projectId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.invoicesByProjectId.items[0];\n const invoice = {\n \"invoice.id\": i.id,\n \"invoice.name\": i.name || \"-\",\n \"invoice.invoiceNo\": i.invoiceNo || \"-\",\n \"invoice.issueDate\": i.issueDate || \"-\",\n \"invoice.billingDate\": i.billingDate || \"-\",\n \"invoice.recordingDate\": i.recordingDate || \"-\",\n \"invoice.billingType\": i.billingType || \"-\",\n \"invoice.fax\": i.fax || \"-\",\n \"invoice.phone\": i.phone || \"-\",\n \"invoice.taxed\": i.taxed || \"-\",\n \"invoice.untaxed\": i.untaxed || \"-\",\n \"invoice.subtotal\": i.subtotal || \"-\",\n \"invoice.taxTotal\": i.taxTotal || \"-\",\n \"invoice.taxableTotal\": i.taxableTotal || \"-\",\n \"invoice.total\": i.total || \"-\",\n \"invoice.description\": i.description || \"-\",\n \"invoice.createdAt\": i.createdAt || \"-\",\n \"invoice.updatedAt\": i.updatedAt || \"-\",\n \"invoice.accountName\": i.accountName || \"-\",\n \"invoice.contactName\": i.contactName || \"-\",\n \"invoice.contactTitle\": i.contactTitle || \"-\",\n \"invoice.accountPostalCode\": i.accountAddress.postalCode || \"-\",\n \"invoice.accountState\": i.accountAddress.state || \"-\",\n \"invoice.accountCity\": i.accountAddress.city || \"-\",\n \"invoice.accountStreet\": i.accountAddress.street || \"-\",\n \"invoice.groupName\": i.groupName || \"-\",\n \"invoice.groupPostalCode\": i.groupAddress.postalCode || \"-\",\n \"invoice.groupState\": i.groupAddress.state || \"-\",\n \"invoice.groupCity\": i.groupAddress.city || \"-\",\n \"invoice.groupStreet\": i.groupAddress.street || \"-\",\n \"invoice.bankName\": i.groupBank.name || \"-\",\n \"invoice.bankBranchName\": i.groupBank.branchName || \"-\",\n \"invoice.bankBranchNumber\": i.groupBank.branchNumber || \"-\",\n \"invoice.bankAccountType\": i.groupBank.type || \"-\",\n \"invoice.bankAccountNumber\": i.groupBank.accountNumber || \"-\"\n };\n const ils = i.invoiceLines.items;\n const invoiceLines = ils.map((il, idx)=>({\n number: idx + 1,\n order: il.order + 1 || \"-\",\n name: il.name || \"-\",\n shippingDate: il.shippingDate ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.shippingDate) : \"-\",\n pricingName: il.pricingName || \"-\",\n quantity: il.quantity || \"-\",\n m3: il.m3 || \"-\",\n minimumAmount: il.minimumAmount || \"-\",\n grossWeight: il.grossWeight || \"-\",\n amount: il.amount || \"-\",\n description: il.description || \"-\",\n unit: il.unit || \"-\",\n unitPrice: il.unitPrice || \"-\",\n taxRate: il.taxRate || \"-\",\n taxTotal: il.taxTotal || \"-\",\n taxType: il.taxType || \"-\",\n subtotal: il.subtotal || \"-\",\n total: il.total || \"-\",\n createdAt: il.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.createdAt) : \"-\",\n updatedAt: il.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.updatedAt) : \"-\"\n }));\n const data = {\n invoice,\n invoiceLines\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/docx/index.ts\n\n\n\n\nasync function getDocxData(templateType, projectId, options) {\n let promises = [];\n promises.push(getProjectData(projectId));\n if (templateType === \"QUOTE\" && (options === null || options === void 0 ? void 0 : options.quoteId)) {\n promises.push(getQuoteData(options.quoteId));\n }\n if (templateType === \"SERVICE\" && (options === null || options === void 0 ? void 0 : options.productId)) {\n promises.push(getServiceData(options.productId));\n }\n if (templateType === \"INVOICE\") {\n promises.push(getInvoiceData(projectId));\n }\n let [projectData, secondaryData] = await Promise.all(promises);\n return {\n ...projectData,\n ...secondaryData\n };\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/project.ts\n\n\n\n\nasync function project_getProjectData(projectId) {\n var ref;\n const p = (await API/* API.graphql */.b.graphql({\n query: queries.getProject,\n variables: {\n id: projectId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getProject;\n let isExternalShareEnabled = false;\n if (p.externalShareExpirationDate && p.externalShareEnabled && p.externalSharePassword && p.externalShareUrl) {\n const isExpired = moment_default()().startOf(\"day\").isAfter(moment_default()(p.externalShareExpirationDate));\n isExternalShareEnabled = !isExpired;\n }\n const project = {\n id: p.id,\n name: p.name || \"-\",\n type: (0,utils_project/* getProjectTypeName */.m)(p.type),\n accountName: p.accountName || \"-\",\n contactName: p.contactName || \"-\",\n contactTitle: p.contactTitle || \"-\",\n reference: p.reference || \"-\",\n alert: p.alert || \"\",\n qrcode: \"qrcode\",\n userName: p.user.name || \"-\",\n managerName: p.managerName || \"-\",\n quoterName: p.quoterName || \"-\",\n operatorName: p.operatorName || \"-\",\n account: p.account.name || \"-\",\n externalShareUrl: isExternalShareEnabled ? p.externalShareUrl || \"-\" : \"-\",\n externalSharePassword: isExternalShareEnabled ? p.externalSharePassword || \"-\" : \"-\",\n externalShareEnabled: isExternalShareEnabled ? \"TRUE\" : \"FALSE\",\n externalShareExpirationDate: isExternalShareEnabled ? p.externalShareExpirationDate || \"-\" : \"-\",\n category: ((ref = p.category) === null || ref === void 0 ? void 0 : ref.name) || \"-\"\n };\n const sortByCreatedDate = (a, b)=>{\n return moment_default()(a.createdAt).isBefore(b.createdAt) ? -1 : 1;\n };\n const ss = p.schedules.items;\n const schedules = ss.sort(sortByCreatedDate).map((s, idx)=>({\n number: idx + 1,\n id: s.id,\n name: s.name || \"-\",\n m3: s.m3 || \"-\",\n case: s.case || \"-\",\n shipType: s.shipType || \"-\",\n stockingDate: s.stockingDate || \"-\",\n packagingDate: s.packagingDate || \"-\",\n shippingDate: s.shippingDate || \"-\",\n cutDate: s.cutDate || \"-\"\n }));\n const g = p.group || {};\n const group = {\n name: g.name || \"-\",\n phone: g.phone || \"-\",\n fax: g.fax || \"-\",\n email: g.email || \"-\",\n taxRate: g.taxRate || \"-\"\n };\n const ga = p.group.groupAddress || {};\n const groupAddress = {\n postalCode: ga.postalCode || \"-\",\n country: ga.country || \"-\",\n state: ga.state || \"-\",\n city: ga.city || \"-\",\n street: ga.street || \"-\"\n };\n const gb = p.group.bank || {};\n const groupBank = {\n name: gb.name || \"-\",\n branchName: gb.branchName || \"-\",\n branchNumber: gb.branchNumber || \"-\",\n type: gb.type || \"-\",\n accountNumber: gb.accountNumber || \"-\"\n };\n const account = {\n name: p.accountName || \"-\",\n contactName: p.contactName || \"-\",\n contactTitle: p.contactTitle || \"-\",\n billingPostalCode: p.account.billingPostalCode || \"-\",\n billingState: p.account.billingState || \"-\",\n billingStreet: p.account.billingStreet || \"-\"\n };\n const data = {\n project,\n schedules,\n group,\n groupAddress,\n groupBank,\n account\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/quote.ts\n\n\n\nasync function quote_getQuoteData(quoteId) {\n const q = (await API/* API.graphql */.b.graphql({\n query: queries.getQuote,\n variables: {\n id: quoteId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getQuote;\n const qss = (await API/* API.graphql */.b.graphql({\n query: queries.quoteSummariesByQuoteId,\n variables: {\n input: {\n quoteId\n }\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.quoteSummariesByQuoteId.items;\n const quote = {\n id: q.id,\n name: q.name || \"-\",\n quoteNumber: q.quoteNumber || \"-\",\n expiryDate: q.expiryDate || \"-\",\n description: q.description || \"\",\n destination: q.destination || \"-\",\n greeting: q.greeting || \"\",\n totalNumOfCases: q.totalNumOfCases || \"-\",\n totalNetWeight: q.totalNetWeight || \"-\",\n totalGrossWeight: q.totalGrossWeight || \"-\",\n totalM3: q.totalM3 || \"-\",\n revenue: q.revenue || \"-\",\n paymentMethod: q.paymentMethod || \"-\",\n createdAt: q.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(q.createdAt) : \"-\",\n updatedAt: q.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(q.updatedAt) : \"-\"\n };\n const qls = q.quoteLines.items;\n const sortedQls = [\n ...qls.filter((ql)=>ql.showInQuoteSummary).sort((a, b)=>{\n return a.order > b.order ? 1 : -1;\n }),\n ...qls.filter((ql)=>!ql.showInQuoteSummary).sort((a, b)=>{\n return a.order > b.order ? 1 : -1;\n })\n ];\n const quoteLines = sortedQls.map((ql, idx)=>{\n var ref, ref1;\n return {\n number: idx + 1,\n index: ql.index || \"-\",\n name: ql.name || \"-\",\n packageTypeName: ql.packageTypeName || \"-\",\n pricingName: ql.pricingName || \"-\",\n quantity: ql.quantity || \"-\",\n amount: ql.amount || \"-\",\n outerLength: ql.outerLength || \"-\",\n outerWidth: ql.outerWidth || \"-\",\n outerHeight: ql.outerHeight || \"-\",\n productLength: ql.productLength || \"-\",\n productWidth: ql.productWidth || \"-\",\n productHeight: ql.productHeight || \"-\",\n unit: ql.unit || \"-\",\n unitNW: ql.unitNW || \"-\",\n NW: ql.NW || \"-\",\n unitPrice: ql.unitPrice || \"-\",\n taxType: ql.taxType || \"-\",\n taxRate: ql.taxRate || \"-\",\n subtotal: ql.subtotal || \"-\",\n total: ql.total || \"-\",\n notes: ql.notes || \"-\",\n estimatedUnitGrossWeight: ql.estimatedUnitGrossWeight || \"-\",\n estimatedGrossWeight: ql.estimatedGrossWeight || \"-\",\n estimatedUnitM3: ((ref = ql.estimatedUnitM3) === null || ref === void 0 ? void 0 : ref.toFixed(3)) || \"-\",\n estimatedM3: ((ref1 = ql.estimatedM3) === null || ref1 === void 0 ? void 0 : ref1.toFixed(3)) || \"-\",\n estimatedUnitCost: ql.estimatedUnitCost || \"-\",\n estimatedCost: ql.estimatedCost || \"-\",\n estimatedProfit: ql.estimatedProfit || \"-\",\n estimatedWood: ql.estimatedWood || \"-\",\n estimatedLvl: ql.estimatedLvl || \"-\",\n estimatedPanel: ql.estimatedPanel || \"-\",\n estimatedInterior: ql.estimatedInterior || \"-\",\n estimatedExterior: ql.estimatedExterior || \"-\",\n estimatedCostM3: ql.estimatedCostM3 || \"-\",\n estimatedOther: ql.estimatedOther || \"-\",\n createdAt: ql.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(ql.createdAt) : \"-\",\n updatedAt: ql.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(ql.updatedAt) : \"-\",\n showInQuoteSummary: ql.showInQuoteSummary || false\n };\n });\n const quoteSummaries = qss.map((qs, idx)=>({\n number: idx + 1,\n name: qs.name || \"-\",\n pricingName: qs.pricingName || \"-\",\n amount: qs.amount || 0,\n unit: qs.unit || \"-\",\n unitPrice: qs.unitPrice || 0,\n subtotal: qs.subtotal || 0,\n taxType: qs.taxType || \"-\",\n notes: qs.notes || \"\"\n }));\n var _showInQuoteSummary, _showInQuoteSummary1;\n const data = {\n quote,\n quoteLines,\n quoteSummaries,\n otherQuoteLines: quoteLines.filter((l)=>!((_showInQuoteSummary = l.showInQuoteSummary) !== null && _showInQuoteSummary !== void 0 ? _showInQuoteSummary : false)),\n packQuoteLines: quoteLines.filter((l)=>(_showInQuoteSummary1 = l.showInQuoteSummary) !== null && _showInQuoteSummary1 !== void 0 ? _showInQuoteSummary1 : false)\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/elements.ts\nfunction getMaterial(ms, elements) {\n const materialElement = elements.filter((e)=>e.slug.includes(\"materialId\"))[0];\n const material = ms.filter((ms)=>ms.id === materialElement.value)[0];\n if (!material) return \"-\";\n return material.name;\n}\nfunction getValue(elements, slug) {\n const filteredElements = elements.filter((e)=>e.slug.includes(slug));\n if (filteredElements.length == 0) return null;\n const element = filteredElements[0];\n if (element.type === \"number\" && isNaN(Number(element.value))) {\n return 0;\n }\n return element.value;\n}\n\n// EXTERNAL MODULE: ./src/utils/product.tsx\nvar utils_product = __webpack_require__(41491);\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/product.ts\n\n\n\n\n\n\nasync function getProductData(productId, groupId) {\n const M2_TO_CM2 = 10000; //PAX-622 定数に修正\n const M3_TO_CM3 = 10000;\n const p = (await API/* API.graphql */.b.graphql({\n query: graphql_product/* getAllProduct */.de,\n variables: {\n id: productId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getProduct;\n const as = p.areas.items;\n const ms = (await API/* API.graphql */.b.graphql({\n query: queries.materialsByGroupId,\n variables: {\n groupId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.materialsByGroupId.items;\n const e = p.elements;\n const packPhases = !p.packPhases ? [] : p.packPhases.filter((p)=>!!p.showInKanBan).map((p)=>p.name).join(\", \");\n if (!p.schedule) {\n throw new Error(\"スケジュールが設定されていないため、帳票を出力できません\");\n }\n const product = {\n id: p.id,\n productNumber: p.productNumber || \"-\",\n name: p.name || \"-\",\n packageTypeName: p.packageTypeName || \"-\",\n material: p.material || \"\",\n destination: p.destination || \"-\",\n stamp: p.stamp || \"\",\n description: p.description || \"-\",\n quantity: p.quantity || \"-\",\n productLength: getValue(e, \"productLength\") || \"-\",\n productWidth: getValue(e, \"productWidth\") || \"-\",\n productHeight: getValue(e, \"productHeight\") || \"-\",\n innerLength: getValue(e, \"innerLength\") || \"-\",\n innerWidth: getValue(e, \"innerWidth\") || \"-\",\n innerHeight: getValue(e, \"innerHeight\") || \"-\",\n outerLength: getValue(e, \"outerLength\") || \"-\",\n outerWidth: getValue(e, \"outerWidth\") || \"-\",\n outerHeight: getValue(e, \"outerHeight\") || \"-\",\n m3: (0,utils_product/* calcM3 */.Hs)(isNaN(getValue(e, \"outerLength\")) ? 0 : getValue(e, \"outerLength\"), isNaN(getValue(e, \"outerWidth\")) ? 0 : getValue(e, \"outerWidth\"), isNaN(getValue(e, \"outerHeight\")) ? 0 : getValue(e, \"outerHeight\")) || \"-\",\n NW: getValue(e, \"NW\") || \"-\",\n clearanceLengthLeft: getValue(e, \"clearanceLengthLeft\") || \"-\",\n clearanceLengthRight: getValue(e, \"clearanceLengthRight\") || \"-\",\n clearanceWidthLeft: getValue(e, \"clearanceWidthLeft\") || \"-\",\n clearanceWidthRight: getValue(e, \"clearanceWidthRight\") || \"-\",\n clearanceHeightTop: getValue(e, \"clearanceHeightTop\") || \"-\",\n clearanceHeightTopUnderBeam: getValue(e, \"clearanceHeightTopUnderBeam\") || \"-\",\n clearanceHeightBottom: getValue(e, \"clearanceHeightBottom\") || \"-\",\n verticalClearance: getValue(e, \"verticalClearance\") || \"-\",\n grossWeight: p.grossWeight || \"-\",\n panelM2: Math.round(p.panelM2 * M2_TO_CM2) / M2_TO_CM2 || \"-\",\n woodM3: Math.round(p.woodM3 * M3_TO_CM3) / M3_TO_CM3 || \"-\",\n note: p.note || \"-\",\n tareWeight: getValue(e, \"tareWeight\") || p.tareWeight || \"-\",\n stockingDate: p.schedule.stockingDate || \"-\",\n packagingDate: p.schedule.packagingDate || \"-\",\n shippingDate: p.schedule.shippingDate || \"-\",\n shipType: p.schedule.shipType || \"-\",\n packPhases,\n createdAt: p.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.createdAt) : \"-\",\n updatedAt: p.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.updatedAt) : \"-\"\n };\n const components = as.sort((a, b)=>a.order - b.order).reduce((r, area)=>{\n var ref;\n const cs = (ref = area.components) === null || ref === void 0 ? void 0 : ref.items.sort((a, b)=>a.order - b.order).map((c)=>{\n return {\n areaName: area.name,\n name: c === null || c === void 0 ? void 0 : c.name,\n order: c === null || c === void 0 ? void 0 : c.order,\n material: getMaterial(ms, c === null || c === void 0 ? void 0 : c.elements) || \"-\",\n length: getValue(c === null || c === void 0 ? void 0 : c.elements, \"length\"),\n width: getValue(c === null || c === void 0 ? void 0 : c.elements, \"width\"),\n height: getValue(c === null || c === void 0 ? void 0 : c.elements, \"height\"),\n quantity: getValue(c === null || c === void 0 ? void 0 : c.elements, \"quantity\"),\n m2: getValue(c === null || c === void 0 ? void 0 : c.elements, \"m2\"),\n m3: getValue(c === null || c === void 0 ? void 0 : c.elements, \"m3\"),\n lengthNominal: getValue(c === null || c === void 0 ? void 0 : c.elements, \"lengthNominal\"),\n widthNominal: getValue(c === null || c === void 0 ? void 0 : c.elements, \"widthNominal\"),\n heightNominal: getValue(c === null || c === void 0 ? void 0 : c.elements, \"heightNominal\"),\n notes: getValue(c === null || c === void 0 ? void 0 : c.elements, \"notes\") || \"\",\n createdAt: (c === null || c === void 0 ? void 0 : c.createdAt) ? (0,date/* dateStringToJaDateTimeStr */.DB)(c === null || c === void 0 ? void 0 : c.createdAt) : \"\",\n updatedAt: (c === null || c === void 0 ? void 0 : c.updatedAt) ? (0,date/* dateStringToJaDateTimeStr */.DB)(c === null || c === void 0 ? void 0 : c.updatedAt) : \"\"\n };\n });\n return r.concat(cs);\n }, []);\n const is = p.decorations.items.filter((d)=>d.type === \"INTERIOR\");\n const es = p.decorations.items.filter((d)=>d.type === \"EXTERIOR\");\n const interiors = is.map((i)=>({\n name: i.name,\n order: i.order,\n material: getMaterial(ms, i.elements),\n quantity: getValue(i.elements, \"quantity\"),\n createdAt: i.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(i.createdAt) : \"\",\n updatedAt: i.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(i.updatedAt) : \"\"\n }));\n const exteriors = es.map((e)=>({\n name: e.name,\n order: e.order,\n material: getMaterial(ms, e.elements),\n quantity: getValue(e.elements, \"quantity\"),\n createdAt: e.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(e.createdAt) : \"\",\n updatedAt: e.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(e.updatedAt) : \"\"\n }));\n const cs = p.cases;\n const cases = cs.map((c)=>({\n name: c.name || \"\".concat(p.name, \"-\").concat(c.order),\n order: c.order,\n outerLength: c.outerLength,\n outerWidth: c.outerWidth,\n outerHeight: c.outerHeight,\n netWeight: c.netWeight,\n grossWeight: c.grossWeight,\n note: c.note,\n packPhases\n }));\n const data = {\n product,\n interiors,\n exteriors,\n cases,\n components\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/service.ts\n\n\n\nasync function service_getServiceData(productId) {\n const p = (await API/* API.graphql */.b.graphql({\n query: graphql_product/* getAllProduct */.de,\n variables: {\n id: productId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getProduct;\n const service = {\n id: p.id,\n productNumber: p.productNumber || \"-\",\n name: p.name || \"-\",\n quantity: p.quantity || \"-\",\n stockingDate: p.schedule.stockingDate || \"-\",\n shippingDate: p.schedule.shippingDate || \"-\",\n scheduleName: p.schedule.name || \"-\",\n createdAt: p.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.createdAt) : \"-\",\n updatedAt: p.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(p.updatedAt) : \"-\"\n };\n const data = {\n service\n };\n return data;\n}\n\n// EXTERNAL MODULE: ./src/utils/productSummary.ts\nvar utils_productSummary = __webpack_require__(11);\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/productSummary.ts\n\n\n\nasync function getProductSummaryData(projectId, filter) {\n let summaryOrderMapping = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : undefined;\n const p = (await API/* API.graphql */.b.graphql({\n query: queries.productSummariesByProjectId,\n variables: {\n input: {\n projectId,\n filter\n }\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.productSummariesByProjectId.items;\n if (summaryOrderMapping === undefined) {\n p.sort(// ここのsortの部分を持ってきた順番の物を使うようにする\n (a, b)=>{\n if (a.order !== b.order) {\n return a.order - b.order;\n }\n return 0;\n });\n } else {\n p.map((productSummary)=>{\n const productIdOrderPair = (0,utils_productSummary/* makeProductSummaryId */.lB)(productSummary);\n productSummary.number = summaryOrderMapping[productIdOrderPair];\n productSummary.order = summaryOrderMapping[productIdOrderPair];\n return productSummary;\n });\n (0,utils_productSummary/* sortSummariesBySummaryOrder */.$Y)(p);\n }\n const summaryLines = p.map((s, idx)=>{\n return {\n ...s,\n // numberは表示順の通し番号にしたいのでここで上書きする(そのままだとデフォルトの9999とかが入っちゃう)\n number: idx + 1,\n phaseName: s.phaseName === \"complete\" ? \"完了\" : s.phaseName\n };\n });\n const summary = p.reduce((r, s)=>{\n r.totalQuantity += s.quantity || 0;\n r.totalNetWeight += s.netWeight || 0;\n r.totalGrossWeight += s.grossWeight || 0;\n r.totalM3 += s.m3 || 0;\n return r;\n }, {\n totalQuantity: 0,\n totalNetWeight: 0,\n totalGrossWeight: 0,\n totalM3: 0\n });\n const data = {\n summary,\n summaryLines\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/invoice.ts\n\n\n\nasync function invoice_getInvoiceData(invoiceId, projectId) {\n var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12;\n const i = (await API/* API.graphql */.b.graphql({\n query: queries.getInvoice,\n variables: {\n id: invoiceId\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getInvoice;\n const invoice = {\n id: i.id,\n name: i.name || \"-\",\n invoiceNo: i.invoiceNo || \"-\",\n issueDate: i.issueDate || \"-\",\n billingDate: i.billingDate || \"-\",\n recordingDate: i.recordingDate || \"-\",\n billingType: i.billingType || \"-\",\n fax: i.fax || \"-\",\n phone: i.phone || \"-\",\n taxableSubtotal: i.taxableSubtotal || \"-\",\n nonTaxableTotal: i.nonTaxableTotal || \"-\",\n subtotal: i.subtotal || \"-\",\n taxTotal: i.taxTotal || \"-\",\n taxableTotal: i.taxableTotal || \"-\",\n total: i.total || \"-\",\n description: i.description || \"-\",\n createdAt: i.createdAt || \"-\",\n updatedAt: i.updatedAt || \"-\",\n accountName: i.accountName || \"-\",\n accountSite: i.accountSite || \"\",\n contactName: i.contactName || \"-\",\n contactFirstName: i.contactFirstName || \"\",\n contactLastName: i.contactLastName || i.contactName || \"-\",\n contactTitle: i.contactTitle || \"\",\n contactDepartment: i.contactDepartment || \"\",\n accountPostalCode: ((ref = i.accountAddress) === null || ref === void 0 ? void 0 : ref.postalCode) || \"-\",\n accountState: ((ref1 = i.accountAddress) === null || ref1 === void 0 ? void 0 : ref1.state) || \"-\",\n accountCity: ((ref2 = i.accountAddress) === null || ref2 === void 0 ? void 0 : ref2.city) || \"-\",\n accountStreet: ((ref3 = i.accountAddress) === null || ref3 === void 0 ? void 0 : ref3.street) || \"-\",\n groupName: i.groupName || \"-\",\n groupPostalCode: ((ref4 = i.groupAddress) === null || ref4 === void 0 ? void 0 : ref4.postalCode) || \"-\",\n groupState: ((ref5 = i.groupAddress) === null || ref5 === void 0 ? void 0 : ref5.state) || \"-\",\n groupCity: ((ref6 = i.groupAddress) === null || ref6 === void 0 ? void 0 : ref6.city) || \"-\",\n groupStreet: ((ref7 = i.groupAddress) === null || ref7 === void 0 ? void 0 : ref7.street) || \"-\",\n bankName: ((ref8 = i.groupBank) === null || ref8 === void 0 ? void 0 : ref8.name) || \"-\",\n bankBranchName: ((ref9 = i.groupBank) === null || ref9 === void 0 ? void 0 : ref9.branchName) || \"-\",\n bankBranchNumber: ((ref10 = i.groupBank) === null || ref10 === void 0 ? void 0 : ref10.branchNumber) || \"-\",\n bankAccountType: ((ref11 = i.groupBank) === null || ref11 === void 0 ? void 0 : ref11.type) || \"-\",\n bankAccountNumber: ((ref12 = i.groupBank) === null || ref12 === void 0 ? void 0 : ref12.accountNumber) || \"-\"\n };\n const ils = i.invoiceLines.items;\n const invoiceLines = ils.sort((a, b)=>a.order - b.order).map((il, idx)=>({\n number: idx + 1,\n order: il.order === 0 ? 0 : il.order || \"-\",\n name: il.name || \"-\",\n shippingDate: il.shippingDate ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.shippingDate) : \"-\",\n pricingName: il.pricingName || \"-\",\n quantity: il.quantity || \"-\",\n m3: il.m3 || \"-\",\n minimumAmount: il.minimumAmount || \"-\",\n grossWeight: il.grossWeight || \"-\",\n salesType: il.salesType || \"-\",\n amount: il.amount || \"-\",\n description: il.description || \"-\",\n unit: il.unit || \"-\",\n unitPrice: il.unitPrice || \"-\",\n taxRate: il.taxRate || \"-\",\n taxTotal: il.taxTotal || \"-\",\n taxType: il.taxType || \"-\",\n subtotal: il.subtotal || \"-\",\n total: il.total || \"-\",\n createdAt: il.createdAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.createdAt) : \"-\",\n updatedAt: il.updatedAt ? (0,date/* dateStringToJaDateTimeStr */.DB)(il.updatedAt) : \"-\"\n }));\n const data = {\n invoice,\n invoiceLines\n };\n return data;\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/xlsx/index.ts\n\n\n\n\n\n\nasync function getXlsxData(templateType, projectId, groupId, options) {\n const promises = [];\n promises.push(project_getProjectData(projectId));\n if (templateType === \"QUOTE\" && (options === null || options === void 0 ? void 0 : options.quoteId)) {\n promises.push(quote_getQuoteData(options.quoteId));\n }\n if (templateType === \"SERVICE\") {\n promises.push(service_getServiceData(options === null || options === void 0 ? void 0 : options.productId));\n }\n if (templateType === \"PRODUCT\" || templateType === \"CASE\") {\n promises.push(getProductData(options === null || options === void 0 ? void 0 : options.productId, groupId));\n }\n if (templateType === \"PRODUCTS\") {\n promises.push(getProductSummaryData(projectId, options === null || options === void 0 ? void 0 : options.productSummariesFilter, options === null || options === void 0 ? void 0 : options.summaryOrderMapping));\n }\n if (templateType === \"INVOICE\") {\n promises.push(invoice_getInvoiceData(options === null || options === void 0 ? void 0 : options.invoiceId, projectId));\n }\n const [projectData, secondaryData] = await Promise.all(promises);\n return {\n ...projectData,\n ...secondaryData\n };\n}\n\n;// CONCATENATED MODULE: ./src/utils/report/data/index.ts\n\n\nasync function getData(type, templateType, projectId, groupId, options) {\n if (type === \"DOCUMENT\") return getDocxData(templateType, projectId, options);\n if (type === \"SPREADSHEET\") return getXlsxData(templateType, projectId, groupId, options);\n}\n\n// EXTERNAL MODULE: ./src/utils/files.tsx\nvar utils_files = __webpack_require__(61142);\n// EXTERNAL MODULE: ./src/utils/image.ts\nvar utils_image = __webpack_require__(77325);\n;// CONCATENATED MODULE: ./src/utils/report/index.ts\n\n\n\n\n\n\n\n\n\nasync function download(report, projectId, groupId, options) {\n try {\n const type = report.type;\n const dataType = report.data;\n const [data, file] = await Promise.all([\n getData(type, dataType, projectId, groupId, options),\n lib_esm/* Storage.get */.Ke.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\"\n })\n ]);\n if (!(0,utils_image/* isDownloadedS3ImageObject */.qi)(file)) {\n throw Error(\"帳票が見つかりません\");\n }\n const fileName = \"\".concat(report.name, \"_\").concat(moment_default()().format(\"YYYYMMDDHHmmss\"));\n if (type === \"DOCUMENT\") {\n const blob = await renderDocument(file.Body, data);\n await (0,utils_files/* downloadFile */.Sv)(fileName, blob);\n }\n if (type === \"SPREADSHEET\") {\n const renderData = await renderSpreadsheet(file.Body, data, report);\n await (0,utils_files/* downloadFile */.Sv)(replaceFileName(renderData.customName || fileName), renderData.base64, \"base64\");\n }\n } catch (e) {\n var ref, ref1;\n const msg = e.message + \": \" + (((ref = e.response) === null || ref === void 0 ? void 0 : (ref1 = ref.data) === null || ref1 === void 0 ? void 0 : ref1.message) || \"\");\n throw Error(msg);\n }\n}\nasync function downloadMultipleReports(reports, projectId, groupId, options) {\n try {\n const products = options === null || options === void 0 ? void 0 : options.products;\n if (!products) return;\n const dataPromises = [];\n const filePromises = [];\n const fileNames = [];\n const reportList = [];\n const dataTypes = [];\n products.forEach((product)=>{\n const option = {\n productId: product.id\n };\n reports.forEach((report)=>{\n const type = report.type;\n const dataType = report.data;\n dataPromises.push(getData(type, dataType, projectId, groupId, option));\n filePromises.push(lib_esm/* Storage.get */.Ke.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\"\n }));\n if (type === \"DOCUMENT\") {\n fileNames.push(\"\".concat(product.name, \"_\").concat(report.name, \"_\").concat(moment_default()().format(\"YYYYMMDDHHmmss\"), \".docx\"));\n }\n if (type === \"SPREADSHEET\") {\n fileNames.push(\"\".concat(product.name, \"_\").concat(report.name, \"_\").concat(moment_default()().format(\"YYYYMMDDHHmmss\"), \".xlsx\"));\n }\n reportList.push(report);\n dataTypes.push(dataType);\n });\n });\n const data = await Promise.all(dataPromises);\n const files = await Promise.all(filePromises);\n const blobsBase64sPromises = [];\n data.forEach((d, idx)=>{\n if (reportList[idx].type === \"DOCUMENT\") {\n blobsBase64sPromises.push(renderDocument(files[idx].Body, d));\n }\n if (reportList[idx].type === \"SPREADSHEET\") {\n blobsBase64sPromises.push(renderSpreadsheet(files[idx].Body, d, reportList[idx]));\n }\n });\n const blobsBase64s = await Promise.all(blobsBase64sPromises);\n const blobsPromises = blobsBase64s.map((b, idx)=>{\n if (reportList[idx].type === \"SPREADSHEET\") {\n return (0,utils_files/* convertDataUrl */.cx)(b.base64);\n }\n return b;\n });\n const blobs = await Promise.all(blobsPromises);\n const zip = new (jszip_min_default())();\n fileNames.forEach((f, idx)=>{\n zip.file(f, blobs[idx]);\n });\n const zipBlob = await zip.generateAsync({\n type: \"blob\"\n });\n await (0,utils_files/* downloadFile */.Sv)(\"pax_\".concat(moment_default()().format(\"YYYYMMDDHHmmss\")), zipBlob);\n } catch (e) {\n throw Error(e);\n }\n}\nasync function downloadTemplate(report) {\n try {\n const file = await lib_esm/* Storage.get */.Ke.get(report.template.key, {\n download: true,\n cacheControl: \"no-cache, no-store, must-revalidate\"\n });\n if (!(0,utils_image/* isDownloadedS3ImageObject */.qi)(file)) {\n throw Error(\"帳票が見つかりません\");\n }\n const fileName = \"\".concat(report.name, \"_template_\").concat(moment_default()().format(\"YYYYMMDDHHmmss\"));\n await (0,utils_files/* downloadFile */.Sv)(fileName, file.Body);\n } catch (e) {\n throw Error(e);\n }\n}\n/** ファイル名で使用できない文字を置換する */ const replaceFileName = (name)=>{\n return name.replace(/[\\\\./:*?\"<>|]/g, \"\");\n};\n\n\n/***/ }),\n\n/***/ 58142:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Nz\": function() { return /* binding */ getStatusIndex; },\n/* harmony export */ \"Y0\": function() { return /* binding */ getStatusInitial; },\n/* harmony export */ \"i7\": function() { return /* binding */ status; },\n/* harmony export */ \"lR\": function() { return /* binding */ getStatus; },\n/* harmony export */ \"li\": function() { return /* binding */ getStatusText; }\n/* harmony export */ });\n/* unused harmony exports getStatusColor, getStatusFromTabIndex, getTabIndex */\nfunction getStatus(text) {\n if (text.match(/見積/)) {\n return \"QUOTE\";\n } else if (text.match(/受注/)) {\n return \"ORDER\";\n } else if (text.match(/入荷/)) {\n return \"STOCK\";\n } else if (text.match(/梱包/)) {\n return \"PACK\";\n } else if (text.match(/出荷/)) {\n return \"SHIP\";\n } else if (text.match(/請求/)) {\n return \"INVOICE\";\n } else if (text.match(/完了/)) {\n return \"COMPLETE\";\n } else if (text.match(/失注/)) {\n return \"CANCEL\";\n } else {\n return \"UNKNOWN\";\n }\n}\nfunction getStatusIndex(status) {\n switch(status){\n case \"QUOTE\":\n return 0;\n case \"ORDER\":\n return 1;\n case \"STOCK\":\n return 2;\n case \"PACK\":\n return 3;\n case \"SHIP\":\n return 4;\n case \"INVOICE\":\n return 5;\n case \"COMPLETE\":\n return 6;\n case \"CANCEL\":\n return 7;\n default:\n return 8;\n }\n}\nfunction getStatusColor(status) {\n switch(status){\n case \"QUOTE\":\n return \"#777\";\n case \"ORDER\":\n return \"#3e6eb3\";\n case \"STOCK\":\n return \"#29BF12\";\n case \"PACK\":\n return \"#3e6eb3\";\n case \"SHIP\":\n return \"#d18643\";\n case \"CUT\":\n return \"#bd3993\";\n case \"INVOICE\":\n return \"#bd3993\";\n case \"CANCEL\":\n return \"#e53935\";\n default:\n return \"#000\";\n }\n}\nfunction getStatusInitial(status) {\n switch(status){\n case \"QUOTE\":\n return \"見\";\n case \"ORDER\":\n return \"受\";\n case \"STOCK\":\n return \"入\";\n case \"PACK\":\n return \"梱\";\n case \"SHIP\":\n return \"出\";\n case \"CUT\":\n return \"C\";\n case \"INVOICE\":\n return \"請\";\n case \"COMPLETE\":\n return \"完\";\n case \"CANCEL\":\n return \"失\";\n default:\n return \"?\";\n }\n}\nfunction getStatusText(status) {\n switch(status){\n case \"QUOTE\":\n return \"見積\";\n case \"ORDER\":\n return \"受注\";\n case \"STOCK\":\n return \"入荷\";\n case \"PACK\":\n return \"梱包\";\n case \"SHIP\":\n return \"出荷\";\n case \"CUT\":\n return \"CUT\";\n case \"INVOICE\":\n return \"請求\";\n case \"COMPLETE\":\n return \"完了\";\n case \"CANCEL\":\n return \"失注\";\n default:\n return \"?\";\n }\n}\nfunction getStatusFromTabIndex(index) {\n switch(index){\n case 1:\n return \"STOCK\";\n case 2:\n return \"PACK\";\n case 3:\n return \"SHIP\";\n default:\n return \"DETAIL\";\n }\n}\nfunction getTabIndex(status) {\n switch(status){\n case \"QUOTE\":\n return 0;\n case \"ORDER\":\n return 0;\n case \"STOCK\":\n return 1;\n case \"PACK\":\n return 2;\n case \"SHIP\":\n return 3;\n case \"INVOICE\":\n return 0;\n default:\n return 0;\n }\n}\nconst status = [\n {\n value: \"QUOTE\",\n label: \"見積\"\n },\n {\n value: \"ORDER\",\n label: \"受注\"\n },\n {\n value: \"STOCK\",\n label: \"入荷\"\n },\n {\n value: \"PACK\",\n label: \"梱包\"\n },\n {\n value: \"SHIP\",\n label: \"出荷\"\n },\n {\n value: \"INVOICE\",\n label: \"請求\"\n },\n {\n value: \"COMPLETE\",\n label: \"完了\"\n },\n {\n value: \"CANCEL\",\n label: \"失注\"\n }\n];\n\n\n/***/ })\n\n}]);"],"names":["self","push","__unused_webpack_module","__webpack_exports__","__webpack_require__","d","AccessGate","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","_mui_material__WEBPACK_IMPORTED_MODULE_2__","contexts_auth__WEBPACK_IMPORTED_MODULE_1__","logout","a","jsxs","role","className","children","jsx","Z","onClick","variant","UsersProvider","useUsers","react__WEBPACK_IMPORTED_MODULE_1__","_auth__WEBPACK_IMPORTED_MODULE_2__","_tenant__WEBPACK_IMPORTED_MODULE_3__","hooks_datalist__WEBPACK_IMPORTED_MODULE_4__","utils_license__WEBPACK_IMPORTED_MODULE_5__","UsersContext","createContext","users","managerUsers","mobileUsers","supportUsers","unlincensedUsers","isLicenseValid","isLicenseValidForMobile","isLicenseValidForManager","isLicenseValidForMe","myLicense","y$","MANAGER","canRemoveAdmin","loading","invite","Promise","resolve","update","refetch","param","user","tenant","S","data","create","set","nextToken","appendNext","query","disableMultiTenant","variables","tenantId","fetchingNext","setFetchingNext","useState","useEffect","finally","map","ref","ref1","usersTenantsId","id","groups","filter","license","MOBILE","NONE","SUPPORT","isAdmin","active","length","maxManagerLicense","maxMobileLicense","me","find","usr","inviteMember","input","multiTenant","updateMember","values","useMemo","Provider","value","usersContext","useContext","undefined","defaultCookieOptions","parseCookieBooleanValue","sameSite","secure","maxAge","path","dateStringToJaDateTimeStr","pickLatestDateString","dateStringToJaDateStr","date","Date","dateString","isNaN","getTime","jaDateStr","toLocaleDateString","year","month","day","replace","jaDateTimeStr","hour12","hour","minute","second","date1","date2","LicenseEnum","getLicenseName","getLicenseOptions","label","download","downloadMultipleReports","downloadTemplate","replaceFileName","lib_esm","moment","moment_default","n","jszip_min","jszip_min_default","docxtemplater","docxtemplater_default","js","js_default","PizZipUtils","renderDocument","blob","file","reject","url","URL","createObjectURL","getBinaryContent","err","modifyContent","content","zip","doc","loadZip","setData","render","error","properties","errors","Array","errorMessages","explanation","join","Error","getZip","generate","type","mimeType","e","then","t","bind","r","axios","renderSpreadsheet","report","body","FormData","append","JSON","stringify","res","post","timeout","API","queries","utils_project","getProjectData","projectId","p","b","graphql","getProject","authMode","project","name","accountName","contactName","contactTitle","reference","alert","managerName","quoterName","operatorName","m","ss","schedules","items","s","idx","number","m3","case","shipType","stockingDate","packagingDate","shippingDate","cutDate","g","group","phone","fax","email","taxRate","ga","groupAddress","postalCode","country","state","city","street","gb","bank","groupBank","branchName","branchNumber","accountNumber","account","billingPostalCode","billingState","billingStreet","getQuoteData","quoteId","_showInQuoteSummary","_showInQuoteSummary1","q","getQuote","qss","quoteSummariesByQuoteId","quote","quoteNumber","expiryDate","description","destination","greeting","totalNumOfCases","totalNetWeight","totalGrossWeight","totalM3","revenue","createdAt","DB","updatedAt","qls","quoteLines","sortedQls","ql","showInQuoteSummary","sort","order","index","packageTypeName","pricingName","quantity","amount","outerLength","outerWidth","outerHeight","productLength","productWidth","productHeight","unit","unitNW","NW","unitPrice","taxType","subtotal","total","notes","estimatedUnitGrossWeight","estimatedGrossWeight","estimatedUnitM3","toFixed","estimatedM3","estimatedUnitCost","estimatedCost","estimatedProfit","quoteSummaries","qs","otherQuoteLines","l","packQuoteLines","graphql_product","getServiceData","productId","de","getProduct","service","productNumber","schedule","getInvoiceData","i","invoicesByProjectId","invoice","invoiceNo","issueDate","billingDate","recordingDate","billingType","taxed","untaxed","taxTotal","taxableTotal","accountAddress","groupName","ils","invoiceLines","il","minimumAmount","grossWeight","getDocxData","templateType","options","promises","projectData","secondaryData","all","project_getProjectData","isExternalShareEnabled","externalShareExpirationDate","externalShareEnabled","externalSharePassword","externalShareUrl","isExpired","startOf","isAfter","qrcode","userName","category","sortByCreatedDate","isBefore","quote_getQuoteData","paymentMethod","estimatedWood","estimatedLvl","estimatedPanel","estimatedInterior","estimatedExterior","estimatedCostM3","estimatedOther","getMaterial","ms","elements","materialElement","slug","includes","material","getValue","filteredElements","element","Number","utils_product","getProductData","groupId","as","areas","materialsByGroupId","packPhases","showInKanBan","product","stamp","innerLength","innerWidth","innerHeight","Hs","clearanceLengthLeft","clearanceLengthRight","clearanceWidthLeft","clearanceWidthRight","clearanceHeightTop","clearanceHeightTopUnderBeam","clearanceHeightBottom","verticalClearance","panelM2","Math","round","woodM3","note","tareWeight","components","reduce","area","cs","areaName","c","width","height","m2","lengthNominal","widthNominal","heightNominal","concat","is","decorations","es","interiors","exteriors","cases","netWeight","service_getServiceData","scheduleName","utils_productSummary","getProductSummaryData","summaryOrderMapping","arguments","productSummariesByProjectId","productIdOrderPair","lB","productSummary","$Y","summaryLines","phaseName","summary","totalQuantity","invoice_getInvoiceData","invoiceId","ref2","ref3","ref4","ref5","ref6","ref7","ref8","ref9","ref10","ref11","ref12","getInvoice","taxableSubtotal","nonTaxableTotal","accountSite","contactFirstName","contactLastName","contactDepartment","accountPostalCode","accountState","accountCity","accountStreet","groupPostalCode","groupState","groupCity","groupStreet","bankName","bankBranchName","bankBranchNumber","bankAccountType","bankAccountNumber","salesType","getXlsxData","productSummariesFilter","getData","utils_files","utils_image","dataType","Ke","get","template","key","cacheControl","qi","fileName","format","Body","Sv","renderData","customName","base64","msg","message","response","reports","products","dataPromises","filePromises","fileNames","reportList","dataTypes","forEach","option","files","blobsBase64sPromises","blobsBase64s","blobsPromises","cx","blobs","f","zipBlob","generateAsync","getStatus","text","match","getStatusIndex","status","getStatusInitial","getStatusText"],"sourceRoot":""}