Skip to content
2 changes: 2 additions & 0 deletions apps/customer-portal/backend/modules/entity/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ public type Case record {|
string number;
# Created date and time
string createdOn;
# Updated date and time
string updatedOn;
# Created by (User email)
string createdBy;
# Case title
Expand Down
2 changes: 2 additions & 0 deletions apps/customer-portal/backend/modules/types/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ public type Case record {|
string number;
# Created date and time
string createdOn;
# Updated date and time
string updatedOn;
# Created by (User email)
string createdBy;
# Case title
Expand Down
4 changes: 4 additions & 0 deletions apps/customer-portal/backend/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,7 @@ components:
- assignedTeam
- createdBy
- createdOn
- updatedOn
- description
- duration
- id
Expand All @@ -3605,6 +3606,9 @@ components:
createdOn:
type: string
description: Created date and time
updatedOn:
type: string
description: Updated date and time
createdBy:
type: string
description: Created by (User email)
Expand Down
1 change: 1 addition & 0 deletions apps/customer-portal/backend/utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public isolated function searchCases(string idToken, string projectId, types:Cas
number: case.number,
title: case.title,
createdOn: case.createdOn,
updatedOn: case.updatedOn,
createdBy: case.createdBy,
description: case.description,
duration: case.duration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default function ListCard({
color="text.secondary"
sx={{ lineHeight: 1, overflowWrap: "anywhere" }}
>
Updated {formatDateTime(caseItem.updatedOn ?? caseItem.createdOn) || "--"}
Updated {formatDateTime(caseItem.updatedOn) || "--"}
</Typography>
</Box>
{caseItem.createdBy && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ export default function AnnouncementDetailsPanel({
const statusLabel = data.status?.label;
const statusColorPath = getStatusColor(statusLabel ?? undefined);
const resolvedStatusColor = resolveColorFromTheme(statusColorPath, theme);
const updatedOnLabel = formatAnnouncementDateDisplay(
data.updatedOn ?? data.createdOn,
);
const updatedOnLabel = formatAnnouncementDateDisplay(data.updatedOn);

return (
<Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}>
Expand Down Expand Up @@ -225,7 +223,7 @@ export default function AnnouncementDetailsPanel({
aria-hidden
/>
<Typography variant="body2" color="text.secondary">
{updatedOnLabel}
{updatedOnLabel || "--"}
</Typography>
</Stack>
{data.issueType?.label && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function AnnouncementList({
const statusColor = getStatusColor(statusLabel);
const resolvedStatusColor = resolveColorFromTheme(statusColor, theme);
const updatedOnLabel = formatAnnouncementDateDisplay(
caseItem.updatedOn ?? caseItem.createdOn,
caseItem.updatedOn,
);

const cardContent = (
Expand Down Expand Up @@ -195,7 +195,7 @@ export default function AnnouncementList({
color="text.secondary"
sx={{ lineHeight: 1 }}
>
Updated {updatedOnLabel}
Updated {updatedOnLabel || "--"}
</Typography>
</Box>
{caseItem.issueType?.label && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const CasesList = ({
<Box>
<Typography variant="body2" color="text.primary">
{formatBackendTimestampForDisplay(
row.updatedOn ?? row.createdOn,
row.updatedOn,
{
month: "short",
day: "numeric",
Expand All @@ -176,7 +176,7 @@ const CasesList = ({
color="text.secondary"
>
{formatBackendTimestampForDisplay(
row.updatedOn ?? row.createdOn,
row.updatedOn,
{
hour: "numeric",
minute: "2-digit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export default function ChangeRequestsList({
</Typography>
</Box>
)}
{(item.updatedOn ?? item.createdOn) && (
{item.updatedOn && (
<Box
sx={{
display: "flex",
Expand All @@ -331,11 +331,11 @@ export default function ChangeRequestsList({
{CHANGE_REQUESTS_LIST_UPDATED_PREFIX}
</Typography>
<Typography variant="body2" color="text.secondary">
{formatDateTime(item.updatedOn ?? item.createdOn)}
{formatDateTime(item.updatedOn)}
</Typography>
</Box>
)}
{(item.updatedOn ?? item.createdOn) && (item.startDate || item.endDate) && (
{item.updatedOn && (item.startDate || item.endDate) && (
<Typography variant="body2" color="text.disabled">
|
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default function ServiceRequestsList({
color="text.secondary"
sx={{ lineHeight: 1 }}
>
{formatDateTime(sr.updatedOn ?? sr.createdOn) || NULL_PLACEHOLDER}
{formatDateTime(sr.updatedOn) || NULL_PLACEHOLDER}
</Typography>
</Box>
{environmentLabel && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default function OutstandingCasesList({
color="text.secondary"
sx={{ flexShrink: 0 }}
>
{formatRelativeTime(c.updatedOn ?? c.createdOn ?? undefined)}
{formatRelativeTime(c.updatedOn ?? undefined)}
</Typography>
</Box>
</Form.CardActions>
Expand Down