Removed Est_number from Job. Potential Breaking changes. IO-553

This commit is contained in:
Patrick Fic
2021-01-07 15:25:32 -08:00
parent 3da3fb96e2
commit 0c83a62dd2
64 changed files with 1730 additions and 269 deletions

View File

@@ -5,7 +5,7 @@ const JobsCreate = (props) => (
<Create {...props}>
<SimpleForm>
<TextInput source="ro_number" />
<TextInput source="est_number" />
<TextInput source="ownr_fn" />
<TextInput source="ownr_ln" />
<TextInput source="converted" />

View File

@@ -283,7 +283,6 @@ const JobsEdit = (props) => (
<FormTab label="Other">
<TextInput fullWidth source="area_of_damage" />
<TextInput fullWidth source="loss_cat" />
<TextInput fullWidth source="est_number" />
<TextInput fullWidth source="special_coverage_policy" />
<TextInput fullWidth source="csr" />
<TextInput fullWidth source="po_number" />

View File

@@ -1,16 +1,16 @@
import { useQuery } from "@apollo/client";
import CircularProgress from "@material-ui/core/CircularProgress";
import React from "react";
import {
Datagrid,
Filter,
List,
ReferenceField,
TextField,
SelectInput,
TextInput,
TextField,
TextInput
} from "react-admin";
import { useQuery } from "@apollo/client";
import { QUERY_ALL_SHOPS } from "../../graphql/admin.shop.queries";
import CircularProgress from "@material-ui/core/CircularProgress";
const JobsList = (props) => (
<List filters={<JobsFilter />} {...props}>
@@ -20,7 +20,7 @@ const JobsList = (props) => (
<TextField source="shopname" />
</ReferenceField>
<TextField source="ro_number" />
<TextField source="est_number" />
<TextField source="ownr_fn" />
<TextField source="ownr_ln" />
<TextField source="ownr_co_nm" />

View File

@@ -7,7 +7,7 @@ import {
Show,
Tab,
TabbedShowLayout,
TextField,
TextField
} from "react-admin";
const JobsShow = (props) => (
@@ -221,7 +221,7 @@ const JobsShow = (props) => (
<TextField source="ownr_ea" />
<TextField source="area_of_damage" />
<TextField source="loss_cat" />
<TextField source="est_number" />
<TextField source="special_coverage_policy" />
<TextField source="csr" />
<TextField source="po_number" />

View File

@@ -14062,27 +14062,6 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>est_number</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>est_ph1</name>
<definition_loaded>false</definition_loaded>

View File

@@ -2,12 +2,12 @@ import { Input, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { logImEXEvent } from "../../firebase/firebase.utils";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters";
import PaymentExportButton from "../payment-export-button/payment-export-button.component";
import { PaymentsExportAllButton } from "../payments-export-all-button/payments-export-all-button.component";
import { logImEXEvent } from "../../firebase/firebase.utils";
export default function AccountingPayablesTableComponent({
loading,
@@ -37,19 +37,7 @@ export default function AccountingPayablesTableComponent({
<Link to={"/manage/jobs/" + record.job.id}>{record.job.ro_number}</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
sorter: (a, b) => a.job.est_number - b.job.est_number,
sortOrder:
state.sortedInfo.columnKey === "est_number" && state.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>
{record.job.est_number}
</Link>
),
},
{
title: t("jobs.fields.owner"),
dataIndex: "owner",

View File

@@ -1,11 +1,11 @@
import { Input, Table, Button } from "antd";
import { Button, Input, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { logImEXEvent } from "../../firebase/firebase.utils";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { alphaSort } from "../../utils/sorters";
import JobExportButton from "../jobs-close-export-button/jobs-close-export-button.component";
import { logImEXEvent } from "../../firebase/firebase.utils";
import { JobsExportAllButton } from "../jobs-export-all-button/jobs-export-all-button.component";
export default function AccountingReceivablesTableComponent({ loading, jobs }) {
@@ -34,17 +34,7 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
<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.status"),
dataIndex: "status",
@@ -156,10 +146,6 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
.toString()
.toLowerCase()
.includes(state.search.toLowerCase()) ||
(v.est_number || "")
.toString()
.toLowerCase()
.includes(state.search.toLowerCase()) ||
(v.ownr_fn || "")
.toLowerCase()
.includes(state.search.toLowerCase()) ||

View File

@@ -23,17 +23,13 @@ export default function ContractsJobsComponent({
dataIndex: "ro_number",
key: "ro_number",
width: "8%",
sorter: (a, b) =>
alphaSort(
a.ro_number ? a.ro_number : "EST-" + a.est_number,
b.ro_number ? b.ro_number : "EST-" + b.est_number
),
sorter: (a, b) => alphaSort(a.ro_number, b.ro_number),
sortOrder:
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
render: (text, record) => (
<span>
{record.ro_number ? record.ro_number : "EST-" + record.est_number}
{record.ro_number ? record.ro_number : t("general.labels.na")}
</span>
),
},
@@ -135,10 +131,6 @@ export default function ContractsJobsComponent({
? data
: data.filter(
(j) =>
(j.est_number || "")
.toString()
.toLowerCase()
.includes(state.search.toLowerCase()) ||
(j.ro_number || "")
.toString()
.toLowerCase()

View File

@@ -31,21 +31,9 @@ export default function CsiResponseListPaginated({
sorter: (a, b) => alphaSort(a.job.ro_number, b.job.ro_number),
sortOrder: sortcolumn === "ro_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>{record.job.ro_number}</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
width: "8%",
sorter: (a, b) => a.job.est_number - b.job.est_number,
sortOrder: sortcolumn === "est_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>
{record.job.est_number}
{record.job.ro_number || t("general.labels.na")}
</Link>
),
},

View File

@@ -48,11 +48,7 @@ export default function GlobalSearch() {
<Link to={`/manage/jobs/${job.id}`}>
<div className="imex-flex-row">
<span className="imex-flex-row__margin-large">
<strong>
{job.ro_number
? `${job.ro_number || ""} / ${job.est_number || ""}`
: `${job.est_number || ""}`}
</strong>
<strong>{job.ro_number || t("general.labels.na")}</strong>
</span>
<span className="imex-flex-row__margin-large">{`${

View File

@@ -1,6 +1,6 @@
import { PrinterFilled } from "@ant-design/icons";
import { useQuery } from "@apollo/react-hooks";
import { Button, Col, Drawer, Grid, PageHeader, Row, Tag, Space } from "antd";
import { Button, Col, Drawer, Grid, PageHeader, Row, Space, Tag } from "antd";
import queryString from "query-string";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -101,11 +101,7 @@ export function JobDetailCards({ setPrintCenterContext }) {
]}
title={
<Link to={`/manage/jobs/${data.jobs_by_pk.id}`}>
{data.jobs_by_pk.ro_number
? `${t("jobs.fields.ro_number")} ${data.jobs_by_pk.ro_number}`
: `${t("jobs.fields.est_number")} ${
data.jobs_by_pk.est_number
}`}
{data.jobs_by_pk.ro_number || t("general.labels.na")}
</Link>
}
subTitle={data.jobs_by_pk.status}

View File

@@ -3,12 +3,12 @@ import { useLazyQuery } from "@apollo/react-hooks";
import { Empty, Select } from "antd";
import _ from "lodash";
import React, { forwardRef, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import {
SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE,
SEARCH_JOBS_FOR_AUTOCOMPLETE,
SEARCH_JOBS_FOR_AUTOCOMPLETE
} from "../../graphql/jobs.queries";
import AlertComponent from "../alert/alert.component";
const { Option } = Select;
const JobSearchSelect = (
@@ -22,6 +22,7 @@ const JobSearchSelect = (
},
ref
) => {
const { t } = useTranslation();
const [callSearch, { loading, error, data }] = useLazyQuery(
SEARCH_JOBS_FOR_AUTOCOMPLETE,
{
@@ -100,9 +101,9 @@ const JobSearchSelect = (
{theOptions
? theOptions.map((o) => (
<Option key={o.id} value={o.id}>
{`${
o.ro_number ? `RO ${o.ro_number}` : `EST ${o.est_number}`
} | ${o.ownr_ln || ""} ${o.ownr_fn || ""} ${
{`${o.ro_number || t("general.labels.na")} | ${
o.ownr_ln || ""
} ${o.ownr_fn || ""} ${
o.ownr_co_nm ? ` ${o.ownr_co_num}` : ""
}| ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${
o.v_model_desc || ""

View File

@@ -63,12 +63,9 @@ export default function JobsAvailableSupplementComponent({
sortOrder:
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order,
render: (text, record) => (
<div>{`${(record.job && record.job.est_number) || ""}${
(record.job &&
record.job.ro_number &&
` / ${record.job.ro_number}`) ||
""
}`}</div>
<div>
{(record.job && record.job_ro_number) || t("general.labels.na")}
</div>
),
},
{

View File

@@ -71,11 +71,7 @@ export function JobsDetailHeader({
return (
<PageHeader
title={
job.ro_number
? `${t("jobs.fields.ro_number")} ${job.ro_number}`
: `${t("jobs.fields.est_number")} ${job.est_number}`
}
title={job.ro_number || t("general.labels.na")}
subTitle={job.status}
tags={[
<OwnerTagPopoverComponent key="owner" job={job} />,

View File

@@ -27,7 +27,7 @@ export default function JobsFindModalComponent({
render: (text, record) => (
<span>
<Link to={"/manage/jobs/" + record.id}>
{record.ro_number ? record.ro_number : "EST-" + record.est_number}
{record.ro_number || t("general.labels.na")}
</Link>
</span>
),

View File

@@ -45,10 +45,6 @@ export default connect(
(j.ro_number || "")
.toLowerCase()
.includes(modalSearch.toLowerCase()) ||
(j.est_number || "")
.toString()
.toLowerCase()
.includes(modalSearch.toLowerCase()) ||
(j.ownr_fn || "")
.toLowerCase()
.includes(modalSearch.toLowerCase()) ||

View File

@@ -25,21 +25,12 @@ export default function JobsList({ refetch, loading, jobs, total }) {
sortOrder: sortcolumn === "ro_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.ro_number}</Link>
<Link to={"/manage/jobs/" + record.id}>
{record.ro_number || t("general.labels.na")}
</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
width: "8%",
sorter: (a, b) => a.est_number - b.est_number,
sortOrder: sortcolumn === "est_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.est_number}</Link>
),
},
{
title: t("jobs.fields.owner"),
dataIndex: "owner",

View File

@@ -99,22 +99,11 @@ export function JobsList({ bodyshop }) {
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.ro_number}</Link>
<Link to={"/manage/jobs/" + record.id}>
{record.ro_number || t("general.labels.na")}
</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",

View File

@@ -23,7 +23,7 @@ function OwnerDetailJobsComponent({ bodyshop, owner }) {
ellipsis: true,
render: (text, record) => (
<Link to={`/manage/jobs/${record.id}`}>
{record.ro_number ? record.ro_number : `EST ${record.est_number}`}
{record.ro_number || t("general.labels.na")}
</Link>
),
},

View File

@@ -30,22 +30,13 @@ export default function PaymentsListPaginated({
key: "ro_number",
sorter: (a, b) => alphaSort(a.job.ro_number, b.job.ro_number),
sortOrder: sortcolumn === "ro_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>{record.job.ro_number}</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
sorter: (a, b) => a.job.est_number - b.job.est_number,
sortOrder: sortcolumn === "est_number" && sortorder,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>
{record.job.est_number}
{record.job.ro_number || t("general.labels.na")}
</Link>
),
},
{
title: t("jobs.fields.owner"),
dataIndex: "owner",

View File

@@ -5,9 +5,7 @@ import { createStructuredSelector } from "reselect";
import { setEmailOptions } from "../../redux/email/email.actions";
import { selectPrintCenter } from "../../redux/modals/modals.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import RenderTemplate, {
displayTemplateInWindow,
} from "../../utils/RenderTemplate";
import RenderTemplate from "../../utils/RenderTemplate";
const mapStateToProps = createStructuredSelector({
printCenterModal: selectPrintCenter,
bodyshop: selectBodyshop,

View File

@@ -26,9 +26,9 @@ export default function ProductionBoardCard(card) {
className="react-kanban-card imex-kanban-card tight-antd-rows"
style={{ margin: ".2rem 0rem" }}
size="small"
title={`${card.ro_number || card.est_number} - ${card.v_model_yr} ${
card.v_make_desc || ""
} ${card.v_model_desc || ""}`}
title={`${card.ro_number || t("general.labels.na")} - ${
card.v_model_yr
} ${card.v_make_desc || ""} ${card.v_model_desc || ""}`}
>
<Row>
<Col span={24}>

View File

@@ -91,10 +91,6 @@ export const createBoardData = (AllStatuses, Jobs, filter) => {
const CheckSearch = (search, job) => {
return (
(job.ro_number || "").toLowerCase().includes(search.toLowerCase()) ||
(job.est_number || "")
.toString()
.toLowerCase()
.includes(search.toLowerCase()) ||
(job.ownr_fn || "").toLowerCase().includes(search.toLowerCase()) ||
(job.ownr_co_nm || "").toLowerCase().includes(search.toLowerCase()) ||
(job.ownr_ln || "").toLowerCase().includes(search.toLowerCase()) ||

View File

@@ -114,7 +114,7 @@ export function ScheduleEventComponent({
const RegularEvent = event.isintake ? (
<div style={{ display: "flex", flexWrap: "wrap" }}>
<strong style={{ margin: ".1rem" }}>{`${
event.job.ro_number || event.job.est_number
event.job.ro_number || t("general.labels.na")
}`}</strong>
<div style={{ margin: ".1rem" }}>{`${
(event.job && event.job.ownr_fn) || ""

View File

@@ -14,20 +14,13 @@ export default function ScoreboardJobsList({ scoreBoardlist }) {
title: t("jobs.fields.ro_number"),
dataIndex: "ro_number",
key: "ro_number",
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>{record.job.ro_number}</Link>
),
},
{
title: t("jobs.fields.est_number"),
dataIndex: "est_number",
key: "est_number",
render: (text, record) => (
<Link to={"/manage/jobs/" + record.job.id}>
{record.job.est_number}
{record.job.ro_number || t("general.labels.na")}
</Link>
),
},
{
title: t("scoreboard.fields.date"),
dataIndex: "date",

View File

@@ -58,7 +58,7 @@ export function TechClockedInList({ technician }) {
<Card
title={
<Link to={`/tech/joblookup?selected=${ticket.job.id}`}>
{`${ticket.job.ro_number || ticket.job.est_number} ${
{`${ticket.job.ro_number || t("general.labels.na")} ${
ticket.job.ownr_fn || ""
} ${ticket.job.ownr_ln || ""} ${
ticket.job.ownr_co_nm || ""

View File

@@ -94,9 +94,7 @@ export function JobDetailCards({ setPrintCenterContext }) {
<Link to={`/manage/jobs/${data.jobs_by_pk.id}`}>
{data.jobs_by_pk.ro_number
? `${t("jobs.fields.ro_number")} ${data.jobs_by_pk.ro_number}`
: `${t("jobs.fields.est_number")} ${
data.jobs_by_pk.est_number
}`}
: t("general.labels.na")}
</Link>
}
subTitle={data.jobs_by_pk.status}

View File

@@ -43,10 +43,6 @@ export function TechLookupJobsList({ bodyshop }) {
? data.jobs
: data.jobs.filter(
(j) =>
(j.est_number || "")
.toString()
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ro_number || "")
.toString()
.toLowerCase()
@@ -103,18 +99,6 @@ export function TechLookupJobsList({ bodyshop }) {
<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"),

View File

@@ -24,7 +24,7 @@ export function VehicleDetailJobsComponent({ vehicle, bodyshop }) {
ellipsis: true,
render: (text, record) => (
<Link to={`/manage/jobs/${record.id}`}>
{record.ro_number ? record.ro_number : `EST ${record.est_number}`}
{record.ro_number || t("general.labels.na")}
</Link>
),
},

View File

@@ -20,7 +20,7 @@ export const QUERY_JOBS_FOR_EXPORT = gql`
v_make_desc
v_model_yr
v_color
est_number
clm_total
clm_no
ins_co_nm
@@ -59,7 +59,7 @@ export const QUERY_PAYMENTS_FOR_EXPORT = gql`
amount
job {
ro_number
est_number
id
ownr_fn
ownr_ln

View File

@@ -196,7 +196,7 @@ export const QUERY_SCHEDULE_LOAD_DATA = gql`
where: { scheduled_completion: { _gte: $start, _lte: $end } }
) {
id
est_number
ro_number
scheduled_completion
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _eq: "LAB" } }) {
@@ -217,7 +217,7 @@ export const QUERY_SCHEDULE_LOAD_DATA = gql`
arrJobs: jobs(where: { scheduled_in: { _gte: $start, _lte: $end } }) {
id
scheduled_in
est_number
ro_number
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _eq: "LAB" } }) {
aggregate {

View File

@@ -45,7 +45,6 @@ export const QUERY_AVAILABLE_SUPPLEMENT_JOBS = gql`
job {
id
ro_number
est_number
}
}
}

View File

@@ -168,7 +168,7 @@ export const QUERY_INTAKE_CHECKLIST = gql`
jobs_by_pk(id: $jobId) {
id
ro_number
est_number
scheduled_completion
scheduled_delivery
intakechecklist

View File

@@ -90,7 +90,7 @@ export const QUERY_CONTRACT_BY_PK = gql`
fuelout
job {
id
est_number
ro_number
v_make_desc
v_model_desc
@@ -162,7 +162,7 @@ export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
jobid
job {
id
est_number
ro_number
ownr_fn
ownr_ln

View File

@@ -126,7 +126,7 @@ export const QUERY_CC_BY_PK = gql`
driver_fn
job {
ro_number
est_number
ownr_ln
ownr_fn
ownr_co_nm

View File

@@ -69,7 +69,7 @@ export const QUERY_CSI_RESPONSE_PAGINATED = gql`
ownr_fn
ownr_ln
ro_number
est_number
id
}
}

View File

@@ -4,7 +4,7 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
query QUERY_ALL_ACTIVE_JOBS($statuses: [String!]!) {
jobs(
where: { status: { _in: $statuses } }
order_by: { est_number: desc }
order_by: { created_at: desc }
) {
ownr_fn
ownr_ln
@@ -26,7 +26,7 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
ins_ct_fn
@@ -83,7 +83,7 @@ export const QUERY_PARTS_QUEUE = gql`
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
ins_ct_fn
@@ -115,7 +115,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
id
status
ro_number
est_number
ownr_fn
ownr_ln
v_model_yr
@@ -217,7 +217,6 @@ export const QUERY_LBR_HRS_BY_PK = gql`
export const QUERY_JOB_COSTING_DETAILS = gql`
query QUERY_JOB_COSTING_DETAILS($id: uuid!) {
jobs_by_pk(id: $id) {
est_number
ro_number
clm_total
id
@@ -338,7 +337,7 @@ export const GET_JOB_BY_PK = gql`
special_coverage_policy
scheduled_delivery
converted
est_number
ro_number
clm_total
inproduction
@@ -576,7 +575,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
ins_ct_fn
@@ -641,7 +640,7 @@ export const QUERY_TECH_JOB_DETAILS = gql`
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
clm_no
@@ -748,7 +747,6 @@ export const INSERT_NEW_JOB = gql`
insert_jobs(objects: $job) {
returning {
id
est_number
}
}
}
@@ -773,7 +771,7 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql`
ownr_fn
ownr_ln
ro_number
est_number
vehicleid
v_make_desc
v_model_desc
@@ -803,7 +801,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
ownr_fn
ownr_ln
ro_number
est_number
vehicleid
v_make_desc
v_model_desc
@@ -818,7 +816,7 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql`
ownr_fn
ownr_ln
ro_number
est_number
vehicleid
v_make_desc
v_model_desc
@@ -1095,7 +1093,7 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
) {
id
ro_number
est_number
ownr_co_nm
ownr_fn
ownr_ln
@@ -1150,7 +1148,7 @@ export const QUERY_ALL_JOBS_PAGINATED = gql`
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
ins_ct_fn

View File

@@ -41,7 +41,6 @@ export const QUERY_OWNER_BY_ID = gql`
jobs {
id
ro_number
est_number
clm_no
status
clm_total

View File

@@ -29,7 +29,6 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
job {
id
ro_number
est_number
ownr_fn
ownr_ln
ownr_co_nm

View File

@@ -10,7 +10,7 @@ export const SUBSCRIPTION_SCOREBOARD = gql`
job {
id
ro_number
est_number
}
}
}

View File

@@ -5,7 +5,7 @@ export const GLOBAL_SEARCH_QUERY = gql`
search_jobs(args: { search: $search }) {
id
ro_number
est_number
clm_total
clm_no
v_model_yr

View File

@@ -115,7 +115,7 @@ export const QUERY_ACTIVE_TIME_TICKETS = gql`
memo
job {
id
est_number
ownr_fn
ownr_ln
ownr_co_nm
@@ -145,7 +145,7 @@ export const QUERY_ACTIVE_SHIFT_TIME_TICKETS = gql`
memo
job {
id
est_number
ownr_fn
ownr_ln
ownr_co_nm

View File

@@ -31,7 +31,7 @@ export const QUERY_VEHICLE_BY_ID = gql`
id
ro_number
ownr_fn
est_number
ownr_ln
owner {
id

View File

@@ -34,7 +34,7 @@ export function AllJobs({ setBreadcrumbs, setSelectedHeader }) {
limit: 25,
order: sortcolumn && [
{
[sortcolumn || "est_number"]: sortorder
[sortcolumn || "created_at"]: sortorder
? sortorder === "descend"
? "desc"
: "asc"

View File

@@ -81,9 +81,7 @@ export default function JobsCreateComponent({ form }) {
<Result
status="success"
title={t("jobs.successes.creatednoclick")}
subTitle={t("jobs.successes.created_subtitle", {
est_number: state.newJobEstNum,
})}
subTitle={t("jobs.successes.created_subtitle")}
extra={[
<Link to={`/manage/jobs/${state.newJobId}`} key="gotojob">
<Button type="primary">{t("jobs.actions.gotojob")}</Button>

View File

@@ -68,7 +68,6 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
created: true,
error: null,
newJobId: resp.data.insert_jobs.returning[0].id,
newJobEstNum: resp.data.insert_jobs.returning[0].est_number,
});
})
.catch((error) => {

View File

@@ -47,9 +47,8 @@ function JobsDetailPageContainer({
? t("titles.app")
: t("titles.jobsdetail", {
ro_number:
data.jobs_by_pk && data.jobs_by_pk.converted
? data.jobs_by_pk && data.jobs_by_pk.ro_number
: `EST ${data.jobs_by_pk && data.jobs_by_pk.est_number}`,
(data.jobs_by_pk && data.jobs_by_pk.ro_number) ||
t("general.labels.na"),
});
setBreadcrumbs([
{ link: "/manage/jobs", label: t("titles.bc.jobs") },
@@ -57,12 +56,8 @@ function JobsDetailPageContainer({
link: `/manage/jobs/${jobId}`,
label: t("titles.bc.jobs-detail", {
number:
(data &&
data.jobs_by_pk &&
(data.jobs_by_pk && data.jobs_by_pk.converted
? data && data.jobs_by_pk && data.jobs_by_pk.ro_number
: `EST ${data.jobs_by_pk && data.jobs_by_pk.est_number}`)) ||
"",
(data && data.jobs_by_pk && data.jobs_by_pk.ro_number) ||
t("general.labels.na"),
}),
},
]);
@@ -74,13 +69,11 @@ function JobsDetailPageContainer({
CreateRecentItem(
jobId,
"job",
`${
data.jobs_by_pk.ro_number
? data.jobs_by_pk.ro_number
: data.jobs_by_pk.est_number
} | ${data.jobs_by_pk.ownr_fn || ""} ${
data.jobs_by_pk.ownr_ln || ""
} ${data.jobs_by_pk.ownr_co_nm || ""}`,
`${data.jobs_by_pk.ro_number || t("general.labels.na")} | ${
data.jobs_by_pk.ownr_fn || ""
} ${data.jobs_by_pk.ownr_ln || ""} ${
data.jobs_by_pk.ownr_co_nm || ""
}`,
`/manage/jobs/${jobId}`
)
);

View File

@@ -48,7 +48,7 @@ export function JobsIntakeContainer({
number:
data &&
((data.jobs_by_pk && data.jobs_by_pk.ro_number) ||
data.jobs_by_pk.est_number),
t("general.labels.na")),
}),
},
{

View File

@@ -81,22 +81,11 @@ export function PartsQueuePageComponent({ bodyshop }) {
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
render: (text, record) => (
<Link to={"/manage/jobs/" + record.id}>{record.ro_number}</Link>
<Link to={"/manage/jobs/" + record.id}>
{record.ro_number || t("general.labels.na")}
</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",

View File

@@ -896,7 +896,6 @@
"est_ct_fn": "Appraiser First Name",
"est_ct_ln": "Appraiser Last Name",
"est_ea": "Appraiser Email",
"est_number": "Estimate #",
"est_ph1": "Appraiser Phone #",
"federal_tax_payable": "Federal Tax Payable",
"federal_tax_rate": "Federal Tax Rate",

View File

@@ -896,7 +896,6 @@
"est_ct_fn": "Nombre del tasador",
"est_ct_ln": "Apellido del tasador",
"est_ea": "Correo electrónico del tasador",
"est_number": "Numero Estimado",
"est_ph1": "Número de teléfono del tasador",
"federal_tax_payable": "Impuesto federal por pagar",
"federal_tax_rate": "",

View File

@@ -896,7 +896,6 @@
"est_ct_fn": "Prénom de l'évaluateur",
"est_ct_ln": "Nom de l'évaluateur",
"est_ea": "Courriel de l'évaluateur",
"est_number": "Numéro d'estimation",
"est_ph1": "Numéro de téléphone de l'évaluateur",
"federal_tax_payable": "Impôt fédéral à payer",
"federal_tax_rate": "",

View File

@@ -0,0 +1,263 @@
- 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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_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_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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_ph1
- est_st
- est_zip
- 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,264 @@
- 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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_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,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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_ph1
- est_st
- est_zip
- 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,263 @@
- 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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_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

@@ -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
- alt_transport
- area_of_damage
- asgn_date
- asgn_no
- asgn_type
- ca_gst_registrant
- 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_ph1
- est_st
- est_zip
- 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

@@ -0,0 +1,15 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."jobs" ADD COLUMN "est_number" int8;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "est_number" DROP NOT NULL;
type: run_sql
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "est_number" SET DEFAULT nextval('jobs_est_number_seq'::regclass);
type: run_sql

View File

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

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,41 @@
- args:
cascade: false
read_only: false
sql: |-
CREATE OR REPLACE FUNCTION public.search_jobs(search text)
RETURNS SETOF jobs
LANGUAGE plpgsql
STABLE
AS $function$ BEGIN if search = '' then return query
select *
from jobs j;
else return query
SELECT *
FROM jobs j2
WHERE ro_number ILIKE '%' || search || '%'
or ownr_fn ILIKE '%' || search || '%'
or ownr_ln ILIKE '%' || search || '%'
or ownr_co_nm ILIKE '%' || search || '%'
or clm_no ILIKE '%' || search || '%'
or v_make_desc ILIKE '%' || search || '%'
or v_model_desc ILIKE '%' || search || '%'
OR plate_no ILIKE '%' || search || '%'
ORDER BY ro_number ILIKE '%' || search || '%'
OR NULL,
ownr_ln ILIKE '%' || search || '%'
OR null,
ownr_co_nm ILIKE '%' || search || '%'
OR NULL,
ownr_fn ILIKE '%' || search || '%'
OR NULL,
clm_no ILIKE '%' || search || '%'
OR NULL,
v_make_desc ILIKE '%' || search || '%'
OR NULL,
v_model_desc ILIKE '%' || search || '%'
OR NULL,
plate_no ILIKE '%' || search || '%'
OR NULL;
end if;
END $function$;
type: run_sql

View File

@@ -2207,7 +2207,6 @@ tables:
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
@@ -2450,7 +2449,6 @@ tables:
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip
@@ -2703,7 +2701,6 @@ tables:
- est_ct_ln
- est_ctry
- est_ea
- est_number
- est_ph1
- est_st
- est_zip

View File

@@ -154,7 +154,7 @@ exports.QUERY_PAYMENTS_FOR_EXPORT = `
job {
id
ro_number
est_number
ins_co_nm
owner{
accountingid