Added parts Queue BOD-388

This commit is contained in:
Patrick Fic
2020-09-23 15:49:48 -07:00
parent 1a89d683d7
commit 3f446b7525
23 changed files with 2095 additions and 4 deletions

View File

@@ -9113,6 +9113,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>remove</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>reset</name>
<definition_loaded>false</definition_loaded>
@@ -18046,6 +18067,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>parts-queue</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>productionboard</name>
<definition_loaded>false</definition_loaded>
@@ -23705,6 +23747,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>parts-queue</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>payments-all</name>
<definition_loaded>false</definition_loaded>
@@ -24358,6 +24421,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>parts-queue</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>payments-all</name>
<definition_loaded>false</definition_loaded>

View File

@@ -12,6 +12,7 @@ import Icon, {
TeamOutlined,
UnorderedListOutlined,
UserOutlined,
ToolFilled,
} from "@ant-design/icons";
import { Avatar, Menu } from "antd";
import React from "react";
@@ -96,6 +97,11 @@ function Header({
<FileFilled />
<Link to="/manage/jobs">{t("menus.header.activejobs")}</Link>
</Menu.Item>
<Menu.Item key="parts-queue">
<Link to="/manage/partsqueue">
<ToolFilled /> {t("menus.header.parts-queue")}
</Link>
</Menu.Item>
<Menu.Item key="availablejobs">
<Link to="/manage/available">
<ImportOutlined /> {t("menus.header.availablejobs")}

View File

@@ -0,0 +1,37 @@
import { Button, notification } from "antd";
import React, { useState } from "react";
import { useMutation } from "react-apollo";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { useTranslation } from "react-i18next";
export default function JobRemoveFromPartsQueue({ jobId, refetch }) {
const [updateJob] = useMutation(UPDATE_JOB);
const { t } = useTranslation();
const [loading, setLoading] = useState(false);
const handleClick = async (e) => {
setLoading(true);
const result = await updateJob({
variables: { jobId: jobId, job: { queued_for_parts: false } },
});
if (!!!result.errors) {
notification["success"]({ message: t("jobs.successes.saved") });
if (refetch) refetch();
} else {
notification["error"]({
message: t("jobs.errors.saving", {
error: JSON.stringify(result.errors),
}),
});
}
setLoading(false);
};
return (
<Button onClick={handleClick} loading={loading}>
{t("general.actions.remove")}
</Button>
);
}

View File

@@ -74,6 +74,7 @@ export function JobsAvailableContainer({
clm_total: Dinero(newTotals.totals.total_repairs).toFormat("0.00"),
owner_owing: Dinero(newTotals.custPayable.total).toFormat("0.00"),
job_totals: newTotals,
queued_for_parts: true,
};
insertNewJob({

View File

@@ -104,6 +104,7 @@ export function JobsAvailableSupplementContainer({
clm_total: Dinero(newTotals.totals.total_repairs).toFormat("0.00"),
owner_owing: Dinero(newTotals.custPayable.total).toFormat("0.00"),
job_totals: newTotals,
queued_for_parts: true,
},
},
})

View File

@@ -2,8 +2,6 @@ import { GET_JOB_LINES_BY_PK } from "../../graphql/jobs-lines.queries";
import gql from "graphql-tag";
export const GetSupplementDelta = async (client, jobId, newLines) => {
console.log("-----Begin Supplement-----");
console.log("Supplement delta for jobId", jobId);
console.log("New Lines", newLines);
const {
data: { joblines: existingLines },

View File

@@ -153,6 +153,18 @@ export default function ShopInfoRbacComponent({ form }) {
>
<InputNumber />
</Form.Item>
<Form.Item
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
name={["md_rbac", "jobs:partsqueue"]}
>
<InputNumber />
</Form.Item>
<Form.Item
label={t("bodyshop.fields.rbac.jobs.list-all")}
rules={[

View File

@@ -45,11 +45,67 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
status
updated_at
ded_amt
vehicleid
}
}
`;
export const QUERY_PARTS_QUEUE = gql`
query QUERY_PARTS_QUEUE($statuses: [String!]!) {
jobs(
where: {
_and: [
{ status: { _in: $statuses } }
{ queued_for_parts: { _eq: true } }
]
}
order_by: { updated_at: asc }
) {
ownr_fn
ownr_ln
ownr_ph1
ownr_ea
owner {
id
allow_text_message
preferred_contact
}
plate_no
plate_st
v_vin
v_model_yr
v_model_desc
v_make_desc
v_color
vehicleid
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
ins_ct_fn
ins_ct_ln
ins_ph1
ins_ea
est_co_nm
est_ph1
est_ea
est_ct_fn
est_ct_ln
clm_no
clm_total
owner_owing
ro_number
scheduled_completion
scheduled_in
scheduled_delivery
status
updated_at
ded_amt
vehicleid
}
}
`;
export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
subscription SUBSCRIPTION_JOBS_IN_PRODUCTION {
jobs(where: { inproduction: { _eq: true } }) {
@@ -1016,7 +1072,7 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
v_make_desc
v_model_desc
scheduled_completion
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _eq: "LAB" } }) {
aggregate {
sum {

View File

@@ -128,6 +128,9 @@ const TimeTicketsAll = lazy(() =>
import("../time-tickets/time-tickets.container")
);
const Help = lazy(() => import("../help/help.page"));
const PartsQueue = lazy(() =>
import("../parts-queue/parts-queue.page.container")
);
const { Content, Header } = Layout;
@@ -332,6 +335,11 @@ export function Manage({ match, conflict }) {
path={`${match.path}/accounting/payments`}
component={AccountingPayments}
/>
<Route
exact
path={`${match.path}/partsqueue`}
component={PartsQueue}
/>
<Route
exact
path={`${match.path}/payments`}

View File

@@ -0,0 +1,258 @@
import { SyncOutlined } from "@ant-design/icons";
import { useQuery } from "@apollo/react-hooks";
import { Button, Input, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import AlertComponent from "../../components/alert/alert.component";
import JobRemoveFromPartsQueue from "../../components/job-remove-from-parst-queue/job-remove-from-parts-queue.component";
import { QUERY_PARTS_QUEUE } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { onlyUnique } from "../../utils/arrayHelper";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { TimeAgoFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
export function PartsQueuePageComponent({ bodyshop }) {
const { loading, error, data, refetch } = useQuery(QUERY_PARTS_QUEUE, {
variables: {
statuses: bodyshop.md_ro_statuses.active_statuses || ["Open", "Open*"],
},
});
const [state, setState] = useState({
sortedInfo: {},
filteredInfo: { text: "" },
});
const { t } = useTranslation();
const [searchText, setSearchText] = useState("");
if (error) return <AlertComponent message={error.message} type="error" />;
const jobs = data
? searchText === ""
? data.jobs
: data.jobs.filter(
(j) =>
(j.ro_number || "")
.toString()
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ownr_co_nm || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ownr_fn || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ownr_ln || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.clm_no || "").toLowerCase().includes(searchText.toLowerCase()) ||
(j.plate_no || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.v_model_desc || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.v_make_desc || "")
.toLowerCase()
.includes(searchText.toLowerCase())
)
: [];
const handleTableChange = (pagination, filters, sorter) => {
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
};
const columns = [
{
title: t("jobs.fields.ro_number"),
dataIndex: "ro_number",
key: "ro_number",
sorter: (a, b) => alphaSort(a.ro_number, b.ro_number),
sortOrder:
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.ro_number}</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
sorter: (a, b) => a.est_number - b.est_number,
sortOrder:
state.sortedInfo.columnKey === "est_number" && state.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.est_number}</Link>
),
},
{
title: t("jobs.fields.owner"),
dataIndex: "owner",
key: "owner",
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.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
}`}
</Link>
) : (
<span>{`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
}`}</span>
);
},
},
{
title: t("jobs.fields.status"),
dataIndex: "status",
key: "status",
sorter: (a, b) => alphaSort(a.status, b.status),
sortOrder:
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
filters:
(jobs &&
jobs
.map((j) => j.status)
.filter(onlyUnique)
.map((s) => {
return {
text: s || "No Status*",
value: [s],
};
})) ||
[],
onFilter: (value, record) => value.includes(record.status),
render: (text, record) => {
return record.status || t("general.labels.na");
},
},
{
title: t("jobs.fields.vehicle"),
dataIndex: "vehicle",
key: "vehicle",
ellipsis: true,
render: (text, record) => {
return record.vehicleid ? (
<Link to={"/manage/vehicles/" + record.vehicleid}>
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
record.v_model_desc || ""
}`}
</Link>
) : (
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
record.v_model_desc || ""
}`}</span>
);
},
},
{
title: t("vehicles.fields.plate_no"),
dataIndex: "plate_no",
key: "plate_no",
sorter: (a, b) => alphaSort(a.plate_no, b.plate_no),
sortOrder:
state.sortedInfo.columnKey === "plate_no" && state.sortedInfo.order,
render: (text, record) => {
return record.plate_no ? record.plate_no : "";
},
},
{
title: t("jobs.fields.clm_no"),
dataIndex: "clm_no",
key: "clm_no",
ellipsis: true,
sorter: (a, b) => alphaSort(a.clm_no, b.clm_no),
sortOrder:
state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order,
render: (text, record) => {
return record.clm_no ? (
<span>{record.clm_no}</span>
) : (
t("general.labels.unknown")
);
},
},
{
title: t("jobs.fields.clm_total"),
dataIndex: "clm_total",
key: "clm_total",
sorter: (a, b) => a.clm_total - b.clm_total,
sortOrder:
state.sortedInfo.columnKey === "clm_total" && state.sortedInfo.order,
render: (text, record) => {
return record.clm_total ? (
<CurrencyFormatter>{record.clm_total}</CurrencyFormatter>
) : (
t("general.labels.unknown")
);
},
},
{
title: t("jobs.fields.updated_at"),
dataIndex: "updated_at",
key: "updated_at",
render: (text, record) => (
<TimeAgoFormatter>{record.updated_at}</TimeAgoFormatter>
),
},
{
title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
render: (text, record) => (
<JobRemoveFromPartsQueue jobId={record.id} refetch={refetch} />
),
},
];
return (
<Table
loading={loading}
size="small"
pagination={false}
columns={columns}
rowKey="id"
dataSource={jobs}
style={{ height: "100%" }}
scroll={{ x: true }}
title={() => {
return (
<div className="imex-table-header">
<Button onClick={() => refetch()}>
<SyncOutlined />
</Button>
<Input.Search
className="imex-table-header__search"
placeholder={t("general.labels.search")}
onChange={(e) => {
setSearchText(e.target.value);
}}
value={searchText}
enterButton
/>
</div>
);
}}
onChange={handleTableChange}
/>
);
}
export default connect(mapStateToProps, null)(PartsQueuePageComponent);

View File

@@ -0,0 +1,33 @@
import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
import {
setBreadcrumbs,
setSelectedHeader,
} from "../../redux/application/application.actions";
import PartsQueuePage from "./parts-queue.page.component";
const mapDispatchToProps = (dispatch) => ({
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
});
export function PartsQueuePageContainer({ setBreadcrumbs, setSelectedHeader }) {
const { t } = useTranslation();
useEffect(() => {
document.title = t("titles.parts-queue");
setSelectedHeader("parts-queue");
setBreadcrumbs([
{ link: "/manage/partsqueue", label: t("titles.bc.parts-queue") },
]);
}, [setBreadcrumbs, t, setSelectedHeader]);
return (
<RbacWrapper action="jobs:partsqueue">
<PartsQueuePage />
</RbacWrapper>
);
}
export default connect(null, mapDispatchToProps)(PartsQueuePageContainer);

View File

@@ -611,6 +611,7 @@
"edit": "Edit",
"login": "Login",
"refresh": "Refresh",
"remove": "Remove",
"reset": "Reset your changes.",
"resetpassword": "Reset Password",
"save": "Save",
@@ -1091,6 +1092,7 @@
"home": "Home",
"jobs": "Jobs",
"owners": "Owners",
"parts-queue": "Parts Queue",
"productionboard": "Production Board - Visual",
"productionlist": "Production Board - List",
"recent": "Recent Items",
@@ -1475,6 +1477,7 @@
"jobs-new": "Create a New Job",
"owner-detail": "{{name}}",
"owners": "Owners",
"parts-queue": "Parts Queue",
"payments-all": "All Payments",
"productionboard": "Production Board - Visual",
"productionlist": "Production Board - List",
@@ -1507,6 +1510,7 @@
"manageroot": "Home | $t(titles.app)",
"owners": "All Owners | $t(titles.app)",
"owners-detail": "{{name}} | $t(titles.app)",
"parts-queue": "Parts Queue | $t(titles.app)",
"payments-all": "Payments | $t(titles.app)",
"productionboard": "Production - Board",
"productionlist": "Production Board - List | $t(titles.app)",

View File

@@ -611,6 +611,7 @@
"edit": "Editar",
"login": "",
"refresh": "",
"remove": "",
"reset": " Restablecer a original.",
"resetpassword": "",
"save": "Salvar",
@@ -1091,6 +1092,7 @@
"home": "Casa",
"jobs": "Trabajos",
"owners": "propietarios",
"parts-queue": "",
"productionboard": "",
"productionlist": "",
"recent": "",
@@ -1475,6 +1477,7 @@
"jobs-new": "",
"owner-detail": "",
"owners": "",
"parts-queue": "",
"payments-all": "",
"productionboard": "",
"productionlist": "",
@@ -1507,6 +1510,7 @@
"manageroot": "Casa | $t(titles.app)",
"owners": "Todos los propietarios | $t(titles.app)",
"owners-detail": "",
"parts-queue": "",
"payments-all": "",
"productionboard": "",
"productionlist": "",

View File

@@ -611,6 +611,7 @@
"edit": "modifier",
"login": "",
"refresh": "",
"remove": "",
"reset": " Rétablir l'original.",
"resetpassword": "",
"save": "sauvegarder",
@@ -1091,6 +1092,7 @@
"home": "Accueil",
"jobs": "Emplois",
"owners": "Propriétaires",
"parts-queue": "",
"productionboard": "",
"productionlist": "",
"recent": "",
@@ -1475,6 +1477,7 @@
"jobs-new": "",
"owner-detail": "",
"owners": "",
"parts-queue": "",
"payments-all": "",
"productionboard": "",
"productionlist": "",
@@ -1507,6 +1510,7 @@
"manageroot": "Accueil | $t(titles.app)",
"owners": "Tous les propriétaires | $t(titles.app)",
"owners-detail": "",
"parts-queue": "",
"payments-all": "",
"productionboard": "",
"productionlist": "",

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."jobs" DROP COLUMN "queued_for_parts";
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."jobs" ADD COLUMN "queued_for_parts" boolean NOT NULL
DEFAULT false;
type: run_sql

View File

@@ -0,0 +1,261 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,262 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,262 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: jobs
schema: public
type: create_select_permission

View File

@@ -0,0 +1,263 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: jobs
schema: public
type: create_select_permission

View File

@@ -0,0 +1,261 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: jobs
schema: public
type: create_update_permission

View File

@@ -0,0 +1,262 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- actual_completion
- actual_delivery
- actual_in
- adj_g_disc
- adj_strdis
- adj_towdis
- adjustment_bottom_line
- agt_addr1
- agt_addr2
- agt_city
- agt_co_id
- agt_co_nm
- agt_ct_fn
- agt_ct_ln
- agt_ct_ph
- agt_ct_phx
- agt_ctry
- agt_ea
- agt_fax
- agt_faxx
- agt_lic_no
- agt_ph1
- agt_ph1x
- agt_ph2
- agt_ph2x
- agt_st
- agt_zip
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- cat_no
- category
- cieca_stl
- cieca_ttl
- ciecaid
- class
- clm_addr1
- clm_addr2
- clm_city
- clm_ct_fn
- clm_ct_ln
- clm_ct_ph
- clm_ct_phx
- clm_ctry
- clm_ea
- clm_fax
- clm_faxx
- clm_no
- clm_ofc_id
- clm_ofc_nm
- clm_ph1
- clm_ph1x
- clm_ph2
- clm_ph2x
- clm_st
- clm_title
- clm_total
- clm_zip
- converted
- created_at
- csr
- cust_pr
- date_closed
- date_estimated
- date_exported
- date_invoiced
- date_open
- date_scheduled
- ded_amt
- ded_status
- deliverchecklist
- depreciation_taxes
- employee_body
- employee_prep
- employee_refinish
- est_addr1
- est_addr2
- est_city
- est_co_nm
- est_ct_fn
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
- federal_tax_payable
- federal_tax_rate
- g_bett_amt
- id
- inproduction
- ins_addr1
- ins_addr2
- ins_city
- ins_co_id
- ins_co_nm
- ins_ct_fn
- ins_ct_ln
- ins_ct_ph
- ins_ct_phx
- ins_ctry
- ins_ea
- ins_fax
- ins_faxx
- ins_memo
- ins_ph1
- ins_ph1x
- ins_ph2
- ins_ph2x
- ins_st
- ins_title
- ins_zip
- insd_addr1
- insd_addr2
- insd_city
- insd_co_nm
- insd_ctry
- insd_ea
- insd_fax
- insd_faxx
- insd_fn
- insd_ln
- insd_ph1
- insd_ph1x
- insd_ph2
- insd_ph2x
- insd_st
- insd_title
- insd_zip
- intakechecklist
- invoice_allocation
- invoice_date
- job_totals
- kanbanparent
- kmin
- kmout
- labor_rate_desc
- labor_rate_id
- local_tax_rate
- loss_cat
- loss_date
- loss_desc
- loss_type
- other_amount_payable
- owner_owing
- ownerid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fax
- ownr_faxx
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph1x
- ownr_ph2
- ownr_ph2x
- ownr_st
- ownr_title
- ownr_zip
- parts_tax_rates
- pay_amt
- pay_chknm
- pay_date
- pay_type
- payee_nms
- plate_no
- plate_st
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_laa
- rate_lab
- rate_lad
- rate_lae
- rate_laf
- rate_lag
- rate_lam
- rate_lar
- rate_las
- rate_lau
- rate_ma2s
- rate_ma2t
- rate_ma3s
- rate_mabl
- rate_macs
- rate_mahw
- rate_mapa
- rate_mash
- rate_matd
- referral_source
- regie_number
- ro_number
- scheduled_completion
- scheduled_delivery
- scheduled_in
- selling_dealer
- selling_dealer_contact
- servicing_dealer
- servicing_dealer_contact
- shopid
- special_coverage_policy
- state_tax_rate
- status
- storage_payable
- tax_lbr_rt
- tax_levies_rt
- tax_paint_mat_rt
- tax_predis
- tax_prethr
- tax_pstthr
- tax_registration_number
- tax_shop_mat_rt
- tax_str_rt
- tax_sub_rt
- tax_thramt
- tax_tow_rt
- theft_ind
- tlos_ind
- towing_payable
- unit_number
- updated_at
- v_color
- v_make_desc
- v_model_desc
- v_model_yr
- v_vin
- vehicleid
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: jobs
schema: public
type: create_update_permission

View File

@@ -2281,6 +2281,7 @@ tables:
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3
@@ -2522,6 +2523,7 @@ tables:
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3
@@ -2773,6 +2775,7 @@ tables:
- po_number
- policy_no
- production_vars
- queued_for_parts
- rate_la1
- rate_la2
- rate_la3