|
@@ -6,6 +6,7 @@ import { |
|
|
GridCellParams, |
|
|
GridCellParams, |
|
|
GridColDef, |
|
|
GridColDef, |
|
|
GridEditInputCell, |
|
|
GridEditInputCell, |
|
|
|
|
|
GridRenderCellParams, |
|
|
GridRenderEditCellParams, |
|
|
GridRenderEditCellParams, |
|
|
GridRowId, |
|
|
GridRowId, |
|
|
GridRowModel, |
|
|
GridRowModel, |
|
@@ -45,6 +46,7 @@ import { roundToNearestQuarter } from "@/app/utils/manhourUtils"; |
|
|
import FastTimeEntryModal from "../TimesheetTable/FastTimeEntryModal"; |
|
|
import FastTimeEntryModal from "../TimesheetTable/FastTimeEntryModal"; |
|
|
import { LeaveType } from "@/app/api/timesheets"; |
|
|
import { LeaveType } from "@/app/api/timesheets"; |
|
|
import DisabledEdit from "./DisabledEdit"; |
|
|
import DisabledEdit from "./DisabledEdit"; |
|
|
|
|
|
import TwoLineCell from "./TwoLineCell"; |
|
|
|
|
|
|
|
|
dayjs.extend(isBetween); |
|
|
dayjs.extend(isBetween); |
|
|
|
|
|
|
|
@@ -325,6 +327,9 @@ const TimeLeaveInputTable: React.FC<Props> = ({ |
|
|
return leave?.name || "Unknown leave"; |
|
|
return leave?.name || "Unknown leave"; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
renderCell(params: GridRenderCellParams<TimeLeaveRow, number>) { |
|
|
|
|
|
return <TwoLineCell>{params.formattedValue}</TwoLineCell>; |
|
|
|
|
|
}, |
|
|
renderEditCell(params: GridRenderEditCellParams<TimeLeaveRow, number>) { |
|
|
renderEditCell(params: GridRenderEditCellParams<TimeLeaveRow, number>) { |
|
|
return ( |
|
|
return ( |
|
|
<ProjectSelect |
|
|
<ProjectSelect |
|
@@ -455,6 +460,9 @@ const TimeLeaveInputTable: React.FC<Props> = ({ |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
renderCell(params: GridRenderCellParams<TimeLeaveRow, number>) { |
|
|
|
|
|
return <TwoLineCell>{params.formattedValue}</TwoLineCell>; |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: "taskId", |
|
|
field: "taskId", |
|
@@ -496,6 +504,9 @@ const TimeLeaveInputTable: React.FC<Props> = ({ |
|
|
).find((t) => t.id === params.value); |
|
|
).find((t) => t.id === params.value); |
|
|
return task ? task.name : t("None"); |
|
|
return task ? task.name : t("None"); |
|
|
}, |
|
|
}, |
|
|
|
|
|
renderCell(params: GridRenderCellParams<TimeLeaveRow, number>) { |
|
|
|
|
|
return <TwoLineCell>{params.formattedValue}</TwoLineCell>; |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
field: "inputHours", |
|
|
field: "inputHours", |
|
@@ -578,6 +589,9 @@ const TimeLeaveInputTable: React.FC<Props> = ({ |
|
|
content |
|
|
content |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
|
|
|
renderCell(params: GridRenderCellParams<TimeLeaveRow>) { |
|
|
|
|
|
return <TwoLineCell>{params.value}</TwoLineCell>; |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
[ |
|
|
[ |
|
|