@@ -30,6 +36,7 @@ export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPho
+
@@ -50,6 +57,7 @@ export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPho
+
+
+ {/* Phone 1 + Type + Opt-out icon */}
+
+
+
+
+
{isPhone1OptedOut && (
+
+ {/* Phone 2 + Type + Opt-out icon */}
+
+
+
+
+
{isPhone2OptedOut && (
+
@@ -120,6 +143,7 @@ export default function OwnerDetailFormComponent({ form, isPhone1OptedOut, isPho
+
diff --git a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx
index b021660ff..78ab8454d 100644
--- a/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx
+++ b/client/src/components/owner-detail-update-jobs/owner-detail-update-jobs.component.jsx
@@ -25,8 +25,10 @@ export default function OwnerDetailUpdateJobsComponent({ owner, selectedJobs, di
ownr_ea: owner["ownr_ea"],
ownr_fn: owner["ownr_fn"],
ownr_ph1: owner["ownr_ph1"],
+ ownr_ph1_ty: owner["ownr_ph1_ty"],
ownr_ln: owner["ownr_ln"],
ownr_ph2: owner["ownr_ph2"],
+ ownr_ph2_ty: owner["ownr_ph2_ty"],
ownr_st: owner["ownr_st"],
ownr_title: owner["ownr_title"],
ownr_zip: owner["ownr_zip"]
diff --git a/client/src/components/owner-find-modal/owner-find-modal.component.jsx b/client/src/components/owner-find-modal/owner-find-modal.component.jsx
index 7527de91f..09067bda5 100644
--- a/client/src/components/owner-find-modal/owner-find-modal.component.jsx
+++ b/client/src/components/owner-find-modal/owner-find-modal.component.jsx
@@ -47,13 +47,13 @@ export default function OwnerFindModalComponent({
title: t("owners.fields.ownr_ph1"),
dataIndex: "ownr_ph1",
key: "ownr_ph1",
- render: (text, record) => {record.ownr_ph1}
+ render: (text, record) => {record.ownr_ph1}
},
{
title: t("owners.fields.ownr_ph2"),
dataIndex: "ownr_ph2",
key: "ownr_ph2",
- render: (text, record) => {record.ownr_ph2}
+ render: (text, record) => {record.ownr_ph2}
},
{
title: t("owners.fields.note"),
diff --git a/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx b/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx
index 8d086e4fa..8781fd116 100644
--- a/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx
+++ b/client/src/components/owner-tag-popover/owner-tag-popover.component.jsx
@@ -15,10 +15,10 @@ export default function OwnerTagPopoverComponent({ job }) {
- {job.ownr_ph1 || ""}
+ {job.ownr_ph1 || ""}
- {job.ownr_ph2 || ""}
+ {job.ownr_ph2 || ""}
{`${job.ownr_addr1 || ""} ${job.ownr_addr2 || ""} ${
@@ -36,13 +36,10 @@ export default function OwnerTagPopoverComponent({ job }) {
- {job.owner.ownr_ph1 || ""}
-
-
- {job.owner.ownr_ph2 || ""}
+ {job.owner.ownr_ph1 || ""}
- {job.owner.ownr_ph2 || ""}
+ {job.owner.ownr_ph2 || ""}
{`${job.owner.ownr_addr1 || ""} ${job.owner.ownr_addr2 || ""} ${
diff --git a/client/src/components/owners-list/owners-list.component.jsx b/client/src/components/owners-list/owners-list.component.jsx
index cd30f7824..a93e5765c 100644
--- a/client/src/components/owners-list/owners-list.component.jsx
+++ b/client/src/components/owners-list/owners-list.component.jsx
@@ -39,7 +39,7 @@ export default function OwnersListComponent({ loading, owners, total, refetch })
dataIndex: "ownr_ph1",
key: "ownr_ph1",
render: (text, record) => {
- return {record.ownr_ph1};
+ return {record.ownr_ph1};
}
},
{
@@ -47,7 +47,7 @@ export default function OwnersListComponent({ loading, owners, total, refetch })
dataIndex: "ownr_ph2",
key: "ownr_ph2",
render: (text, record) => {
- return {record.ownr_ph2};
+ return {record.ownr_ph2};
}
},
{
diff --git a/client/src/components/production-list-columns/production-list-columns.data.jsx b/client/src/components/production-list-columns/production-list-columns.data.jsx
index 91dd64c45..3b1e79625 100644
--- a/client/src/components/production-list-columns/production-list-columns.data.jsx
+++ b/client/src/components/production-list-columns/production-list-columns.data.jsx
@@ -270,14 +270,14 @@ const productionListColumnsData = ({ technician, state, activeStatuses, data, bo
dataIndex: "ownr_ph1",
key: "ownr_ph1",
ellipsis: true,
- render: (text, record) => {record.ownr_ph1}
+ render: (text, record) => {record.ownr_ph1}
},
{
title: i18n.t("jobs.fields.ownr_ph2"),
dataIndex: "ownr_ph2",
key: "ownr_ph2",
ellipsis: true,
- render: (text, record) => {record.ownr_ph2}
+ render: (text, record) => {record.ownr_ph2}
},
{
title: i18n.t("jobs.fields.specialcoveragepolicy"),
diff --git a/client/src/components/production-list-detail/production-list-detail.component.jsx b/client/src/components/production-list-detail/production-list-detail.component.jsx
index d05110fc5..307e0409d 100644
--- a/client/src/components/production-list-detail/production-list-detail.component.jsx
+++ b/client/src/components/production-list-detail/production-list-detail.component.jsx
@@ -154,13 +154,25 @@ export function ProductionListDetail({ bodyshop, jobs, setPrintCenterContext, te
{!technician ? (
<>
-
-
+
+
>
) : (
<>
- {data.jobs_by_pk.ownr_ph1}
- {data.jobs_by_pk.ownr_ph2}
+
+ {data.jobs_by_pk.ownr_ph1}
+
+
+ {data.jobs_by_pk.ownr_ph2}
+
>
)}
diff --git a/client/src/graphql/appointments.queries.js b/client/src/graphql/appointments.queries.js
index c13c6a374..51117f39f 100644
--- a/client/src/graphql/appointments.queries.js
+++ b/client/src/graphql/appointments.queries.js
@@ -40,6 +40,8 @@ export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
ownr_fn
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_ea
clm_total
id
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index e1775728c..2d7169d23 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -19,7 +19,9 @@ export const QUERY_ALL_ACTIVE_JOBS_PAGINATED = gql`
ownr_ln
ownr_co_nm
ownr_ph1
+ ownr_ph1_ty
ownr_ph2
+ ownr_ph2_ty
ownr_ea
ownerid
comment
@@ -69,6 +71,8 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_ea
ownerid
comment
@@ -122,6 +126,8 @@ export const QUERY_PARTS_QUEUE = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_ea
plate_no
plate_st
@@ -179,6 +185,8 @@ export const QUERY_EXACT_JOB_IN_PRODUCTION = gql`
clm_total
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
special_coverage_policy
owner_owing
production_vars
@@ -249,6 +257,8 @@ export const QUERY_EXACT_JOBS_IN_PRODUCTION = gql`
clm_total
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
special_coverage_policy
owner_owing
production_vars
@@ -615,6 +625,8 @@ export const GET_JOB_BY_PK = gql`
ownr_ln
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_st
ownr_zip
tax_number
@@ -631,6 +643,8 @@ export const GET_JOB_BY_PK = gql`
ownr_ln
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_st
ownr_zip
parts_tax_rates
@@ -714,7 +728,7 @@ export const GET_JOB_BY_PK = gql`
v_model_yr
v_model_desc
v_vin
- notes(where:{pinned: {_eq: true}}, order_by: {updated_at: desc}) {
+ notes(where: { pinned: { _eq: true } }, order_by: { updated_at: desc }) {
created_at
created_by
critical
@@ -830,6 +844,8 @@ export const QUERY_JOB_CARD_DETAILS = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
comment
ownr_ea
ca_gst_registrant
@@ -1000,7 +1016,6 @@ export const QUERY_JOB_CARD_DETAILS = gql`
key
type
}
-
}
}
`;
@@ -1231,6 +1246,8 @@ export const GET_JOB_INFO_FOR_STRIPE = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_ea
}
}
@@ -1444,8 +1461,10 @@ export const QUERY_JOB_FOR_DUPE = gql`
ownr_ln
ownr_ph1
ownr_ph1x
+ ownr_ph1_ty
ownr_ph2
ownr_ph2x
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
@@ -1691,8 +1710,10 @@ export const QUERY_ALL_JOB_FIELDS = gql`
ownr_ln
ownr_ph1
ownr_ph1x
+ ownr_ph1_ty
ownr_ph2
ownr_ph2x
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
@@ -1830,6 +1851,8 @@ export const QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
plate_no
plate_st
v_vin
@@ -1870,6 +1893,8 @@ export const QUERY_SIMPLIFIED_PARTS_PAGINATED_STATUS_FILTERED = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
plate_no
plate_st
v_vin
@@ -2118,6 +2143,8 @@ export const GET_JOB_FOR_CC_CONTRACT = gql`
ownr_zip
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
}
}
`;
@@ -2416,7 +2443,7 @@ export const QUERY_PARTS_QUEUE_CARD_DETAILS = gql`
start
status
}
- notes(where:{pinned: {_eq: true}}, order_by: {updated_at: desc}) {
+ notes(where: { pinned: { _eq: true } }, order_by: { updated_at: desc }) {
created_at
created_by
critical
@@ -2504,6 +2531,8 @@ export const QUERY_PARTS_QUEUE_CARD_DETAILS = gql`
ownr_ln
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
owner {
id
preferred_contact
@@ -2602,6 +2631,8 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
clm_total
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
special_coverage_policy
owner_owing
production_vars
diff --git a/client/src/graphql/owners.queries.js b/client/src/graphql/owners.queries.js
index de1b654b7..37389bada 100644
--- a/client/src/graphql/owners.queries.js
+++ b/client/src/graphql/owners.queries.js
@@ -8,6 +8,8 @@ export const QUERY_SEARCH_OWNER_BY_IDX = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
ownr_addr1
ownr_addr2
ownr_city
@@ -57,8 +59,10 @@ export const QUERY_OWNER_BY_ID = gql`
ownr_ea
ownr_fn
ownr_ph1
+ ownr_ph1_ty
ownr_ln
ownr_ph2
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
@@ -112,8 +116,10 @@ export const QUERY_ALL_OWNERS = gql`
ownr_ea
ownr_fn
ownr_ph1
+ ownr_ph1_ty
ownr_ln
ownr_ph2
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
@@ -136,8 +142,10 @@ export const QUERY_ALL_OWNERS_PAGINATED = gql`
ownr_ea
ownr_fn
ownr_ph1
+ ownr_ph1_ty
ownr_ln
ownr_ph2
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
@@ -164,8 +172,10 @@ export const QUERY_OWNER_FOR_JOB_CREATION = gql`
ownr_ea
ownr_fn
ownr_ph1
+ ownr_ph1_ty
ownr_ln
ownr_ph2
+ ownr_ph2_ty
ownr_st
ownr_title
ownr_zip
diff --git a/client/src/graphql/parts-orders.queries.js b/client/src/graphql/parts-orders.queries.js
index de51fab3d..de4f07cee 100644
--- a/client/src/graphql/parts-orders.queries.js
+++ b/client/src/graphql/parts-orders.queries.js
@@ -177,10 +177,12 @@ export const QUERY_PARTS_ORDER_OEC = gql`
ownr_fax
ownr_faxx
ownr_ph1
+ ownr_ph1_ty
ownr_fn
ownr_ln
ownr_ph1x
ownr_ph2
+ ownr_ph2_ty
ownr_ph2x
ownr_st
ownr_title
diff --git a/client/src/graphql/search.queries.js b/client/src/graphql/search.queries.js
index 1c1943e30..ba91fc8af 100644
--- a/client/src/graphql/search.queries.js
+++ b/client/src/graphql/search.queries.js
@@ -22,6 +22,8 @@ export const GLOBAL_SEARCH_QUERY = gql`
ownr_co_nm
ownr_ph1
ownr_ph2
+ ownr_ph1_ty
+ ownr_ph2_ty
}
search_vehicles(args: { search: $search }, limit: 25) {
id
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 3dc50d4f0..12265673b 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -2595,7 +2595,10 @@
"fromclaim": "Current Claim",
"fromowner": "Historical Owner Record",
"relatedjobs": "Related Jobs",
- "updateowner": "Update Owner"
+ "updateowner": "Update Owner",
+ "work": "Work",
+ "home": "Home",
+ "cell": "Cell"
},
"successes": {
"delete": "Owner deleted successfully.",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index d53efe7b8..3ed9d6e12 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -2595,7 +2595,10 @@
"fromclaim": "",
"fromowner": "",
"relatedjobs": "",
- "updateowner": ""
+ "updateowner": "",
+ "work": "",
+ "home": "",
+ "cell": ""
},
"successes": {
"delete": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index ed4677891..93af4bff0 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -2595,7 +2595,10 @@
"fromclaim": "",
"fromowner": "",
"relatedjobs": "",
- "updateowner": ""
+ "updateowner": "",
+ "work": "",
+ "home": "",
+ "cell": ""
},
"successes": {
"delete": "",
diff --git a/client/src/utils/PhoneFormatter.jsx b/client/src/utils/PhoneFormatter.jsx
index 0e99308cc..90fc49e50 100644
--- a/client/src/utils/PhoneFormatter.jsx
+++ b/client/src/utils/PhoneFormatter.jsx
@@ -1,7 +1,23 @@
-//import NumberFormat from "react-number-format";
+import { Typography } from "antd";
import parsePhoneNumber from "libphonenumber-js";
-export default function PhoneNumberFormatter(props) {
- const p = parsePhoneNumber(props.children || "", "CA");
- return p ? {p.formatNational()} : null;
+const { Text } = Typography;
+
+export default function PhoneNumberFormatter({ children, type }) {
+ const p = parsePhoneNumber(children || "", "CA");
+ if (!p) return null;
+
+ const phone = p.formatNational();
+
+ return (
+
+ {phone}
+ {type ? (
+ <>
+ {" "}
+ ({type})
+ >
+ ) : null}
+
+ );
}
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 8231c2dd0..7cf11c8de 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -3799,8 +3799,10 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph1x
- ownr_ph2
+ - ownr_ph2_ty
- ownr_ph2x
- ownr_st
- ownr_title
@@ -4079,8 +4081,10 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph1x
- ownr_ph2
+ - ownr_ph2_ty
- ownr_ph2x
- ownr_st
- ownr_title
@@ -4370,8 +4374,10 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph1x
- ownr_ph2
+ - ownr_ph2_ty
- ownr_ph2x
- ownr_st
- ownr_title
@@ -5171,7 +5177,9 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph2
+ - ownr_ph2_ty
- ownr_st
- ownr_title
- ownr_zip
@@ -5196,7 +5204,9 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph2
+ - ownr_ph2_ty
- ownr_st
- ownr_title
- ownr_zip
@@ -5232,7 +5242,9 @@
- ownr_fn
- ownr_ln
- ownr_ph1
+ - ownr_ph1_ty
- ownr_ph2
+ - ownr_ph2_ty
- ownr_st
- ownr_title
- ownr_zip
diff --git a/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql
new file mode 100644
index 000000000..ca4186489
--- /dev/null
+++ b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."owners" add column "ownr_ph1_ty" text
+-- null;
diff --git a/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql
new file mode 100644
index 000000000..416ac0d25
--- /dev/null
+++ b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."owners" add column "ownr_ph1_ty" text
+ null;
diff --git a/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql
new file mode 100644
index 000000000..21a718779
--- /dev/null
+++ b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."owners" add column "ownr_ph2_ty" text
+-- null;
diff --git a/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql
new file mode 100644
index 000000000..381f77c8d
--- /dev/null
+++ b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."owners" add column "ownr_ph2_ty" text
+ null;
diff --git a/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/down.sql b/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/down.sql
new file mode 100644
index 000000000..60e1189bd
--- /dev/null
+++ b/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."jobs" add column "ownr_ph1_ty" text
+-- null;
diff --git a/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/up.sql b/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/up.sql
new file mode 100644
index 000000000..3d1c0e5ea
--- /dev/null
+++ b/hasura/migrations/1767138645058_alter_table_public_jobs_add_column_ownr_ph1_ty/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."jobs" add column "ownr_ph1_ty" text
+ null;
diff --git a/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/down.sql b/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/down.sql
new file mode 100644
index 000000000..b16896fbb
--- /dev/null
+++ b/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."jobs" add column "ownr_ph2_ty" text
+-- null;
diff --git a/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/up.sql b/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/up.sql
new file mode 100644
index 000000000..f513a8a1c
--- /dev/null
+++ b/hasura/migrations/1767138667991_alter_table_public_jobs_add_column_ownr_ph2_ty/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."jobs" add column "ownr_ph2_ty" text
+ null;