IO-1891 Add owner Note.

This commit is contained in:
Patrick Fic
2022-05-26 12:09:36 -07:00
parent 7f3b1413d7
commit e1e5dda710
11 changed files with 80 additions and 30 deletions

View File

@@ -32076,6 +32076,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>note</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>ownr_addr1</name> <name>ownr_addr1</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -14,7 +14,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
return ( return (
<div> <div>
<FormFieldsChanged form={form} /> <FormFieldsChanged form={form} />
<LayoutFormRow header={t("owners.forms.name")}> <LayoutFormRow header={t("owners.forms.name")}>
<Form.Item label={t("owners.fields.ownr_title")} name="ownr_title"> <Form.Item label={t("owners.fields.ownr_title")} name="ownr_title">
<Input /> <Input />
@@ -29,7 +28,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
<Input /> <Input />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow header={t("owners.forms.address")}> <LayoutFormRow header={t("owners.forms.address")}>
<Form.Item label={t("owners.fields.ownr_addr1")} name="ownr_addr1"> <Form.Item label={t("owners.fields.ownr_addr1")} name="ownr_addr1">
<Input /> <Input />
@@ -50,7 +48,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
<Input /> <Input />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow header={t("owners.forms.contact")}> <LayoutFormRow header={t("owners.forms.contact")}>
<Form.Item <Form.Item
label={t("owners.fields.allow_text_message")} label={t("owners.fields.allow_text_message")}
@@ -98,6 +95,9 @@ export default function OwnerDetailFormComponent({ form, loading }) {
<Input /> <Input />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<Form.Item label={t("owners.fields.note")} name="note">
<Input.TextArea rows={4} />
</Form.Item>
</div> </div>
); );
} }

View File

@@ -59,6 +59,14 @@ export default function OwnerFindModalComponent({
<PhoneFormatter>{record.ownr_ph2}</PhoneFormatter> <PhoneFormatter>{record.ownr_ph2}</PhoneFormatter>
), ),
}, },
{
title: t("owners.fields.note"),
dataIndex: "note",
key: "note",
render: (text, record) => (
<span style={{ whiteSpace: "pre" }}>{record.note}</span>
),
},
]; ];
const handleOnRowClick = (record) => { const handleOnRowClick = (record) => {

View File

@@ -42,17 +42,24 @@ export function ProductionColumnsComponent({
}; };
const columnKeys = columns.map((i) => i.key); const columnKeys = columns.map((i) => i.key);
const cols = dataSource({
technician,
state: tableState,
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
});
const menu = ( const menu = (
<Menu onClick={handleAdd}> <Menu
{dataSource({ onClick={handleAdd}
technician, style={{
state: tableState, columnCount: Math.max(Math.floor(cols.length / 10), 1),
activeStatuses: bodyshop.md_ro_statuses.active_statuses, }}
}) >
{cols
.filter((i) => !columnKeys.includes(i.key)) .filter((i) => !columnKeys.includes(i.key))
.map((item) => ( .map((item) => (
<Menu.Item key={item.key}>{item.title}</Menu.Item> <Menu.Item key={item.key} style={{ breakInside: "avoid" }}>
{item.title}
</Menu.Item>
))} ))}
</Menu> </Menu>
); );

View File

@@ -15,6 +15,7 @@ export const QUERY_SEARCH_OWNER_BY_IDX = gql`
ownr_st ownr_st
ownr_zip ownr_zip
id id
note
} }
} }
`; `;
@@ -65,6 +66,7 @@ export const QUERY_OWNER_BY_ID = gql`
ownr_title ownr_title
ownr_zip ownr_zip
preferred_contact preferred_contact
note
jobs { jobs {
id id
ro_number ro_number

View File

@@ -1893,6 +1893,7 @@
"address": "Address", "address": "Address",
"allow_text_message": "Permission to Text?", "allow_text_message": "Permission to Text?",
"name": "Name", "name": "Name",
"note": "Owner Note",
"ownr_addr1": "Address", "ownr_addr1": "Address",
"ownr_addr2": "Address 2", "ownr_addr2": "Address 2",
"ownr_city": "City", "ownr_city": "City",

View File

@@ -1893,6 +1893,7 @@
"address": "Dirección", "address": "Dirección",
"allow_text_message": "Permiso de texto?", "allow_text_message": "Permiso de texto?",
"name": "Nombre", "name": "Nombre",
"note": "",
"ownr_addr1": "Dirección", "ownr_addr1": "Dirección",
"ownr_addr2": "Dirección 2", "ownr_addr2": "Dirección 2",
"ownr_city": "ciudad", "ownr_city": "ciudad",

View File

@@ -1893,6 +1893,7 @@
"address": "Adresse", "address": "Adresse",
"allow_text_message": "Autorisation de texte?", "allow_text_message": "Autorisation de texte?",
"name": "Prénom", "name": "Prénom",
"note": "",
"ownr_addr1": "Adresse", "ownr_addr1": "Adresse",
"ownr_addr2": "Adresse 2 ", "ownr_addr2": "Adresse 2 ",
"ownr_city": "Ville", "ownr_city": "Ville",

View File

@@ -3823,32 +3823,36 @@
- active: - active:
_eq: true _eq: true
columns: columns:
- id - accountingid
- allow_text_message
- created_at - created_at
- updated_at - id
- ownr_fn - note
- ownr_ln
- ownr_addr1 - ownr_addr1
- ownr_addr2 - ownr_addr2
- ownr_city - ownr_city
- ownr_st - ownr_co_nm
- ownr_zip
- ownr_ctry - ownr_ctry
- ownr_ea - ownr_ea
- ownr_fn
- ownr_ln
- ownr_ph1 - ownr_ph1
- preferred_contact
- allow_text_message
- shopid
- ownr_ph2 - ownr_ph2
- ownr_co_nm - ownr_st
- ownr_title - ownr_title
- accountingid - ownr_zip
- preferred_contact
- shopid
- updated_at
select_permissions: select_permissions:
- role: user - role: user
permission: permission:
columns: columns:
- allow_text_message
- accountingid - accountingid
- allow_text_message
- created_at
- id
- note
- ownr_addr1 - ownr_addr1
- ownr_addr2 - ownr_addr2
- ownr_city - ownr_city
@@ -3863,10 +3867,8 @@
- ownr_title - ownr_title
- ownr_zip - ownr_zip
- preferred_contact - preferred_contact
- created_at
- updated_at
- id
- shopid - shopid
- updated_at
filter: filter:
bodyshop: bodyshop:
associations: associations:
@@ -3881,8 +3883,11 @@
- role: user - role: user
permission: permission:
columns: columns:
- allow_text_message
- accountingid - accountingid
- allow_text_message
- created_at
- id
- note
- ownr_addr1 - ownr_addr1
- ownr_addr2 - ownr_addr2
- ownr_city - ownr_city
@@ -3897,10 +3902,8 @@
- ownr_title - ownr_title
- ownr_zip - ownr_zip
- preferred_contact - preferred_contact
- created_at
- updated_at
- id
- shopid - shopid
- updated_at
filter: filter:
bodyshop: bodyshop:
associations: associations:

View File

@@ -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 "note" text
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."owners" add column "note" text
null;