Skip to content

Commit

Permalink
fix residentId property
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-sellner committed Jun 23, 2023
1 parent 8bc9783 commit d87800e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/pages/HomePage/LogRecordsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const LogRecordsTable = ({
{
// TODO: Resolve the resident record at some point
}
<Td width="5%">{record.residentFirstName}</Td>
<Td width="5%">{record.residentId}</Td>
<Td whiteSpace="normal" width="75%">
{record.note}
</Td>
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/helper/CSVConverter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const convertToCSVLog = (logRecord: LogRecord): CSVLog => {
employee,
flagged: logRecord.flagged,
note: logRecord.note,
residentFirstName: logRecord.residentFirstName,
residentLastName: logRecord.residentLastName,
residentId: logRecord.residentId,
tags: logRecord.tags.join("; "),
};
};
Expand All @@ -23,7 +22,7 @@ const CSVConverter = (data: LogRecord[]): boolean => {
try {
const csvRows = [];

const headers = ["attnTo", "building", "datetime", "employee", "flagged", "note", "residentFirstName", "residentLastName", "tags"];
const headers = ["attnTo", "building", "datetime", "employee", "flagged", "note", "residentId", "tags"];
csvRows.push(headers.join(","));
data.forEach((log: LogRecord) => {
const logCSV = convertToCSVLog(log);
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/types/CSVLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export type CSVLog = {
employee: string;
flagged: boolean;
note: string;
residentFirstName: string;
residentLastName: string;
residentId: string;
tags: string;
};
3 changes: 1 addition & 2 deletions frontend/src/types/LogRecordTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export type LogRecord = {
employeeLastName: string;
flagged: boolean;
note: string;
residentFirstName: string;
residentLastName: string;
residentId: string;
tags: string[];
};

Expand Down

0 comments on commit d87800e

Please sign in to comment.