feat: complete jobcard management workflows and UI

This commit is contained in:
Marco0300
2026-09-01 21:47:35 +02:00
parent b983f90dcb
commit 9ce08bc6f8
27 changed files with 1081 additions and 115 deletions
+5 -4
View File
@@ -61,11 +61,12 @@ final class ContactUpdateCommand
}
/** @return array<string, mixed> */
public function validateForEdit(int $id, array $input, array $existingContacts = []): array
public function validateForEdit(mixed $id, array $input, array $existingContacts = []): array
{
$result = $this->validate($input, $existingContacts, $id);
$result['id'] = $id;
if ($id < 1) $result['errors']['id'] = 'Contact ID must be a positive integer.';
$normalizedId = $this->positiveId($id);
$result = $this->validate($input, $existingContacts, $normalizedId);
$result['id'] = $normalizedId;
if ($normalizedId === null) $result['errors']['id'] = 'Contact ID must be a positive integer.';
$result['valid'] = $result['errors'] === [];
return $result;
}