mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
WIP(represtation step)
This commit is contained in:
@@ -23,7 +23,6 @@ import type {
|
|||||||
} from "@/services/verifayda.service";
|
} from "@/services/verifayda.service";
|
||||||
|
|
||||||
import type { FormData } from "../schema";
|
import type { FormData } from "../schema";
|
||||||
import SourcedField from "../SourcedField";
|
|
||||||
|
|
||||||
/** How a foreign company chose to prove the person: Fayda, or a passport. */
|
/** How a foreign company chose to prove the person: Fayda, or a passport. */
|
||||||
export type IdentityMethod = "fayda" | "passport";
|
export type IdentityMethod = "fayda" | "passport";
|
||||||
@@ -252,32 +251,27 @@ export default function RepresentationStep({
|
|||||||
|
|
||||||
{/* -------------------------------------------------------------- */}
|
{/* -------------------------------------------------------------- */}
|
||||||
{/* The representative's own details — only once the person exists, */}
|
{/* The representative's own details — only once the person exists, */}
|
||||||
{/* and only the parts the verification did not already carry. What */}
|
{/* and only the parts the verification did not carry. What Fayda */}
|
||||||
{/* Fayda supplied is shown on the panel above and never repeated. */}
|
{/* supplied is on the card above; echoing it back here as read-only */}
|
||||||
|
{/* rows was the same data twice with nothing to do about either. */}
|
||||||
{/* -------------------------------------------------------------- */}
|
{/* -------------------------------------------------------------- */}
|
||||||
{declared === "yes" && established && (
|
{declared === "yes" && established && (
|
||||||
<>
|
<>
|
||||||
<SourcedField
|
{!locked.name && (
|
||||||
label="Representative's Name"
|
|
||||||
value={identity.poa.name}
|
|
||||||
source="Fayda"
|
|
||||||
locked={locked.name}
|
|
||||||
>
|
|
||||||
<TextInput
|
<TextInput
|
||||||
label="Representative's Name"
|
label="Representative's Name"
|
||||||
placeholder="Abebe Bikila"
|
placeholder="Abebe Bikila"
|
||||||
error={errors.poaName?.message}
|
error={errors.poaName?.message}
|
||||||
{...register("poaName")}
|
{...register("poaName")}
|
||||||
/>
|
/>
|
||||||
</SourcedField>
|
)}
|
||||||
|
|
||||||
<SimpleGrid cols={{ base: 1, sm: 2 }} spacing="md">
|
{(!locked.email || !locked.phone) && (
|
||||||
<SourcedField
|
<SimpleGrid
|
||||||
label="Representative's Email"
|
cols={{ base: 1, sm: !locked.email && !locked.phone ? 2 : 1 }}
|
||||||
value={identity.poa.email}
|
spacing="md"
|
||||||
source="Fayda"
|
|
||||||
locked={locked.email}
|
|
||||||
>
|
>
|
||||||
|
{!locked.email && (
|
||||||
<TextInput
|
<TextInput
|
||||||
label="Representative's Email"
|
label="Representative's Email"
|
||||||
type="email"
|
type="email"
|
||||||
@@ -285,21 +279,17 @@ export default function RepresentationStep({
|
|||||||
error={errors.poaEmail?.message}
|
error={errors.poaEmail?.message}
|
||||||
{...register("poaEmail")}
|
{...register("poaEmail")}
|
||||||
/>
|
/>
|
||||||
</SourcedField>
|
)}
|
||||||
|
|
||||||
<SourcedField
|
{!locked.phone && (
|
||||||
label="Representative's Phone"
|
|
||||||
value={identity.poa.phone}
|
|
||||||
source="Fayda"
|
|
||||||
locked={locked.phone}
|
|
||||||
>
|
|
||||||
<ControlledPhoneField
|
<ControlledPhoneField
|
||||||
control={control}
|
control={control}
|
||||||
name="poaPhone"
|
name="poaPhone"
|
||||||
label="Representative's Phone"
|
label="Representative's Phone"
|
||||||
/>
|
/>
|
||||||
</SourcedField>
|
)}
|
||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
|
)}
|
||||||
|
|
||||||
{!locked.address && (
|
{!locked.address && (
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
Reference in New Issue
Block a user