IO-1419 Added comments to parts orders.

This commit is contained in:
Patrick Fic
2021-10-04 11:59:33 -07:00
parent 0fd06d5e4e
commit 7d9759fda4
11 changed files with 42 additions and 0 deletions

View File

@@ -30396,6 +30396,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>comments</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>
<name>cost</name>
<definition_loaded>false</definition_loaded>

View File

@@ -27,6 +27,7 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters";
import { TemplateList } from "../../utils/TemplateConstants";
import DataLabel from "../data-label/data-label.component";
import PartsOrderBackorderEta from "../parts-order-backorder-eta/parts-order-backorder-eta.component";
import PartsOrderLineBackorderButton from "../parts-order-line-backorder-button/parts-order-line-backorder-button.component";
import PartsReceiveModalContainer from "../parts-receive-modal/parts-receive-modal.container";
@@ -379,6 +380,9 @@ export function PartsOrderListTableComponent({
rowKey="id"
dataSource={record.parts_order_lines}
/>
<DataLabel label={t("parts_orders.fields.comments")}>
<div style={{ whiteSpace: "pre" }}>{record.comments}</div>
</DataLabel>
</div>
);
};

View File

@@ -152,6 +152,9 @@ export default function PartsOrderModalComponent({
);
}}
</Form.List>
<Form.Item name="comments" label={t("parts_orders.fields.comments")}>
<Input.TextArea rows={3} />
</Form.Item>
<Radio.Group
defaultValue={sendType}
onChange={(e) => setSendType(e.target.value)}

View File

@@ -93,6 +93,7 @@ export const QUERY_BILLS_BY_JOBID = gql`
backordered_on
}
order_number
comments
user_email
}
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {

View File

@@ -564,6 +564,7 @@ export const GET_JOB_BY_PK = gql`
parts_order {
id
order_number
comments
order_date
user_email
vendor {

View File

@@ -1813,6 +1813,7 @@
"act_price": "Price",
"backordered_eta": "B.O. ETA",
"backordered_on": "B.O. On",
"comments": "Comments",
"cost": "Cost",
"db_price": "List Price",
"deliver_by": "Date",

View File

@@ -1813,6 +1813,7 @@
"act_price": "",
"backordered_eta": "",
"backordered_on": "",
"comments": "",
"cost": "",
"db_price": "",
"deliver_by": "",

View File

@@ -1813,6 +1813,7 @@
"act_price": "",
"backordered_eta": "",
"backordered_on": "",
"comments": "",
"cost": "",
"db_price": "",
"deliver_by": "",

View File

@@ -3782,6 +3782,7 @@
- active:
_eq: true
columns:
- comments
- created_at
- deliver_by
- id
@@ -3799,6 +3800,7 @@
- role: user
permission:
columns:
- comments
- created_at
- deliver_by
- id
@@ -3826,6 +3828,7 @@
- role: user
permission:
columns:
- comments
- created_at
- deliver_by
- id

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"."parts_orders" add column "comments" text
-- null;

View File

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