Updates to all card components.

This commit is contained in:
Patrick Fic
2020-01-09 15:27:40 -08:00
parent e3357910b9
commit dbe4f47539
46 changed files with 1135 additions and 112 deletions

View File

@@ -10,6 +10,7 @@
"apollo-link-error": "^1.1.12",
"apollo-link-logger": "^1.2.3",
"apollo-link-ws": "^1.0.19",
"chart.js": "^2.9.3",
"dotenv": "^8.2.0",
"firebase": "^7.5.0",
"graphql": "^14.5.8",
@@ -17,6 +18,7 @@
"node-sass": "^4.13.0",
"react": "^16.12.0",
"react-apollo": "^3.1.3",
"react-chartjs-2": "^2.8.0",
"react-dom": "^16.12.0",
"react-i18next": "^11.2.7",
"react-icons": "^3.8.0",

View File

@@ -3,8 +3,9 @@ import { useTranslation } from "react-i18next";
import { useQuery } from "@apollo/react-hooks";
import AlertComponent from "../alert/alert.component";
import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries";
import { Row, Col } from "antd";
import { PageHeader, Button, Descriptions, Menu, Icon } from "antd";
import JobDetailCardsHeaderComponent from "./job-detail-cards.header.component";
import JobDetailCardsCustomerComponent from "./job-detail-cards.customer.component";
import JobDetailCardsVehicleComponent from "./job-detail-cards.vehicle.component";
import JobDetailCardsInsuranceComponent from "./job-detail-cards.insurance.component";
@@ -33,39 +34,88 @@ export default function JobDetailCards({ selectedJob }) {
if (error) return <AlertComponent message={error.message} type="error" />;
return (
<section className="job-cards">
<JobDetailCardsCustomerComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsVehicleComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsInsuranceComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDatesComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsPartsComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsNotesComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDamageComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDocumentsComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
</section>
<PageHeader
ghost={false}
onBack={() => window.history.back()}
title="Title"
subTitle="This is a subtitle"
extra={[
<Button key="images">
<Icon type="file-image" />
{t("jobs.actions.viewJobImages")}
</Button>,
<Button key="printing">
<Icon type="printer" />
{t("jobs.actions.printCenter")}
</Button>,
<Button key="notes">
<Icon type="edit" />
{t("jobs.actions.notes")}
</Button>,
<Button key="postinvoices">
<Icon type="shopping-cart" />
{t("jobs.actions.postInvoices")}
</Button>,
<Button key="receiveparts">
<Icon type="inbox" />
{t("jobs.actions.receiveParts")}
</Button>,
<Button key="partstatus">
<Icon type="tool" />
{t("jobs.actions.partStatus")}
</Button>
]}
>
<Descriptions size="small" column={3}>
<Descriptions.Item label="Created">Lili Qu</Descriptions.Item>
<Descriptions.Item label="Association">
<a>421421</a>
</Descriptions.Item>
<Descriptions.Item label="Creation Time">2017-01-10</Descriptions.Item>
<Descriptions.Item label="Effective Time">2017-10-10</Descriptions.Item>
<Descriptions.Item label="Remarks">
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
</Descriptions.Item>
</Descriptions>
<section className="job-cards">
<JobDetailCardsCustomerComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsVehicleComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsInsuranceComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDatesComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsPartsComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsNotesComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDamageComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsDocumentsComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
<JobDetailCardsTotalsComponent
loading={loading}
data={data ? data.jobs_by_pk : null}
/>
</section>
</PageHeader>
);
}

View File

@@ -7,7 +7,11 @@ export default function JobDetailCardsCustomerComponent({ loading, data }) {
const { t } = useTranslation();
return (
<CardTemplate loading={loading} title={t("jobs.labels.cards.customer")}>
<CardTemplate
loading={loading}
title={t("jobs.labels.cards.customer")}
extraLink={data?.owner ? `/manage/owners/${data?.owner?.id}` : null}
>
{data ? (
<span>
<div>{`${data?.pit_owner_first_name ??

View File

@@ -1,6 +1,7 @@
import React from "react";
import { useTranslation } from "react-i18next";
import CardTemplate from "./job-detail-cards.template.component";
import Moment from "react-moment";
export default function JobDetailCardsDatesComponent({ loading, data }) {
const { t } = useTranslation();
@@ -9,7 +10,9 @@ export default function JobDetailCardsDatesComponent({ loading, data }) {
<CardTemplate loading={loading} title={t("jobs.labels.cards.dates")}>
{data ? (
<span>
Dates stuff here.
Actual In <Moment format="MM/DD/YYYY">{data?.actual_in}</Moment>
Scheduled Completion
<Moment format="MM/DD/YYYY">{data?.scheduled_completion}</Moment>
</span>
) : null}
</CardTemplate>

View File

@@ -0,0 +1,74 @@
import { Icon, Menu, Row, Col, PageHeader, Button, Descriptions } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
export default function JobDetailCardsHeader({ selectedJob, data }) {
const { t } = useTranslation();
return (
<div>
<PageHeader
ghost={false}
onBack={() => window.history.back()}
title="Title"
subTitle="This is a subtitle"
extra={[
<Button key="3">Operation</Button>,
<Button key="2">Operation</Button>,
<Button key="1" type="primary">
Primary
</Button>
]}
>
<Descriptions size="small" column={3}>
<Descriptions.Item label="Created">Lili Qu</Descriptions.Item>
<Descriptions.Item label="Association">
<a>421421</a>
</Descriptions.Item>
<Descriptions.Item label="Creation Time">
2017-01-10
</Descriptions.Item>
<Descriptions.Item label="Effective Time">
2017-10-10
</Descriptions.Item>
<Descriptions.Item label="Remarks">
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
</Descriptions.Item>
</Descriptions>
The rest of the content can go heare?
</PageHeader>
<Row>
<Col span={4}>Name</Col>
<Col span={18} offset={2}>
<Menu mode="horizontal">
<Menu.Item key="images">
<Icon type="file-image" />
{t("jobs.actions.viewJobImages")}
</Menu.Item>
<Menu.Item key="printing">
<Icon type="printer" />
{t("jobs.actions.printCenter")}
</Menu.Item>
<Menu.Item key="notes">
<Icon type="edit" />
{t("jobs.actions.notes")}
</Menu.Item>
<Menu.Item key="postinvoices">
<Icon type="shopping-cart" />
{t("jobs.actions.postInvoices")}
</Menu.Item>
<Menu.Item key="receiveparts">
<Icon type="inbox" />
{t("jobs.actions.receiveParts")}
</Menu.Item>
<Menu.Item key="partstatus">
<Icon type="tool" />
{t("jobs.actions.partStatus")}
</Menu.Item>
</Menu>
</Col>
</Row>
</div>
);
}

View File

@@ -1,6 +1,7 @@
import React from "react";
import { useTranslation } from "react-i18next";
import CardTemplate from "./job-detail-cards.template.component";
import PhoneFormatter from "../../utils/PhoneFormatter";
export default function JobDetailCardsInsuranceComponent({ loading, data }) {
const { t } = useTranslation();
@@ -9,7 +10,47 @@ export default function JobDetailCardsInsuranceComponent({ loading, data }) {
<CardTemplate loading={loading} title={t("jobs.labels.cards.insurance")}>
{data ? (
<span>
Insurance stuff here.
<div>{data?.ins_co_nm ?? t("general.labels.unknown")}</div>
<div>{data?.clm_no ?? t("general.labels.unknown")}</div>
<div>
{t("jobs.labels.cards.filehandler")}
{data?.ins_ea ? (
<a href={`mailto:${data.ins_ea}`}>
<div>{`${data?.ins_ct_fn ?? ""} ${data?.ins_ct_ln ?? ""}`}</div>
</a>
) : (
<div>{`${data?.ins_ct_fn ?? ""} ${data?.ins_ct_ln ?? ""}`}</div>
)}
{data?.ins_ph1 ? (
<PhoneFormatter>{data?.ins_ph1}</PhoneFormatter>
) : null}
</div>
<div>
TODO:
{t("jobs.labels.cards.appraiser")}
{data?.est_ea ? (
<a href={`mailto:${data.est_ea}`}>
<div>{`${data?.ins_ct_fn ?? ""} ${data?.ins_ct_ln ?? ""}`}</div>
</a>
) : (
<div>{`${data?.ins_ct_fn ?? ""} ${data?.ins_ct_ln ?? ""}`}</div>
)}
</div>
<div>
{t("jobs.labels.cards.estimator")}
{data?.est_ea ? (
<a href={`mailto:${data.est_ea}`}>
<div>{`${data?.est_ct_fn ?? ""} ${data?.est_ct_ln ?? ""}`}</div>
</a>
) : (
<div>{`${data?.est_ct_fn ?? ""} ${data?.est_ct_ln ?? ""}`}</div>
)}
{data?.est_ph1 ? (
<PhoneFormatter>{data?.est_ph1}</PhoneFormatter>
) : null}
</div>
</span>
) : null}
</CardTemplate>

View File

@@ -1,17 +1,42 @@
import React from "react";
import { useTranslation } from "react-i18next";
import CardTemplate from "./job-detail-cards.template.component";
import { Pie } from "react-chartjs-2";
export default function JobDetailCardsPartsComponent({ loading, data }) {
const { t } = useTranslation();
const p = {
labels: ["Not Ordered", "Ordered", "Received", "Backordered"],
datasets: [
{
data: [5, 15, 10, 2],
backgroundColor: [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(255, 206, 86, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(255, 159, 64, 0.2)"
],
borderColor: [
"rgba(255, 99, 132, 1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)"
],
borderWidth: 1
}
]
};
return (
<CardTemplate loading={loading} title={t("jobs.labels.cards.parts")}>
{data ? (
<span>
Parts stuff here.
</span>
) : null}
</CardTemplate>
<div>
<CardTemplate loading={loading} title={t("jobs.labels.cards.parts")}>
{data ? <Pie data={p} /> : null}
</CardTemplate>
</div>
);
}

View File

@@ -1,11 +1,15 @@
import React from "react";
import { Card } from "antd";
import { Link } from "react-router-dom";
export default function JobDetailCardTemplate({
loading,
title,
extraLink,
...otherProps
}) {
let extra;
if (extraLink) extra = { extra: <Link to={extraLink} >More</Link> };
return (
<Card
size="small"
@@ -13,6 +17,7 @@ export default function JobDetailCardTemplate({
className="job-card"
title={title}
loading={loading}
{...extra}
>
{otherProps.children}
</Card>

View File

@@ -6,10 +6,16 @@ export default function JobDetailCardsVehicleComponent({ loading, data }) {
const { t } = useTranslation();
return (
<CardTemplate loading={loading} title={t("jobs.labels.cards.vehicle")}>
<CardTemplate
loading={loading}
title={t("jobs.labels.cards.vehicle")}
extraLink={data?.vehicle ? `/manage/vehicles/${data?.vehicle?.id}` : null}
>
{data ? (
<span>
Vehicle stuff here.
{data.vehicle?.v_model_yr ?? t("general.labels.na")}{" "}
{data.vehicle?.v_make_desc ?? t("general.labels.na")}{" "}
{data.vehicle?.v_model_desc ?? t("general.labels.na")}
</span>
) : null}
</CardTemplate>

View File

@@ -19,28 +19,28 @@ export default function JobsPage({
const actionMenu = (
<Menu>
<Menu.Item key='images'>
<Icon type='file-image' />
<Menu.Item key="images">
<Icon type="file-image" />
{t("jobs.actions.viewJobImages")}
</Menu.Item>
<Menu.Item key='printing'>
<Icon type='printer' />
<Menu.Item key="printing">
<Icon type="printer" />
{t("jobs.actions.printCenter")}
</Menu.Item>
<Menu.Item key='notes'>
<Icon type='edit' />
<Menu.Item key="notes">
<Icon type="edit" />
{t("jobs.actions.notes")}
</Menu.Item>
<Menu.Item key='postinvoices'>
<Icon type='shopping-cart' />
<Menu.Item key="postinvoices">
<Icon type="shopping-cart" />
{t("jobs.actions.postInvoices")}
</Menu.Item>
<Menu.Item key='receiveparts'>
<Icon type='inbox' />
<Menu.Item key="receiveparts">
<Icon type="inbox" />
{t("jobs.actions.receiveParts")}
</Menu.Item>
<Menu.Item key='partstatus'>
<Icon type='tool' />
<Menu.Item key="partstatus">
<Icon type="tool" />
{t("jobs.actions.partStatus")}
</Menu.Item>
</Menu>
@@ -114,7 +114,7 @@ export default function JobsPage({
key: "action",
render: (text, record) => (
<Dropdown overlay={actionMenu} trigger={["click"]}>
<Icon type='ellipsis' />
<Icon type="ellipsis" />
</Dropdown>
)
}
@@ -141,13 +141,20 @@ export default function JobsPage({
return (
<div>
<Input name='searchCriteria' onChange={handleChange} />
<Input.Search
placeholder="Search..."
onSearch={value => console.log(value)}
enterButton
/>
<br />
<Table
loading={loading}
pagination={{ position: "bottom" }}
pagination={{ position: "top" }}
columns={columns.map(item => ({ ...item }))}
rowKey='id'
rowKey="id"
dataSource={jobs}
rowSelection={{ selectedRowKeys: [selectedJob] }}
onChange={handleTableChange}
onRow={(record, rowIndex) => {
return {

View File

@@ -9,51 +9,51 @@ const errorLink = onError(
console.log("networkError", networkError);
console.log("operation", operation);
console.log("forward", forward);
if (graphQLErrors) {
// User access token has expired
if (graphQLErrors[0].message.includes("JWTExpired")) {
console.log("Got to the error check.");
if (access_token && access_token !== "undefined") {
// Let's refresh token through async request
return new Observable(observer => {
auth.currentUser
.getIdToken(true)
.then(function(idToken) {
if (!idToken) {
window.localStorage.removeItem("token");
return console.log("Refresh token has expired");
}
console.log("Got a new token", idToken);
window.localStorage.setItem("token", idToken);
//if (graphQLErrors) {
// User access token has expired
// if (graphQLErrors[0].message.includes("JWTExpired")) {
console.log("Got to the error check.");
if (access_token && access_token !== "undefined") {
// Let's refresh token through async request
return new Observable(observer => {
auth.currentUser
.getIdToken(true)
.then(function(idToken) {
if (!idToken) {
window.localStorage.removeItem("token");
return console.log("Refresh token has expired");
}
console.log("Got a new token", idToken);
window.localStorage.setItem("token", idToken);
// reset the headers
operation.setContext(({ headers = {} }) => ({
headers: {
// Re-add old headers
...headers,
// Switch out old access token for new one
authorization: idToken ? `Bearer ${idToken}` : ""
}
}));
// reset the headers
operation.setContext(({ headers = {} }) => ({
headers: {
// Re-add old headers
...headers,
// Switch out old access token for new one
authorization: idToken ? `Bearer ${idToken}` : ""
}
}));
const subscriber = {
next: observer.next.bind(observer),
error: observer.error.bind(observer),
complete: observer.complete.bind(observer)
};
console.log("About to resend the request.");
// Retry last failed request
forward(operation).subscribe(subscriber);
})
.catch(error => {
// No refresh or client token available, we force user to login
console.log("Hit an error.");
observer.error(error);
});
const subscriber = {
next: observer.next.bind(observer),
error: observer.error.bind(observer),
complete: observer.complete.bind(observer)
};
console.log("About to resend the request.");
// Retry last failed request
forward(operation).subscribe(subscriber);
})
.catch(error => {
// No refresh or client token available, we force user to login
console.log("Hit an error.");
observer.error(error);
});
}
}
});
}
//}
//}
if (networkError) {
console.log(`[Network error]: ${networkError}`);

View File

@@ -7,6 +7,7 @@ export const GET_ALL_OPEN_JOBS = gql`
est_number
ro_number
job_status {
id
name
}
scheduled_completion
@@ -35,6 +36,7 @@ export const SUBSCRIPTION_ALL_OPEN_JOBS = gql`
ro_number
job_status {
name
id
}
scheduled_completion
scheduled_delivery
@@ -46,6 +48,7 @@ export const SUBSCRIPTION_ALL_OPEN_JOBS = gql`
plate_no
}
owner {
id
first_name
last_name
}
@@ -101,6 +104,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
v_vin
}
owner {
id
first_name
last_name
}
@@ -120,6 +124,7 @@ export const GET_JOB_BY_PK = gql`
id
local_tax_rate
owner {
id
first_name
last_name
phone
@@ -135,6 +140,7 @@ export const GET_JOB_BY_PK = gql`
scheduled_in
scheduled_delivery
job_status {
id
name
}
updated_at
@@ -161,10 +167,12 @@ export const QUERY_JOB_CARD_DETAILS = gql`
pit_owner_phone
pit_owner_email
owner {
id
allow_text_message
preferred_contact
}
vehicle {
id
v_model_yr
v_make_desc
v_model_desc
@@ -175,27 +183,30 @@ export const QUERY_JOB_CARD_DETAILS = gql`
actual_completion
actual_delivery
actual_in
created_at
est_number
id
local_tax_rate
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
regie_number
clm_no
ro_number
scheduled_completion
scheduled_in
scheduled_delivery
job_status {
id
name
}
updated_at
claim_total
deductible
ded_amt
vehicle {
id
plate_no

View File

@@ -49,7 +49,10 @@
"parts": "Parts",
"notes": "Notes",
"damage": "Area of Damage",
"totals": "Totals"
"totals": "Totals",
"filehandler" : "File Handler",
"appraiser" : "Appraiser",
"estimator" : "Estimator"
},
"no_owner": "No Owner",
"vehicle_info": "Vehicle"

View File

@@ -3249,6 +3249,29 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
chart.js@^2.9.3:
version "2.9.3"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.9.3.tgz#ae3884114dafd381bc600f5b35a189138aac1ef7"
integrity sha512-+2jlOobSk52c1VU6fzkh3UwqHMdSlgH1xFv9FKMqHiNCpXsGPQa/+81AFa+i3jZ253Mq9aAycPwDjnn1XbRNNw==
dependencies:
chartjs-color "^2.1.0"
moment "^2.10.2"
chartjs-color-string@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz#1df096621c0e70720a64f4135ea171d051402f71"
integrity sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==
dependencies:
color-name "^1.0.0"
chartjs-color@^2.1.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.4.1.tgz#6118bba202fe1ea79dd7f7c0f9da93467296c3b0"
integrity sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==
dependencies:
chartjs-color-string "^0.6.0"
color-convert "^1.9.3"
cheerio@^1.0.0-rc.3:
version "1.0.0-rc.3"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6"
@@ -3420,7 +3443,7 @@ collection-visit@^1.0.0:
map-visit "^1.0.0"
object-visit "^1.0.0"
color-convert@^1.9.0, color-convert@^1.9.1:
color-convert@^1.9.0, color-convert@^1.9.1, color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
@@ -7837,7 +7860,7 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"
moment@2.x, moment@^2.24.0:
moment@2.x, moment@^2.10.2, moment@^2.24.0:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
@@ -10238,6 +10261,14 @@ react-app-polyfill@^1.0.4:
regenerator-runtime "^0.13.3"
whatwg-fetch "^3.0.0"
react-chartjs-2@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/react-chartjs-2/-/react-chartjs-2-2.8.0.tgz#1c24de91fb3755f8c4302675de7d66fdda339759"
integrity sha512-BPpC+qfnh37DkcXvxRwA1rdD9rX/0AQrwru4VZTLofCCuZBwRsc7PbfxjilvoB6YlHhorwZu40YDWEQkoz7xfQ==
dependencies:
lodash "^4.17.4"
prop-types "^15.5.8"
react-click-outside@tj/react-click-outside:
version "1.1.1"
resolved "https://codeload.github.com/tj/react-click-outside/tar.gz/a833ddc5be47490307f9fcc6ed09d8c353108510"
@@ -10994,6 +11025,8 @@ rxjs@^6.4.0, rxjs@^6.5.3:
version "6.5.4"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
dependencies:
tslib "^1.9.0"
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"

View File

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

View File

@@ -0,0 +1,15 @@
- args:
cascade: true
sql: "alter table jobs\r\nadd column ins_co_id text ,\r\nadd column ins_co_nm
text ,\r\nadd column ins_addr1 text ,\r\nadd column ins_addr2 text ,\r\nadd
column ins_city text ,\r\nadd column ins_st text ,\r\nadd column ins_zip text
,\r\nadd column ins_ctry text ,\r\nadd column ins_ph1 text ,\r\nadd column ins_ph1x
text ,\r\nadd column ins_ph2 text ,\r\nadd column ins_ph2x text ,\r\nadd column
ins_fax text ,\r\nadd column ins_faxx text ,\r\nadd column ins_ct_ln text ,\r\nadd
column ins_ct_fn text ,\r\nadd column ins_title text ,\r\nadd column ins_ct_ph
text ,\r\nadd column ins_ct_phx text ,\r\nadd column ins_ea text , \r\nadd
column ins_memo text ,\r\nadd column policy_no text ,\r\nadd column ded_amt
numeric ,\r\nadd column ded_status boolean ,\r\nadd column asgn_no text ,\r\nadd
column asgn_date date ,\r\nadd column asgn_type text ,\r\nadd column clm_no
text ,\r\nadd column clm_ofc_id text \r\n"
type: run_sql

View File

@@ -0,0 +1,91 @@
- 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:
- id
- created_at
- updated_at
- shopid
- est_number
- ro_number
- ownerid
- vehicleid
- labor_rate_id
- labor_rate_desc
- rate_lab
- rate_lad
- rate_lae
- rate_lar
- rate_las
- rate_laf
- rate_lam
- rate_lag
- rate_atp
- rate_lau
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_mapa
- rate_mash
- rate_mahw
- rate_ma2s
- rate_ma3s
- rate_ma2t
- rate_mabl
- rate_macs
- rate_matd
- federal_tax_rate
- state_tax_rate
- local_tax_rate
- est_co_nm
- est_addr1
- est_addr2
- est_city
- est_st
- est_zip
- est_ctry
- est_ph1
- est_ea
- est_ct_ln
- est_ct_fn
- scheduled_in
- actual_in
- scheduled_completion
- actual_completion
- scheduled_delivery
- actual_delivery
- regie_number
- invoice_date
- claim_total
- deductible
- inproduction
- statusid
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_owner_email
- pit_vehicle_plate_no
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,120 @@
- 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:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- rate_atp
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- 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
- state_tax_rate
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- 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
- 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
- labor_rate_desc
- labor_rate_id
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- updated_at
- id
- ownerid
- shopid
- statusid
- vehicleid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,89 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- id
- created_at
- updated_at
- shopid
- est_number
- ro_number
- ownerid
- vehicleid
- labor_rate_id
- labor_rate_desc
- rate_lab
- rate_lad
- rate_lae
- rate_lar
- rate_las
- rate_laf
- rate_lam
- rate_lag
- rate_atp
- rate_lau
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- rate_mapa
- rate_mash
- rate_mahw
- rate_ma2s
- rate_ma3s
- rate_ma2t
- rate_mabl
- rate_macs
- rate_matd
- federal_tax_rate
- state_tax_rate
- local_tax_rate
- est_co_nm
- est_addr1
- est_addr2
- est_city
- est_st
- est_zip
- est_ctry
- est_ph1
- est_ea
- est_ct_ln
- est_ct_fn
- scheduled_in
- actual_in
- scheduled_completion
- actual_completion
- scheduled_delivery
- actual_delivery
- regie_number
- invoice_date
- claim_total
- deductible
- inproduction
- statusid
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_owner_email
- pit_vehicle_plate_no
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,118 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- rate_atp
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- 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
- state_tax_rate
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- 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
- 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
- labor_rate_desc
- labor_rate_id
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- updated_at
- id
- ownerid
- shopid
- statusid
- 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,91 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- inproduction
- invoice_date
- claim_total
- deductible
- federal_tax_rate
- local_tax_rate
- rate_atp
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- 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
- state_tax_rate
- 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
- labor_rate_desc
- labor_rate_id
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- updated_at
- id
- ownerid
- shopid
- statusid
- vehicleid
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_update_permission

View File

@@ -0,0 +1,120 @@
- args:
role: user
table:
name: jobs
schema: public
type: drop_update_permission
- args:
permission:
columns:
- ded_status
- inproduction
- asgn_date
- invoice_date
- claim_total
- ded_amt
- deductible
- federal_tax_rate
- local_tax_rate
- rate_atp
- rate_la1
- rate_la2
- rate_la3
- rate_la4
- 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
- state_tax_rate
- asgn_no
- asgn_type
- clm_no
- clm_ofc_id
- 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
- 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
- labor_rate_desc
- labor_rate_id
- pit_owner_email
- pit_owner_first_name
- pit_owner_last_name
- pit_owner_phone
- pit_vehicle_plate_no
- policy_no
- regie_number
- ro_number
- actual_completion
- actual_delivery
- actual_in
- scheduled_completion
- scheduled_delivery
- scheduled_in
- created_at
- updated_at
- id
- ownerid
- shopid
- statusid
- vehicleid
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: jobs
schema: public
type: create_update_permission

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_in" TYPE timestamp without
time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_in" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_in" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_in" IS E''
type: run_sql

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_in" TYPE timestamp without
time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_in" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_in" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_in" IS E''
type: run_sql

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_completion" TYPE timestamp
without time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_completion" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_completion" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_completion" IS E''
type: run_sql

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_completion" TYPE timestamp
without time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_completion" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_completion" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_completion" IS E''
type: run_sql

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_delivery" TYPE timestamp
without time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_delivery" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "scheduled_delivery" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."scheduled_delivery" IS E''
type: run_sql

View File

@@ -0,0 +1,7 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_delivery" TYPE timestamp
without time zone;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_delivery" IS E'null'
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
sql: ALTER TABLE "public"."jobs" ALTER COLUMN "actual_delivery" TYPE timestamptz;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."jobs"."actual_delivery" IS E''
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_estimated";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_estimated" timestamptz NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_open";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_open" timestamptz NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_scheduled";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_scheduled" timestamptz NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_invoiced";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_invoiced" timestamptz NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_closed";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_closed" timestamptz NULL;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" DROP COLUMN "date_exported";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."jobs" ADD COLUMN "date_exported" timestamptz NULL;
type: run_sql