diff --git a/packages/client/locales/en/leo.json b/packages/client/locales/en/leo.json
index 87d358416..3b9188fd9 100644
--- a/packages/client/locales/en/leo.json
+++ b/packages/client/locales/en/leo.json
@@ -122,6 +122,9 @@
"reportedStolen": "Reported Stolen",
"pendingAccessDepartment": "You are still awaiting access for this department. This CAD has set a default department ({defaultDepartment}) that you are in until you're accepted.",
"pendingAccessDepartmentNoDefault": "You are still awaiting access for this department. There is not default department set so this officer will be disabled until you're accepted.",
+ "editTicket": "Edit Ticket",
+ "editArrestReport": "Edit Arrest Report",
+ "editWrittenWarning": "Edit Written Warning",
"alert_deleteRecord": "Are you sure you want to delete this record? This action cannot be undone.",
"alert_deleteOfficer": "Are you sure you want to delete {officer}? This action cannot be undone.",
"alert_allowCheckout": "Are you sure you to checkout this vehicle from the impound lot?",
diff --git a/packages/client/src/components/leo/modals/ManageRecordModal.tsx b/packages/client/src/components/leo/modals/ManageRecordModal.tsx
index 9be0fcac9..e1e3d5481 100644
--- a/packages/client/src/components/leo/modals/ManageRecordModal.tsx
+++ b/packages/client/src/components/leo/modals/ManageRecordModal.tsx
@@ -25,26 +25,30 @@ interface Props {
record?: FullRecord | null;
type: RecordType;
id?: ModalIds.ManageRecord | ModalIds.CreateTicket;
+ isEdit?: boolean;
onUpdate?(data: FullRecord): void;
}
-export function ManageRecordModal({ onUpdate, record, type, id = ModalIds.CreateTicket }: Props) {
+export function ManageRecordModal({ onUpdate, record, type, isEdit, id }: Props) {
const { isOpen, closeModal, getPayload } = useModal();
const common = useTranslations("Common");
const t = useTranslations("Leo");
const data = {
[RecordType.TICKET]: {
- title: "createTicket",
- id,
+ isEdit,
+ title: isEdit ? "editTicket" : "createTicket",
+ id: id ?? ModalIds.CreateTicket,
},
[RecordType.ARREST_REPORT]: {
- title: "createArrestReport",
- id: ModalIds.CreateArrestReport,
+ isEdit,
+ title: isEdit ? "editArrestReport" : "createArrestReport",
+ id: id ?? ModalIds.CreateArrestReport,
},
[RecordType.WRITTEN_WARNING]: {
- title: "createWrittenWarning",
- id: ModalIds.CreateWrittenWarning,
+ isEdit,
+ title: isEdit ? "editWrittenWarning" : "createWrittenWarning",
+ id: id ?? ModalIds.CreateWrittenWarning,
},
};
diff --git a/packages/client/src/components/leo/modals/NameSearchModal/RecordsArea.tsx b/packages/client/src/components/leo/modals/NameSearchModal/RecordsArea.tsx
index 5cec88b50..28cf41688 100644
--- a/packages/client/src/components/leo/modals/NameSearchModal/RecordsArea.tsx
+++ b/packages/client/src/components/leo/modals/NameSearchModal/RecordsArea.tsx
@@ -116,6 +116,7 @@ export function RecordsArea({ warrants, records }: Props) {
id={ModalIds.ManageRecord}
type={tempEditRecord.type}
record={tempEditRecord}
+ isEdit
/>
) : null}
diff --git a/packages/client/src/pages/admin/manage/citizens/index.tsx b/packages/client/src/pages/admin/manage/citizens/index.tsx
index 33a7975d4..57468f972 100644
--- a/packages/client/src/pages/admin/manage/citizens/index.tsx
+++ b/packages/client/src/pages/admin/manage/citizens/index.tsx
@@ -32,7 +32,7 @@ export default function ManageCitizens({ citizens: data }: Props) {
{t("MANAGE_CITIZENS")}
- {t("MANAGE_CITIZENS")}
+ {t("MANAGE_CITIZENS")}
diff --git a/packages/schemas/src/court.ts b/packages/schemas/src/court.ts
index 00746b39e..5c52a8557 100644
--- a/packages/schemas/src/court.ts
+++ b/packages/schemas/src/court.ts
@@ -2,6 +2,6 @@ import { z } from "zod";
export const RELEASE_CITIZEN_SCHEMA = z.object({
type: z.string().min(2),
- releasedBy: z.string().min(2),
+ releasedBy: z.string(),
recordId: z.string().min(2),
});