refactor: rename remaining recipient references to person/people
This commit is contained in:
@@ -35,7 +35,7 @@ function buildAssetBaseSchema(copy: AssetSchemaCopy) {
|
||||
}),
|
||||
deliveryNote: z.string().optional(),
|
||||
notes: z.string().optional(),
|
||||
recipientId: z.string().optional(),
|
||||
personId: z.string().optional(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export type AssignmentSchemaCopy =
|
||||
Dictionary["inventory"]["assignments"]["schema"]
|
||||
|
||||
const defaultAssignmentSchemaCopy: AssignmentSchemaCopy = {
|
||||
recipientRequired: "Recipient is required",
|
||||
personRequired: "Person is required",
|
||||
itemIdRequired: "Item is required",
|
||||
quantityMinOne: "Quantity must be at least 1",
|
||||
assetIdRequired: "Asset ID is required when item ID is provided",
|
||||
@@ -27,8 +27,8 @@ function buildAssignmentBaseSchema(copy: AssignmentSchemaCopy) {
|
||||
})
|
||||
.optional(),
|
||||
assetId: z.string().optional(),
|
||||
recipientId: z.string().min(1, {
|
||||
error: copy.recipientRequired,
|
||||
personId: z.string().min(1, {
|
||||
error: copy.personRequired,
|
||||
}),
|
||||
assignmentDate: z.date().optional(),
|
||||
returnDate: z.date().optional(),
|
||||
|
||||
@@ -11,7 +11,7 @@ export const movementSchema = z.object({
|
||||
assetId: z.string().optional(),
|
||||
userId: z.string(),
|
||||
assignmentId: z.string().optional(),
|
||||
recipientId: z.string().optional(),
|
||||
personId: z.string().optional(),
|
||||
})
|
||||
|
||||
export const createMovementSchema = movementSchema.omit({
|
||||
|
||||
Reference in New Issue
Block a user