From c470e0ba187850446023b302281bb710619b3bdc Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 13 May 2020 00:38:10 -0700 Subject: [PATCH] Added job intake process for BOD-114 --- bodyshop_translations.babel | 235 ++++++++++++++++ client/public/index.html | 2 +- .../src/components/_test/test.component.jsx | 2 +- .../email-overlay/email-overlay.container.jsx | 4 +- .../job-itnake-form-checkbox.component.jsx | 22 ++ .../job-intake-form.component.jsx | 97 +++++++ .../job-intake-template-item.component.jsx | 10 + .../job-intake-template-list.component.jsx | 58 ++++ .../job-intake/job-intake.component.jsx | 13 + .../print-center-item.component.jsx | 9 +- .../shop-template-add.component.jsx | 2 +- .../shop-templates-list.container.jsx | 2 +- client/src/firebase/firebase.utils.js | 6 +- client/src/graphql/bodyshop.queries.js | 8 + .../invoices/invoices.page.container.jsx | 18 +- .../jobs-intake.page.container.jsx | 90 ++++++ .../pages/manage/manage.page.component.jsx | 12 +- client/src/translations/en_us/common.json | 22 +- client/src/translations/es/common.json | 22 +- client/src/translations/fr/common.json | 22 +- client/src/utils/RenderTemplate.js | 16 ++ .../{constants.js => TemplateConstants.js} | 6 +- .../estimate_detail/estimate_detail.query.gql | 32 +++ .../estimate_detail.template.html | 87 ++++++ .../down.yaml | 5 + .../up.yaml | 5 + .../down.yaml | 49 ++++ .../up.yaml | 50 ++++ .../down.yaml | 47 ++++ .../up.yaml | 48 ++++ .../down.yaml | 5 + .../up.yaml | 5 + .../down.yaml | 255 +++++++++++++++++ .../up.yaml | 256 ++++++++++++++++++ .../down.yaml | 253 +++++++++++++++++ .../up.yaml | 254 +++++++++++++++++ .../down.yaml | 255 +++++++++++++++++ .../up.yaml | 256 ++++++++++++++++++ hasura/migrations/metadata.yaml | 5 + 39 files changed, 2508 insertions(+), 37 deletions(-) create mode 100644 client/src/components/job-intake/components/job-intake-form-checkbox/job-itnake-form-checkbox.component.jsx create mode 100644 client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx create mode 100644 client/src/components/job-intake/components/job-intake-template-item/job-intake-template-item.component.jsx create mode 100644 client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx create mode 100644 client/src/components/job-intake/job-intake.component.jsx create mode 100644 client/src/pages/jobs-intake/jobs-intake.page.container.jsx rename client/src/utils/{constants.js => TemplateConstants.js} (85%) create mode 100644 client/templates/estimate_detail/estimate_detail.query.gql create mode 100644 client/templates/estimate_detail/estimate_detail.template.html create mode 100644 hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/down.yaml create mode 100644 hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/up.yaml create mode 100644 hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/down.yaml create mode 100644 hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/up.yaml create mode 100644 hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/down.yaml create mode 100644 hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/up.yaml create mode 100644 hasura/migrations/1589354360622_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1589354360622_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1589354371131_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1589354371131_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1589354381499_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1589354381499_update_permission_user_public_table_jobs/up.yaml diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 4c760d478..dafe90108 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4426,6 +4426,27 @@ + + submit + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + @@ -4870,6 +4891,178 @@ + + intake + + + actions + + + printall + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + errors + + + intake + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + nochecklist + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + labels + + + addtoproduction + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + checklist + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + printpack + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + successes + + + intake + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + invoicelines @@ -13280,6 +13473,27 @@ + + jobs-intake + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobs-new false @@ -13681,6 +13895,27 @@ + + jobs-intake + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + jobsavailable false diff --git a/client/public/index.html b/client/public/index.html index 42bbab0b2..8b3eb7a0d 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -26,7 +26,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - BodyShop | ImEX Systems Inc. + ImEX Online diff --git a/client/src/components/_test/test.component.jsx b/client/src/components/_test/test.component.jsx index 444b3f60c..43cb233b2 100644 --- a/client/src/components/_test/test.component.jsx +++ b/client/src/components/_test/test.component.jsx @@ -3,7 +3,7 @@ import axios from "axios"; import React, { useState } from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { EmailSettings } from "../../utils/constants"; +import { EmailSettings } from "../../utils/TemplateConstants"; import { endLoading, startLoading, diff --git a/client/src/components/email-overlay/email-overlay.container.jsx b/client/src/components/email-overlay/email-overlay.container.jsx index b0c4504f7..c6c5ed34b 100644 --- a/client/src/components/email-overlay/email-overlay.container.jsx +++ b/client/src/components/email-overlay/email-overlay.container.jsx @@ -10,7 +10,7 @@ import { selectEmailVisible, } from "../../redux/email/email.selectors.js"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import { EmailSettings } from "../../utils/constants"; +import { EmailSettings } from "../../utils/TemplateConstants"; import RenderTemplate from "../../utils/RenderTemplate"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import EmailOverlayComponent from "./email-overlay.component"; @@ -20,9 +20,11 @@ const mapStateToProps = createStructuredSelector({ emailConfig: selectEmailConfig, bodyshop: selectBodyshop, }); + const mapDispatchToProps = (dispatch) => ({ toggleEmailOverlayVisible: () => dispatch(toggleEmailOverlayVisible()), }); + export function EmailOverlayContainer({ emailConfig, modalVisible, diff --git a/client/src/components/job-intake/components/job-intake-form-checkbox/job-itnake-form-checkbox.component.jsx b/client/src/components/job-intake/components/job-intake-form-checkbox/job-itnake-form-checkbox.component.jsx new file mode 100644 index 000000000..5e80707bd --- /dev/null +++ b/client/src/components/job-intake/components/job-intake-form-checkbox/job-itnake-form-checkbox.component.jsx @@ -0,0 +1,22 @@ +import React from "react"; +import { Form, Checkbox } from "antd"; +import { useTranslation } from "react-i18next"; + +export default function JobIntakeFormCheckboxComponent({ formItem }) { + const { name, label, required } = formItem; + const { t } = useTranslation(); + return ( + + + + ); +} diff --git a/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx b/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx new file mode 100644 index 000000000..6eccf60a5 --- /dev/null +++ b/client/src/components/job-intake/components/job-intake-form/job-intake-form.component.jsx @@ -0,0 +1,97 @@ +import React from "react"; +import { Form, Button, Switch, DatePicker, notification } from "antd"; +import CheckboxFormItem from "../job-intake-form-checkbox/job-itnake-form-checkbox.component"; +import { useTranslation } from "react-i18next"; +import { useMutation } from "@apollo/react-hooks"; +import { UPDATE_JOB } from "../../../../graphql/jobs.queries"; +import { useParams } from "react-router-dom"; +import { selectBodyshop } from "../../../../redux/user/user.selectors"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { useHistory } from "react-router-dom"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, +}); +const mapDispatchToProps = (dispatch) => ({ + //setUserLanguage: language => dispatch(setUserLanguage(language)) +}); + +export function JobIntakeForm({ formItems, bodyshop }) { + const { t } = useTranslation(); + const [intakeJob] = useMutation(UPDATE_JOB); + const { jobId } = useParams(); + const history = useHistory(); + const handleFinish = async (values) => { + console.log("values", values); + + const result = await intakeJob({ + variables: { + jobId: jobId, + job: { + inproduction: values.addToProduction || false, + status: bodyshop.md_ro_statuses.default_arrived || "Arrived*", + actual_in: new Date(), + scheduled_completion: values.scheduledCompletion, + intakechecklist: values, + scheduled_delivery: values.scheduledDelivery, + }, + }, + }); + if (!!!result.errors) { + notification["success"]({ message: t("intake.successes.intake") }); + history.push(`/manage/jobs/${jobId}`); + } else { + notification["error"]({ + message: t("intake.errors.intake", { + error: JSON.stringify(result.errors), + }), + }); + } + console.log("handleFinish -> result", result); + }; + + const [form] = Form.useForm(); + + return ( +
+ {t("intake.labels.checklist")} + {formItems.map((f, idx) => { + switch (f.type) { + case "checkbox": + return ; + default: + return
Error
; + } + })} + + + + + + + + + + + + ); +} + +export default connect(mapStateToProps, mapDispatchToProps)(JobIntakeForm); diff --git a/client/src/components/job-intake/components/job-intake-template-item/job-intake-template-item.component.jsx b/client/src/components/job-intake/components/job-intake-template-item/job-intake-template-item.component.jsx new file mode 100644 index 000000000..d5069c7ec --- /dev/null +++ b/client/src/components/job-intake/components/job-intake-template-item/job-intake-template-item.component.jsx @@ -0,0 +1,10 @@ +import React from "react"; +import { PrinterFilled } from "@ant-design/icons"; +export default function JobIntakeTemplateItem({ templateKey, renderTemplate }) { + return ( +
+ {templateKey} + renderTemplate(templateKey)} /> +
+ ); +} diff --git a/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx b/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx new file mode 100644 index 000000000..69799a332 --- /dev/null +++ b/client/src/components/job-intake/components/job-intake-template-list/job-intake-template-list.component.jsx @@ -0,0 +1,58 @@ +import React from "react"; +import JobIntakeTemplateItem from "../job-intake-template-item/job-intake-template-item.component"; +import { useParams } from "react-router-dom"; +import RenderTemplate, { + displayTemplateInWindow, +} from "../../../../utils/RenderTemplate"; +import { Button } from "antd"; +import { selectBodyshop } from "../../../../redux/user/user.selectors"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { useTranslation } from "react-i18next"; + +const mapStateToProps = createStructuredSelector({ + //currentUser: selectCurrentUser + bodyshop: selectBodyshop, +}); +const mapDispatchToProps = (dispatch) => ({ + //setUserLanguage: language => dispatch(setUserLanguage(language)) +}); + +export function JobIntakeTemplateList({ bodyshop, templates }) { + const { jobId } = useParams(); + const { t } = useTranslation(); + const renderTemplate = async (templateKey) => { + const html = await RenderTemplate( + { + name: templateKey, + variables: { id: jobId }, + }, + bodyshop + ); + displayTemplateInWindow(html); + }; + + const renderAllTemplates = () => { + templates.forEach((template) => renderTemplate(template)); + }; + + return ( +
+ {t("intake.labels.printpack")} + + {templates.map((template) => ( + + ))} +
+ ); +} +export default connect( + mapStateToProps, + mapDispatchToProps +)(JobIntakeTemplateList); diff --git a/client/src/components/job-intake/job-intake.component.jsx b/client/src/components/job-intake/job-intake.component.jsx new file mode 100644 index 000000000..4fc12672d --- /dev/null +++ b/client/src/components/job-intake/job-intake.component.jsx @@ -0,0 +1,13 @@ +import React from "react"; +import JobIntakeTemplateList from "./components/job-intake-template-list/job-intake-template-list.component"; +import JobIntakeForm from "./components/job-intake-form/job-intake-form.component"; +export default function JobIntakeComponent({ intakeChecklistConfig }) { + const { form, templates } = intakeChecklistConfig; + + return ( +
+ + +
+ ); +} diff --git a/client/src/components/print-center-item/print-center-item.component.jsx b/client/src/components/print-center-item/print-center-item.component.jsx index 150afb0ab..55a1dbc1c 100644 --- a/client/src/components/print-center-item/print-center-item.component.jsx +++ b/client/src/components/print-center-item/print-center-item.component.jsx @@ -5,7 +5,9 @@ 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 from "../../utils/RenderTemplate"; +import RenderTemplate, { + displayTemplateInWindow, +} from "../../utils/RenderTemplate"; const mapStateToProps = createStructuredSelector({ printCenterModal: selectPrintCenter, bodyshop: selectBodyshop, @@ -28,12 +30,9 @@ export function PrintCenterItemComponent({ name: item.key, variables: { id: id }, }, - bodyshop ); - - var newWin = window.open(); - newWin.document.write(html); + displayTemplateInWindow(html); }; if (disabled) return
  • {item.title}
  • ; diff --git a/client/src/components/shop-template-add/shop-template-add.component.jsx b/client/src/components/shop-template-add/shop-template-add.component.jsx index 36c44486d..e19a8f7d3 100644 --- a/client/src/components/shop-template-add/shop-template-add.component.jsx +++ b/client/src/components/shop-template-add/shop-template-add.component.jsx @@ -9,7 +9,7 @@ import { useHistory, useLocation } from "react-router-dom"; import { createStructuredSelector } from "reselect"; import { INSERT_TEMPLATE } from "../../graphql/templates.queries"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import { TemplateList } from "../../utils/constants"; +import { TemplateList } from "../../utils/TemplateConstants"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser diff --git a/client/src/components/shop-templates-list/shop-templates-list.container.jsx b/client/src/components/shop-templates-list/shop-templates-list.container.jsx index c66d3cf91..ccc604197 100644 --- a/client/src/components/shop-templates-list/shop-templates-list.container.jsx +++ b/client/src/components/shop-templates-list/shop-templates-list.container.jsx @@ -7,7 +7,7 @@ import Skeleton from "../loading-skeleton/loading-skeleton.component"; import { useTranslation } from "react-i18next"; import { useHistory, useLocation } from "react-router-dom"; import queryString from "query-string"; -import { TemplateList } from "../../utils/constants"; +import { TemplateList } from "../../utils/TemplateConstants"; import ShopTemplateAdd from "../shop-template-add/shop-template-add.component"; import ShopTemplateDeleteComponent from "../shop-template-delete/shop-template-delete.component"; diff --git a/client/src/firebase/firebase.utils.js b/client/src/firebase/firebase.utils.js index dc5382ad2..d3bc91fe0 100644 --- a/client/src/firebase/firebase.utils.js +++ b/client/src/firebase/firebase.utils.js @@ -38,12 +38,8 @@ let messaging; try { messaging = firebase.messaging(); // Project Settings => Cloud Messaging => Web Push certificates - // messaging.usePublicVapidKey(process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY); messaging.usePublicVapidKey(process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY); - console.log( - "Firebase Messaging initialized successfully.", - process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY - ); + console.log("Firebase Messaging initialized successfully."); } catch { console.log("Firebase Messaging is likely unsupported."); } diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js index 8e37b4cbc..0e0d51f6c 100644 --- a/client/src/graphql/bodyshop.queries.js +++ b/client/src/graphql/bodyshop.queries.js @@ -88,3 +88,11 @@ export const UPDATE_SHOP = gql` } } `; +export const QUERY_INTAKE_CHECKLIST = gql` + query QUERY_INTAKE_CHECKLIST($shopId: uuid!) { + bodyshops_by_pk(id: $shopId) { + id + intakechecklist + } + } +`; diff --git a/client/src/pages/invoices/invoices.page.container.jsx b/client/src/pages/invoices/invoices.page.container.jsx index f801ca62c..e42355029 100644 --- a/client/src/pages/invoices/invoices.page.container.jsx +++ b/client/src/pages/invoices/invoices.page.container.jsx @@ -1,18 +1,13 @@ import { Col, Row } from "antd"; import React, { useEffect } from "react"; -import InvoicesByVendorList from "../../components/invoices-by-vendor-list/invoices-by-vendor-list.component"; -import VendorsList from "../../components/invoices-vendors-list/invoices-vendors-list.component"; -import InvoiceDetailEditContainer from "../../components/invoice-detail-edit/invoice-detail-edit.container"; -import { setBreadcrumbs } from "../../redux/application/application.actions"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; -import { createStructuredSelector } from "reselect"; +import InvoiceDetailEditContainer from "../../components/invoice-detail-edit/invoice-detail-edit.container"; +import InvoicesByVendorList from "../../components/invoices-by-vendor-list/invoices-by-vendor-list.component"; +import VendorsList from "../../components/invoices-vendors-list/invoices-vendors-list.component"; +import { setBreadcrumbs } from "../../redux/application/application.actions"; -const mapStateToProps = createStructuredSelector({ - //currentUser: selectCurrentUser -}); const mapDispatchToProps = (dispatch) => ({ - //setUserLanguage: language => dispatch(setUserLanguage(language)) setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), }); @@ -41,7 +36,4 @@ export function InvoicesPageContainer({ setBreadcrumbs }) { ); } -export default connect( - mapStateToProps, - mapDispatchToProps -)(InvoicesPageContainer); +export default connect(null, mapDispatchToProps)(InvoicesPageContainer); diff --git a/client/src/pages/jobs-intake/jobs-intake.page.container.jsx b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx new file mode 100644 index 000000000..3d8519717 --- /dev/null +++ b/client/src/pages/jobs-intake/jobs-intake.page.container.jsx @@ -0,0 +1,90 @@ +import React, { useEffect } from "react"; +import { useQuery } from "@apollo/react-hooks"; +import { QUERY_INTAKE_CHECKLIST } from "../../graphql/bodyshop.queries"; +import { selectBodyshop } from "../../redux/user/user.selectors"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { useParams } from "react-router-dom"; +import AlertComponent from "../../components/alert/alert.component"; +import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; +import { useTranslation } from "react-i18next"; +import { setBreadcrumbs } from "../../redux/application/application.actions"; +import JobIntakeComponent from "../../components/job-intake/job-intake.component"; + +const mapStateToProps = createStructuredSelector({ + //currentUser: selectCurrentUser + bodyshop: selectBodyshop, +}); +const mapDispatchToProps = (dispatch) => ({ + setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), +}); + +export function JobsIntakeContainer({ bodyshop, setBreadcrumbs }) { + const { t } = useTranslation(); + const { loading, error, data } = useQuery(QUERY_INTAKE_CHECKLIST, { + variables: { shopId: bodyshop.id }, + }); + const { jobId } = useParams(); + + useEffect(() => { + document.title = t("titles.jobs-intake"); + setBreadcrumbs([ + { link: "/manage/jobs", label: t("titles.bc.jobs") }, + { + link: `/manage/jobs/${jobId}`, + label: t("titles.bc.jobs-detail", { number: "TODO" }), + }, + { + link: `/manage/jobs/${jobId}/intake`, + label: t("titles.bc.jobs-intake"), + }, + ]); + }, [t, setBreadcrumbs, jobId]); + + if (loading) return ; + if (error) return ; + // if (data && !!!data.bodyshops_by_pk.intakechecklist) + // return ( + // + // ); + return ( +
    + +
    + ); +} + +export default connect( + mapStateToProps, + mapDispatchToProps +)(JobsIntakeContainer); + +const testConfig = { + form: [ + { + name: "item1", + label: "Checklist Item 1", + required: true, + type: "checkbox", + }, + { + name: "item2", + label: "Checklist Item 2", + required: true, + type: "checkbox", + }, + { + name: "item3", + label: "Checklist Item 3", + required: true, + type: "checkbox", + }, + { + name: "item4", + label: "Checklist Item 4", + required: true, + type: "checkbox", + }, + ], + templates: ["estimate_detail", "estimate_detail2"], +}; diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index efe4e97be..6e519d12e 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -85,6 +85,9 @@ const ProductionBoardPage = lazy(() => const ShopTemplates = lazy(() => import("../shop-templates/shop-templates.container") ); +const JobIntake = lazy(() => + import("../jobs-intake/jobs-intake.page.container") +); const { Header, Content, Footer } = Layout; export default function Manage({ match }) { @@ -116,14 +119,19 @@ export default function Manage({ match }) { + + @@ -188,7 +196,6 @@ export default function Manage({ match }) { path={`${match.path}/vehicles/:vehId`} component={VehiclesDetailContainer} /> - - { + try { + var newWin = window.open("", "_blank", "toolbar=0,location=0,menubar=0"); + newWin.document.write(html); + + setTimeout(function () { + newWin.document.close(); + newWin.focus(); + newWin.print(); + newWin.close(); + }, 500); + } catch (error) { + console.log("Unable to write to new window.", error); + } +}; diff --git a/client/src/utils/constants.js b/client/src/utils/TemplateConstants.js similarity index 85% rename from client/src/utils/constants.js rename to client/src/utils/TemplateConstants.js index 44d936386..1ed21df4d 100644 --- a/client/src/utils/constants.js +++ b/client/src/utils/TemplateConstants.js @@ -14,9 +14,9 @@ export const TemplateList = { description: "Parts order template including part details", drivingId: "Parts order Id", }, - test_Template: { - title: "Test", - description: "Test - does nto exist.", + estimate_detail: { + title: "Estimate Detail Lines", + description: "Est Detail", drivingId: "test does not exist.", }, }; diff --git a/client/templates/estimate_detail/estimate_detail.query.gql b/client/templates/estimate_detail/estimate_detail.query.gql new file mode 100644 index 000000000..f0a2d7657 --- /dev/null +++ b/client/templates/estimate_detail/estimate_detail.query.gql @@ -0,0 +1,32 @@ +query TEMPLATE_ESTIMATE_DETAIL($id: uuid!) { + jobs_by_pk(id: $id) { + csr + ded_amt + ded_status + id + ownr_co_nm + ownr_ln + ownr_fn + plate_no + plate_st + ro_number + regie_number + tlos_ind + v_color + v_make_desc + v_model_desc + v_model_yr + v_vin + clm_no + joblines(order_by: { line_no: asc }) { + id + mod_lbr_ty + mod_lb_hrs + part_qty + oem_partno + op_code_desc + line_desc + line_no + } + } +} diff --git a/client/templates/estimate_detail/estimate_detail.template.html b/client/templates/estimate_detail/estimate_detail.template.html new file mode 100644 index 000000000..e30a11457 --- /dev/null +++ b/client/templates/estimate_detail/estimate_detail.template.html @@ -0,0 +1,87 @@ +
    +

    + Job Detail Summary +

    + + + + + + + + +
    + Owner: {{jobs_by_pk.ownr_fn}} {{jobs_by_pk.ownr_ln}} + {{jobs_by_pk.ownr_co_nm}} + + Vehicle: {{jobs_by_pk.v_model_yr}} + {{jobs_by_pk.v_color}}{{jobs_by_pk.v_make_desc}} + {{jobs_by_pk.v_model_desc}} + +

    + Claim Number: {{jobs_by_pk.clm_no}}
    Regie Number:</strong > {{jobs_by_pk.regie_number}} + +

    +

    + Deductible: {{jobs_by_pk.ded_amt}} + {{jobs_by_pk.ded_status}} +

    +
    +

    Job Lines

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Line No. + + Line Desc. + + OEM Part # + + Qty. + + Labor Type + + Hours +
    + {{#each jobs_by_pk.joblines}} +
    + {{this.line_no}} + + {{this.line_desc}} + + {{this.oem_partno}} + + {{this.part_qty}} + + {{this.mod_lbr_ty}} + + {{this.mod_lb_hrs}} +
    {{/each}}
    +
    diff --git a/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/down.yaml b/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/down.yaml new file mode 100644 index 000000000..5f6a8a89d --- /dev/null +++ b/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/down.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "intakechecklist"; + type: run_sql diff --git a/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/up.yaml b/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/up.yaml new file mode 100644 index 000000000..324c622c8 --- /dev/null +++ b/hasura/migrations/1589307600089_alter_table_public_bodyshops_add_column_intakechecklist/up.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "intakechecklist" jsonb NULL; + type: run_sql diff --git a/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..5cdd042d5 --- /dev/null +++ b/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,49 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - address1 + - address2 + - city + - country + - created_at + - email + - federal_tax_id + - id + - inhousevendorid + - insurance_vendor_id + - invoice_tax_rates + - logo_img_path + - md_order_statuses + - md_responsibility_centers + - md_ro_statuses + - messagingservicesid + - production_config + - region_config + - shopname + - shoprates + - state + - state_tax_id + - template_header + - textid + - updated_at + - zip_post + computed_fields: [] + filter: + associations: + bodyshop: + associations: + user: + authid: + _eq: X-Hasura-User-Id + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..24fcc62ed --- /dev/null +++ b/hasura/migrations/1589307611118_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,50 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - address1 + - address2 + - city + - country + - created_at + - email + - federal_tax_id + - id + - inhousevendorid + - insurance_vendor_id + - intakechecklist + - invoice_tax_rates + - logo_img_path + - md_order_statuses + - md_responsibility_centers + - md_ro_statuses + - messagingservicesid + - production_config + - region_config + - shopname + - shoprates + - state + - state_tax_id + - template_header + - textid + - updated_at + - zip_post + computed_fields: [] + filter: + associations: + bodyshop: + associations: + user: + authid: + _eq: X-Hasura-User-Id + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..529715952 --- /dev/null +++ b/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,47 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_update_permission +- args: + permission: + columns: + - address1 + - address2 + - city + - country + - created_at + - email + - federal_tax_id + - id + - inhousevendorid + - insurance_vendor_id + - invoice_tax_rates + - logo_img_path + - md_order_statuses + - md_responsibility_centers + - md_ro_statuses + - production_config + - shopname + - shoprates + - state + - state_tax_id + - updated_at + - zip_post + filter: + associations: + bodyshop: + associations: + user: + authid: + _eq: X-Hasura-User-Id + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: bodyshops + schema: public + type: create_update_permission diff --git a/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..477056eb1 --- /dev/null +++ b/hasura/migrations/1589307625647_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,48 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_update_permission +- args: + permission: + columns: + - address1 + - address2 + - city + - country + - created_at + - email + - federal_tax_id + - id + - inhousevendorid + - insurance_vendor_id + - intakechecklist + - invoice_tax_rates + - logo_img_path + - md_order_statuses + - md_responsibility_centers + - md_ro_statuses + - production_config + - shopname + - shoprates + - state + - state_tax_id + - updated_at + - zip_post + filter: + associations: + bodyshop: + associations: + user: + authid: + _eq: X-Hasura-User-Id + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: bodyshops + schema: public + type: create_update_permission diff --git a/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/down.yaml b/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/down.yaml new file mode 100644 index 000000000..425276ebd --- /dev/null +++ b/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/down.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" DROP COLUMN "intakechecklist"; + type: run_sql diff --git a/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/up.yaml b/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/up.yaml new file mode 100644 index 000000000..518e79a63 --- /dev/null +++ b/hasura/migrations/1589354344575_alter_table_public_jobs_add_column_intakechecklist/up.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."jobs" ADD COLUMN "intakechecklist" jsonb NULL; + type: run_sql diff --git a/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..f38c14033 --- /dev/null +++ b/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,255 @@ +- 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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 + - invoice_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..962088486 --- /dev/null +++ b/hasura/migrations/1589354360622_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,256 @@ +- 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..c5748c7d9 --- /dev/null +++ b/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,253 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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 + - invoice_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 diff --git a/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..5d889adc3 --- /dev/null +++ b/hasura/migrations/1589354371131_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,254 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 diff --git a/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..b7b713a69 --- /dev/null +++ b/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,255 @@ +- 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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 + - invoice_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..2cc028154 --- /dev/null +++ b/hasura/migrations/1589354381499_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,256 @@ +- 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 + - cieca_stl + - cieca_ttl + - ciecaid + - 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 + - depreciation_taxes + - 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_date + - job_totals + - 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_atp + - 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 + - statusid + - storage_payable + - tax_lbr_rt + - tax_levies_rt + - tax_paint_mat_rt + - tax_predis + - tax_prethr + - tax_pstthr + - 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 + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_update_permission diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml index 0fec3b3a3..435215782 100644 --- a/hasura/migrations/metadata.yaml +++ b/hasura/migrations/metadata.yaml @@ -440,6 +440,7 @@ tables: - id - inhousevendorid - insurance_vendor_id + - intakechecklist - invoice_tax_rates - logo_img_path - md_order_statuses @@ -477,6 +478,7 @@ tables: - id - inhousevendorid - insurance_vendor_id + - intakechecklist - invoice_tax_rates - logo_img_path - md_order_statuses @@ -1802,6 +1804,7 @@ tables: - insd_st - insd_title - insd_zip + - intakechecklist - invoice_date - job_totals - kmin @@ -2034,6 +2037,7 @@ tables: - insd_st - insd_title - insd_zip + - intakechecklist - invoice_date - job_totals - kmin @@ -2275,6 +2279,7 @@ tables: - insd_st - insd_title - insd_zip + - intakechecklist - invoice_date - job_totals - kmin