feature/IO-3494-Change-Preferred-Contact - Implement select box, fix capture bug
This commit is contained in:
@@ -5,17 +5,22 @@ import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-
|
||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component";
|
||||
import { buildOwnerPhoneTypeOptions } from "../../utils/phoneTypeOptions.js";
|
||||
|
||||
export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPhone2OptedOut }) {
|
||||
const { t } = useTranslation();
|
||||
const { getFieldValue } = form;
|
||||
|
||||
const PHONE_TYPE_OPTIONS = [
|
||||
{ label: t("owners.labels.home"), value: "Home" },
|
||||
{ label: t("owners.labels.work"), value: "Work" },
|
||||
{ label: t("owners.labels.cell"), value: "Cell" }
|
||||
const PHONE_TYPE_OPTIONS = buildOwnerPhoneTypeOptions(t);
|
||||
const PREFERRED_CONTACT_OPTIONS = [
|
||||
{
|
||||
label: t("owners.labels.email", { defaultValue: "Email" }),
|
||||
options: [{ label: t("owners.labels.email", { defaultValue: "Email" }), value: "Email" }]
|
||||
},
|
||||
{
|
||||
label: t("owners.labels.phone", { defaultValue: "Phone" }),
|
||||
options: PHONE_TYPE_OPTIONS
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<FormFieldsChanged form={form} />
|
||||
@@ -137,8 +142,9 @@ export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPho
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label={t("owners.fields.preferred_contact")} name="preferred_contact">
|
||||
<Input />
|
||||
<Select allowClear placeholder="Type" options={PREFERRED_CONTACT_OPTIONS} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label={t("owners.fields.tax_number")} name="tax_number">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user