|
|
@@ -211,7 +211,7 @@ const EntryInputTable: React.FC<Props> = ({ |
|
|
|
{ |
|
|
|
field: "projectId", |
|
|
|
headerName: t("Project Code and Name"), |
|
|
|
width: 400, |
|
|
|
width: 300, |
|
|
|
editable: true, |
|
|
|
valueFormatter(params) { |
|
|
|
const project = assignedProjects.find((p) => p.id === params.value); |
|
|
@@ -310,7 +310,17 @@ const EntryInputTable: React.FC<Props> = ({ |
|
|
|
editable: true, |
|
|
|
type: "number", |
|
|
|
valueFormatter(params) { |
|
|
|
return manhourFormatter.format(params.value); |
|
|
|
return manhourFormatter.format(params.value || 0); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: "otHours", |
|
|
|
headerName: t("Other Hours"), |
|
|
|
width: 150, |
|
|
|
editable: true, |
|
|
|
type: "number", |
|
|
|
valueFormatter(params) { |
|
|
|
return manhourFormatter.format(params.value || 0); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@@ -336,10 +346,9 @@ const EntryInputTable: React.FC<Props> = ({ |
|
|
|
useEffect(() => { |
|
|
|
setValue(day, [ |
|
|
|
...entries |
|
|
|
.filter((e) => !e._isNew && !e._error && e.id && e.inputHours) |
|
|
|
.filter((e) => !e._isNew && !e._error && e.id) |
|
|
|
.map(({ isPlanned, _error, _isNew, ...entry }) => ({ |
|
|
|
id: entry.id!, |
|
|
|
inputHours: entry.inputHours!, |
|
|
|
...entry, |
|
|
|
})), |
|
|
|
]); |
|
|
|