Merge pull request #558 from Tria-plc/freight_feature/usermanagement

resolve merge conflict
This commit is contained in:
marshal
2026-07-09 06:59:00 +03:00
committed by GitHub
2 changed files with 0 additions and 20 deletions

View File

@@ -1151,14 +1151,9 @@ function ContainerLineEditor({
render={({ field, fieldState }) => (
<TextInput
{...field}
<<<<<<< HEAD
onChange={(e) =>
field.onChange(e.currentTarget.value.toUpperCase())
}
=======
onChange={(e) => field.onChange(e.currentTarget.value.toUpperCase())}
maxLength={11}
>>>>>>> 1b9ac42ed3fc9bd6b8dea8d08b5c4c066d083feb
label={u === 0 ? "Container number *" : undefined}
placeholder="e.g. MSCU1234567"
error={fieldState.error?.message}

View File

@@ -26,31 +26,16 @@ export interface ShipmentValidationContext {
requiresDate?: boolean;
}
<<<<<<< HEAD
// ISO 6346: 3-letter owner code + category id (U/J/Z) + 6-digit serial + check digit.
const ISO_CONTAINER_NUMBER_REGEX = /^[A-Z]{4}\d{7}$/;
=======
// ISO 6346: 4 letters (owner + category) + 6 serial digits + 1 check digit.
// Enforced at booking input so the number stays a clean reference in the warehouse.
const ISO_CONTAINER_RE = /^[A-Z]{4}\d{7}$/;
>>>>>>> 1b9ac42ed3fc9bd6b8dea8d08b5c4c066d083feb
const containerUnitSchema = z.object({
containerNumber: z
.string()
<<<<<<< HEAD
.min(1, "Container number is required.")
.refine(
(v) => ISO_CONTAINER_NUMBER_REGEX.test(v.trim().toUpperCase()),
"Enter a valid ISO container number (e.g. ABCD1234567).",
=======
.transform((v) => v.trim().toUpperCase())
.pipe(
z
.string()
.min(1, "Container number is required.")
.regex(ISO_CONTAINER_RE, "Use ISO format: 4 letters + 7 digits, e.g. ABCU1234567."),
>>>>>>> 1b9ac42ed3fc9bd6b8dea8d08b5c4c066d083feb
),
sealNumber: z.string().default(""),
vgmTons: z