Updated field names.

This commit is contained in:
Patrick Fic
2020-01-21 08:54:37 -08:00
parent 78772b847d
commit 57886dc276
9 changed files with 56 additions and 22 deletions

View File

@@ -13,14 +13,14 @@ export default function JobDetailCardsCustomerComponent({ loading, data }) {
extraLink={data?.owner ? `/manage/owners/${data?.owner?.id}` : null}>
{data ? (
<span>
<div>{`${data?.pit_owner_first_name ??
""} ${data.pit_owner_last_name ?? ""}`}</div>
<div>{`${data?.ownr_fn ??
""} ${data.ownr_ln ?? ""}`}</div>
<div>
<PhoneFormatter>{`${data?.pit_owner_phone ?? ""}`}</PhoneFormatter>
<PhoneFormatter>{`${data?.ownr_ph1 ?? ""}`}</PhoneFormatter>
</div>
{data?.pit_owner_email ? (
<a href={`mailto:${data.pit_owner_email}`}>
<div>{`${data?.pit_owner_email ?? ""}`}</div>
{data?.ownr_ea ? (
<a href={`mailto:${data.ownr_ea}`}>
<div>{`${data?.ownr_ea ?? ""}`}</div>
</a>
) : null}

View File

@@ -43,13 +43,13 @@ export default function JobsList({
dataIndex: "owner",
key: "owner",
ellipsis: true,
sorter: (a, b) => alphaSort(a.pit_owner_last_name, b.pit_owner_last_name),
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
sortOrder:
state.sortedInfo.columnKey === "owner" && state.sortedInfo.order,
render: (text, record) => {
return record.owner ? (
<Link to={"/manage/owners/" + record.owner.id}>
{record.pit_owner_first_name} {record.pit_owner_last_name}
{record.ownr_fn} {record.ownr_ln}
</Link>
) : (
t("jobs.errors.noowner")
@@ -58,13 +58,13 @@ export default function JobsList({
},
{
title: t("jobs.fields.phone1"),
dataIndex: "pit_owner_phone",
key: "pit_owner_phone",
dataIndex: "ownr_ph1",
key: "ownr_ph1",
ellipsis: true,
render: (text, record) => {
return record.pit_owner_phone ? (
return record.ownr_ph1 ? (
<span>
<PhoneFormatter>{record.pit_owner_phone}</PhoneFormatter>
<PhoneFormatter>{record.ownr_ph1}</PhoneFormatter>
<Icon
style={{ margin: 4 }}
type='message'

View File

@@ -30,10 +30,10 @@ export const GET_ALL_OPEN_JOBS = gql`
export const SUBSCRIPTION_ALL_OPEN_JOBS = gql`
subscription SUBSCRIPTION_ALL_OPEN_JOBS {
jobs {
pit_owner_first_name
pit_owner_last_name
pit_owner_phone
pit_owner_email
ownr_fn
ownr_ln
ownr_ph1
ownr_ea
owner {
id
allow_text_message
@@ -47,7 +47,6 @@ export const SUBSCRIPTION_ALL_OPEN_JOBS = gql`
v_color
plate_no
}
pit_vehicle_plate_no
actual_completion
actual_delivery
actual_in
@@ -196,10 +195,10 @@ export const GET_JOB_BY_PK = gql`
export const QUERY_JOB_CARD_DETAILS = gql`
query QUERY_JOB_CARD_DETAILS($id: uuid!) {
jobs_by_pk(id: $id) {
pit_owner_first_name
pit_owner_last_name
pit_owner_phone
pit_owner_email
ownr_fn
ownr_ln
ownr_ph1
ownr_ea
owner {
id
allow_text_message
@@ -213,7 +212,6 @@ export const QUERY_JOB_CARD_DETAILS = gql`
v_color
plate_no
}
pit_vehicle_plate_no
actual_completion
actual_delivery
actual_in

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "ded_status" TYPE boolean;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."ded_status" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "ded_status" TYPE text;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."ded_status" IS E''
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" SET NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vehicles"."v_vin" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" DROP NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vehicles"."v_vin" IS E''
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" DROP NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vehicles"."v_vin" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."vehicles" ALTER COLUMN "v_vin" SET NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vehicles"."v_vin" IS E''
type: run_sql