Added ordering invoice as in house BOD-101
This commit is contained in:
@@ -49,3 +49,6 @@
|
||||
|
||||
--\* Set the region for the shop.
|
||||
-Counter Record - type: ronum
|
||||
|
||||
|
||||
Create an in house vendor record and add it to the bodyshop record.
|
||||
@@ -2699,6 +2699,27 @@
|
||||
<folder_node>
|
||||
<name>actions</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>new</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>return</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -5797,6 +5818,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>line_no</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>mod_lb_hrs</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -11663,6 +11705,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>quantity</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>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Table } from "antd";
|
||||
import { Table, Button } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
@@ -7,7 +7,7 @@ import { alphaSort } from "../../utils/sorters";
|
||||
export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
filteredInfo: { text: "" }
|
||||
filteredInfo: { text: "" },
|
||||
});
|
||||
|
||||
const { t } = useTranslation();
|
||||
@@ -19,7 +19,7 @@ export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
key: "fleetnumber",
|
||||
sorter: (a, b) => alphaSort(a.fleetnumber, b.fleetnumber),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "fleetnumber" && state.sortedInfo.order
|
||||
state.sortedInfo.columnKey === "fleetnumber" && state.sortedInfo.order,
|
||||
},
|
||||
{
|
||||
title: t("courtesycars.fields.vin"),
|
||||
@@ -29,7 +29,7 @@ export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
sortOrder: state.sortedInfo.columnKey === "vin" && state.sortedInfo.order,
|
||||
render: (text, record) => (
|
||||
<Link to={`/manage/courtesycars/${record.id}`}>{record.vin}</Link>
|
||||
)
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t("courtesycars.fields.status"),
|
||||
@@ -38,21 +38,23 @@ export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
sorter: (a, b) => alphaSort(a.status, b.status),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
||||
render: (text, record) => t(record.status)
|
||||
render: (text, record) => t(record.status),
|
||||
},
|
||||
{
|
||||
title: t("courtesycars.fields.year"),
|
||||
dataIndex: "year",
|
||||
key: "year",
|
||||
sorter: (a, b) => alphaSort(a.year, b.year),
|
||||
sortOrder: state.sortedInfo.columnKey === "year" && state.sortedInfo.order
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "year" && state.sortedInfo.order,
|
||||
},
|
||||
{
|
||||
title: t("courtesycars.fields.make"),
|
||||
dataIndex: "make",
|
||||
key: "make",
|
||||
sorter: (a, b) => alphaSort(a.make, b.make),
|
||||
sortOrder: state.sortedInfo.columnKey === "make" && state.sortedInfo.order
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "make" && state.sortedInfo.order,
|
||||
},
|
||||
{
|
||||
title: t("courtesycars.fields.model"),
|
||||
@@ -60,8 +62,8 @@ export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
key: "model",
|
||||
sorter: (a, b) => alphaSort(a.model, b.model),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "model" && state.sortedInfo.order
|
||||
}
|
||||
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
||||
},
|
||||
];
|
||||
|
||||
const handleTableChange = (pagination, filters, sorter) => {
|
||||
@@ -71,9 +73,14 @@ export default function CourtesyCarsList({ loading, courtesycars }) {
|
||||
return (
|
||||
<Table
|
||||
loading={loading}
|
||||
title={() => (
|
||||
<Link to={`/manage/courtesycars/new`}>
|
||||
<Button>{t("courtesycars.actions.new")}</Button>
|
||||
</Link>
|
||||
)}
|
||||
size="small"
|
||||
pagination={{ position: "top" }}
|
||||
columns={columns.map(item => ({ ...item }))}
|
||||
columns={columns.map((item) => ({ ...item }))}
|
||||
rowKey="id"
|
||||
dataSource={courtesycars}
|
||||
onChange={handleTableChange}
|
||||
|
||||
@@ -64,7 +64,9 @@ export default function InvoicesListTableComponent({
|
||||
dataIndex: "actions",
|
||||
key: "actions",
|
||||
render: (text, record) => (
|
||||
<Link to={`/manage/invoices/${record.id}`}>
|
||||
<Link
|
||||
to={`/manage/invoices?invoiceid=${record.id}&vendorid=${record.vendorid}`}
|
||||
>
|
||||
<Button>{t("invoices.actions.edit")}</Button>
|
||||
</Link>
|
||||
),
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { DatePicker, Form, Input, Radio } from "antd";
|
||||
import { DatePicker, Form, Input, Radio, InputNumber } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
export default function PartsOrderModalComponent({
|
||||
vendorList,
|
||||
sendTypeState
|
||||
sendTypeState,
|
||||
}) {
|
||||
const [sendType, setSendType] = sendTypeState;
|
||||
|
||||
@@ -20,8 +20,8 @@ export default function PartsOrderModalComponent({
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<VendorSearchSelect options={vendorList} />
|
||||
@@ -31,8 +31,8 @@ export default function PartsOrderModalComponent({
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
label={t("parts_orders.fields.deliver_by")}
|
||||
>
|
||||
@@ -54,8 +54,8 @@ export default function PartsOrderModalComponent({
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
@@ -81,6 +81,13 @@ export default function PartsOrderModalComponent({
|
||||
>
|
||||
<CurrencyInput />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("parts_orders.fields.quantity")}
|
||||
key={`${index}quantity`}
|
||||
name={[field.name, "quantity"]}
|
||||
>
|
||||
<InputNumber />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
@@ -95,7 +102,7 @@ export default function PartsOrderModalComponent({
|
||||
</Form.List>
|
||||
<Radio.Group
|
||||
defaultValue={sendType}
|
||||
onChange={e => setSendType(e.target.value)}
|
||||
onChange={(e) => setSendType(e.target.value)}
|
||||
>
|
||||
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
||||
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
||||
|
||||
@@ -8,6 +8,7 @@ import { EmailSettings } from "../../emails/constants";
|
||||
import { UPDATE_JOB_LINE_STATUS } from "../../graphql/jobs-lines.queries";
|
||||
import { INSERT_NEW_PARTS_ORDERS } from "../../graphql/parts-orders.queries";
|
||||
import { QUERY_ALL_VENDORS_FOR_ORDER } from "../../graphql/vendors.queries";
|
||||
import { INSERT_NEW_INVOICE } from "../../graphql/invoices.queries";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectPartsOrder } from "../../redux/modals/modals.selectors";
|
||||
@@ -52,8 +53,11 @@ export function PartsOrderModalContainer({
|
||||
});
|
||||
const [insertPartOrder] = useMutation(INSERT_NEW_PARTS_ORDERS);
|
||||
const [updateJobLines] = useMutation(UPDATE_JOB_LINE_STATUS);
|
||||
const [insertInvoice] = useMutation(INSERT_NEW_INVOICE);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
//Check if this was actuall an inhouse invoice
|
||||
|
||||
const handleFinish = (values) => {
|
||||
insertPartOrder({
|
||||
variables: {
|
||||
po: [
|
||||
@@ -77,6 +81,39 @@ export function PartsOrderModalContainer({
|
||||
notification["success"]({
|
||||
message: t("parts_orders.successes.created"),
|
||||
});
|
||||
|
||||
if (values.vendorid === bodyshop.inhousevendorid) {
|
||||
console.log("Inhouse Invoice needs to be psoted.");
|
||||
let invoiceToPost = {
|
||||
vendorid: bodyshop.inhousevendorid,
|
||||
jobid: jobId,
|
||||
total: 0,
|
||||
invoice_number: `${jobId}`, //TODO Add INhouse invoice generation?
|
||||
federal_tax_rate:
|
||||
bodyshop.invoice_tax_rates.federal_tax_rate || 0,
|
||||
state_tax_rate: bodyshop.invoice_tax_rates.state_tax_rate || 0,
|
||||
local_tax_rate: bodyshop.invoice_tax_rates.local_tax_rate || 0,
|
||||
invoicelines: {
|
||||
data: values.parts_order_lines.data.map((p) => {
|
||||
return {
|
||||
joblineid: p.job_line_id,
|
||||
actual_price: 0,
|
||||
actual_cost: 0,
|
||||
line_desc: p.line_desc,
|
||||
quantity: p.quantity || 1,
|
||||
cost_center:
|
||||
bodyshop.md_responsibility_centers.defaults.PAO ||
|
||||
"Other*",
|
||||
};
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
const invoiceResult = insertInvoice({
|
||||
variables: { invoice: invoiceToPost },
|
||||
});
|
||||
}
|
||||
|
||||
if (refetch) refetch();
|
||||
toggleModalVisible();
|
||||
|
||||
@@ -84,10 +121,6 @@ export function PartsOrderModalContainer({
|
||||
//TODO Remove hardcoding
|
||||
setEmailOptions({
|
||||
messageOptions: {
|
||||
from: {
|
||||
name: bodyshop.shopname || EmailSettings.fromNameDefault,
|
||||
address: EmailSettings.fromAddress,
|
||||
},
|
||||
to:
|
||||
data.vendors.filter((item) => item.id === values.id)[0] ||
|
||||
null,
|
||||
@@ -127,6 +160,7 @@ export function PartsOrderModalContainer({
|
||||
oem_partno: value.oem_partno,
|
||||
db_price: value.db_price,
|
||||
act_price: value.act_price,
|
||||
quantity: value.part_qty,
|
||||
job_line_id: value.id,
|
||||
status: bodyshop.md_order_statuses.default_ordered || "Ordered*",
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ function VendorsFormContainer({ selectedVendor, refetch, bodyshop }) {
|
||||
const { loading, error, data } = useQuery(QUERY_VENDOR_BY_ID, {
|
||||
variables: { id: (selectedVendor && selectedVendor.id) || null },
|
||||
fetchPolicy: "network-only",
|
||||
skip: !selectedVendor
|
||||
skip: !!!selectedVendor
|
||||
});
|
||||
const [updateVendor] = useMutation(UPDATE_VENDOR);
|
||||
const [insertvendor] = useMutation(INSERT_NEW_VENDOR);
|
||||
|
||||
@@ -6,14 +6,13 @@ import VendorsListComponent from "./vendors-list.component";
|
||||
|
||||
export default function VendorsListContainer({ selectedVendorState }) {
|
||||
const [selectedVendor, setSelectedVendor] = selectedVendorState;
|
||||
const { loading, error, data } = useQuery(QUERY_ALL_VENDORS, {
|
||||
fetchPolicy: "network-only"
|
||||
});
|
||||
const { loading, error, data } = useQuery(QUERY_ALL_VENDORS);
|
||||
|
||||
const handleNewVendor = () => {
|
||||
setSelectedVendor({});
|
||||
};
|
||||
|
||||
const handleOnRowClick = record => {
|
||||
const handleOnRowClick = (record) => {
|
||||
if (record) {
|
||||
setSelectedVendor(record);
|
||||
} else setSelectedVendor(null);
|
||||
|
||||
@@ -28,6 +28,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
textid
|
||||
production_config
|
||||
invoice_tax_rates
|
||||
inhousevendorid
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
|
||||
@@ -41,6 +41,7 @@ export const QUERY_INVOICES_BY_JOBID = gql`
|
||||
query QUERY_INVOICES_BY_JOBID($jobid: uuid!) {
|
||||
invoices(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
},
|
||||
"courtesycars": {
|
||||
"actions": {
|
||||
"new": "New Courtesy Car",
|
||||
"return": "Return Car"
|
||||
},
|
||||
"errors": {
|
||||
@@ -402,6 +403,7 @@
|
||||
"db_price": "Database Price",
|
||||
"line_desc": "Line Description",
|
||||
"line_ind": "S#",
|
||||
"line_no": "Line #",
|
||||
"mod_lb_hrs": "Labor Hours",
|
||||
"mod_lbr_ty": "Labor Type",
|
||||
"oem_partno": "OEM Part #",
|
||||
@@ -742,7 +744,8 @@
|
||||
"job_line_id": "Job Line Id",
|
||||
"line_desc": "Line Description",
|
||||
"line_remarks": "Remarks",
|
||||
"lineremarks": "Line Remarks"
|
||||
"lineremarks": "Line Remarks",
|
||||
"quantity": "Qty."
|
||||
},
|
||||
"labels": {
|
||||
"email": "Send by Email",
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
},
|
||||
"courtesycars": {
|
||||
"actions": {
|
||||
"new": "",
|
||||
"return": ""
|
||||
},
|
||||
"errors": {
|
||||
@@ -402,6 +403,7 @@
|
||||
"db_price": "Precio de base de datos",
|
||||
"line_desc": "Descripción de línea",
|
||||
"line_ind": "S#",
|
||||
"line_no": "",
|
||||
"mod_lb_hrs": "Horas laborales",
|
||||
"mod_lbr_ty": "Tipo de trabajo",
|
||||
"oem_partno": "OEM parte #",
|
||||
@@ -742,7 +744,8 @@
|
||||
"job_line_id": "",
|
||||
"line_desc": "",
|
||||
"line_remarks": "",
|
||||
"lineremarks": "Comentarios de línea"
|
||||
"lineremarks": "Comentarios de línea",
|
||||
"quantity": ""
|
||||
},
|
||||
"labels": {
|
||||
"email": "Enviar por correo electrónico",
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
},
|
||||
"courtesycars": {
|
||||
"actions": {
|
||||
"new": "",
|
||||
"return": ""
|
||||
},
|
||||
"errors": {
|
||||
@@ -402,6 +403,7 @@
|
||||
"db_price": "Prix de la base de données",
|
||||
"line_desc": "Description de la ligne",
|
||||
"line_ind": "S#",
|
||||
"line_no": "",
|
||||
"mod_lb_hrs": "Heures de travail",
|
||||
"mod_lbr_ty": "Type de travail",
|
||||
"oem_partno": "Pièce OEM #",
|
||||
@@ -742,7 +744,8 @@
|
||||
"job_line_id": "",
|
||||
"line_desc": "",
|
||||
"line_remarks": "",
|
||||
"lineremarks": "Remarques sur la ligne"
|
||||
"lineremarks": "Remarques sur la ligne",
|
||||
"quantity": ""
|
||||
},
|
||||
"labels": {
|
||||
"email": "Envoyé par email",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "inhousevendorid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "inhousevendorid" uuid NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,48 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_order_statuses
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- messagingservicesid
|
||||
- production_config
|
||||
- region_config
|
||||
- shopname
|
||||
- shoprates
|
||||
- state
|
||||
- state_tax_id
|
||||
- template_header
|
||||
- textid
|
||||
- updated_at
|
||||
- zip_post
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,49 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_order_statuses
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- messagingservicesid
|
||||
- production_config
|
||||
- region_config
|
||||
- shopname
|
||||
- shoprates
|
||||
- state
|
||||
- state_tax_id
|
||||
- template_header
|
||||
- textid
|
||||
- updated_at
|
||||
- zip_post
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,46 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_order_statuses
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- production_config
|
||||
- shopname
|
||||
- shoprates
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,47 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
- md_order_statuses
|
||||
- md_responsibility_centers
|
||||
- md_ro_statuses
|
||||
- production_config
|
||||
- shopname
|
||||
- shoprates
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."parts_order_lines" DROP COLUMN "quantity";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."parts_order_lines" ADD COLUMN "quantity" numeric NOT
|
||||
NULL DEFAULT 1;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- orderid
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- oem_partno
|
||||
- db_price
|
||||
- act_price
|
||||
- status
|
||||
- line_remarks
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,41 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- act_price
|
||||
- created_at
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- act_price
|
||||
- db_price
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- job_line_id
|
||||
- orderid
|
||||
computed_fields: []
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,39 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- act_price
|
||||
- created_at
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- act_price
|
||||
- db_price
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- job_line_id
|
||||
- orderid
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,41 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- act_price
|
||||
- created_at
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order_lines
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -438,6 +438,7 @@ tables:
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
@@ -474,6 +475,7 @@ tables:
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- inhousevendorid
|
||||
- insurance_vendor_id
|
||||
- invoice_tax_rates
|
||||
- logo_img_path
|
||||
@@ -2746,32 +2748,34 @@ tables:
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- act_price
|
||||
- created_at
|
||||
- updated_at
|
||||
- orderid
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- oem_partno
|
||||
- db_price
|
||||
- act_price
|
||||
- status
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- act_price
|
||||
- created_at
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- job_line_id
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
@@ -2788,16 +2792,17 @@ tables:
|
||||
permission:
|
||||
columns:
|
||||
- act_price
|
||||
- created_at
|
||||
- db_price
|
||||
- id
|
||||
- job_line_id
|
||||
- line_desc
|
||||
- line_remarks
|
||||
- oem_partno
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- job_line_id
|
||||
- orderid
|
||||
- quantity
|
||||
- status
|
||||
- updated_at
|
||||
filter:
|
||||
parts_order:
|
||||
job:
|
||||
|
||||
Reference in New Issue
Block a user