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,SAHO4O,GACxBtN,CAAA,EAGA,IAAMuN,qBAAAA,CAAU,CAAWC,mBAAAA,CAAG,CAAS,CAAAxN,EAEjC,CAAAkD,EAAAC,EAAe,EAAY,EAAArB,EAAA4D,QAAA,MAC/B+H,EAAc,UACZvK,EAEmBsK,EACF,CAAAE,cACT,CAAAC,GACF,EACQ5K,KACJ,CACF6K,SAAA1K,CACF,CACA,GACe2K,YACX,CACFD,SAAA1K,CACF,CACA,GACe4K,YACX,CACFF,SAAA1K,CACF,CACA,GACa6K,UACT,CACFH,SAAA1K,CACF,CACA,GACe8K,YACX,CACFJ,SAAA1K,CACF,CACA,GACc+K,WACV,CACFL,SAAA1K,CACF,CACA,GACgBgL,aACF,CACZN,SAAA1K,CACF,CACA,GACU6E,OACN,CACF6F,SAAA,GAAA9E,EAAAqF,EAAA,EAAAjL,EACF,CACD,EACH,EACYkL,WACN,CAAAT,GACF,EACaU,UACT,CACFT,SAAA1K,CACF,CACA,GACYoL,SACR,CACFV,SAAA1K,CACF,CACA,GACQH,KACJ,CACF6K,SAAA1K,CACF,CACD,EACH,EACgBqL,eACV,CAAAZ,GACF,EACQ5K,KACJ,CACF6K,SAAA1K,CACF,CACD,EACH,EACgBsL,eACV,CAAAb,GACF,EACsBc,mBACR,CACZb,SAAA1K,CACF,CACA,GACuBwL,oBACT,CACZd,SAAA1K,CACF,CACA,GACsByL,mBACR,CACZf,SAAA1K,CACF,CACA,GACiB0L,cACH,CACZhB,SAAA1K,CACF,CACA,GACgB2L,aACF,CACZjB,SAAA1K,CACF,CACD,EACH,CAEH,GAxGDsK,EAAO,IA0GTD,GAEA,EACQ,MACM,GAAAjM,EAAAkF,IAAA,EAAA2G,GAAA/M,CAAA,EACV6D,UAAI,OAAAZ,GACF,CACAyL,EAAA,UACAC,QAAA,OACAC,WAAO,SACPzC,MAAG,IACLI,EAAA,UACA,EACI,SAAAlF,EAAA,CACFA,EAAAwH,cAAA,GACFxB,GAAA,EAAA1N,SAAA,CAGM,GAAAu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src/contexts/groups.tsx","webpack://_N_E/./src/components/Projects/ListView/Filter.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Header/DateRange.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Header/Sort.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Header/Filter.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Table/Columns.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Header/Column.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Header/index.tsx","webpack://_N_E/./src/components/Projects/ListView/Columns.tsx","webpack://_N_E/./src/components/SearchBox.tsx","webpack://_N_E/./src/hooks/request.ts","webpack://_N_E/./src/components/Projects/ListView/Table.tsx","webpack://_N_E/./src/components/Projects/ListView/index.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Table/ProjectCell.tsx","webpack://_N_E/./src/utils/gantt/constant.ts","webpack://_N_E/./src/utils/gantt/schedule.ts","webpack://_N_E/./src/components/Projects/ScheduleView/Table/GanttCell.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Table/ScheduleCell.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Table/ProjectRow.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/Table/index.tsx","webpack://_N_E/./src/components/Projects/ScheduleView/index.tsx","webpack://_N_E/./src/components/Projects/Menu.tsx","webpack://_N_E/./src/components/Projects/SaveFilterButton.tsx","webpack://_N_E/./src/components/Projects/index.tsx","webpack://_N_E/./src/pages/index.tsx","webpack://_N_E/./src/utils/toolbar.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return require(\"private-next-pages/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/\"])\n });\n }\n ","import {\n ReactNode,\n createContext,\n useContext,\n useEffect,\n useMemo,\n} from \"react\";\n\nimport { useAuth } from \"./auth\";\n\nimport type { Group } from \"API\";\nimport useDataList, { GraphQLInput } from \"hooks/datalist\";\n\ninterface GroupsContextValue {\n loading: boolean;\n groups: Group[] | undefined;\n update: (input: GraphQLInput) => void;\n create: (input: GraphQLInput) => void;\n refetch: () => Promise;\n set: (input: GraphQLInput) => void;\n}\n\ninterface GroupsContextProps {\n caseOrder?: string | null | undefined;\n children: ReactNode;\n}\n\nconst GroupsContext = createContext({\n groups: [],\n loading: false,\n update: () => null,\n create: () => null,\n refetch: () => Promise.resolve(),\n set: () => Promise.resolve,\n});\n\nexport const GroupsProvider = ({ children }: GroupsContextProps) => {\n const { user } = useAuth();\n const { data, loading, refetch, update, create, set } = useDataList({\n query: \"groupsByTenantId\",\n variables: {\n tenantId: user?.tenantId,\n },\n });\n\n useEffect(() => {\n refetch({\n tenantId: user?.tenantId,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [user?.tenantId]);\n\n const createGroup = async (input: GraphQLInput) => {\n await create(\"createGroup\", {\n ...input,\n tenantId: user?.tenantId,\n });\n };\n\n const updateGroup = async (input: GraphQLInput) => {\n await update(\"updateGroup\", {\n ...input,\n });\n };\n\n const values = useMemo(\n () => ({\n groups: data,\n update: updateGroup,\n create: createGroup,\n loading,\n refetch: () => refetch({ tenantId: user?.tenantId }),\n set,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [data, update, loading, create, set]\n );\n\n return (\n {children}\n );\n};\n\nexport const useGroups = () => {\n const groupsContext = useContext(GroupsContext);\n\n if (groupsContext === undefined) {\n throw new Error(\"useGroups must be within GroupsProvider\");\n }\n\n return groupsContext;\n};\n","import Autocomplete from \"@mui/material/Autocomplete\";\nimport Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { removeBeforeIdx } from \"utils/gantt\";\n\nconst options = [\n { id: \"見積\", name: \"見積\" },\n { id: \"受注\", name: \"受注\" },\n { id: \"入荷\", name: \"入荷\" },\n { id: \"梱包\", name: \"梱包\" },\n { id: \"出荷\", name: \"出荷\" },\n { id: \"請求\", name: \"請求\" },\n { id: \"完了\", name: \"完了\" },\n { id: \"失注\", name: \"失注\" },\n];\n\nexport default function ProjectFilter() {\n const { projects, keyword, setKeyword } = useGantt();\n return (\n opt.name}\n options={options}\n clearOnBlur={false}\n inputValue={keyword || \"\"}\n renderOption={(props, option) => (\n \n {option.name}\n \n )}\n onInputChange={(_, value) => {\n setKeyword(value);\n removeBeforeIdx(projects);\n }}\n onChange={(_, value) => value && setKeyword(value?.name as string)}\n renderInput={(params) => (\n \n )}\n />\n );\n}\n","import { useState } from \"react\";\nimport { DateRangePicker } from \"mui-daterange-picker\";\nimport Button from \"@mui/material/Button\";\nimport moment from \"moment\";\nimport ja from \"date-fns/locale/ja\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { removeBeforeIdx } from \"utils/gantt\";\n\nconst displayFormat = \"MM月DD日\";\n\nconst definedRanges = [\n {\n label: \"今週\",\n startDate: moment().startOf(\"week\").toDate(),\n endDate: moment().endOf(\"week\").toDate(),\n },\n {\n label: \"先週\",\n startDate: moment().startOf(\"week\").subtract(1, \"week\").toDate(),\n endDate: moment().endOf(\"week\").subtract(1, \"week\").toDate(),\n },\n {\n label: \"来週\",\n startDate: moment().startOf(\"week\").add(1, \"week\").toDate(),\n endDate: moment().endOf(\"week\").add(1, \"week\").toDate(),\n },\n {\n label: \"今月\",\n startDate: moment().startOf(\"month\").toDate(),\n endDate: moment().endOf(\"month\").toDate(),\n },\n {\n label: \"先月\",\n startDate: moment().subtract(1, \"month\").startOf(\"month\").toDate(),\n endDate: moment().subtract(1, \"month\").endOf(\"month\").toDate(),\n },\n {\n label: \"来月\",\n startDate: moment().add(1, \"month\").startOf(\"month\").toDate(),\n endDate: moment().add(1, \"month\").endOf(\"month\").toDate(),\n },\n {\n label: \"+7Days\",\n startDate: moment().toDate(),\n endDate: moment().add(7, \"day\").toDate(),\n },\n {\n label: \"+30Days\",\n startDate: moment().toDate(),\n endDate: moment().add(1, \"month\").toDate(),\n },\n];\n\nexport default function DateRange() {\n const [open, setOpen] = useState(false);\n const { projects, dateRange, setDateRange, setDateLabel } = useGantt();\n const { startDate, endDate } = dateRange;\n const displayDateRange = `${moment(startDate).format(\n displayFormat\n )} - ${moment(endDate).format(displayFormat)}`;\n\n const toggle = () => setOpen(!open);\n\n //PAX-607 dateLabelを取得してコンテキストに渡す\n const handleDateRangeChange = (range: any) => {\n const selectedIndex = definedRanges.findIndex(\n (item) =>\n item.startDate.getTime() === range.startDate.getTime() &&\n item.endDate.getTime() === range.endDate.getTime()\n );\n if (selectedIndex !== -1) {\n setDateLabel(definedRanges[selectedIndex].label);\n } else {\n setDateLabel(\"\"); // ラベルがない場合は空の文字列に設定\n }\n\n setDateRange(range);\n removeBeforeIdx(projects);\n };\n\n return (\n
\n \n
\n \n
\n
\n );\n}\n","import TextField from \"@mui/material/TextField\";\nimport ListSubheader from \"@mui/material/ListSubheader\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport ArrowUpwardIcon from \"@mui/icons-material/ArrowUpward\";\nimport ArrowDownIcon from \"@mui/icons-material/ArrowDownward\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { ProjectDateSortName, removeBeforeIdx } from \"utils/gantt\";\n\nconst ascOptions = [\n { value: \"sortByStatus\", label: \"フェーズ順\" },\n { value: \"sortByName\", label: \"案件名順\" },\n { value: \"sortByStock\", label: \"入荷日順\" },\n { value: \"sortByPackage\", label: \"梱包日順\" },\n { value: \"sortByShip\", label: \"出荷日順\" },\n { value: \"sortByCut\", label: \"CUT日順\" },\n { value: \"sortByCreate\", label: \"作成日順\" },\n { value: \"sortByUpdate\", label: \"最終更新日順\" },\n];\n\nconst descOptions = [\n { value: \"sortByStatusDesc\", label: \"フェーズ順\" },\n { value: \"sortByNameDesc\", label: \"案件名順\" },\n { value: \"sortByStockDesc\", label: \"入荷日順\" },\n { value: \"sortByPackageDesc\", label: \"梱包日順\" },\n { value: \"sortByShipDesc\", label: \"出荷日順\" },\n { value: \"sortByCutDesc\", label: \"CUT日順\" },\n { value: \"sortByCreateDesc\", label: \"作成日順\" },\n { value: \"sortByUpdateDesc\", label: \"最終更新日順\" },\n];\n\nexport default function ProjectFilter() {\n const { projects, sort, setSort } = useGantt();\n\n return (\n {\n setSort(e.target.value as ProjectDateSortName);\n removeBeforeIdx(projects);\n }}\n sx={{ minWidth: 160 }}\n size=\"small\"\n >\n 昇順\n {ascOptions.map((option) => (\n \n {option.label} \n \n ))}\n 降順\n {descOptions.map((option) => (\n \n {option.label} \n \n ))}\n \n );\n}\n","import Autocomplete from \"@mui/material/Autocomplete\";\nimport Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport { useEffect, useState } from \"react\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { removeBeforeIdx } from \"utils/gantt\";\n\nconst options = [\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\nexport default function ProjectFilter() {\n const [value, setValue] = useState([]);\n const { projects, status, setStatus, keyword, setKeyword } = useGantt();\n\n useEffect(() => {\n setValue(options.filter((o) => status.includes(o.value)));\n }, [status]);\n\n return (\n opt.label}\n options={options}\n clearOnBlur={false}\n renderOption={(props, option) => (\n \n {option.label}\n \n )}\n onInputChange={(_, value) => {\n setKeyword(value);\n removeBeforeIdx(projects);\n }}\n onChange={(_, value) => {\n setStatus(value.map((v) => v.value) as any);\n removeBeforeIdx(projects);\n }}\n value={value}\n renderInput={(params) => (\n \n )}\n />\n );\n}\n","import moment from \"moment\";\nimport VisibilityIcon from \"@mui/icons-material/Visibility\";\nimport IconButton from \"@mui/material/IconButton\";\nimport EditNotificationsIcon from \"@mui/icons-material/EditNotifications\";\nimport Link from \"next/link\";\nimport { Tooltip } from \"@mui/material\";\n\nimport { drawHolidayBorder, drawHolidayColor } from \"utils/gantt\";\nimport { getStatusText } from \"utils/status\";\nimport { Holiday } from \"API\";\n\nexport const dateColDef = (\n dates: string[],\n holidays: (Holiday | null)[] | undefined\n) => {\n return dates.map((date) => ({\n field: date,\n headerName: (\n
\n
{moment(date).format(\"ddd\")}
\n
{moment(date).format(\"M/D\")}
\n
\n ),\n headerClassName: `m-0 p-0 ${drawHolidayColor(\n date,\n holidays\n )} ${drawHolidayBorder(date, holidays)} `,\n }));\n};\n\n/**\n * スケジュールの表示カラム。表示制御ボタンのプロジェクト項目と見分けるためにfieldは\"s.\"で始める。\n */\nexport const scheduleColDef = () => [\n {\n field: \"s.name\",\n headerName: \"スケジュール名\",\n headerClassName: \"w-36\",\n cellClassName: \"break-words\",\n showColumnsMenu: true,\n },\n {\n field: \"s.note\",\n headerName: \"スケジュールメモ\",\n headerClassName: \"w-32\",\n cellClassName: \"break-words\",\n showColumnsMenu: true,\n editable: true,\n inputProps: {\n maxLength: 30,\n },\n },\n];\n\nexport const projectColDef = () => [\n {\n field: \"recentlyScheduleUpdated\",\n headerName: \"\",\n headerClassName: \"w-1\",\n cellClassName: \"cursor-hover hover:text-slate-800\",\n showColumnsMenu: false,\n renderCell: (params: any) =>\n params.value && (\n \n
\n \n
\n \n ),\n },\n {\n field: \"name\",\n headerName: \"案件名\",\n headerClassName: \"w-48\",\n cellClassName: \"cursor-hover hover:text-slate-800\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
\n \n \n \n \n \n {params.value}\n
\n ),\n },\n {\n field: \"reference\",\n headerName: \"案件管理番号\",\n headerClassName: \"w-32 text-center\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"category\",\n headerName: \"案件分類\",\n headerClassName: \"w-32 text-center\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"status\",\n headerName: \"フェーズ\",\n headerClassName: \"w-24 text-center\",\n cellClassName: \"text-center\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
\n {getStatusText(params.value)}\n
\n ),\n },\n {\n field: \"accountName\",\n headerName: \"取引先名\",\n headerClassName: \"w-44\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"contactName\",\n headerName: \"取引先責任者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"userName\",\n headerName: \"作成者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"managerName\",\n headerName: \"案件担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"operatorName\",\n headerName: \"業務担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"quoterName\",\n headerName: \"見積担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
{params.value}
\n ),\n },\n {\n field: \"createdAt\",\n headerName: \"作成日\",\n headerClassName: \"w-28 text-center\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
\n {new Date(params.value).toLocaleDateString(\"ja-JP\", {\n month: \"numeric\",\n day: \"numeric\",\n })}\n
\n ),\n },\n {\n field: \"updatedAt\",\n headerName: \"最終更新日\",\n headerClassName: \"w-28 text-center\",\n showColumnsMenu: true,\n renderCell: (params: any) => (\n
\n {new Date(params.value).toLocaleDateString(\"ja-JP\", {\n month: \"numeric\",\n day: \"numeric\",\n })}\n
\n ),\n },\n];\n","import React, { useState } from \"react\";\nimport { Button, Menu, FormControlLabel, Switch } from \"@mui/material\";\n\nimport { projectColDef, scheduleColDef } from \"../Table/Columns\";\n\nimport { useGantt } from \"contexts/gantt\";\n\n// 制御する項目(Table/ColumnsからshowColumnsMenu=trueのものを取得)\nexport const defColumns = [\n ...projectColDef().filter((col) => col.showColumnsMenu),\n ...scheduleColDef().filter((col) => col.showColumnsMenu),\n];\n\nexport default function Column() {\n const [anchorEl, setAnchorEl] = useState(null);\n const { column, setColumn } = useGantt();\n\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n return (\n
\n \n 表示項目\n \n \n {defColumns.map((defColumn) => (\n
\n \n column.includes(defColumn.field)\n ? setColumn(column.filter((f) => f !== defColumn.field))\n : setColumn(column.concat(defColumn.field))\n }\n />\n }\n />\n
\n ))}\n
\n
\n );\n}\n","import DateRange from \"./DateRange\";\nimport Sort from \"./Sort\";\nimport Filter from \"./Filter\";\nimport Column from \"./Column\";\n\nexport default function GanttHeader() {\n return (\n <>\n \n \n \n \n \n );\n}\n","import { GridColDef } from \"@mui/x-data-grid\";\nimport VisibilityIcon from \"@mui/icons-material/Visibility\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Link from \"next/link\";\n\nimport { IPermission } from \"utils/permission\";\nimport { getStatusText } from \"utils/status\";\nimport { getProjectTypeName } from \"utils/project\";\n\n// PAX-538 文字列の幅について、以下の列のみ固定値\n// reference, type, status, schedules, createdAt, updatedAt\n// 自動調整するならDataGridProが必要\nexport const Columns = (permission: IPermission): GridColDef[] => {\n const cols: GridColDef[] = [\n {\n field: \"reference\",\n headerName: \"案件管理番号\",\n sortable: true,\n width: 140,\n renderCell: (params: any) => (\n
\n \n \n \n \n \n {params.value}\n
\n ),\n },\n {\n field: \"name\",\n headerName: \"案件名\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 3,\n },\n {\n field: \"accountName\",\n headerName: \"取引先名\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n },\n {\n field: \"contactName\",\n headerName: \"取引先責任者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n },\n {\n field: \"managerName\",\n headerName: \"案件管理者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n },\n {\n field: \"quoterName\",\n headerName: \"見積担当者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n },\n {\n field: \"operatorName\",\n headerName: \"業務担当者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n },\n {\n field: \"user\",\n headerName: \"作成者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n type: \"string\",\n },\n {\n field: \"alert\",\n headerName: \"注意事項\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 2,\n },\n {\n field: \"type\",\n headerName: \"案件タイプ\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 70,\n valueFormatter: (value) => getProjectTypeName(value),\n renderCell: (params) => <>{getProjectTypeName(params.value)},\n },\n {\n field: \"category\",\n headerName: \"案件分類\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n type: \"string\",\n },\n {\n field: \"status\",\n headerName: \"案件フェーズ\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 70,\n valueFormatter: (value) => getStatusText(value),\n renderCell: (params) => <>{getStatusText(params.value)},\n },\n {\n field: \"schedules\",\n headerName: \"スケジュール数\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 50,\n valueFormatter: (value: { items: any[] }) => value.items.length,\n renderCell: (params) => <>{Object.keys(params.value.items).length},\n },\n {\n field: \"createdAt\",\n headerName: \"作成日\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 130,\n },\n {\n field: \"updatedAt\",\n headerName: \"最終更新日\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 130,\n },\n ];\n\n if (permission.canWrite) {\n return cols;\n }\n\n return cols.filter((col) => col.field !== \"editBtn\");\n};\n\nexport default Columns;\n","import * as React from \"react\";\nimport { useState, Dispatch, SetStateAction } from \"react\";\nimport Paper from \"@mui/material/Paper\";\nimport InputBase from \"@mui/material/InputBase\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { getStatus } from \"utils/status\";\n\ntype SearchBoxProps = {\n resetPaginationModel: () => void;\n setFilterCondition: Dispatch>;\n};\n\nexport function SearchBox({\n resetPaginationModel,\n setFilterCondition,\n}: SearchBoxProps) {\n const [keyword, setKeyword] = useState(\"\");\n\n const handleSearch = async () => {\n if (!keyword) {\n setFilterCondition({});\n } else {\n setFilterCondition({\n projectFilter: {\n or: [\n {\n name: {\n contains: keyword,\n },\n },\n {\n accountName: {\n contains: keyword,\n },\n },\n {\n contactName: {\n contains: keyword,\n },\n },\n {\n reference: {\n contains: keyword,\n },\n },\n {\n managerName: {\n contains: keyword,\n },\n },\n {\n quoterName: {\n contains: keyword,\n },\n },\n {\n operatorName: {\n contains: keyword,\n },\n },\n {\n status: {\n contains: getStatus(keyword),\n },\n },\n ],\n },\n userFilter: {\n or: [\n {\n firstName: {\n contains: keyword,\n },\n },\n {\n lastName: {\n contains: keyword,\n },\n },\n {\n name: {\n contains: keyword,\n },\n },\n ],\n },\n categoryFilter: {\n or: [\n {\n name: {\n contains: keyword,\n },\n },\n ],\n },\n scheduleFilter: {\n or: [\n {\n beforeStockingName: {\n contains: keyword,\n },\n },\n {\n beforePackagingName: {\n contains: keyword,\n },\n },\n {\n beforeShippingName: {\n contains: keyword,\n },\n },\n {\n beforeCutName: {\n contains: keyword,\n },\n },\n {\n afterCutName: {\n contains: keyword,\n },\n },\n ],\n },\n });\n }\n resetPaginationModel();\n };\n\n return (\n {\n e.preventDefault();\n handleSearch();\n }}\n >\n setKeyword(e.target.value)}\n />\n \n \n \n \n );\n}\n","import { QueryKey, useQuery } from \"@tanstack/react-query\";\nimport { API } from \"aws-amplify\";\n\nimport { useAlerts } from \"contexts/alerts\";\nimport { CustomError } from \"utils/error\";\n\ninterface APIResponse {\n __typename: string;\n}\n\nfunction extractQueryName(graphqlQuery: string) {\n const queryNameMatch = graphqlQuery.match(/query\\s+([a-zA-Z0-9_]+)/);\n if (!queryNameMatch) return null;\n\n const queryName = queryNameMatch[1];\n // 頭文字を小文字に変換\n return queryName.charAt(0).toLowerCase() + queryName.slice(1);\n}\n\nconst fetchAppSync = async (\n query: string,\n params: { [key: string]: unknown }\n): Promise => {\n const res = await API.graphql({\n query,\n variables: params,\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n });\n\n const queryName = extractQueryName(query);\n\n if (!queryName) {\n throw new Error(\"Query name not found\");\n }\n return res.data[queryName];\n};\n\nexport const useQueryWrap = (\n queryKey: QueryKey,\n query: string,\n params: { [key: string]: unknown },\n queryFn: (res: T) => U,\n scaleTime?: number,\n gcTime?: number\n) => {\n const { addAlert } = useAlerts();\n return useQuery({\n queryKey,\n queryFn: async () => {\n try {\n const data = await fetchAppSync(query, params);\n\n return queryFn(data);\n } catch (err) {\n const customError = new CustomError(err, \"get\");\n if (customError instanceof Error)\n addAlert({ message: customError.message, severity: \"error\" });\n }\n },\n staleTime: scaleTime ?? 1000 * 60 * 5,\n gcTime: gcTime ?? 1000 * 60 * 6,\n });\n};\n","import { useState } from \"react\";\nimport {\n DataGrid,\n GridColumnVisibilityModel,\n GridPaginationModel,\n} from \"@mui/x-data-grid\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\n\nimport columns from \"./Columns\";\n\nimport { ProjectsByGroupIdForManagerOutput } from \"API\";\nimport { dateStringToJaDateStr } from \"utils/date\";\nimport { dataGridToolbar } from \"utils/toolbar\";\nimport { useAuth } from \"contexts/auth\";\nimport { SearchBox } from \"components/SearchBox\";\nimport {\n ModelProjectConditionInput,\n ModelUserConditionInput,\n ModelScheduleConditionInput,\n} from \"API\";\nimport { getFullName } from \"utils/user\";\nimport { projectsByGroupIdForManager } from \"graphql/queries\";\nimport { useQueryWrap } from \"hooks/request\";\n\ntype CursorInfo = {\n nextToken: string | null;\n startIndex: number;\n};\n\ntype FilterCondition = {\n projectFilter?: ModelProjectConditionInput[];\n userFilter?: ModelUserConditionInput[];\n categoryFilter?: ModelProjectConditionInput[];\n scheduleFilter?: ModelScheduleConditionInput[];\n};\n\nconst dataToRows = (data: ProjectsByGroupIdForManagerOutput[\"items\"]) => {\n if (!data) return [];\n const rows = data.map((d) => ({\n id: d?.id,\n managerName: d?.managerName,\n quoterName: d?.quoterName,\n operatorName: d?.operatorName,\n accountId: d?.accountId,\n accountName: d?.accountName,\n contactId: d?.contactId,\n contactName: d?.contactName,\n name: d?.name,\n status: d?.status,\n alert: d?.alert,\n reference: d?.reference,\n type: d?.type,\n createdAt: d?.createdAt ? dateStringToJaDateStr(d.createdAt) : null,\n updatedAt: d?.updatedAt ? dateStringToJaDateStr(d.updatedAt) : null,\n account: d?.account,\n schedules: d?.schedules,\n user: getFullName(d?.user),\n category: d?.category?.name,\n }));\n return rows;\n};\n\nconst DEFAULT_PAGINATION_MODEL = {\n page: 0,\n pageSize: 100,\n};\n\nexport function Table() {\n const { permissions, currentGroup, user } = useAuth();\n const [paginationModel, setPaginationModel] = useState(\n DEFAULT_PAGINATION_MODEL\n );\n // ページごとのnextTokenを管理\n const [cursorInfo, setCursorInfo] = useState<{ [key: string]: CursorInfo }>(\n {}\n );\n const [filterCondition, setFilterCondition] = useState({});\n\n //PAX-538 デフォルトで表示しない列はここで指定する\n const [columnVisibilityModel, setColumnVisibilityModel] =\n useState({\n managerName: false,\n quoterName: false,\n operatorName: false,\n user: false,\n alert: false,\n caseMarkNumImgs: false,\n stockNumImgs: false,\n archived: false,\n cancelled: false,\n cancelReason: false,\n });\n\n const generateCacheKey = (page: number) => {\n return JSON.stringify({\n query: \"projectsByGroupIdForManager\",\n groupId: currentGroup?.id,\n page,\n pageSize: paginationModel.pageSize,\n filterCondition: filterCondition,\n });\n };\n\n const hasNextPage =\n cursorInfo[generateCacheKey(paginationModel.page)]?.nextToken !== null;\n\n const queryCallback = (data: ProjectsByGroupIdForManagerOutput) => {\n const newNextToken = data.nextToken ?? null;\n const newStartIndex = data.startIndex ?? 0;\n // 新しいトークンが存在する場合にnextTokensを更新\n setCursorInfo((prevCursorInfo) => {\n if (generateCacheKey(paginationModel.page) in cursorInfo) {\n return prevCursorInfo;\n }\n return {\n ...prevCursorInfo,\n [generateCacheKey(paginationModel.page)]: {\n nextToken: newNextToken,\n startIndex: newStartIndex,\n },\n };\n });\n return data.items;\n };\n\n const handlePaginationModelChange = (\n newPaginationModel: GridPaginationModel\n ) => {\n // 1ページあたりの表示数が変わるときはトークンとページをリセット\n if (newPaginationModel.pageSize !== paginationModel.pageSize) {\n setPaginationModel({ ...newPaginationModel, page: 0 });\n } else {\n setPaginationModel(newPaginationModel);\n }\n };\n\n const resetPaginationModel = () => {\n setPaginationModel(DEFAULT_PAGINATION_MODEL);\n };\n\n const { data: projects, isLoading } = useQueryWrap<\n ProjectsByGroupIdForManagerOutput,\n ProjectsByGroupIdForManagerOutput[\"items\"]\n >(\n [\n \"projectsByGroupIdForManager\",\n currentGroup?.id,\n paginationModel.page,\n paginationModel.pageSize,\n filterCondition,\n ],\n projectsByGroupIdForManager,\n {\n groupId: currentGroup?.id,\n tenantId: user?.tenantId,\n filter: { ...filterCondition.projectFilter, archived: { ne: true } },\n userFilter: filterCondition.userFilter,\n categoryFilter: filterCondition.categoryFilter,\n scheduleFilter: filterCondition.scheduleFilter,\n limit: paginationModel.pageSize,\n sortDirection: \"DESC\",\n nextToken:\n cursorInfo[generateCacheKey(paginationModel.page - 1)]?.nextToken ??\n null,\n startIndex:\n cursorInfo[generateCacheKey(paginationModel.page - 1)]?.startIndex ?? 0,\n },\n queryCallback\n );\n\n if (!projects && !isLoading) return null;\n return (\n <>\n \n {isLoading ? (\n \n ) : (\n \n setColumnVisibilityModel(newModel)\n }\n initialState={{\n pagination: { rowCount: -1 },\n density: \"compact\",\n }}\n // PAX-538 列選択をできないようにしている(1列だけ掴むとCSV出力などがうまくいかないため)\n isRowSelectable={() => false}\n // paginationの設定\n paginationMode=\"server\"\n pageSizeOptions={[25, 50, 100]}\n paginationMeta={{ hasNextPage }}\n paginationModel={paginationModel}\n onPaginationModelChange={handlePaginationModelChange}\n />\n )}\n \n );\n}\n\nexport default Table;\n","import Table from \"./Table\";\n\nfunction ProjectListView() {\n return (\n
\n
\n \n \n );\n}\n\nexport default ProjectListView;\n","import TableCell from \"@mui/material/TableCell\";\n\n// スケジュールのカラムに表示する内容をカスタマイズする\nconst renderCellValue = (row: any, col: any) => {\n switch (col.field) {\n case \"accountName\": // 取引先\n return `${row.account?.name ?? \"\"}`;\n case \"userName\": // 作成者\n return `${row.user?.lastName ?? \"\"} ${row.user?.firstName ?? \"\"}`;\n case \"category\":\n return `${row.category?.name ?? \"\"}`;\n default:\n return row[col.field];\n }\n};\n\nexport default function ProjectCell({ row, col }: any) {\n let rowSpan = row.schedules?.items.length + 1;\n if (rowSpan < 2) rowSpan = 2;\n return (\n \n
\n {col.renderCell\n ? col.renderCell({\n id: row.id,\n value: renderCellValue(row, col),\n })\n : row[col.field]}\n
\n
\n );\n}\n","interface Draggable {\n [key: string]: (id: string) => string;\n}\n\nexport const DraggableType: Draggable = {\n GANTT_CELL: (id: string) => `GANTT_CELL_${id}`,\n};\n","import moment, { Moment } from \"moment\";\nimport { API } from \"aws-amplify\";\n\nimport { Schedule, UpdateScheduleInput } from \"API\";\nimport { getSchedule } from \"graphql/queries\";\nimport { updateSchedule } from \"graphql/mutations\";\n\n/** フェーズ識別子 */\ntype PhaseType =\n | \"beforeStockingDate\"\n | \"stockingDate\"\n | \"beforePackagingDate\"\n | \"packagingDate\"\n | \"beforeShippingDate\"\n | \"shippingDate\"\n | \"beforeCutDate\"\n | \"cutDate\"\n | \"afterCutDate\";\n\n/** フェーズの列挙体。画面上左から並ぶ順番通りに上から列挙すること。 */\nconst PhaseEnum: PhaseType[] = [\n \"beforeStockingDate\",\n \"stockingDate\",\n \"beforePackagingDate\",\n \"packagingDate\",\n \"beforeShippingDate\",\n \"shippingDate\",\n \"beforeCutDate\",\n \"cutDate\",\n \"afterCutDate\",\n];\n\n// GQLを使ってscheduleをIDで取得する\nexport const getScheduleById = async (id: string): Promise => {\n const s = (\n await API.graphql({\n query: getSchedule,\n variables: { id },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n })\n ).data.getSchedule;\n\n return {\n __typename: \"Schedule\",\n id: s.id,\n projectId: s.projectId,\n name: s.name,\n note: s.note,\n beforeStockingName: s.beforeStockingName,\n beforeStockingDate: s.beforeStockingDate,\n stockingDate: s.stockingDate,\n beforePackagingName: s.beforePackagingName,\n beforePackagingDate: s.beforePackagingDate,\n packagingDate: s.packagingDate,\n beforeShippingName: s.beforeShippingName,\n beforeShippingDate: s.beforeShippingDate,\n shippingDate: s.shippingDate,\n shipType: s.shipType,\n beforeCutName: s.beforeCutName,\n beforeCutDate: s.beforeCutDate,\n cutDate: s.cutDate,\n afterCutName: s.afterCutName,\n afterCutDate: s.afterCutDate,\n createdAt: s.createdAt,\n updatedAt: s.updatedAt,\n };\n};\n\n// GQLを使ってscheduleを更新する\nexport const updateScheduleByInput = async (\n input: UpdateScheduleInput\n): Promise => {\n return await API.graphql({\n query: updateSchedule,\n variables: { input },\n authMode: \"AMAZON_COGNITO_USER_POOLS\",\n });\n};\n\n/**\n * targetがどこのphaseの日にちか確認する\n * @param schedule スケジュール情報\n * @param targetDate 確認したい日にち\n * @return 対象フェーズ、見つからない場合はnull\n */\nexport const getPhase = (\n schedule: Schedule,\n targetDate: string\n): PhaseType | null => {\n // 各日付のどの期間に含まれているか確認\n let result = -1; // フェーズを示す。idxのひとつ前に検査したフェーズにする\n let startDate = null;\n let endDate = null;\n // idx=0は(入荷)範囲がないため除外\n for (let idx = 0; idx < PhaseEnum.length; idx++) {\n // 日付未設定の場合は次の対象を探す\n if (!schedule[PhaseEnum[idx]]) continue;\n // 初回の日付を設定(比較対象がないためcontinue)\n if (!endDate) {\n endDate = schedule[PhaseEnum[idx]];\n result = idx;\n continue;\n }\n // 初回より後の日付を設定\n startDate = endDate;\n endDate = schedule[PhaseEnum[idx]];\n\n // 日付に含まれていればそのindexを返す。startDate <= targetDate < endDate\n if (\n moment(targetDate).isBetween(\n moment(startDate),\n moment(endDate),\n \"day\",\n \"[)\"\n )\n ) {\n break;\n }\n result = idx;\n }\n // resultの値でどのフェーズか判定\n if (result >= 0 && result < PhaseEnum.length) {\n return PhaseEnum[result];\n } else {\n return null;\n }\n};\n\n/**\n * toDateを以下の観点でvalidateする\n * - 前後のphaseに含まれているか\n * - 移動元が終点だったら開始日を、始点だったら終了日を越してはいけない\n * phaseによっては日にちが重なっていたりするのでそれも考慮している\n * @param schedule スケジュール情報\n * @param toDate 移動先の日にち\n * @param phase 移動させるフェーズ\n * @param isFuture 未来方向か過去方向か\n * @return 移動可能=true, 移動不可=false\n */\nexport const validateToDate = (\n schedule: Schedule,\n toDate: string,\n phase: PhaseType,\n isFuture: boolean\n): boolean => {\n /** 対象フェーズ */\n let phaseIndex: Number = -1;\n let momentBeforeDate: Moment | null | undefined = undefined;\n let isTargetPhase: boolean = false;\n\n const momentToDate = moment(toDate);\n\n // isFuture(未来/過去)によってループの向きを変える 未来最初から、過去最後から\n for (\n let i: number = isFuture ? 0 : PhaseEnum.length - 1;\n isFuture ? i < PhaseEnum.length : i >= 0;\n isFuture ? i++ : i--\n ) {\n // 処理開始位置\n if (!isTargetPhase) {\n if (phase === PhaseEnum[i]) {\n isTargetPhase = true;\n momentBeforeDate = moment(schedule[PhaseEnum[i]]);\n phaseIndex = i;\n }\n continue;\n }\n // 日付が未設定の場合 または 確認対象が同じ日の場合は確認不要なので次の日付を確認する\n if (\n !schedule[PhaseEnum[i]] ||\n momentBeforeDate?.isSame(moment(schedule[PhaseEnum[i]]))\n ) {\n continue;\n }\n // 移動先から未来なら過去方向・過去なら未来方向をみて日付の設定がある場合は移動不可\n return isFuture\n ? momentToDate.isSameOrBefore(moment(schedule[PhaseEnum[i]]))\n : momentToDate.isSameOrAfter(moment(schedule[PhaseEnum[i]]));\n }\n // いずれの日付にも条件が合致しない場合フリー\n return true;\n};\n\n/**\n * スケジュールを移動させる\n * - phaseの重なりについて\n * - 未来方向への移動は見えているphase(一番後のphase)のみ更新、過去方向への移動は全てまとめて更新\n * - 対象が開始日の場合…そのphaseの日にちを更新、ただし前のphaseがある場合はその日にちも更新\n * - 対象が終了日の場合…その後のphaseの日にちを更新\n * - 対象が開始日であり終了日の場合…そのphaseの日にちを更新、未来 or 過去方向によって更新が必要なphaseを更新する\n * @param phase 移動させるフェーズ\n * @param schedule スケジュール情報\n * @param toDate 移動先の日にち\n * @param isFuture 未来方向か過去方向か\n */\nconst moveSchedule = (\n phase: string,\n schedule: Schedule,\n toDate: string,\n isFuture: boolean\n): void => {\n let beforeDate: Moment | null | undefined = undefined;\n // isFuture(未来/過去)によってループの向きを変える\n for (\n let i: number = isFuture ? 0 : PhaseEnum.length - 1;\n isFuture ? i < PhaseEnum.length : i >= 0;\n isFuture ? i++ : i--\n ) {\n // 自分の日付を探す\n if (!beforeDate) {\n if (PhaseEnum[i] === phase) {\n beforeDate = moment(schedule[PhaseEnum[i]]);\n schedule[PhaseEnum[i]] = toDate;\n }\n continue;\n }\n // 同じ日付があれば一緒に移動する\n // * 未来方向は見えている日付が一番上になるので動作しない\n if (beforeDate.isSame(moment(schedule[PhaseEnum[i]]))) {\n schedule[PhaseEnum[i]] = toDate;\n }\n }\n};\n\n// scheduleを移動さきによって更新する\nexport const getUpdatedSchedule = async (\n fromDate: string,\n toDate: string,\n row: any\n): Promise => {\n // どのphaseがどの日にちからどの日にちに動こうとしているか取得\n\n // fromDateとtoDateが同じなら何もしない\n if (fromDate === toDate) return Promise.reject();\n\n // 移動が過去方向か未来方向か確認\n const isFuture = moment(fromDate).isBefore(toDate);\n\n // fromDateからどのフェーズか確認\n const phase = getPhase(row, fromDate);\n if (!phase) return Promise.reject();\n\n // toDateは前後のphaseの期間でないといけない\n if (!validateToDate(row, toDate, phase, isFuture)) {\n return Promise.reject();\n }\n\n // 変更対象のschedule取得\n const targetSchedule = await getScheduleById(row.id);\n if (targetSchedule === undefined) {\n return Promise.reject();\n }\n\n // 各phaseの日にちを更新していく\n moveSchedule(phase, targetSchedule, toDate, isFuture);\n\n const input: UpdateScheduleInput = {\n id: targetSchedule.id,\n projectId: targetSchedule.projectId,\n name: targetSchedule.name,\n m3: targetSchedule.m3,\n case: targetSchedule.case,\n shipType: targetSchedule.shipType,\n beforeStockingDate: targetSchedule.beforeStockingDate,\n stockingDate: targetSchedule.stockingDate,\n beforePackagingDate: targetSchedule.beforePackagingDate,\n packagingDate: targetSchedule.packagingDate,\n beforeShippingDate: targetSchedule.beforeShippingDate,\n shippingDate: targetSchedule.shippingDate,\n beforeCutDate: targetSchedule.beforeCutDate,\n cutDate: targetSchedule.cutDate,\n afterCutDate: targetSchedule.afterCutDate,\n numImgs: targetSchedule.numImgs,\n isShipped: targetSchedule.isShipped,\n };\n await updateScheduleByInput(input);\n const resultSchedule = await getScheduleById(row.id);\n if (resultSchedule === undefined) {\n return Promise.reject();\n }\n return resultSchedule;\n};\n","import TableCell from \"@mui/material/TableCell\";\nimport { useDrag, useDrop } from \"react-dnd\";\nimport { useRef } from \"react\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport {\n drawHolidayBorder,\n drawHolidayColor,\n getScheduleDates,\n} from \"utils/gantt\";\nimport { DraggableType } from \"utils/gantt/constant\";\nimport { getPhase, getUpdatedSchedule } from \"utils/gantt/schedule\";\nimport { Holiday, Project, Schedule } from \"API\";\nimport { useGroups } from \"contexts/groups\";\nimport { useAuth } from \"contexts/auth\";\nimport { useAlerts } from \"contexts/alerts\";\n\nfunction EmptyCell({\n date,\n color,\n className,\n onClick,\n cellRef,\n holidays,\n}: any) {\n return (\n \n );\n}\n\nfunction getCellStyle(data: any) {\n return `bg-[${data.color}] text-white text-gray-100 h-10`;\n}\n\ntype DragItem = {\n fromDate: string;\n};\n\nexport default function GanttCell({\n row,\n date,\n focus,\n noScheduleClassName,\n draggableId,\n setSchedules,\n}: any) {\n const { projects: ganttProjects, dates } = useGantt();\n const { groups } = useGroups();\n const { currentGroup, permissions } = useAuth();\n // rowとganttProjectsの最新の状態を保持するためのRefを作成します\n const rowRef = useRef(row);\n const refGanttProjects = useRef(ganttProjects);\n const { addAlert } = useAlerts();\n\n // rowとganttProjectsが更新されるたびにそれぞれのRefを更新します\n rowRef.current = row;\n refGanttProjects.current = ganttProjects;\n // 休日カレンダー\n const holidayCalendar: (Holiday | null)[] =\n groups?.find((group) => group.id === currentGroup?.id)?.holidays?.items ??\n [];\n\n const [, drag] = useDrag(\n () => ({\n type: DraggableType.GANTT_CELL(draggableId),\n item: { fromDate: date }, // drag元の日付\n }),\n []\n );\n\n const [, drop] = useDrop(\n () => ({\n accept: DraggableType.GANTT_CELL(draggableId),\n drop: async (item) => {\n try {\n // scheduleを更新する\n const updatedSchedule = await getUpdatedSchedule(\n item.fromDate,\n date,\n rowRef.current // rowRef.currentは更新されたrowの値を保持している\n );\n setSchedules((prev: [Schedule]) => {\n const updatedSchedules = [...prev];\n const index = updatedSchedules.findIndex(\n (schedule) => schedule.id === updatedSchedule.id\n );\n updatedSchedules[index] = {\n ...updatedSchedule,\n ...getScheduleDates(updatedSchedule, dates),\n };\n return updatedSchedules;\n });\n // ganttの中で何番目にあるかをidxで取得、最新のganttProjectsを参照する\n const idx = refGanttProjects.current.findIndex((project: Project) => {\n return project.id === updatedSchedule.projectId;\n });\n // ganttProjectsの中でtargetProjectと同じidを持つものを更新する\n const targetProject = ganttProjects.find(\n (project: Project) => project.id === updatedSchedule.projectId\n ) as Project & { beforeIdx: number };\n if (!targetProject || !targetProject.schedules) return;\n // schedulesの中でtargetScheduleと同じidを持つものを更新する\n targetProject.schedules.items = targetProject.schedules.items.map(\n (schedule: Schedule | null) => {\n if (schedule === null) return null;\n if (schedule.id === updatedSchedule.id) {\n return updatedSchedule;\n }\n return schedule;\n }\n );\n // ドラッグ&ドロップで変更されたことをprojectレベルで持たせる\n targetProject.beforeIdx = idx;\n addAlert({\n message: \"スケジュールを更新しました\",\n severity: \"success\",\n });\n } catch (e) {}\n return;\n },\n // メモ化されてほしくない値は依存配列に追加すること\n // 非同期処理が完了していない状態でメモ化すると古い値を参照するため状態管理がおかしくなる\n }),\n [ganttProjects, setSchedules]\n );\n\n // dragとdropを同じコンポーネントに反映するための\n const draggableAndDroppable = (el: any) => {\n drag(el);\n drop(el);\n };\n\n if (!row)\n return (\n \n );\n\n const data = row[date];\n\n // typeが空の時はdragできない\n if (!data || data.type === \"\")\n return (\n \n );\n\n // rowから各フェーズの日にちを持ってくる\n // data.typeが空ではないけど、Dataは持っていない場合(= フェーズの途中)\n if (!data.hasData) {\n // そのフェーズの最後の日付(=stock以外のフェーズの前の日)の場合は、ドラッグできる\n // fromDateからどのフェーズか確認\n const phase = getPhase(row, date);\n if (!phase) return <>;\n return (\n \n );\n }\n\n // こいつは終点のはずなのでドラッグできる\n return (\n \n {dates.length > 14 ? data.initial : `${data.text}`}\n \n );\n}\n","import { TableCell, TextField } from \"@mui/material\";\nimport { useState } from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { updateScheduleByInput } from \"utils/gantt/schedule\";\nimport { Schedule, UpdateScheduleInput } from \"API\";\nimport { useAuth } from \"contexts/auth\";\n\nexport function ScheduleCell({ schedule, col }: any) {\n const { projects } = useGantt();\n const queryClient = useQueryClient();\n const { permissions } = useAuth();\n const [editColumns, setEditColumns] = useState([]);\n\n const scheduleId = schedule[\"id\"];\n // リストをダブルクリックしたときの操作\n const changeEditStatus = (id: string) => {\n // 編集中のカラムを記録する。ひとつしかないとは思われるが複数対応。\n if (permissions.Project.canWrite) {\n editColumns?.includes(id)\n ? setEditColumns(editColumns.filter((col) => col !== id))\n : setEditColumns(editColumns.concat(id));\n }\n };\n // 値が含まれるか確認する\n const isEditable = (id: string, editable: boolean) => {\n return editColumns.includes(id) && editable;\n };\n // スケジュールのはじめはs.なので排除する\n const replaceField = (field: string) => {\n return field.replace(\"s.\", \"\");\n };\n // スケジュールデータ更新\n const handleUpdate = (field: string, value: any) => {\n // 編集状態を解除する\n changeEditStatus(scheduleId);\n // 編集前と変わらない場合は処理中断\n if (schedule[field] === value) return;\n // 値の変更\n schedule[field] = value;\n // スケジュール更新を準備\n const inputSchedule: UpdateScheduleInput = {\n id: scheduleId,\n [field]: value,\n };\n // スケジュールの更新\n updateScheduleByInput(inputSchedule);\n queryClient.invalidateQueries({\n queryKey: [\"projectsByGroupIdForManager\"],\n });\n // 案件を更新\n const targetProject = projects.find(\n (project) => project.id === (schedule[\"projectId\"] as string)\n );\n if (targetProject) {\n const targetSchedule: any = targetProject.schedules?.items.find(\n (findSchedule: Schedule | null) => findSchedule?.id === scheduleId\n );\n if (targetSchedule && Object.keys(targetSchedule).includes(field)) {\n // 対象フィールドに値を設定\n targetSchedule[field] = value;\n }\n }\n };\n\n return (\n {\n changeEditStatus(scheduleId);\n }}\n >\n {isEditable(scheduleId, col.editable) && (\n {\n handleUpdate(replaceField(col.field), event.target.value);\n }}\n inputProps={col.inputProps}\n autoFocus\n />\n )}\n {!isEditable(scheduleId, col.editable) &&\n schedule[replaceField(col.field)]}\n \n );\n}\n","import { useState } from \"react\";\nimport { TableRow } from \"@mui/material\";\nimport moment from \"moment\";\n\nimport { projectColDef, scheduleColDef } from \"./Columns\";\nimport ProjectCell from \"./ProjectCell\";\nimport GanttCell from \"./GanttCell\";\nimport { ScheduleCell } from \"./ScheduleCell\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { useAlerts } from \"contexts/alerts\";\nimport { Schedule } from \"API\";\n\nfunction DummyRow({ project }: any) {\n const { dates } = useGantt();\n const { addAlert } = useAlerts();\n const focus = () =>\n addAlert({\n severity: \"warning\",\n message: `「${project.name}」はスケジュールが設定されていません`,\n });\n return (\n \n {dates.map((date) => (\n \n ))}\n \n );\n}\n\nfunction ScheduleRow({ schedule, setSchedules }: any) {\n const { dates, focus, column } = useGantt();\n const scheduleCols = scheduleColDef();\n const draggableId = schedule.id;\n\n return (\n \n {scheduleCols\n .filter((col: { field: string }) => column.includes(col.field))\n .map((col) => (\n \n ))}\n {dates.map((date) => (\n focus(schedule)}\n draggableId={draggableId}\n />\n ))}\n \n );\n}\n\nexport default function ProjectRow({ project }: any) {\n const projectCols = projectColDef();\n const { column } = useGantt();\n // キャシュクリアではなくユーザーがドラッグ&ドロップした部分だけUIを更新したいので個別で状態管理する\n const [schedules, setSchedules] = useState(project.schedules?.items);\n\n const scheduleExists = project.schedules?.items.length > 0;\n\n // projectにschedule更新情報を付与\n project.recentlyScheduleUpdated = recentlyScheduleUpdated(schedules, 3);\n return (\n <>\n \n {projectCols\n .filter((col) => column.includes(col.field))\n .map((col) => (\n \n ))}\n \n {!scheduleExists && }\n {schedules.map((schedule: any) => (\n \n ))}\n \n );\n}\n\n// scheduleのリストと日数を渡して、直近N日以内に更新されたscheduleの中で最新のupdatedAtを返す\n// 該当するものがない場合は、空文字を返す\nconst recentlyScheduleUpdated = (\n schedules: Schedule[],\n numOfDays: number\n): string => {\n // 直近N日以内に更新されたscheduleを抽出\n const scheduleUpdated = schedules.filter((schedule: Schedule) => {\n // updatedAtとcreatedAtが同じ場合は更新されてない\n if (schedule.createdAt === schedule.updatedAt) {\n return false;\n }\n // updatedAtが現在時刻の過去3日以内だったら更新されている、momentを使って描く\n return moment(schedule.updatedAt).isAfter(\n moment().subtract(numOfDays, \"days\")\n );\n });\n\n // 直近N日以内に更新されたscheduleがない場合は、空文字を返す\n if (scheduleUpdated.length === 0) {\n return \"\";\n }\n\n // 直近N日以内に更新されたscheduleがある場合は、その中で最もupdatedAtが新しいものを抽出\n const latestScheduleUpdated = scheduleUpdated?.reduce(\n (a: Schedule, b: Schedule) =>\n moment(a.updatedAt).isAfter(moment(b.updatedAt)) ? a : b\n );\n return latestScheduleUpdated.updatedAt;\n};\n","import Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Paper from \"@mui/material/Paper\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { DndProvider } from \"react-dnd\";\nimport { HTML5Backend } from \"react-dnd-html5-backend\";\n\nimport ProjectRow from \"./ProjectRow\";\nimport { projectColDef, scheduleColDef, dateColDef } from \"./Columns\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { useGroups } from \"contexts/groups\";\nimport { useAuth } from \"contexts/auth\";\n\nfunction ScheduleHeaders() {\n const { dates, column } = useGantt();\n const { groups } = useGroups();\n const { currentGroup } = useAuth();\n const projectCols = projectColDef().filter((col) =>\n column.includes(col.field)\n );\n const scheduleCols = scheduleColDef().filter((col) =>\n column.includes(col.field)\n );\n const holidayCalendar = groups?.find((group) => group.id === currentGroup?.id)\n ?.holidays?.items;\n\n const dateCols = dateColDef(dates, holidayCalendar);\n\n const columns = [...projectCols, ...scheduleCols, ...dateCols];\n\n return (\n \n \n {columns.map((col: any) => (\n \n {col.headerName}\n \n ))}\n \n \n );\n}\n\nfunction ScheduleBody() {\n const { projects } = useGantt();\n const key: { [key: string]: number } = {};\n projects.forEach((project) => {\n key[project.id] = project.schedules?.items.length ?? 0;\n });\n\n return (\n \n \n {projects.map((project: any) => (\n \n ))}\n \n \n );\n}\n\nfunction ScheduleTable() {\n const { loading } = useGantt();\n if (loading) return ;\n return (\n \n \n \n \n
\n \n );\n}\n\nexport default ScheduleTable;\n","import moment from \"moment\";\nimport { useEffect } from \"react\";\nimport { setCookie } from \"nookies\";\n\nimport GanttTable from \"./Table\";\n\nimport { useGantt } from \"contexts/gantt\";\nimport { defaultCookieOptions, parseCookieBooleanValue } from \"utils/cookie\";\n\n//PAX-607 日付変更時再設定\nconst resetDate = (\n dateRange: { startDate: Date; endDate: Date },\n setDateRange: (range: { startDate: Date; endDate: Date }) => void,\n dateLabel: string\n) => {\n const newDate = moment();\n const { startDate, endDate } = dateRange;\n\n if (\n !newDate.isSame(startDate, \"day\") &&\n (dateLabel == \"+7Days\" || dateLabel == \"+30Days\")\n ) {\n const daysToAdd = dateLabel === \"+30Days\" ? 30 : 7;\n setDateRange({\n startDate: moment().toDate(),\n endDate: moment().add(daysToAdd, \"day\").toDate(),\n });\n // Cookieの設定もここで行う\n setCookie(\n null,\n \"ganttStartDate\",\n startDate?.toString() ?? \"\",\n defaultCookieOptions\n );\n setCookie(\n null,\n \"ganttEndDate\",\n endDate?.toString() ?? \"\",\n defaultCookieOptions\n );\n }\n};\n\nfunction ScheduleView() {\n const { dateRange, setDateRange, dateLabel } = useGantt();\n\n //PAX-607 日付変更時再設定\n useEffect(() => {\n if (dateRange.startDate && dateRange.endDate) {\n resetDate(\n { startDate: dateRange.startDate!, endDate: dateRange.endDate! },\n setDateRange,\n dateLabel || \"\" // nullの場合は空文字列を使用\n );\n }\n }, [dateRange, setDateRange, dateLabel]); // 依存配列にdateRangeとdateLabelを追加\n\n return ;\n}\n\nexport default ScheduleView;\n","import Button from \"@mui/material/Button\";\nimport { useState, MouseEvent } from \"react\";\nimport PrintIcon from \"@mui/icons-material/Print\";\n\nimport Menu from \"components/Menu\";\nimport { useGroupReports } from \"contexts/groupReports\";\nimport { useAuth } from \"contexts/auth\";\n\nexport default function ProjectsMenu() {\n const [openMenu, setOpenMenu] = useState(false);\n const [anchor, setAnchor] = useState(null);\n const { planReports, woodReports, invoiceReports, download } =\n useGroupReports();\n const { permissions } = useAuth();\n\n if (!planReports) return
;\n\n const handleClick = (e: MouseEvent) => {\n setOpenMenu(true);\n setAnchor(e.currentTarget);\n };\n\n const handleCloseMenu = () => {\n setOpenMenu(false);\n setAnchor(null);\n };\n\n const menus: any = [\n ...planReports.map((report) => ({\n label: `${report.name}を印刷`,\n onClick: async () => {\n await download(report);\n },\n icon: ,\n })),\n ...woodReports.map((report) => ({\n label: `${report.name}を印刷`,\n onClick: async () => {\n await download(report);\n },\n icon: ,\n })),\n ...invoiceReports.map((report) => ({\n label: `${report.name}を印刷`,\n onClick: async () => {\n await download(report);\n },\n icon: ,\n })),\n ];\n\n if (!permissions.GroupReport.canRead) return null;\n\n return (\n
\n \n \n
\n );\n}\n","import PushPinIcon from \"@mui/icons-material/PushPin\";\nimport ToggleButton from \"@mui/material/ToggleButton\";\n\nimport { useProjects } from \"contexts/projects\";\nimport { useGantt } from \"contexts/gantt\";\n\nexport default function SaveFilterButton() {\n const { isFilterSaved, setIsFilterSaved } = useGantt();\n const { isProjectsFilterSaved, setIsProjectsFilterSaved } = useProjects();\n\n return (\n {\n setIsFilterSaved(!isFilterSaved);\n setIsProjectsFilterSaved(!isProjectsFilterSaved);\n }}\n >\n \n \n );\n}\n","import { useState } from \"react\";\nimport Divider from \"@mui/material/Divider\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport FormatListBulletedIcon from \"@mui/icons-material/FormatListBulleted\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { NewProject } from \"./NewProject\";\nimport ProjectFilter from \"./ListView/Filter\";\nimport GanttHeader from \"./ScheduleView/Header\";\nimport ListView from \"./ListView\";\nimport ScheduleView from \"./ScheduleView\";\nimport Menu from \"./Menu\";\nimport SaveFilterButton from \"./SaveFilterButton\";\n\nimport { useGroupReports } from \"contexts/groupReports\";\nimport { useAuth } from \"contexts/auth\";\nimport useQuery from \"hooks/query\";\n\nfunction ViewSelect({ view, setView }: { view: string; setView: any }) {\n return (\n \n value === \"schedule\" ? (\n \n \n \n ) : (\n \n \n \n )\n }\n className=\"bg-white\"\n onChange={(e) => setView(e.target.value)}\n >\n \n \n スケジュール\n \n \n \n リスト\n \n \n );\n}\n\nfunction Projects() {\n const [view, setView] = useQuery<\"list\" | \"schedule\">(\"viewMode\", \"schedule\");\n const [openCreate, setOpenCreate] = useState(false);\n const { planReports, woodReports, invoiceReports } = useGroupReports();\n const { permissions } = useAuth();\n\n return (\n <>\n \n
\n
\n
\n \n 案件一覧\n \n \n \n {view === \"schedule\" && }\n
\n
\n {view === \"schedule\" && }\n
\n
\n
\n {planReports.length + woodReports.length + invoiceReports.length >\n 0 && }\n {permissions.Project.canWrite && (\n setOpenCreate(true)}\n variant=\"outlined\"\n sx={{ maxHeight: \"40px\" }}\n >\n 新規\n \n )}\n
\n
\n \n {view === \"schedule\" && }\n {view === \"list\" && }\n \n );\n}\n\nexport default Projects;\n","import type { NextPage } from \"next\";\nimport Head from \"next/head\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\n\nimport { HomeLayout } from \"layouts\";\nimport { AccountsProvider } from \"contexts/accounts\";\nimport Projects from \"components/Projects\";\nimport { TenantProvider } from \"contexts/tenant\";\nimport { ContactsProvider } from \"contexts/contacts\";\nimport { GanttProvider } from \"contexts/gantt\";\nimport { GroupReportsProvider } from \"contexts/groupReports\";\nimport { useAuth } from \"contexts/auth\";\nimport AccessGate from \"components/AccessGate\";\nimport { UsersProvider } from \"contexts/users\";\nimport { useUsers } from \"contexts/users\";\nimport LicenseNotValid from \"components/LicenseNotValid\";\nimport { LicenseEnum } from \"utils/license\";\nimport { GroupsProvider } from \"contexts/groups\";\nimport { ProjectsProvider } from \"contexts/projects\";\n\nconst Home: NextPage = () => {\n const { permissions } = useAuth();\n const { isLicenseValidForMe, myLicense } = useUsers();\n\n if (!isLicenseValidForMe && !permissions.TenantMember.canWrite) {\n return ;\n }\n if (!isLicenseValidForMe && myLicense === LicenseEnum.SUPPORT) {\n return ;\n }\n if (!isLicenseValidForMe && permissions.TenantMember.canWrite) {\n return (\n \n \n \n );\n }\n\n return (\n
\n \n PAX\n \n \n \n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n );\n};\n\nfunction Root() {\n const queryClient = new QueryClient();\n return (\n \n \n \n \n \n \n \n );\n}\n\nexport default Root;\n","import {\n GridToolbarContainer,\n GridToolbarColumnsButton,\n GridToolbarFilterButton,\n GridToolbarDensitySelector,\n GridToolbarExport,\n} from \"@mui/x-data-grid\";\n\n// DataGrid Toolbar\nexport const dataGridToolbar = () => {\n return (\n \n \n \n \n \n \n );\n};\n","(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[5405],{\n\n/***/ 48312:\n/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {\n\n\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return __webpack_require__(85382);\n }\n ]);\n if(false) {}\n \n\n/***/ }),\n\n/***/ 50179:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"X\": function() { return /* binding */ useGroups; },\n/* harmony export */ \"p\": function() { return /* binding */ GroupsProvider; }\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 hooks_datalist__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32380);\n\n\n\n\nconst GroupsContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({\n groups: [],\n loading: false,\n update: ()=>null,\n create: ()=>null,\n refetch: ()=>Promise.resolve(),\n set: ()=>Promise.resolve\n});\nconst GroupsProvider = (param)=>{\n let { children } = param;\n const { user } = (0,_auth__WEBPACK_IMPORTED_MODULE_2__/* .useAuth */ .a)();\n const { data , loading , refetch , update , create , set } = (0,hooks_datalist__WEBPACK_IMPORTED_MODULE_3__/* [\"default\"] */ .Z)({\n query: \"groupsByTenantId\",\n variables: {\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n }\n });\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n refetch({\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n user === null || user === void 0 ? void 0 : user.tenantId\n ]);\n const createGroup = async (input)=>{\n await create(\"createGroup\", {\n ...input,\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n });\n };\n const updateGroup = async (input)=>{\n await update(\"updateGroup\", {\n ...input\n });\n };\n const values = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n return {\n groups: data,\n update: updateGroup,\n create: createGroup,\n loading,\n refetch: ()=>{\n return refetch({\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId\n });\n },\n set\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n data,\n update,\n loading,\n create,\n set\n ]);\n return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(GroupsContext.Provider, {\n value: values,\n children: children\n });\n};\nconst useGroups = ()=>{\n const groupsContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(GroupsContext);\n if (groupsContext === undefined) {\n throw new Error(\"useGroups must be within GroupsProvider\");\n }\n return groupsContext;\n};\n\n\n/***/ }),\n\n/***/ 85382:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ pages; }\n});\n\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(85893);\n// EXTERNAL MODULE: ./node_modules/next/head.js\nvar head = __webpack_require__(9008);\nvar head_default = /*#__PURE__*/__webpack_require__.n(head);\n// EXTERNAL MODULE: ./node_modules/@tanstack/query-core/build/modern/queryClient.js + 4 modules\nvar modern_queryClient = __webpack_require__(88021);\n// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js\nvar QueryClientProvider = __webpack_require__(30202);\n// EXTERNAL MODULE: ./src/layouts/index.tsx + 17 modules\nvar layouts = __webpack_require__(91294);\n// EXTERNAL MODULE: ./src/contexts/accounts.tsx\nvar accounts = __webpack_require__(7742);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(67294);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Divider/Divider.js\nvar Divider = __webpack_require__(67720);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Typography/Typography.js + 1 modules\nvar Typography = __webpack_require__(15861);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Button/Button.js + 3 modules\nvar Button = __webpack_require__(69417);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Select/Select.js + 4 modules\nvar Select = __webpack_require__(18360);\n// EXTERNAL MODULE: ./node_modules/@mui/material/MenuItem/MenuItem.js + 1 modules\nvar MenuItem = __webpack_require__(18972);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/AccountTree.js\nvar AccountTree = __webpack_require__(30061);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/FormatListBulleted.js\nvar FormatListBulleted = __webpack_require__(85938);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Tooltip/Tooltip.js\nvar Tooltip = __webpack_require__(21023);\n// EXTERNAL MODULE: ./src/components/Projects/NewProject/index.tsx + 9 modules\nvar NewProject = __webpack_require__(25744);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Autocomplete/Autocomplete.js + 1 modules\nvar Autocomplete = __webpack_require__(5306);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Box/Box.js + 2 modules\nvar Box = __webpack_require__(5616);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TextField/TextField.js + 3 modules\nvar TextField = __webpack_require__(61903);\n// EXTERNAL MODULE: ./src/contexts/gantt.tsx\nvar gantt = __webpack_require__(94890);\n// EXTERNAL MODULE: ./src/utils/gantt/index.ts + 8 modules\nvar utils_gantt = __webpack_require__(4486);\n;// CONCATENATED MODULE: ./src/components/Projects/ListView/Filter.tsx\n\n\n\n\n\n\nconst options = [\n {\n id: \"見積\",\n name: \"見積\"\n },\n {\n id: \"受注\",\n name: \"受注\"\n },\n {\n id: \"入荷\",\n name: \"入荷\"\n },\n {\n id: \"梱包\",\n name: \"梱包\"\n },\n {\n id: \"出荷\",\n name: \"出荷\"\n },\n {\n id: \"請求\",\n name: \"請求\"\n },\n {\n id: \"完了\",\n name: \"完了\"\n },\n {\n id: \"失注\",\n name: \"失注\"\n }\n];\nfunction ProjectFilter() {\n const { projects , keyword , setKeyword } = (0,gantt/* useGantt */.Y)();\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(Autocomplete/* default */.Z, {\n sx: {\n minWidth: 140\n },\n size: \"small\",\n includeInputInList: true,\n filterSelectedOptions: true,\n getOptionLabel: (opt)=>opt.name,\n options: options,\n clearOnBlur: false,\n inputValue: keyword || \"\",\n renderOption: (props, option)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n component: \"li\",\n ...props,\n children: option.name\n }),\n onInputChange: (_, value)=>{\n setKeyword(value);\n (0,utils_gantt/* removeBeforeIdx */._M)(projects);\n },\n onChange: (_, value)=>{\n return value && setKeyword(value === null || value === void 0 ? void 0 : value.name);\n },\n renderInput: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(TextField/* default */.Z, {\n label: \"検索\",\n placeholder: \"案件名、得意様名\",\n value: keyword || \"\",\n ...params\n })\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/mui-daterange-picker/dist/index.es.js + 59 modules\nvar index_es = __webpack_require__(3784);\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/date-fns/esm/locale/ja/index.js + 5 modules\nvar ja = __webpack_require__(40944);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Header/DateRange.tsx\n\n\n\n\n\n\n\n\nconst displayFormat = \"MM月DD日\";\nconst definedRanges = [\n {\n label: \"今週\",\n startDate: moment_default()().startOf(\"week\").toDate(),\n endDate: moment_default()().endOf(\"week\").toDate()\n },\n {\n label: \"先週\",\n startDate: moment_default()().startOf(\"week\").subtract(1, \"week\").toDate(),\n endDate: moment_default()().endOf(\"week\").subtract(1, \"week\").toDate()\n },\n {\n label: \"来週\",\n startDate: moment_default()().startOf(\"week\").add(1, \"week\").toDate(),\n endDate: moment_default()().endOf(\"week\").add(1, \"week\").toDate()\n },\n {\n label: \"今月\",\n startDate: moment_default()().startOf(\"month\").toDate(),\n endDate: moment_default()().endOf(\"month\").toDate()\n },\n {\n label: \"先月\",\n startDate: moment_default()().subtract(1, \"month\").startOf(\"month\").toDate(),\n endDate: moment_default()().subtract(1, \"month\").endOf(\"month\").toDate()\n },\n {\n label: \"来月\",\n startDate: moment_default()().add(1, \"month\").startOf(\"month\").toDate(),\n endDate: moment_default()().add(1, \"month\").endOf(\"month\").toDate()\n },\n {\n label: \"+7Days\",\n startDate: moment_default()().toDate(),\n endDate: moment_default()().add(7, \"day\").toDate()\n },\n {\n label: \"+30Days\",\n startDate: moment_default()().toDate(),\n endDate: moment_default()().add(1, \"month\").toDate()\n }\n];\nfunction DateRange() {\n var ref;\n const [open, setOpen] = (0,react.useState)(false);\n const { projects , dateRange , setDateRange , setDateLabel } = (0,gantt/* useGantt */.Y)();\n const { startDate , endDate } = dateRange;\n const displayDateRange = \"\".concat(moment_default()(startDate).format(displayFormat), \" - \").concat(moment_default()(endDate).format(displayFormat));\n const toggle = ()=>setOpen(!open);\n //PAX-607 dateLabelを取得してコンテキストに渡す\n const handleDateRangeChange = (range)=>{\n const selectedIndex = definedRanges.findIndex((item)=>item.startDate.getTime() === range.startDate.getTime() && item.endDate.getTime() === range.endDate.getTime());\n if (selectedIndex !== -1) {\n setDateLabel(definedRanges[selectedIndex].label);\n } else {\n setDateLabel(\"\"); // ラベルがない場合は空の文字列に設定\n }\n setDateRange(range);\n (0,utils_gantt/* removeBeforeIdx */._M)(projects);\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"relative\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n variant: \"outlined\",\n onClick: toggle,\n className: \"whitespace-nowrap\",\n children: displayDateRange\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"absolute z-[100]\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(index_es/* DateRangePicker */.D, {\n open: open,\n toggle: toggle,\n onChange: handleDateRangeChange,\n initialDateRange: dateRange,\n locale: ja/* default */.Z,\n definedRanges: definedRanges\n }, (ref = dateRange.startDate) === null || ref === void 0 ? void 0 : ref.toISOString())\n })\n ]\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/@mui/material/ListSubheader/ListSubheader.js + 1 modules\nvar ListSubheader = __webpack_require__(75438);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/ArrowUpward.js\nvar ArrowUpward = __webpack_require__(54364);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/ArrowDownward.js\nvar ArrowDownward = __webpack_require__(26613);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Header/Sort.tsx\n\n\n\n\n\n\n\n\nconst ascOptions = [\n {\n value: \"sortByStatus\",\n label: \"フェーズ順\"\n },\n {\n value: \"sortByName\",\n label: \"案件名順\"\n },\n {\n value: \"sortByStock\",\n label: \"入荷日順\"\n },\n {\n value: \"sortByPackage\",\n label: \"梱包日順\"\n },\n {\n value: \"sortByShip\",\n label: \"出荷日順\"\n },\n {\n value: \"sortByCut\",\n label: \"CUT日順\"\n },\n {\n value: \"sortByCreate\",\n label: \"作成日順\"\n },\n {\n value: \"sortByUpdate\",\n label: \"最終更新日順\"\n }\n];\nconst descOptions = [\n {\n value: \"sortByStatusDesc\",\n label: \"フェーズ順\"\n },\n {\n value: \"sortByNameDesc\",\n label: \"案件名順\"\n },\n {\n value: \"sortByStockDesc\",\n label: \"入荷日順\"\n },\n {\n value: \"sortByPackageDesc\",\n label: \"梱包日順\"\n },\n {\n value: \"sortByShipDesc\",\n label: \"出荷日順\"\n },\n {\n value: \"sortByCutDesc\",\n label: \"CUT日順\"\n },\n {\n value: \"sortByCreateDesc\",\n label: \"作成日順\"\n },\n {\n value: \"sortByUpdateDesc\",\n label: \"最終更新日順\"\n }\n];\nfunction Sort_ProjectFilter() {\n const { projects , sort , setSort } = (0,gantt/* useGantt */.Y)();\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(TextField/* default */.Z, {\n select: true,\n label: \"ソート\",\n value: sort,\n onChange: (e)=>{\n setSort(e.target.value);\n (0,utils_gantt/* removeBeforeIdx */._M)(projects);\n },\n sx: {\n minWidth: 160\n },\n size: \"small\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ListSubheader/* default */.Z, {\n children: \"昇順\"\n }),\n ascOptions.map((option)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(MenuItem/* default */.Z, {\n value: option.value,\n children: [\n option.label,\n \" \",\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ArrowDownward/* default */.Z, {})\n ]\n }, option.value)),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ListSubheader/* default */.Z, {\n children: \"降順\"\n }),\n descOptions.map((option)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(MenuItem/* default */.Z, {\n value: option.value,\n children: [\n option.label,\n \" \",\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ArrowUpward/* default */.Z, {})\n ]\n }, option.value))\n ]\n });\n}\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Header/Filter.tsx\n\n\n\n\n\n\n\nconst Filter_options = [\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];\nfunction Filter_ProjectFilter() {\n const [value, setValue] = (0,react.useState)([]);\n const { projects , status , setStatus , keyword , setKeyword } = (0,gantt/* useGantt */.Y)();\n (0,react.useEffect)(()=>{\n setValue(Filter_options.filter((o)=>status.includes(o.value)));\n }, [\n status\n ]);\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(Autocomplete/* default */.Z, {\n multiple: true,\n sx: {\n minWidth: 200\n },\n size: \"small\",\n includeInputInList: true,\n filterSelectedOptions: true,\n getOptionLabel: (opt)=>opt.label,\n options: Filter_options,\n clearOnBlur: false,\n renderOption: (props, option)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(Box/* default */.Z, {\n component: \"li\",\n ...props,\n children: option.label\n }),\n onInputChange: (_, value)=>{\n setKeyword(value);\n (0,utils_gantt/* removeBeforeIdx */._M)(projects);\n },\n onChange: (_, value)=>{\n setStatus(value.map((v)=>v.value));\n (0,utils_gantt/* removeBeforeIdx */._M)(projects);\n },\n value: value,\n renderInput: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(TextField/* default */.Z, {\n label: \"フェーズ\",\n ...params,\n value: value\n })\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/@mui/material/Menu/Menu.js + 1 modules\nvar Menu = __webpack_require__(25464);\n// EXTERNAL MODULE: ./node_modules/@mui/material/FormControlLabel/FormControlLabel.js + 1 modules\nvar FormControlLabel = __webpack_require__(50480);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Switch/Switch.js + 1 modules\nvar Switch = __webpack_require__(45843);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Visibility.js\nvar Visibility = __webpack_require__(22961);\n// EXTERNAL MODULE: ./node_modules/@mui/material/IconButton/IconButton.js + 1 modules\nvar IconButton = __webpack_require__(93946);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/EditNotifications.js\nvar EditNotifications = __webpack_require__(78758);\n// EXTERNAL MODULE: ./node_modules/next/link.js\nvar next_link = __webpack_require__(41664);\nvar link_default = /*#__PURE__*/__webpack_require__.n(next_link);\n// EXTERNAL MODULE: ./src/utils/status.ts\nvar utils_status = __webpack_require__(58142);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/Columns.tsx\n\n\n\n\n\n\n\n\n\nconst dateColDef = (dates, holidays)=>{\n return dates.map((date)=>({\n field: date,\n headerName: /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"flex flex-col items-center\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n children: moment_default()(date).format(\"ddd\")\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n children: moment_default()(date).format(\"M/D\")\n })\n ]\n }),\n headerClassName: \"m-0 p-0 \".concat((0,utils_gantt/* drawHolidayColor */.gT)(date, holidays), \" \").concat((0,utils_gantt/* drawHolidayBorder */.yw)(date, holidays), \" \")\n }));\n};\n/**\n * スケジュールの表示カラム。表示制御ボタンのプロジェクト項目と見分けるためにfieldは\"s.\"で始める。\n */ const scheduleColDef = ()=>[\n {\n field: \"s.name\",\n headerName: \"スケジュール名\",\n headerClassName: \"w-36\",\n cellClassName: \"break-words\",\n showColumnsMenu: true\n },\n {\n field: \"s.note\",\n headerName: \"スケジュールメモ\",\n headerClassName: \"w-32\",\n cellClassName: \"break-words\",\n showColumnsMenu: true,\n editable: true,\n inputProps: {\n maxLength: 30\n }\n }\n ];\nconst projectColDef = ()=>[\n {\n field: \"recentlyScheduleUpdated\",\n headerName: \"\",\n headerClassName: \"w-1\",\n cellClassName: \"cursor-hover hover:text-slate-800\",\n showColumnsMenu: false,\n renderCell: (params)=>params.value && /*#__PURE__*/ (0,jsx_runtime.jsx)(Tooltip/* default */.Z, {\n title: \"\".concat(new Date(params.value).toLocaleDateString(\"ja-JP\", {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n timeZone: \"Asia/Tokyo\"\n }), \"にスケジュールが最終更新されています\"),\n placement: \"top\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(EditNotifications/* default */.Z, {\n fontSize: \"small\"\n })\n })\n })\n },\n {\n field: \"name\",\n headerName: \"案件名\",\n headerClassName: \"w-48\",\n cellClassName: \"cursor-hover hover:text-slate-800\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"relative\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)((link_default()), {\n href: \"/projects/\".concat(params.id),\n target: \"_blank\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(IconButton/* default */.Z, {\n className: \"cursor-hover\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Visibility/* default */.Z, {})\n })\n }),\n params.value\n ]\n })\n },\n {\n field: \"reference\",\n headerName: \"案件管理番号\",\n headerClassName: \"w-32 text-center\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative text-center\",\n children: params.value\n })\n },\n {\n field: \"category\",\n headerName: \"案件分類\",\n headerClassName: \"w-32 text-center\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative text-center\",\n children: params.value\n })\n },\n {\n field: \"status\",\n headerName: \"フェーズ\",\n headerClassName: \"w-24 text-center\",\n cellClassName: \"text-center\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative text-center\",\n children: (0,utils_status/* getStatusText */.li)(params.value)\n })\n },\n {\n field: \"accountName\",\n headerName: \"取引先名\",\n headerClassName: \"w-44\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"contactName\",\n headerName: \"取引先責任者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"userName\",\n headerName: \"作成者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"managerName\",\n headerName: \"案件担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"operatorName\",\n headerName: \"業務担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"quoterName\",\n headerName: \"見積担当者\",\n headerClassName: \"w-32\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative\",\n children: params.value\n })\n },\n {\n field: \"createdAt\",\n headerName: \"作成日\",\n headerClassName: \"w-28 text-center\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative text-center\",\n children: new Date(params.value).toLocaleDateString(\"ja-JP\", {\n month: \"numeric\",\n day: \"numeric\"\n })\n })\n },\n {\n field: \"updatedAt\",\n headerName: \"最終更新日\",\n headerClassName: \"w-28 text-center\",\n showColumnsMenu: true,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"relative text-center\",\n children: new Date(params.value).toLocaleDateString(\"ja-JP\", {\n month: \"numeric\",\n day: \"numeric\"\n })\n })\n }\n ];\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Header/Column.tsx\n\n\n\n\n\n// 制御する項目(Table/ColumnsからshowColumnsMenu=trueのものを取得)\nconst defColumns = [\n ...projectColDef().filter((col)=>col.showColumnsMenu),\n ...scheduleColDef().filter((col)=>col.showColumnsMenu)\n];\nfunction Column() {\n const [anchorEl, setAnchorEl] = (0,react.useState)(null);\n const { column , setColumn } = (0,gantt/* useGantt */.Y)();\n const handleClick = (event)=>{\n setAnchorEl(event.currentTarget);\n };\n const handleClose = ()=>{\n setAnchorEl(null);\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"relative\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n variant: \"outlined\",\n onClick: handleClick,\n className: \"whitespace-nowrap\",\n children: \"表示項目\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Menu/* default */.Z, {\n open: Boolean(anchorEl),\n onClose: handleClose,\n anchorEl: anchorEl,\n children: defColumns.map((defColumn)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"hover:bg-gray-100\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(FormControlLabel/* default */.Z, {\n label: defColumn.headerName,\n className: \"block px-2\",\n control: /*#__PURE__*/ (0,jsx_runtime.jsx)(Switch/* default */.Z, {\n checked: column.includes(defColumn.field),\n onChange: ()=>column.includes(defColumn.field) ? setColumn(column.filter((f)=>f !== defColumn.field)) : setColumn(column.concat(defColumn.field))\n })\n })\n }, defColumn.field))\n })\n ]\n });\n}\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Header/index.tsx\n\n\n\n\n\nfunction GanttHeader() {\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(DateRange, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Filter_ProjectFilter, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Sort_ProjectFilter, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Column, {})\n ]\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/@mui/x-data-grid/DataGrid/DataGrid.js + 179 modules\nvar DataGrid = __webpack_require__(80623);\n// EXTERNAL MODULE: ./node_modules/@mui/material/LinearProgress/LinearProgress.js + 1 modules\nvar LinearProgress = __webpack_require__(81458);\n// EXTERNAL MODULE: ./src/utils/project.ts\nvar project = __webpack_require__(25180);\n;// CONCATENATED MODULE: ./src/components/Projects/ListView/Columns.tsx\n\n\n\n\n\n\n// PAX-538 文字列の幅について、以下の列のみ固定値\n// reference, type, status, schedules, createdAt, updatedAt\n// 自動調整するならDataGridProが必要\nconst Columns = (permission)=>{\n const cols = [\n {\n field: \"reference\",\n headerName: \"案件管理番号\",\n sortable: true,\n width: 140,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"relative\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)((link_default()), {\n href: \"/projects/\".concat(params.id),\n target: \"_blank\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(IconButton/* default */.Z, {\n className: \"cursor-hover\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Visibility/* default */.Z, {})\n })\n }),\n params.value\n ]\n })\n },\n {\n field: \"name\",\n headerName: \"案件名\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 3\n },\n {\n field: \"accountName\",\n headerName: \"取引先名\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1\n },\n {\n field: \"contactName\",\n headerName: \"取引先責任者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1\n },\n {\n field: \"managerName\",\n headerName: \"案件管理者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1\n },\n {\n field: \"quoterName\",\n headerName: \"見積担当者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1\n },\n {\n field: \"operatorName\",\n headerName: \"業務担当者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1\n },\n {\n field: \"user\",\n headerName: \"作成者\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n type: \"string\"\n },\n {\n field: \"alert\",\n headerName: \"注意事項\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 2\n },\n {\n field: \"type\",\n headerName: \"案件タイプ\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 70,\n valueFormatter: (value)=>(0,project/* getProjectTypeName */.m)(value),\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {\n children: (0,project/* getProjectTypeName */.m)(params.value)\n })\n },\n {\n field: \"category\",\n headerName: \"案件分類\",\n sortable: true,\n cellClassName: \"text-center\",\n flex: 1,\n type: \"string\"\n },\n {\n field: \"status\",\n headerName: \"案件フェーズ\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 70,\n valueFormatter: (value)=>(0,utils_status/* getStatusText */.li)(value),\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {\n children: (0,utils_status/* getStatusText */.li)(params.value)\n })\n },\n {\n field: \"schedules\",\n headerName: \"スケジュール数\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 50,\n valueFormatter: (value)=>value.items.length,\n renderCell: (params)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {\n children: Object.keys(params.value.items).length\n })\n },\n {\n field: \"createdAt\",\n headerName: \"作成日\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 130\n },\n {\n field: \"updatedAt\",\n headerName: \"最終更新日\",\n sortable: true,\n cellClassName: \"text-center\",\n width: 130\n }\n ];\n if (permission.canWrite) {\n return cols;\n }\n return cols.filter((col)=>col.field !== \"editBtn\");\n};\n/* harmony default export */ var ListView_Columns = (Columns);\n\n// EXTERNAL MODULE: ./src/utils/date.ts\nvar date = __webpack_require__(46870);\n// EXTERNAL MODULE: ./src/utils/toolbar.tsx\nvar toolbar = __webpack_require__(77801);\n// EXTERNAL MODULE: ./src/contexts/auth.tsx + 2 modules\nvar auth = __webpack_require__(17297);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Paper/Paper.js + 2 modules\nvar Paper = __webpack_require__(90629);\n// EXTERNAL MODULE: ./node_modules/@mui/material/InputBase/InputBase.js + 1 modules\nvar InputBase = __webpack_require__(73601);\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Search.js\nvar Search = __webpack_require__(42761);\n;// CONCATENATED MODULE: ./src/components/SearchBox.tsx\n\n\n\n\n\n\n\n\nfunction SearchBox(param) {\n let { resetPaginationModel , setFilterCondition } = param;\n const [keyword, setKeyword] = (0,react.useState)(\"\");\n const handleSearch = async ()=>{\n if (!keyword) {\n setFilterCondition({});\n } else {\n setFilterCondition({\n projectFilter: {\n or: [\n {\n name: {\n contains: keyword\n }\n },\n {\n accountName: {\n contains: keyword\n }\n },\n {\n contactName: {\n contains: keyword\n }\n },\n {\n reference: {\n contains: keyword\n }\n },\n {\n managerName: {\n contains: keyword\n }\n },\n {\n quoterName: {\n contains: keyword\n }\n },\n {\n operatorName: {\n contains: keyword\n }\n },\n {\n status: {\n contains: (0,utils_status/* getStatus */.lR)(keyword)\n }\n }\n ]\n },\n userFilter: {\n or: [\n {\n firstName: {\n contains: keyword\n }\n },\n {\n lastName: {\n contains: keyword\n }\n },\n {\n name: {\n contains: keyword\n }\n }\n ]\n },\n categoryFilter: {\n or: [\n {\n name: {\n contains: keyword\n }\n }\n ]\n },\n scheduleFilter: {\n or: [\n {\n beforeStockingName: {\n contains: keyword\n }\n },\n {\n beforePackagingName: {\n contains: keyword\n }\n },\n {\n beforeShippingName: {\n contains: keyword\n }\n },\n {\n beforeCutName: {\n contains: keyword\n }\n },\n {\n afterCutName: {\n contains: keyword\n }\n }\n ]\n }\n });\n }\n resetPaginationModel();\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(Paper/* default */.Z, {\n component: \"form\",\n sx: {\n p: \"2px 4px\",\n display: \"flex\",\n alignItems: \"center\",\n width: 300,\n m: \"10px 0px\"\n },\n onSubmit: (e)=>{\n e.preventDefault();\n handleSearch();\n },\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(InputBase/* default */.ZP, {\n sx: {\n ml: 1,\n flex: 1\n },\n placeholder: \"案件を検索する\",\n inputProps: {\n \"aria-label\": \"search projects\"\n },\n value: keyword,\n onChange: (e)=>setKeyword(e.target.value)\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(IconButton/* default */.Z, {\n type: \"button\",\n sx: {\n p: \"10px\"\n },\n \"aria-label\": \"search\",\n onClick: handleSearch,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Search/* default */.Z, {})\n })\n ]\n });\n}\n\n// EXTERNAL MODULE: ./src/utils/user.ts\nvar user = __webpack_require__(95978);\n// EXTERNAL MODULE: ./src/graphql/queries.ts\nvar queries = __webpack_require__(18490);\n// EXTERNAL MODULE: ./node_modules/@tanstack/react-query/build/modern/useQuery.js + 7 modules\nvar useQuery = __webpack_require__(87633);\n// EXTERNAL MODULE: ./node_modules/@aws-amplify/api/lib-esm/API.js + 1 modules\nvar API = __webpack_require__(10552);\n// EXTERNAL MODULE: ./src/contexts/alerts.tsx + 6 modules\nvar alerts = __webpack_require__(75313);\n// EXTERNAL MODULE: ./src/utils/error.ts\nvar error = __webpack_require__(78191);\n;// CONCATENATED MODULE: ./src/hooks/request.ts\n\n\n\n\nfunction extractQueryName(graphqlQuery) {\n const queryNameMatch = graphqlQuery.match(/query\\s+([a-zA-Z0-9_]+)/);\n if (!queryNameMatch) return null;\n const queryName = queryNameMatch[1];\n // 頭文字を小文字に変換\n return queryName.charAt(0).toLowerCase() + queryName.slice(1);\n}\nconst fetchAppSync = async (query, params)=>{\n const res = await API/* API.graphql */.b.graphql({\n query,\n variables: params,\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n });\n const queryName = extractQueryName(query);\n if (!queryName) {\n throw new Error(\"Query name not found\");\n }\n return res.data[queryName];\n};\nconst useQueryWrap = (queryKey, query, params, queryFn, scaleTime, gcTime)=>{\n const { addAlert } = (0,alerts/* useAlerts */.Z)();\n return (0,useQuery/* useQuery */.a)({\n queryKey,\n queryFn: async ()=>{\n try {\n const data = await fetchAppSync(query, params);\n return queryFn(data);\n } catch (err) {\n const customError = new error/* CustomError */.s(err, \"get\");\n if (customError instanceof Error) addAlert({\n message: customError.message,\n severity: \"error\"\n });\n }\n },\n staleTime: scaleTime !== null && scaleTime !== void 0 ? scaleTime : 1000 * 60 * 5,\n gcTime: gcTime !== null && gcTime !== void 0 ? gcTime : 1000 * 60 * 6\n });\n};\n\n;// CONCATENATED MODULE: ./src/components/Projects/ListView/Table.tsx\n\n\n\n\n\n\n\n\n\n\n\n\nconst dataToRows = (data)=>{\n if (!data) return [];\n const rows = data.map((d)=>{\n var ref;\n return {\n id: d === null || d === void 0 ? void 0 : d.id,\n managerName: d === null || d === void 0 ? void 0 : d.managerName,\n quoterName: d === null || d === void 0 ? void 0 : d.quoterName,\n operatorName: d === null || d === void 0 ? void 0 : d.operatorName,\n accountId: d === null || d === void 0 ? void 0 : d.accountId,\n accountName: d === null || d === void 0 ? void 0 : d.accountName,\n contactId: d === null || d === void 0 ? void 0 : d.contactId,\n contactName: d === null || d === void 0 ? void 0 : d.contactName,\n name: d === null || d === void 0 ? void 0 : d.name,\n status: d === null || d === void 0 ? void 0 : d.status,\n alert: d === null || d === void 0 ? void 0 : d.alert,\n reference: d === null || d === void 0 ? void 0 : d.reference,\n type: d === null || d === void 0 ? void 0 : d.type,\n createdAt: (d === null || d === void 0 ? void 0 : d.createdAt) ? (0,date/* dateStringToJaDateStr */.PI)(d.createdAt) : null,\n updatedAt: (d === null || d === void 0 ? void 0 : d.updatedAt) ? (0,date/* dateStringToJaDateStr */.PI)(d.updatedAt) : null,\n account: d === null || d === void 0 ? void 0 : d.account,\n schedules: d === null || d === void 0 ? void 0 : d.schedules,\n user: (0,user/* getFullName */.P)(d === null || d === void 0 ? void 0 : d.user),\n category: d === null || d === void 0 ? void 0 : (ref = d.category) === null || ref === void 0 ? void 0 : ref.name\n };\n });\n return rows;\n};\nconst DEFAULT_PAGINATION_MODEL = {\n page: 0,\n pageSize: 100\n};\nfunction Table() {\n var ref, ref1, ref2;\n const { permissions , currentGroup , user } = (0,auth/* useAuth */.a)();\n const [paginationModel, setPaginationModel] = (0,react.useState)(DEFAULT_PAGINATION_MODEL);\n // ページごとのnextTokenを管理\n const [cursorInfo, setCursorInfo] = (0,react.useState)({});\n const [filterCondition, setFilterCondition] = (0,react.useState)({});\n //PAX-538 デフォルトで表示しない列はここで指定する\n const [columnVisibilityModel, setColumnVisibilityModel] = (0,react.useState)({\n managerName: false,\n quoterName: false,\n operatorName: false,\n user: false,\n alert: false,\n caseMarkNumImgs: false,\n stockNumImgs: false,\n archived: false,\n cancelled: false,\n cancelReason: false\n });\n const generateCacheKey = (page)=>{\n return JSON.stringify({\n query: \"projectsByGroupIdForManager\",\n groupId: currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id,\n page,\n pageSize: paginationModel.pageSize,\n filterCondition: filterCondition\n });\n };\n const hasNextPage = ((ref = cursorInfo[generateCacheKey(paginationModel.page)]) === null || ref === void 0 ? void 0 : ref.nextToken) !== null;\n const queryCallback = (data)=>{\n var _nextToken;\n const newNextToken = (_nextToken = data.nextToken) !== null && _nextToken !== void 0 ? _nextToken : null;\n var _startIndex;\n const newStartIndex = (_startIndex = data.startIndex) !== null && _startIndex !== void 0 ? _startIndex : 0;\n // 新しいトークンが存在する場合にnextTokensを更新\n setCursorInfo((prevCursorInfo)=>{\n if (generateCacheKey(paginationModel.page) in cursorInfo) {\n return prevCursorInfo;\n }\n return {\n ...prevCursorInfo,\n [generateCacheKey(paginationModel.page)]: {\n nextToken: newNextToken,\n startIndex: newStartIndex\n }\n };\n });\n return data.items;\n };\n const handlePaginationModelChange = (newPaginationModel)=>{\n // 1ページあたりの表示数が変わるときはトークンとページをリセット\n if (newPaginationModel.pageSize !== paginationModel.pageSize) {\n setPaginationModel({\n ...newPaginationModel,\n page: 0\n });\n } else {\n setPaginationModel(newPaginationModel);\n }\n };\n const resetPaginationModel = ()=>{\n setPaginationModel(DEFAULT_PAGINATION_MODEL);\n };\n var ref3, ref4;\n const { data: projects , isLoading } = useQueryWrap([\n \"projectsByGroupIdForManager\",\n currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id,\n paginationModel.page,\n paginationModel.pageSize,\n filterCondition\n ], queries.projectsByGroupIdForManager, {\n groupId: currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id,\n tenantId: user === null || user === void 0 ? void 0 : user.tenantId,\n filter: {\n ...filterCondition.projectFilter,\n archived: {\n ne: true\n }\n },\n userFilter: filterCondition.userFilter,\n categoryFilter: filterCondition.categoryFilter,\n scheduleFilter: filterCondition.scheduleFilter,\n limit: paginationModel.pageSize,\n sortDirection: \"DESC\",\n nextToken: (ref3 = (ref1 = cursorInfo[generateCacheKey(paginationModel.page - 1)]) === null || ref1 === void 0 ? void 0 : ref1.nextToken) !== null && ref3 !== void 0 ? ref3 : null,\n startIndex: (ref4 = (ref2 = cursorInfo[generateCacheKey(paginationModel.page - 1)]) === null || ref2 === void 0 ? void 0 : ref2.startIndex) !== null && ref4 !== void 0 ? ref4 : 0\n }, queryCallback);\n if (!projects && !isLoading) return null;\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(SearchBox, {\n setFilterCondition: setFilterCondition,\n resetPaginationModel: resetPaginationModel\n }),\n isLoading ? /*#__PURE__*/ (0,jsx_runtime.jsx)(LinearProgress/* default */.Z, {}) : /*#__PURE__*/ (0,jsx_runtime.jsx)(DataGrid/* DataGrid */._, {\n className: \"bg-white\",\n slots: {\n toolbar: toolbar/* dataGridToolbar */._\n },\n slotProps: {\n loadingOverlay: {\n variant: \"skeleton\",\n noRowsVariant: \"skeleton\"\n }\n },\n rows: dataToRows(projects),\n columns: ListView_Columns(permissions.MasterData),\n columnVisibilityModel: columnVisibilityModel,\n onColumnVisibilityModelChange: (newModel)=>setColumnVisibilityModel(newModel),\n initialState: {\n pagination: {\n rowCount: -1\n },\n density: \"compact\"\n },\n // PAX-538 列選択をできないようにしている(1列だけ掴むとCSV出力などがうまくいかないため)\n isRowSelectable: ()=>false,\n // paginationの設定\n paginationMode: \"server\",\n pageSizeOptions: [\n 25,\n 50,\n 100\n ],\n paginationMeta: {\n hasNextPage\n },\n paginationModel: paginationModel,\n onPaginationModelChange: handlePaginationModelChange\n }, hasNextPage ? \"hasNextPage\" : \"noNextPage\")\n ]\n });\n}\n/* harmony default export */ var ListView_Table = (Table);\n\n;// CONCATENATED MODULE: ./src/components/Projects/ListView/index.tsx\n\n\nfunction ProjectListView() {\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"w-full p-2\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"flex justify-between\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ListView_Table, {})\n ]\n });\n}\n/* harmony default export */ var ListView = (ProjectListView);\n\n// EXTERNAL MODULE: ./node_modules/nookies/dist/index.js\nvar dist = __webpack_require__(62286);\n// EXTERNAL MODULE: ./node_modules/@mui/material/Table/Table.js + 1 modules\nvar Table_Table = __webpack_require__(7906);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableBody/TableBody.js + 1 modules\nvar TableBody = __webpack_require__(295);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableCell/TableCell.js + 1 modules\nvar TableCell = __webpack_require__(53252);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableContainer/TableContainer.js + 1 modules\nvar TableContainer = __webpack_require__(72882);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableHead/TableHead.js + 1 modules\nvar TableHead = __webpack_require__(53184);\n// EXTERNAL MODULE: ./node_modules/@mui/material/TableRow/TableRow.js + 1 modules\nvar TableRow = __webpack_require__(53816);\n// EXTERNAL MODULE: ./node_modules/react-dnd/dist/core/DndProvider.js + 34 modules\nvar DndProvider = __webpack_require__(28493);\n// EXTERNAL MODULE: ./node_modules/react-dnd-html5-backend/dist/index.js + 12 modules\nvar react_dnd_html5_backend_dist = __webpack_require__(36963);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/ProjectCell.tsx\n\n\n// スケジュールのカラムに表示する内容をカスタマイズする\nconst renderCellValue = (row, col)=>{\n switch(col.field){\n case \"accountName\":\n var ref;\n var ref1;\n return \"\".concat((ref1 = (ref = row.account) === null || ref === void 0 ? void 0 : ref.name) !== null && ref1 !== void 0 ? ref1 : \"\");\n case \"userName\":\n var ref2, ref3;\n var ref4, ref5;\n return \"\".concat((ref4 = (ref2 = row.user) === null || ref2 === void 0 ? void 0 : ref2.lastName) !== null && ref4 !== void 0 ? ref4 : \"\", \" \").concat((ref5 = (ref3 = row.user) === null || ref3 === void 0 ? void 0 : ref3.firstName) !== null && ref5 !== void 0 ? ref5 : \"\");\n case \"category\":\n var ref6;\n var ref7;\n return \"\".concat((ref7 = (ref6 = row.category) === null || ref6 === void 0 ? void 0 : ref6.name) !== null && ref7 !== void 0 ? ref7 : \"\");\n default:\n return row[col.field];\n }\n};\nfunction ProjectCell(param) {\n let { row , col } = param;\n var ref;\n let rowSpan = ((ref = row.schedules) === null || ref === void 0 ? void 0 : ref.items.length) + 1;\n if (rowSpan < 2) rowSpan = 2;\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n sx: {\n minWidth: 10\n },\n rowSpan: rowSpan,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: col.cellClassName,\n children: col.renderCell ? col.renderCell({\n id: row.id,\n value: renderCellValue(row, col)\n }) : row[col.field]\n })\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/react-dnd/dist/hooks/useDrag/useDrag.js + 9 modules\nvar useDrag = __webpack_require__(49294);\n// EXTERNAL MODULE: ./node_modules/react-dnd/dist/hooks/useDrop/useDrop.js + 9 modules\nvar useDrop = __webpack_require__(99272);\n;// CONCATENATED MODULE: ./src/utils/gantt/constant.ts\nconst DraggableType = {\n GANTT_CELL: (id)=>\"GANTT_CELL_\".concat(id)\n};\n\n// EXTERNAL MODULE: ./src/graphql/mutations.ts\nvar mutations = __webpack_require__(23765);\n;// CONCATENATED MODULE: ./src/utils/gantt/schedule.ts\n\n\n\n\n/** フェーズの列挙体。画面上左から並ぶ順番通りに上から列挙すること。 */ const PhaseEnum = [\n \"beforeStockingDate\",\n \"stockingDate\",\n \"beforePackagingDate\",\n \"packagingDate\",\n \"beforeShippingDate\",\n \"shippingDate\",\n \"beforeCutDate\",\n \"cutDate\",\n \"afterCutDate\"\n];\n// GQLを使ってscheduleをIDで取得する\nconst getScheduleById = async (id)=>{\n const s = (await API/* API.graphql */.b.graphql({\n query: queries.getSchedule,\n variables: {\n id\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n })).data.getSchedule;\n return {\n __typename: \"Schedule\",\n id: s.id,\n projectId: s.projectId,\n name: s.name,\n note: s.note,\n beforeStockingName: s.beforeStockingName,\n beforeStockingDate: s.beforeStockingDate,\n stockingDate: s.stockingDate,\n beforePackagingName: s.beforePackagingName,\n beforePackagingDate: s.beforePackagingDate,\n packagingDate: s.packagingDate,\n beforeShippingName: s.beforeShippingName,\n beforeShippingDate: s.beforeShippingDate,\n shippingDate: s.shippingDate,\n shipType: s.shipType,\n beforeCutName: s.beforeCutName,\n beforeCutDate: s.beforeCutDate,\n cutDate: s.cutDate,\n afterCutName: s.afterCutName,\n afterCutDate: s.afterCutDate,\n createdAt: s.createdAt,\n updatedAt: s.updatedAt\n };\n};\n// GQLを使ってscheduleを更新する\nconst updateScheduleByInput = async (input)=>{\n return await API/* API.graphql */.b.graphql({\n query: mutations.updateSchedule,\n variables: {\n input\n },\n authMode: \"AMAZON_COGNITO_USER_POOLS\"\n });\n};\n/**\n * targetがどこのphaseの日にちか確認する\n * @param schedule スケジュール情報\n * @param targetDate 確認したい日にち\n * @return 対象フェーズ、見つからない場合はnull\n */ const getPhase = (schedule, targetDate)=>{\n // 各日付のどの期間に含まれているか確認\n let result = -1; // フェーズを示す。idxのひとつ前に検査したフェーズにする\n let startDate = null;\n let endDate = null;\n // idx=0は(入荷)範囲がないため除外\n for(let idx = 0; idx < PhaseEnum.length; idx++){\n // 日付未設定の場合は次の対象を探す\n if (!schedule[PhaseEnum[idx]]) continue;\n // 初回の日付を設定(比較対象がないためcontinue)\n if (!endDate) {\n endDate = schedule[PhaseEnum[idx]];\n result = idx;\n continue;\n }\n // 初回より後の日付を設定\n startDate = endDate;\n endDate = schedule[PhaseEnum[idx]];\n // 日付に含まれていればそのindexを返す。startDate <= targetDate < endDate\n if (moment_default()(targetDate).isBetween(moment_default()(startDate), moment_default()(endDate), \"day\", \"[)\")) {\n break;\n }\n result = idx;\n }\n // resultの値でどのフェーズか判定\n if (result >= 0 && result < PhaseEnum.length) {\n return PhaseEnum[result];\n } else {\n return null;\n }\n};\n/**\n * toDateを以下の観点でvalidateする\n * - 前後のphaseに含まれているか\n * - 移動元が終点だったら開始日を、始点だったら終了日を越してはいけない\n * phaseによっては日にちが重なっていたりするのでそれも考慮している\n * @param schedule スケジュール情報\n * @param toDate 移動先の日にち\n * @param phase 移動させるフェーズ\n * @param isFuture 未来方向か過去方向か\n * @return 移動可能=true, 移動不可=false\n */ const validateToDate = (schedule, toDate, phase, isFuture)=>{\n /** 対象フェーズ */ let phaseIndex = -1;\n let momentBeforeDate = undefined;\n let isTargetPhase = false;\n const momentToDate = moment_default()(toDate);\n // isFuture(未来/過去)によってループの向きを変える 未来最初から、過去最後から\n for(let i = isFuture ? 0 : PhaseEnum.length - 1; isFuture ? i < PhaseEnum.length : i >= 0; isFuture ? i++ : i--){\n // 処理開始位置\n if (!isTargetPhase) {\n if (phase === PhaseEnum[i]) {\n isTargetPhase = true;\n momentBeforeDate = moment_default()(schedule[PhaseEnum[i]]);\n phaseIndex = i;\n }\n continue;\n }\n // 日付が未設定の場合 または 確認対象が同じ日の場合は確認不要なので次の日付を確認する\n if (!schedule[PhaseEnum[i]] || (momentBeforeDate === null || momentBeforeDate === void 0 ? void 0 : momentBeforeDate.isSame(moment_default()(schedule[PhaseEnum[i]])))) {\n continue;\n }\n // 移動先から未来なら過去方向・過去なら未来方向をみて日付の設定がある場合は移動不可\n return isFuture ? momentToDate.isSameOrBefore(moment_default()(schedule[PhaseEnum[i]])) : momentToDate.isSameOrAfter(moment_default()(schedule[PhaseEnum[i]]));\n }\n // いずれの日付にも条件が合致しない場合フリー\n return true;\n};\n/**\n * スケジュールを移動させる\n * - phaseの重なりについて\n * - 未来方向への移動は見えているphase(一番後のphase)のみ更新、過去方向への移動は全てまとめて更新\n * - 対象が開始日の場合…そのphaseの日にちを更新、ただし前のphaseがある場合はその日にちも更新\n * - 対象が終了日の場合…その後のphaseの日にちを更新\n * - 対象が開始日であり終了日の場合…そのphaseの日にちを更新、未来 or 過去方向によって更新が必要なphaseを更新する\n * @param phase 移動させるフェーズ\n * @param schedule スケジュール情報\n * @param toDate 移動先の日にち\n * @param isFuture 未来方向か過去方向か\n */ const moveSchedule = (phase, schedule, toDate, isFuture)=>{\n let beforeDate = undefined;\n // isFuture(未来/過去)によってループの向きを変える\n for(let i = isFuture ? 0 : PhaseEnum.length - 1; isFuture ? i < PhaseEnum.length : i >= 0; isFuture ? i++ : i--){\n // 自分の日付を探す\n if (!beforeDate) {\n if (PhaseEnum[i] === phase) {\n beforeDate = moment_default()(schedule[PhaseEnum[i]]);\n schedule[PhaseEnum[i]] = toDate;\n }\n continue;\n }\n // 同じ日付があれば一緒に移動する\n // * 未来方向は見えている日付が一番上になるので動作しない\n if (beforeDate.isSame(moment_default()(schedule[PhaseEnum[i]]))) {\n schedule[PhaseEnum[i]] = toDate;\n }\n }\n};\n// scheduleを移動さきによって更新する\nconst getUpdatedSchedule = async (fromDate, toDate, row)=>{\n // どのphaseがどの日にちからどの日にちに動こうとしているか取得\n // fromDateとtoDateが同じなら何もしない\n if (fromDate === toDate) return Promise.reject();\n // 移動が過去方向か未来方向か確認\n const isFuture = moment_default()(fromDate).isBefore(toDate);\n // fromDateからどのフェーズか確認\n const phase = getPhase(row, fromDate);\n if (!phase) return Promise.reject();\n // toDateは前後のphaseの期間でないといけない\n if (!validateToDate(row, toDate, phase, isFuture)) {\n return Promise.reject();\n }\n // 変更対象のschedule取得\n const targetSchedule = await getScheduleById(row.id);\n if (targetSchedule === undefined) {\n return Promise.reject();\n }\n // 各phaseの日にちを更新していく\n moveSchedule(phase, targetSchedule, toDate, isFuture);\n const input = {\n id: targetSchedule.id,\n projectId: targetSchedule.projectId,\n name: targetSchedule.name,\n m3: targetSchedule.m3,\n case: targetSchedule.case,\n shipType: targetSchedule.shipType,\n beforeStockingDate: targetSchedule.beforeStockingDate,\n stockingDate: targetSchedule.stockingDate,\n beforePackagingDate: targetSchedule.beforePackagingDate,\n packagingDate: targetSchedule.packagingDate,\n beforeShippingDate: targetSchedule.beforeShippingDate,\n shippingDate: targetSchedule.shippingDate,\n beforeCutDate: targetSchedule.beforeCutDate,\n cutDate: targetSchedule.cutDate,\n afterCutDate: targetSchedule.afterCutDate,\n numImgs: targetSchedule.numImgs,\n isShipped: targetSchedule.isShipped\n };\n await updateScheduleByInput(input);\n const resultSchedule = await getScheduleById(row.id);\n if (resultSchedule === undefined) {\n return Promise.reject();\n }\n return resultSchedule;\n};\n\n// EXTERNAL MODULE: ./src/contexts/groups.tsx\nvar contexts_groups = __webpack_require__(50179);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/GanttCell.tsx\n\n\n\n\n\n\n\n\n\n\n\nfunction EmptyCell(param) {\n let { date , color , className , onClick , cellRef , holidays } = param;\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n onClick: onClick,\n className: \"\".concat(className, \" \").concat((0,utils_gantt/* drawHolidayColor */.gT)(date, holidays), \" \").concat((0,utils_gantt/* drawHolidayBorder */.yw)(date, holidays), \" h-14\"),\n style: color ? {\n backgroundColor: color\n } : {},\n ref: cellRef !== undefined ? cellRef : null\n });\n}\nfunction getCellStyle(data) {\n return \"bg-[\".concat(data.color, \"] text-white text-gray-100 h-10\");\n}\nfunction GanttCell(param) {\n let { row , date , focus , noScheduleClassName , draggableId , setSchedules } = param;\n var ref, ref1;\n const { projects: ganttProjects , dates } = (0,gantt/* useGantt */.Y)();\n const { groups } = (0,contexts_groups/* useGroups */.X)();\n const { currentGroup , permissions } = (0,auth/* useAuth */.a)();\n // rowとganttProjectsの最新の状態を保持するためのRefを作成します\n const rowRef = (0,react.useRef)(row);\n const refGanttProjects = (0,react.useRef)(ganttProjects);\n const { addAlert } = (0,alerts/* useAlerts */.Z)();\n // rowとganttProjectsが更新されるたびにそれぞれのRefを更新します\n rowRef.current = row;\n refGanttProjects.current = ganttProjects;\n var ref2;\n // 休日カレンダー\n const holidayCalendar = (ref2 = (ref = groups === null || groups === void 0 ? void 0 : groups.find((group)=>{\n return group.id === (currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id);\n })) === null || ref === void 0 ? void 0 : (ref1 = ref.holidays) === null || ref1 === void 0 ? void 0 : ref1.items) !== null && ref2 !== void 0 ? ref2 : [];\n const [, drag] = (0,useDrag/* useDrag */.c)(()=>({\n type: DraggableType.GANTT_CELL(draggableId),\n item: {\n fromDate: date\n }\n }), []);\n const [, drop] = (0,useDrop/* useDrop */.L)(()=>({\n accept: DraggableType.GANTT_CELL(draggableId),\n drop: async (item)=>{\n try {\n // scheduleを更新する\n const updatedSchedule = await getUpdatedSchedule(item.fromDate, date, rowRef.current // rowRef.currentは更新されたrowの値を保持している\n );\n setSchedules((prev)=>{\n const updatedSchedules = [\n ...prev\n ];\n const index = updatedSchedules.findIndex((schedule)=>schedule.id === updatedSchedule.id);\n updatedSchedules[index] = {\n ...updatedSchedule,\n ...(0,utils_gantt/* getScheduleDates */.NR)(updatedSchedule, dates)\n };\n return updatedSchedules;\n });\n // ganttの中で何番目にあるかをidxで取得、最新のganttProjectsを参照する\n const idx = refGanttProjects.current.findIndex((project)=>{\n return project.id === updatedSchedule.projectId;\n });\n // ganttProjectsの中でtargetProjectと同じidを持つものを更新する\n const targetProject = ganttProjects.find((project)=>project.id === updatedSchedule.projectId);\n if (!targetProject || !targetProject.schedules) return;\n // schedulesの中でtargetScheduleと同じidを持つものを更新する\n targetProject.schedules.items = targetProject.schedules.items.map((schedule)=>{\n if (schedule === null) return null;\n if (schedule.id === updatedSchedule.id) {\n return updatedSchedule;\n }\n return schedule;\n });\n // ドラッグ&ドロップで変更されたことをprojectレベルで持たせる\n targetProject.beforeIdx = idx;\n addAlert({\n message: \"スケジュールを更新しました\",\n severity: \"success\"\n });\n } catch (e) {}\n return;\n }\n }), [\n ganttProjects,\n setSchedules\n ]);\n // dragとdropを同じコンポーネントに反映するための\n const draggableAndDroppable = (el)=>{\n drag(el);\n drop(el);\n };\n if (!row) return /*#__PURE__*/ (0,jsx_runtime.jsx)(EmptyCell, {\n date: date,\n onClick: focus,\n className: noScheduleClassName,\n cellRef: drop,\n holidays: holidayCalendar\n });\n const data = row[date];\n // typeが空の時はdragできない\n if (!data || data.type === \"\") return /*#__PURE__*/ (0,jsx_runtime.jsx)(EmptyCell, {\n date: date,\n onClick: focus,\n color: data === null || data === void 0 ? void 0 : data.color,\n cellRef: drop,\n holidays: holidayCalendar\n });\n // rowから各フェーズの日にちを持ってくる\n // data.typeが空ではないけど、Dataは持っていない場合(= フェーズの途中)\n if (!data.hasData) {\n // そのフェーズの最後の日付(=stock以外のフェーズの前の日)の場合は、ドラッグできる\n // fromDateからどのフェーズか確認\n const phase = getPhase(row, date);\n if (!phase) return /*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n onClick: focus,\n className: \"\".concat((0,utils_gantt/* drawHolidayBorder */.yw)(date, holidayCalendar), \" h-14\"),\n style: data.color ? {\n backgroundColor: data.color,\n opacity: 0.7\n } : {},\n ref: drop\n });\n }\n // こいつは終点のはずなのでドラッグできる\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n className: \"\".concat(getCellStyle(data), \" \").concat((0,utils_gantt/* drawHolidayBorder */.yw)(date, holidayCalendar)),\n style: {\n backgroundColor: data.color,\n color: \"white\"\n },\n ref: permissions.Project.canWrite ? draggableAndDroppable : drop,\n children: dates.length > 14 ? data.initial : \"\".concat(data.text)\n });\n}\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/ScheduleCell.tsx\n\n\n\n\n\n\n\nfunction ScheduleCell(param) {\n let { schedule , col } = param;\n const { projects } = (0,gantt/* useGantt */.Y)();\n const queryClient = (0,QueryClientProvider/* useQueryClient */.NL)();\n const { permissions } = (0,auth/* useAuth */.a)();\n const [editColumns, setEditColumns] = (0,react.useState)([]);\n const scheduleId = schedule[\"id\"];\n // リストをダブルクリックしたときの操作\n const changeEditStatus = (id)=>{\n // 編集中のカラムを記録する。ひとつしかないとは思われるが複数対応。\n if (permissions.Project.canWrite) {\n (editColumns === null || editColumns === void 0 ? void 0 : editColumns.includes(id)) ? setEditColumns(editColumns.filter((col)=>col !== id)) : setEditColumns(editColumns.concat(id));\n }\n };\n // 値が含まれるか確認する\n const isEditable = (id, editable)=>{\n return editColumns.includes(id) && editable;\n };\n // スケジュールのはじめはs.なので排除する\n const replaceField = (field)=>{\n return field.replace(\"s.\", \"\");\n };\n // スケジュールデータ更新\n const handleUpdate = (field, value)=>{\n // 編集状態を解除する\n changeEditStatus(scheduleId);\n // 編集前と変わらない場合は処理中断\n if (schedule[field] === value) return;\n // 値の変更\n schedule[field] = value;\n // スケジュール更新を準備\n const inputSchedule = {\n id: scheduleId,\n [field]: value\n };\n // スケジュールの更新\n updateScheduleByInput(inputSchedule);\n queryClient.invalidateQueries({\n queryKey: [\n \"projectsByGroupIdForManager\"\n ]\n });\n // 案件を更新\n const targetProject = projects.find((project)=>project.id === schedule[\"projectId\"]);\n if (targetProject) {\n var ref;\n const targetSchedule = (ref = targetProject.schedules) === null || ref === void 0 ? void 0 : ref.items.find((findSchedule)=>{\n return (findSchedule === null || findSchedule === void 0 ? void 0 : findSchedule.id) === scheduleId;\n });\n if (targetSchedule && Object.keys(targetSchedule).includes(field)) {\n // 対象フィールドに値を設定\n targetSchedule[field] = value;\n }\n }\n };\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(TableCell/* default */.Z, {\n className: col.cellClassName,\n onDoubleClick: (event)=>{\n changeEditStatus(scheduleId);\n },\n children: [\n isEditable(scheduleId, col.editable) && /*#__PURE__*/ (0,jsx_runtime.jsx)(TextField/* default */.Z, {\n size: \"small\",\n defaultValue: schedule[replaceField(col.field)],\n onBlur: (event)=>{\n handleUpdate(replaceField(col.field), event.target.value);\n },\n inputProps: col.inputProps,\n autoFocus: true\n }),\n !isEditable(scheduleId, col.editable) && schedule[replaceField(col.field)]\n ]\n }, \"\".concat(schedule.id, \"__\").concat(col.field));\n}\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/ProjectRow.tsx\n\n\n\n\n\n\n\n\n\n\nfunction DummyRow(param) {\n let { project } = param;\n const { dates } = (0,gantt/* useGantt */.Y)();\n const { addAlert } = (0,alerts/* useAlerts */.Z)();\n const focus = ()=>addAlert({\n severity: \"warning\",\n message: \"「\".concat(project.name, \"」はスケジュールが設定されていません\")\n });\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableRow/* default */.Z, {\n children: dates.map((date)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(GanttCell, {\n row: null,\n date: date,\n focus: focus,\n noScheduleClassName: \"bg-stone-50 hover:cursor-not-allowed\"\n }, \"\".concat(project.id, \"__\").concat(date)))\n });\n}\nfunction ScheduleRow(param) {\n let { schedule , setSchedules } = param;\n const { dates , focus , column } = (0,gantt/* useGantt */.Y)();\n const scheduleCols = scheduleColDef();\n const draggableId = schedule.id;\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(TableRow/* default */.Z, {\n children: [\n scheduleCols.filter((col)=>column.includes(col.field)).map((col)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(ScheduleCell, {\n schedule: schedule,\n col: col\n }, \"\".concat(schedule.id, \"__\").concat(col.field))),\n dates.map((date)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(GanttCell, {\n row: schedule,\n setSchedules: setSchedules,\n date: date,\n focus: ()=>focus(schedule),\n draggableId: draggableId\n }, \"\".concat(schedule.id, \"__\").concat(date)))\n ]\n }, schedule.id);\n}\nfunction ProjectRow(param) {\n let { project } = param;\n var ref, ref1;\n const projectCols = projectColDef();\n const { column } = (0,gantt/* useGantt */.Y)();\n // キャシュクリアではなくユーザーがドラッグ&ドロップした部分だけUIを更新したいので個別で状態管理する\n const [schedules, setSchedules] = (0,react.useState)((ref = project.schedules) === null || ref === void 0 ? void 0 : ref.items);\n const scheduleExists = ((ref1 = project.schedules) === null || ref1 === void 0 ? void 0 : ref1.items.length) > 0;\n // projectにschedule更新情報を付与\n project.recentlyScheduleUpdated = recentlyScheduleUpdated(schedules, 3);\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(TableRow/* default */.Z, {\n children: projectCols.filter((col)=>column.includes(col.field)).map((col)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(ProjectCell, {\n row: project,\n col: col\n }, \"\".concat(project.id, \"__\").concat(col.field)))\n }),\n !scheduleExists && /*#__PURE__*/ (0,jsx_runtime.jsx)(DummyRow, {\n project: project\n }),\n schedules.map((schedule)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(ScheduleRow, {\n schedule: schedule,\n setSchedules: setSchedules\n }, schedule.id))\n ]\n });\n}\n// scheduleのリストと日数を渡して、直近N日以内に更新されたscheduleの中で最新のupdatedAtを返す\n// 該当するものがない場合は、空文字を返す\nconst recentlyScheduleUpdated = (schedules, numOfDays)=>{\n // 直近N日以内に更新されたscheduleを抽出\n const scheduleUpdated = schedules.filter((schedule)=>{\n // updatedAtとcreatedAtが同じ場合は更新されてない\n if (schedule.createdAt === schedule.updatedAt) {\n return false;\n }\n // updatedAtが現在時刻の過去3日以内だったら更新されている、momentを使って描く\n return moment_default()(schedule.updatedAt).isAfter(moment_default()().subtract(numOfDays, \"days\"));\n });\n // 直近N日以内に更新されたscheduleがない場合は、空文字を返す\n if (scheduleUpdated.length === 0) {\n return \"\";\n }\n // 直近N日以内に更新されたscheduleがある場合は、その中で最もupdatedAtが新しいものを抽出\n const latestScheduleUpdated = scheduleUpdated === null || scheduleUpdated === void 0 ? void 0 : scheduleUpdated.reduce((a, b)=>moment_default()(a.updatedAt).isAfter(moment_default()(b.updatedAt)) ? a : b);\n return latestScheduleUpdated.updatedAt;\n};\n\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/Table/index.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ScheduleHeaders() {\n var ref, ref1;\n const { dates , column } = (0,gantt/* useGantt */.Y)();\n const { groups } = (0,contexts_groups/* useGroups */.X)();\n const { currentGroup } = (0,auth/* useAuth */.a)();\n const projectCols = projectColDef().filter((col)=>column.includes(col.field));\n const scheduleCols = scheduleColDef().filter((col)=>column.includes(col.field));\n const holidayCalendar = (ref = groups === null || groups === void 0 ? void 0 : groups.find((group)=>{\n return group.id === (currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id);\n })) === null || ref === void 0 ? void 0 : (ref1 = ref.holidays) === null || ref1 === void 0 ? void 0 : ref1.items;\n const dateCols = dateColDef(dates, holidayCalendar);\n const columns = [\n ...projectCols,\n ...scheduleCols,\n ...dateCols\n ];\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableHead/* default */.Z, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(TableRow/* default */.Z, {\n children: columns.map((col)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(TableCell/* default */.Z, {\n className: col.headerClassName,\n children: col.headerName\n }, col.field))\n })\n });\n}\nfunction ScheduleBody() {\n const { projects } = (0,gantt/* useGantt */.Y)();\n const key = {};\n projects.forEach((project)=>{\n var ref;\n var _length;\n key[project.id] = (_length = (ref = project.schedules) === null || ref === void 0 ? void 0 : ref.items.length) !== null && _length !== void 0 ? _length : 0;\n });\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(DndProvider/* DndProvider */.W, {\n backend: react_dnd_html5_backend_dist/* HTML5Backend */.PD,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(TableBody/* default */.Z, {\n children: projects.map((project)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(ProjectRow, {\n project: project\n }, project.id))\n }, JSON.stringify(key))\n });\n}\nfunction ScheduleTable() {\n const { loading } = (0,gantt/* useGantt */.Y)();\n if (loading) return /*#__PURE__*/ (0,jsx_runtime.jsx)(LinearProgress/* default */.Z, {\n color: \"secondary\"\n });\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(TableContainer/* default */.Z, {\n component: Paper/* default */.Z,\n sx: {\n height: \"85vh\"\n },\n children: /*#__PURE__*/ (0,jsx_runtime.jsxs)(Table_Table/* default */.Z, {\n size: \"small\",\n stickyHeader: true,\n sx: {\n tableLayout: \"fixed\",\n overflow: \"scroll\"\n },\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ScheduleHeaders, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ScheduleBody, {})\n ]\n })\n });\n}\n/* harmony default export */ var ScheduleView_Table = (ScheduleTable);\n\n// EXTERNAL MODULE: ./src/utils/cookie.ts\nvar cookie = __webpack_require__(41392);\n;// CONCATENATED MODULE: ./src/components/Projects/ScheduleView/index.tsx\n\n\n\n\n\n\n\n//PAX-607 日付変更時再設定\nconst resetDate = (dateRange, setDateRange, dateLabel)=>{\n const newDate = moment_default()();\n const { startDate , endDate } = dateRange;\n if (!newDate.isSame(startDate, \"day\") && (dateLabel == \"+7Days\" || dateLabel == \"+30Days\")) {\n const daysToAdd = dateLabel === \"+30Days\" ? 30 : 7;\n setDateRange({\n startDate: moment_default()().toDate(),\n endDate: moment_default()().add(daysToAdd, \"day\").toDate()\n });\n var ref;\n // Cookieの設定もここで行う\n (0,dist.setCookie)(null, \"ganttStartDate\", (ref = startDate === null || startDate === void 0 ? void 0 : startDate.toString()) !== null && ref !== void 0 ? ref : \"\", cookie/* defaultCookieOptions */.R);\n var ref1;\n (0,dist.setCookie)(null, \"ganttEndDate\", (ref1 = endDate === null || endDate === void 0 ? void 0 : endDate.toString()) !== null && ref1 !== void 0 ? ref1 : \"\", cookie/* defaultCookieOptions */.R);\n }\n};\nfunction ScheduleView() {\n const { dateRange , setDateRange , dateLabel } = (0,gantt/* useGantt */.Y)();\n //PAX-607 日付変更時再設定\n (0,react.useEffect)(()=>{\n if (dateRange.startDate && dateRange.endDate) {\n resetDate({\n startDate: dateRange.startDate,\n endDate: dateRange.endDate\n }, setDateRange, dateLabel || \"\" // nullの場合は空文字列を使用\n );\n }\n }, [\n dateRange,\n setDateRange,\n dateLabel\n ]); // 依存配列にdateRangeとdateLabelを追加\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(ScheduleView_Table, {});\n}\n/* harmony default export */ var Projects_ScheduleView = (ScheduleView);\n\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Print.js\nvar Print = __webpack_require__(16023);\n// EXTERNAL MODULE: ./src/components/Menu.tsx\nvar components_Menu = __webpack_require__(70258);\n// EXTERNAL MODULE: ./src/contexts/groupReports.tsx + 7 modules\nvar groupReports = __webpack_require__(84729);\n;// CONCATENATED MODULE: ./src/components/Projects/Menu.tsx\n\n\n\n\n\n\n\nfunction ProjectsMenu() {\n const [openMenu, setOpenMenu] = (0,react.useState)(false);\n const [anchor, setAnchor] = (0,react.useState)(null);\n const { planReports , woodReports , invoiceReports , download } = (0,groupReports/* useGroupReports */.L)();\n const { permissions } = (0,auth/* useAuth */.a)();\n if (!planReports) return /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {});\n const handleClick = (e)=>{\n setOpenMenu(true);\n setAnchor(e.currentTarget);\n };\n const handleCloseMenu = ()=>{\n setOpenMenu(false);\n setAnchor(null);\n };\n const menus = [\n ...planReports.map((report)=>({\n label: \"\".concat(report.name, \"を印刷\"),\n onClick: async ()=>{\n await download(report);\n },\n icon: /*#__PURE__*/ (0,jsx_runtime.jsx)(Print/* default */.Z, {})\n })),\n ...woodReports.map((report)=>({\n label: \"\".concat(report.name, \"を印刷\"),\n onClick: async ()=>{\n await download(report);\n },\n icon: /*#__PURE__*/ (0,jsx_runtime.jsx)(Print/* default */.Z, {})\n })),\n ...invoiceReports.map((report)=>({\n label: \"\".concat(report.name, \"を印刷\"),\n onClick: async ()=>{\n await download(report);\n },\n icon: /*#__PURE__*/ (0,jsx_runtime.jsx)(Print/* default */.Z, {})\n }))\n ];\n if (!permissions.GroupReport.canRead) return null;\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"mr-3\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n onClick: handleClick,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Print/* default */.Z, {})\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(components_Menu/* default */.Z, {\n open: openMenu,\n anchor: anchor,\n menus: menus,\n onClose: handleCloseMenu\n })\n ]\n });\n}\n\n// EXTERNAL MODULE: ./node_modules/@mui/icons-material/PushPin.js\nvar PushPin = __webpack_require__(24238);\n// EXTERNAL MODULE: ./node_modules/@mui/material/ToggleButton/ToggleButton.js + 4 modules\nvar ToggleButton = __webpack_require__(66437);\n// EXTERNAL MODULE: ./src/contexts/projects.tsx\nvar projects = __webpack_require__(40394);\n;// CONCATENATED MODULE: ./src/components/Projects/SaveFilterButton.tsx\n\n\n\n\n\nfunction SaveFilterButton() {\n const { isFilterSaved , setIsFilterSaved } = (0,gantt/* useGantt */.Y)();\n const { isProjectsFilterSaved , setIsProjectsFilterSaved } = (0,projects/* useProjects */.Z)();\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(ToggleButton/* default */.Z, {\n color: \"secondary\",\n value: \"check\",\n selected: isFilterSaved,\n onChange: ()=>{\n setIsFilterSaved(!isFilterSaved);\n setIsProjectsFilterSaved(!isProjectsFilterSaved);\n },\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(PushPin/* default */.Z, {})\n });\n}\n\n// EXTERNAL MODULE: ./src/hooks/query.ts\nvar query = __webpack_require__(92945);\n;// CONCATENATED MODULE: ./src/components/Projects/index.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ViewSelect(param) {\n let { view , setView } = param;\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(Select/* default */.Z, {\n variant: \"outlined\",\n size: \"small\",\n value: view,\n renderValue: (value)=>value === \"schedule\" ? /*#__PURE__*/ (0,jsx_runtime.jsx)(Tooltip/* default */.Z, {\n title: \"スケジュール\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(AccountTree/* default */.Z, {})\n }) : /*#__PURE__*/ (0,jsx_runtime.jsx)(Tooltip/* default */.Z, {\n title: \"リスト\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(FormatListBulleted/* default */.Z, {})\n }),\n className: \"bg-white\",\n onChange: (e)=>setView(e.target.value),\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(MenuItem/* default */.Z, {\n value: \"schedule\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(AccountTree/* default */.Z, {\n sx: {\n mr: 1\n },\n fontSize: \"small\"\n }),\n \"スケジュール\"\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(MenuItem/* default */.Z, {\n value: \"list\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(FormatListBulleted/* default */.Z, {\n sx: {\n mr: 1\n },\n fontSize: \"small\"\n }),\n \"リスト\"\n ]\n })\n ]\n });\n}\nfunction Projects() {\n const [view, setView] = (0,query/* default */.Z)(\"viewMode\", \"schedule\");\n const [openCreate, setOpenCreate] = (0,react.useState)(false);\n const { planReports , woodReports , invoiceReports } = (0,groupReports/* useGroupReports */.L)();\n const { permissions } = (0,auth/* useAuth */.a)();\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(NewProject/* NewProject */.V, {\n open: openCreate,\n setOpen: setOpenCreate\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"m-4 flex justify-between\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"lg:flex items-center gap-4\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"flex items-center gap-4 mb-4 lg:mb-0\",\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Typography/* default */.Z, {\n variant: \"h6\",\n className: \"whitespace-nowrap\",\n children: \"案件一覧\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(SaveFilterButton, {}),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(ViewSelect, {\n view: view,\n setView: setView\n }),\n view === \"schedule\" && /*#__PURE__*/ (0,jsx_runtime.jsx)(ProjectFilter, {})\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"div\", {\n className: \"flex items-center gap-4\",\n children: view === \"schedule\" && /*#__PURE__*/ (0,jsx_runtime.jsx)(GanttHeader, {})\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n className: \"flex item-center\",\n children: [\n planReports.length + woodReports.length + invoiceReports.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)(ProjectsMenu, {}),\n permissions.Project.canWrite && /*#__PURE__*/ (0,jsx_runtime.jsx)(Button/* default */.Z, {\n onClick: ()=>setOpenCreate(true),\n variant: \"outlined\",\n sx: {\n maxHeight: \"40px\"\n },\n children: \"新規\"\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(Divider/* default */.Z, {}),\n view === \"schedule\" && /*#__PURE__*/ (0,jsx_runtime.jsx)(Projects_ScheduleView, {}),\n view === \"list\" && /*#__PURE__*/ (0,jsx_runtime.jsx)(ListView, {})\n ]\n });\n}\n/* harmony default export */ var components_Projects = (Projects);\n\n// EXTERNAL MODULE: ./src/contexts/tenant.tsx\nvar tenant = __webpack_require__(27349);\n// EXTERNAL MODULE: ./src/contexts/contacts.tsx\nvar contacts = __webpack_require__(36225);\n// EXTERNAL MODULE: ./src/components/AccessGate.tsx\nvar AccessGate = __webpack_require__(13875);\n// EXTERNAL MODULE: ./src/contexts/users.tsx\nvar users = __webpack_require__(32623);\n// EXTERNAL MODULE: ./src/components/LicenseNotValid.tsx\nvar LicenseNotValid = __webpack_require__(17696);\n// EXTERNAL MODULE: ./src/utils/license.ts\nvar license = __webpack_require__(10798);\n;// CONCATENATED MODULE: ./src/pages/index.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Home = ()=>{\n const { permissions } = (0,auth/* useAuth */.a)();\n const { isLicenseValidForMe , myLicense } = (0,users/* useUsers */.U)();\n if (!isLicenseValidForMe && !permissions.TenantMember.canWrite) {\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(LicenseNotValid/* default */.Z, {});\n }\n if (!isLicenseValidForMe && myLicense === license/* LicenseEnum.SUPPORT */.y$.SUPPORT) {\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(LicenseNotValid/* default */.Z, {});\n }\n if (!isLicenseValidForMe && permissions.TenantMember.canWrite) {\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(layouts/* HomeLayout */.Os, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(LicenseNotValid/* default */.Z, {})\n });\n }\n return /*#__PURE__*/ (0,jsx_runtime.jsxs)(\"div\", {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsxs)((head_default()), {\n children: [\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"title\", {\n children: \"PAX\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"meta\", {\n name: \"description\",\n content: \"Pax mobile\"\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"link\", {\n rel: \"manifest\",\n href: \"/manifest.json\"\n })\n ]\n }),\n /*#__PURE__*/ (0,jsx_runtime.jsx)(\"main\", {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(layouts/* HomeLayout */.Os, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(AccessGate/* default */.Z, {\n permission: permissions.Project,\n message: \"プロジェクトを閲覧する権限がありません\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(projects/* ProjectsProvider */.V, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(accounts/* AccountsProvider */.B, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(contacts/* ContactsProvider */.v, {\n by: \"AccountId\",\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(gantt/* GanttProvider */.F, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(groupReports/* GroupReportsProvider */.e, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(contexts_groups/* GroupsProvider */.p, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(components_Projects, {})\n })\n })\n })\n })\n })\n })\n })\n })\n })\n ]\n });\n};\nfunction Root() {\n const queryClient = new modern_queryClient/* QueryClient */.S();\n return /*#__PURE__*/ (0,jsx_runtime.jsx)(QueryClientProvider/* QueryClientProvider */.aH, {\n client: queryClient,\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(tenant/* TenantProvider */.z, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(users/* UsersProvider */.K, {\n children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Home, {})\n })\n })\n });\n}\n/* harmony default export */ var pages = (Root);\n\n\n/***/ }),\n\n/***/ 77801:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"_\": function() { return /* binding */ dataGridToolbar; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85893);\n/* harmony import */ var _mui_x_data_grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42176);\n/* harmony import */ var _mui_x_data_grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6132);\n/* harmony import */ var _mui_x_data_grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50853);\n/* harmony import */ var _mui_x_data_grid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54482);\n/* harmony import */ var _mui_x_data_grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10930);\n\n\n// DataGrid Toolbar\nconst dataGridToolbar = ()=>{\n return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_1__/* .GridToolbarContainer */ .D, {\n children: [\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_2__/* .GridToolbarColumnsButton */ .S, {}),\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_3__/* .GridToolbarFilterButton */ .M, {}),\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_4__/* .GridToolbarDensitySelector */ .L, {}),\n /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_5__/* .GridToolbarExport */ .Zh, {\n csvOptions: {\n utf8WithBom: true\n }\n })\n ]\n });\n};\n\n\n/***/ })\n\n},\n/******/ function(__webpack_require__) { // webpackRuntimeModules\n/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }\n/******/ __webpack_require__.O(0, [3662,8869,7976,7918,1130,5306,623,1398,5733,6888,7633,999,8021,4176,1294,6711,3171,4729,2814,9624,9774,2888,179], function() { return __webpack_exec__(48312); });\n/******/ var __webpack_exports__ = __webpack_require__.O();\n/******/ _N_E = __webpack_exports__;\n/******/ }\n]);"],"names":["self","push","__unused_webpack_module","__unused_webpack_exports","__webpack_require__","window","__NEXT_P","__webpack_exports__","d","useGroups","GroupsProvider","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","react__WEBPACK_IMPORTED_MODULE_1__","_auth__WEBPACK_IMPORTED_MODULE_2__","hooks_datalist__WEBPACK_IMPORTED_MODULE_3__","GroupsContext","createContext","groups","loading","update","create","refetch","Promise","resolve","set","children","param","user","a","data","Z","query","variables","tenantId","useEffect","createGroup","input","updateGroup","values","useMemo","jsx","Provider","value","groupsContext","useContext","undefined","r","pages","jsx_runtime","head","head_default","n","modern_queryClient","QueryClientProvider","layouts","accounts","react","Divider","Typography","Button","Select","MenuItem","AccountTree","FormatListBulleted","Tooltip","NewProject","Autocomplete","Box","TextField","gantt","utils_gantt","options","id","name","ProjectFilter","projects","keyword","setKeyword","Y","sx","minWidth","size","includeInputInList","filterSelectedOptions","getOptionLabel","opt","clearOnBlur","inputValue","renderOption","props","option","component","_","_M","onChange","renderInput","label","placeholder","params","index_es","moment","moment_default","ja","displayFormat","definedRanges","startDate","startOf","toDate","endDate","endOf","subtract","add","DateRange","ref","open","setOpen","useState","dateRange","setDateRange","setDateLabel","displayDateRange","concat","format","toggle","handleDateRangeChange","selectedIndex","findIndex","item","getTime","range","jsxs","className","variant","onClick","D","initialDateRange","locale","toISOString","ListSubheader","ArrowUpward","ArrowDownward","ascOptions","descOptions","Sort_ProjectFilter","sort","setSort","select","e","target","map","Filter_options","Filter_ProjectFilter","setValue","status","setStatus","filter","includes","o","multiple","v","Menu","FormControlLabel","Switch","Visibility","IconButton","EditNotifications","next_link","link_default","utils_status","dateColDef","dates","holidays","field","date","headerName","headerClassName","gT","yw","scheduleColDef","cellClassName","showColumnsMenu","editable","inputProps","maxLength","projectColDef","renderCell","title","Date","toLocaleDateString","year","month","day","hour","minute","second","timeZone","placement","fontSize","href","li","defColumns","col","Column","anchorEl","setAnchorEl","column","setColumn","handleClick","event","currentTarget","handleClose","Boolean","onClose","defColumn","control","checked","f","GanttHeader","Fragment","DataGrid","LinearProgress","project","Columns","cols","sortable","width","flex","type","valueFormatter","m","items","length","Object","keys","canWrite","toolbar","auth","Paper","InputBase","Search","SearchBox","resetPaginationModel","setFilterCondition","handleSearch","projectFilter","or","contains","accountName","contactName","reference","managerName","quoterName","operatorName","lR","userFilter","firstName","lastName","categoryFilter","scheduleFilter","beforeStockingName","beforePackagingName","beforeShippingName","beforeCutName","afterCutName","p","display","alignItems","preventDefault","ZP","ml","queries","useQuery","API","alerts","error","fetchAppSync","res","b","graphql","authMode","queryName","extractQueryName","graphqlQuery","queryNameMatch","match","charAt","toLowerCase","slice","useQueryWrap","queryKey","queryFn","scaleTime","gcTime","addAlert","err","customError","s","Error","message","severity","staleTime","dataToRows","rows","accountId","contactId","alert","createdAt","PI","updatedAt","account","schedules","P","category","DEFAULT_PAGINATION_MODEL","page","pageSize","ListView_Table","ref1","ref2","ref3","ref4","permissions","currentGroup","paginationModel","setPaginationModel","cursorInfo","setCursorInfo","filterCondition","columnVisibilityModel","setColumnVisibilityModel","caseMarkNumImgs","stockNumImgs","archived","cancelled","cancelReason","generateCacheKey","JSON","stringify","groupId","hasNextPage","nextToken","queryCallback","_nextToken","_startIndex","newNextToken","newStartIndex","startIndex","prevCursorInfo","handlePaginationModelChange","newPaginationModel","isLoading","projectsByGroupIdForManager","ne","limit","sortDirection","slots","slotProps","loadingOverlay","noRowsVariant","columns","ListView_Columns","MasterData","onColumnVisibilityModelChange","newModel","initialState","pagination","rowCount","density","isRowSelectable","paginationMode","pageSizeOptions","paginationMeta","onPaginationModelChange","ListView","dist","Table_Table","TableBody","TableCell","TableContainer","TableHead","TableRow","DndProvider","react_dnd_html5_backend_dist","renderCellValue","row","ref5","ref6","ref7","ProjectCell","rowSpan","useDrag","useDrop","DraggableType","GANTT_CELL","mutations","PhaseEnum","getScheduleById","getSchedule","__typename","projectId","note","beforeStockingDate","stockingDate","beforePackagingDate","packagingDate","beforeShippingDate","shippingDate","shipType","beforeCutDate","cutDate","afterCutDate","updateScheduleByInput","updateSchedule","getPhase","schedule","targetDate","result","idx","isBetween","validateToDate","phase","isFuture","momentBeforeDate","isTargetPhase","momentToDate","i","isSame","isSameOrBefore","isSameOrAfter","moveSchedule","beforeDate","getUpdatedSchedule","fromDate","reject","isBefore","targetSchedule","m3","case","numImgs","isShipped","resultSchedule","contexts_groups","EmptyCell","color","cellRef","style","backgroundColor","GanttCell","focus","noScheduleClassName","draggableId","setSchedules","ganttProjects","X","rowRef","useRef","refGanttProjects","current","holidayCalendar","find","group","drag","c","drop","L","accept","updatedSchedule","updatedSchedules","prev","index","NR","targetProject","beforeIdx","draggableAndDroppable","el","hasData","opacity","Project","initial","text","ScheduleCell","queryClient","NL","editColumns","setEditColumns","scheduleId","changeEditStatus","isEditable","replaceField","replace","handleUpdate","invalidateQueries","findSchedule","defaultValue","autoFocus","DummyRow","ScheduleRow","scheduleCols","ProjectRow","projectCols","scheduleExists","recentlyScheduleUpdated","numOfDays","scheduleUpdated","isAfter","latestScheduleUpdated","reduce","ScheduleHeaders","dateCols","ScheduleBody","key","forEach","_length","W","backend","PD","ScheduleView_Table","height","stickyHeader","tableLayout","overflow","cookie","resetDate","dateLabel","newDate","setCookie","toString","R","Projects_ScheduleView","Print","components_Menu","groupReports","ProjectsMenu","openMenu","setOpenMenu","anchor","setAnchor","planReports","woodReports","invoiceReports","download","handleCloseMenu","menus","report","icon","GroupReport","canRead","PushPin","ToggleButton","SaveFilterButton","isFilterSaved","setIsFilterSaved","isProjectsFilterSaved","setIsProjectsFilterSaved","selected","ViewSelect","view","setView","renderValue","mr","components_Projects","openCreate","setOpenCreate","V","maxHeight","tenant","contacts","AccessGate","users","LicenseNotValid","license","Home","isLicenseValidForMe","myLicense","U","TenantMember","y$","SUPPORT","Os","content","rel","permission","B","by","F","S","aH","client","z","K","dataGridToolbar","_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_1__","_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_2__","_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_3__","_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_4__","_mui_x_data_grid__WEBPACK_IMPORTED_MODULE_5__","M","Zh","csvOptions","utf8WithBom","O","_N_E"],"sourceRoot":""}