Finished agent edit screen except for update functionality
This commit is contained in:
parent
c174123dc2
commit
e06651f14c
@ -71,12 +71,24 @@ pub fn agent_fields(props: &AgentFieldsProps) -> Html {
|
|||||||
<SingleMediaPicker value={profile_picture_url_handle} onchange={ontype_cb.clone()} item={jl_types::dto::item::Item::Agent}/>
|
<SingleMediaPicker value={profile_picture_url_handle} onchange={ontype_cb.clone()} item={jl_types::dto::item::Item::Agent}/>
|
||||||
<TextField label={"Nombre Completo"} value={agent_name_handle} required={true} onchange={ontype_cb.clone()}/>
|
<TextField label={"Nombre Completo"} value={agent_name_handle} required={true} onchange={ontype_cb.clone()}/>
|
||||||
|
|
||||||
{if (*credential_type).clone() == Some(CredentialType::PhoneNumber) {
|
{if (*credential_type).clone().is_none() {
|
||||||
html! {
|
match props.edittype.clone() {
|
||||||
<div class={"textfield-container"}>
|
EditType::New => html! {
|
||||||
<div class={"textfield-label-required"}>{"Tipo de Credencial"}</div>
|
<div class={"textfield-container"}>
|
||||||
<DropDown<CredentialType> selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/>
|
<div class={"textfield-label-required"}>{"Tipo de Credencial"}</div>
|
||||||
</div>
|
<DropDown<CredentialType> selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/>
|
||||||
|
</div>
|
||||||
|
},
|
||||||
|
EditType::Existing(_) => if *user_typed {
|
||||||
|
html! {
|
||||||
|
<div class={"textfield-container"}>
|
||||||
|
<div class={"textfield-label-required"}>{"Tipo de Credencial"}</div>
|
||||||
|
<DropDown<CredentialType> selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
html! {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
html! {
|
html! {
|
||||||
@ -85,7 +97,6 @@ pub fn agent_fields(props: &AgentFieldsProps) -> Html {
|
|||||||
<DropDown<CredentialType> selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/>
|
<DropDown<CredentialType> selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<TextField label={"Credencial"} value={credential_handle} required={true} onchange={ontype_cb.clone()}/>
|
<TextField label={"Credencial"} value={credential_handle} required={true} onchange={ontype_cb.clone()}/>
|
||||||
|
Loading…
Reference in New Issue
Block a user