Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Oct 8, 2023
1 parent c1237cb commit 25057bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@ export class AdminManageCitizensController {
where: { OR: [{ citizenId }, { citizen: { socialSecurityNumber: citizenId } }] },
}),
prisma.recordLog.findMany({
orderBy: { createdAt: "desc" },
where: { OR: [{ citizenId }, { citizen: { socialSecurityNumber: citizenId } }] },
take: includeAll ? undefined : 35,
skip: includeAll ? undefined : skip,
where: { OR: [{ citizenId }, { citizen: { socialSecurityNumber: citizenId } }] },
orderBy: { createdAt: "desc" },
include: {
warrant: { include: { officer: { include: leoProperties } } },
records: { include: recordsLogsInclude },
business: { include: { employees: { where: { role: { as: "OWNER" } } } } },
citizen: {
include: { user: { select: userProperties }, gender: true, ethnicity: true },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export default function CitizenLogs(props: Props) {
tableState={tableState}
data={asyncTable.items.map((item) => {
const type = item.records !== null ? TYPE_LABELS[item.records.type] : t("warrant");
const createdAt = item.warrant?.createdAt ?? item.records?.createdAt;
const officer = item.warrant?.officer ?? item.records?.officer;
const createdAt = item.records?.createdAt ?? item.warrant?.createdAt;
const officer = item.records?.officer ?? item.warrant?.officer;
const officerName = officer && makeUnitName(officer);
const callsign = officer && generateCallsign(officer);

Expand Down

0 comments on commit 25057bf

Please sign in to comment.