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";
|
||||
|
||||
import type { FormData } from "../schema";
|
||||
import SourcedField from "../SourcedField";
|
||||
|
||||
/** How a foreign company chose to prove the person: Fayda, or a passport. */
|
||||
export type IdentityMethod = "fayda" | "passport";
|
||||
@@ -252,32 +251,27 @@ export default function RepresentationStep({
|
||||
|
||||
{/* -------------------------------------------------------------- */}
|
||||
{/* The representative's own details — only once the person exists, */}
|
||||
{/* and only the parts the verification did not already carry. What */}
|
||||
{/* Fayda supplied is shown on the panel above and never repeated. */}
|
||||
{/* and only the parts the verification did not carry. What Fayda */}
|
||||
{/* 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 && (
|
||||
<>
|
||||
<SourcedField
|
||||
label="Representative's Name"
|
||||
value={identity.poa.name}
|
||||
source="Fayda"
|
||||
locked={locked.name}
|
||||
>
|
||||
{!locked.name && (
|
||||
<TextInput
|
||||
label="Representative's Name"
|
||||
placeholder="Abebe Bikila"
|
||||
error={errors.poaName?.message}
|
||||
{...register("poaName")}
|
||||
/>
|
||||
</SourcedField>
|
||||
)}
|
||||
|
||||
<SimpleGrid cols={{ base: 1, sm: 2 }} spacing="md">
|
||||
<SourcedField
|
||||
label="Representative's Email"
|
||||
value={identity.poa.email}
|
||||
source="Fayda"
|
||||
locked={locked.email}
|
||||
{(!locked.email || !locked.phone) && (
|
||||
<SimpleGrid
|
||||
cols={{ base: 1, sm: !locked.email && !locked.phone ? 2 : 1 }}
|
||||
spacing="md"
|
||||
>
|
||||
{!locked.email && (
|
||||
<TextInput
|
||||
label="Representative's Email"
|
||||
type="email"
|
||||
@@ -285,21 +279,17 @@ export default function RepresentationStep({
|
||||
error={errors.poaEmail?.message}
|
||||
{...register("poaEmail")}
|
||||
/>
|
||||
</SourcedField>
|
||||
)}
|
||||
|
||||
<SourcedField
|
||||
label="Representative's Phone"
|
||||
value={identity.poa.phone}
|
||||
source="Fayda"
|
||||
locked={locked.phone}
|
||||
>
|
||||
{!locked.phone && (
|
||||
<ControlledPhoneField
|
||||
control={control}
|
||||
name="poaPhone"
|
||||
label="Representative's Phone"
|
||||
/>
|
||||
</SourcedField>
|
||||
)}
|
||||
</SimpleGrid>
|
||||
)}
|
||||
|
||||
{!locked.address && (
|
||||
<TextInput
|
||||
|
||||
Reference in New Issue
Block a user