From b5e9c65aee6b83d44cdcd0068d844bd0420b818b Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 27 Jan 2020 16:20:33 -0800 Subject: [PATCH] Complete refactor of jobs detail screen. --- bodyshop_translations.babel | 327 +++++++++++++++++- client/src/App/App.css | 4 +- .../current-user-dropdown.component.jsx | 10 +- .../components/footer/footer.component.jsx | 5 +- .../components/header/header.component.jsx | 53 ++- .../job-lines.container.component.jsx | 3 +- .../job-tombstone/job-tombstone.component.jsx | 217 ------------ .../jobs-detail-header.component.jsx | 117 +++++++ .../note-upsert-modal.container.jsx | 4 +- client/src/graphql/jobs.queries.js | 54 +-- .../jobs-available.page.component.jsx | 9 + .../jobs-available.page.container.jsx | 10 + .../jobs-detail.page.component.jsx | 181 ++++++++++ .../jobs-detail.page.container.jsx | 77 ++++- .../pages/jobs-detail/jobs-detail.page.jsx | 80 ----- client/src/pages/manage/manage.page.jsx | 10 + client/src/translations/en_us/common.json | 21 +- client/src/translations/es/common.json | 21 +- client/src/translations/fr/common.json | 21 +- client/src/utils/CurrencyFormatter.jsx | 13 + .../down.yaml | 3 + .../up.yaml | 3 + .../down.yaml | 212 ++++++++++++ .../up.yaml | 213 ++++++++++++ .../down.yaml | 210 +++++++++++ .../up.yaml | 211 +++++++++++ .../down.yaml | 212 ++++++++++++ .../up.yaml | 213 ++++++++++++ .../down.yaml | 6 + .../up.yaml | 6 + .../down.yaml | 3 + .../up.yaml | 4 + .../down.yaml | 213 ++++++++++++ .../up.yaml | 214 ++++++++++++ .../down.yaml | 211 +++++++++++ .../up.yaml | 212 ++++++++++++ .../down.yaml | 213 ++++++++++++ .../up.yaml | 214 ++++++++++++ 38 files changed, 3409 insertions(+), 401 deletions(-) delete mode 100644 client/src/components/job-tombstone/job-tombstone.component.jsx create mode 100644 client/src/components/jobs-detail-header/jobs-detail-header.component.jsx create mode 100644 client/src/pages/jobs-available/jobs-available.page.component.jsx create mode 100644 client/src/pages/jobs-available/jobs-available.page.container.jsx create mode 100644 client/src/pages/jobs-detail/jobs-detail.page.component.jsx delete mode 100644 client/src/pages/jobs-detail/jobs-detail.page.jsx create mode 100644 client/src/utils/CurrencyFormatter.jsx create mode 100644 hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/down.yaml create mode 100644 hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/up.yaml create mode 100644 hasura/migrations/1580169357455_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169357455_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580169365397_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169365397_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580169373151_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169373151_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/down.yaml create mode 100644 hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/up.yaml create mode 100644 hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/down.yaml create mode 100644 hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/up.yaml create mode 100644 hasura/migrations/1580169609143_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169609143_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580169617954_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169617954_update_permission_user_public_table_jobs/up.yaml create mode 100644 hasura/migrations/1580169626079_update_permission_user_public_table_jobs/down.yaml create mode 100644 hasura/migrations/1580169626079_update_permission_user_public_table_jobs/up.yaml diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 8b29804b6..ee4afc6cf 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -804,6 +804,27 @@ + + customerowing + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + date_closed false @@ -1077,6 +1098,27 @@ + + repairtotal + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + ro_number false @@ -1161,6 +1203,48 @@ + + servicecar + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + specialcoveragepolicy + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + status false @@ -1713,6 +1797,247 @@ + + header + + + activejobs + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + availablejobs + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + home + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + jobs + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + + + jobsdetail + + + claimdetail + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + dates + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + financials + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + insurance + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + labor + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + partssublet + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + repairdata + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + profilesidebar @@ -1994,7 +2319,7 @@ successes - created + create false diff --git a/client/src/App/App.css b/client/src/App/App.css index a4b0e7a43..e497f630b 100644 --- a/client/src/App/App.css +++ b/client/src/App/App.css @@ -1,6 +1,6 @@ @import "~antd/dist/antd.css"; -.ant-layout-header { +/* .ant-layout-header { position: absolute; top: 0px; left: 0px; @@ -24,4 +24,4 @@ left: 0px; right: 0px; overflow: hidden; -} +} */ diff --git a/client/src/components/current-user-dropdown/current-user-dropdown.component.jsx b/client/src/components/current-user-dropdown/current-user-dropdown.component.jsx index d2bb617b3..5f23bca64 100644 --- a/client/src/components/current-user-dropdown/current-user-dropdown.component.jsx +++ b/client/src/components/current-user-dropdown/current-user-dropdown.component.jsx @@ -1,4 +1,4 @@ -import { useQuery, useApolloClient } from "@apollo/react-hooks"; +import { useApolloClient, useQuery } from "@apollo/react-hooks"; import { Avatar, Col, Dropdown, Icon, Menu, Row } from "antd"; import i18next from "i18next"; import React from "react"; @@ -52,7 +52,7 @@ export default function CurrentUserDropdown() { ); if (loading) return null; - if (error) return ; + if (error) return ; const { currentUser } = data; @@ -62,10 +62,8 @@ export default function CurrentUserDropdown() { - - - {currentUser?.displayName || t("general.labels.unknown")} - + + {currentUser.displayName || t("general.labels.unknown")} diff --git a/client/src/components/footer/footer.component.jsx b/client/src/components/footer/footer.component.jsx index 9061616ef..a8be82b23 100644 --- a/client/src/components/footer/footer.component.jsx +++ b/client/src/components/footer/footer.component.jsx @@ -1,6 +1,5 @@ -import React, { useState } from "react"; -import { Row, Col, Button } from "antd"; -import ChatWindowContainer from "../chat-window/chat-window.container"; +import { Col, Row } from "antd"; +import React from "react"; export default function FooterComponent() { return ( diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index d5f942178..217977bee 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -1,44 +1,65 @@ import { useApolloClient } from "@apollo/react-hooks"; import { Col, Icon, Menu, Row } from "antd"; import React from "react"; +import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; import CurrentUserDropdown from "../current-user-dropdown/current-user-dropdown.component"; import GlobalSearch from "../global-search/global-search.component"; import ManageSignInButton from "../manage-sign-in-button/manage-sign-in-button.component"; import "./header.styles.scss"; - export default ({ landingHeader, navItems, selectedNavItem }) => { const apolloClient = useApolloClient(); - + const { t } = useTranslation(); const handleClick = e => { apolloClient.writeData({ data: { selectedNavItem: e.key } }); }; return ( - + + mode='horizontal'> - {navItems.map(navItem => ( - - - {navItem.icontype ? : null} - {navItem.title} + + + + + {t("menus.header.home")} + + + + + + + {t("menus.header.activejobs")} - ))} + + + + {t("menus.header.availablejobs")} + + + - {!landingHeader ? ( - null - ) : ( + { + // navItems.map(navItem => ( + // + // + // {navItem.icontype ? : null} + // {navItem.title} + // + // + // )) + } + + {!landingHeader ? null : ( diff --git a/client/src/components/job-lines/job-lines.container.component.jsx b/client/src/components/job-lines/job-lines.container.component.jsx index c5f4a994a..70e74c7c5 100644 --- a/client/src/components/job-lines/job-lines.container.component.jsx +++ b/client/src/components/job-lines/job-lines.container.component.jsx @@ -5,8 +5,7 @@ import AlertComponent from "../../components/alert/alert.component"; import { GET_JOB_LINES_BY_PK } from "../../graphql/jobs-lines.queries"; -export default function JobLinesContainer({ match }) { - const { jobId } = match.params; +export default function JobLinesContainer({ jobId }) { const { loading, error, data } = useQuery(GET_JOB_LINES_BY_PK, { variables: { id: jobId }, diff --git a/client/src/components/job-tombstone/job-tombstone.component.jsx b/client/src/components/job-tombstone/job-tombstone.component.jsx deleted file mode 100644 index 0bb478743..000000000 --- a/client/src/components/job-tombstone/job-tombstone.component.jsx +++ /dev/null @@ -1,217 +0,0 @@ -import React, { useState } from "react"; -import { Link } from "react-router-dom"; -import AlertComponent from "../alert/alert.component"; -import { - Form, - Input, - Row, - Col, - Button, - Typography, - PageHeader, - Descriptions, - Tag, - notification, - Avatar, - Layout -} from "antd"; -import { UPDATE_JOB, CONVERT_JOB_TO_RO } from "../../graphql/jobs.queries"; -import { useMutation } from "@apollo/react-hooks"; -import FormItemPhone from "../form-items-formatted/phone-form-item.component"; -import { useTranslation } from "react-i18next"; -import CarImage from "../../assets/car.svg"; - -const { Content } = Layout; -const formItemLayout = { - // labelCol: { - // xs: { span: 12 }, - // sm: { span: 5 } - // }, - // wrapperCol: { - // xs: { span: 24 }, - // sm: { span: 12 } - // } -}; - -function JobTombstone({ job, ...otherProps }) { - const [jobContext, setJobContext] = useState(job); - const [mutationUpdateJob] = useMutation(UPDATE_JOB); - const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO); - const { t } = useTranslation(); - - if (!job) { - return ; - } - - const handleSubmit = e => { - e.preventDefault(); - - otherProps.form.validateFieldsAndScroll((err, values) => { - if (err) { - notification["error"]({ - message: t("jobs.errors.validationtitle"), - description: t("jobs.errors.validation") - }); - } - if (!err) { - mutationUpdateJob({ - variables: { jobId: jobContext.id, job: values } - }).then(r => - notification["success"]({ - message: t("jobs.successes.savetitle") - }) - ); - } - }); - }; - - const handleChange = event => { - const { name, value } = event.target ? event.target : event; - setJobContext({ ...jobContext, [name]: value }); - }; - - const { getFieldDecorator } = otherProps.form; - - const tombstoneTitle = ( -
- - {`${t("jobs.fields.ro_number")} ${ - jobContext.ro_number ? jobContext.ro_number : t("general.labels.na") - }`} -
- ); - - return ( - -
- - {jobContext.job_status ? ( - {jobContext.job_status.name} - ) : null} - - } - extra={[ - , - - ]}> - - - - {jobContext.vehicle?.v_model_yr || t("general.labels.na")}{" "} - {jobContext.vehicle?.v_make_desc || t("general.labels.na")}{" "} - {jobContext.vehicle?.v_model_desc || t("general.labels.na")} |{" "} - {jobContext.vehicle?.plate_no || t("general.labels.na")} - - - - - {jobContext.est_number} - - - - $ {jobContext.claim_total?.toFixed(2)} - - - - $ {jobContext.deductible?.toFixed(2)} - - - - - - Information - { - // - // {getFieldDecorator("est_number", { - // initialValue: jobContext.est_number - // })()} - // - } - - - - Insurance Information - - {getFieldDecorator("est_co_nm", { - initialValue: jobContext.est_co_nm - })()} - - - - {getFieldDecorator("est_ct_ln", { - initialValue: jobContext.est_ct_ln - })()} - - - {getFieldDecorator("est_ct_fn", { - initialValue: jobContext.est_ct_fn - })()} - - - - - {getFieldDecorator("est_ph1", { - initialValue: jobContext.est_ph1 - })( - - )} - - - {getFieldDecorator("est_ea", { - initialValue: jobContext.est_ea, - rules: [ - { - type: "email", - message: "This is not a valid email address." - } - ] - })()} - - - -
-
- ); -} - -export default Form.create({ name: "JobTombstone" })(JobTombstone); diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx new file mode 100644 index 000000000..82d420c6c --- /dev/null +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -0,0 +1,117 @@ +import { + Avatar, + Button, + Descriptions, + notification, + PageHeader, + Tag, + Input, + Form, + Checkbox +} from "antd"; +import React from "react"; +import { useTranslation } from "react-i18next"; +import Moment from "react-moment"; +import { Link } from "react-router-dom"; +import CarImage from "../../assets/car.svg"; +import CurrencyFormatter from "../../utils/CurrencyFormatter"; + +export default function JobsDetailHeader({ + job, + mutationConvertJob, + refetch, + getFieldDecorator +}) { + const { t } = useTranslation(); + + const tombstoneTitle = ( +
+ + {`${t("jobs.fields.ro_number")} ${ + job.ro_number ? job.ro_number : t("general.labels.na") + }`} +
+ ); + + const tombstoneSubtitle = ( +
+ {job.owner + ? (job.owner.first_name || "") + " " + (job.owner.last_name || "") + : t("jobs.errors.noowner")} + + {job.vehicle ? ( + + {job.vehicle.v_model_yr || t("general.labels.na")}{" "} + {job.vehicle.v_make_desc || t("general.labels.na")}{" "} + {job.vehicle.v_model_desc || t("general.labels.na")} |{" "} + {job.vehicle.plate_no || t("general.labels.na")} |{" "} + {job.vehicle.v_vin || t("general.labels.na")} + + ) : null} +
+ ); + + const menuExtra = [ + , + + ]; + + return ( + + {job.job_status ? ( + {job.job_status.name} + ) : null} + + } + extra={menuExtra}> + + + {job.claim_total} + + + + $NO BINDING YET + + + + + + + + {job.scheduled_completion ? ( + {job.scheduled_completion} + ) : null} + + + + {job.service_car} + + + + ); +} diff --git a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx index 79287a033..ba7e46422 100644 --- a/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx +++ b/client/src/components/note-upsert-modal/note-upsert-modal.container.jsx @@ -37,12 +37,12 @@ export default function NoteUpsertModalContainer({ ] } }).then(r => { + refetch(); + changeVisibility(!visible); notification["success"]({ message: t("notes.successes.create") }); }); - refetch(); - changeVisibility(!visible); }; const updateExistingNote = () => { diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index c70285e9b..33f56e24b 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -1,32 +1,5 @@ import { gql } from "apollo-boost"; -export const GET_ALL_OPEN_JOBS = gql` - query GET_ALL_OPEN_JOBS { - jobs { - id - est_number - ro_number - job_status { - id - name - } - scheduled_completion - scheduled_delivery - vehicle { - id - v_model_yr - v_make_desc - v_model_desc - plate_no - } - owner { - first_name - last_name - } - } - } -`; - export const QUERY_ALL_OPEN_JOBS = gql` query QUERY_ALL_OPEN_JOBS { jobs { @@ -89,30 +62,6 @@ export const QUERY_ALL_OPEN_JOBS = gql` } `; -export const QUERY_JOBS_IN_PRODUCTION = gql` - query QUERY_JOBS_IN_PRODUCTION { - jobs { - id - updated_at - est_number - ro_number - scheduled_completion - scheduled_delivery - vehicle { - id - v_model_yr - v_make_desc - v_model_desc - plate_no - } - owner { - first_name - last_name - } - } - } -`; - export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql` subscription SUBSCRIPTION_JOBS_IN_PRODUCTION { job_status( @@ -149,6 +98,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql` export const GET_JOB_BY_PK = gql` query GET_JOB_BY_PK($id: uuid!) { jobs_by_pk(id: $id) { + converted actual_completion actual_delivery actual_in @@ -171,6 +121,8 @@ export const GET_JOB_BY_PK = gql` ro_number scheduled_completion scheduled_in + service_car + special_coverage_policy scheduled_delivery job_status { id diff --git a/client/src/pages/jobs-available/jobs-available.page.component.jsx b/client/src/pages/jobs-available/jobs-available.page.component.jsx new file mode 100644 index 000000000..9dc5b81fe --- /dev/null +++ b/client/src/pages/jobs-available/jobs-available.page.component.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +export default function JobsAvailablePageComponent() { + return ( +
+ JobsAvailablePageComponent +
+ ) +} diff --git a/client/src/pages/jobs-available/jobs-available.page.container.jsx b/client/src/pages/jobs-available/jobs-available.page.container.jsx new file mode 100644 index 000000000..6a146ea6a --- /dev/null +++ b/client/src/pages/jobs-available/jobs-available.page.container.jsx @@ -0,0 +1,10 @@ +import React from 'react' +import JobsAvailablePageComponent from './jobs-available.page.component' + +export default function JobsAvailablePageContainer() { + return ( +
+ +
+ ) +} diff --git a/client/src/pages/jobs-detail/jobs-detail.page.component.jsx b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx new file mode 100644 index 000000000..7e3afddd3 --- /dev/null +++ b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx @@ -0,0 +1,181 @@ +import { Form, Icon, Tabs } from "antd"; +import React from "react"; +import { useTranslation } from "react-i18next"; +import { FaRegStickyNote } from "react-icons/fa"; +import JobLinesContainer from "../../components/job-lines/job-lines.container.component"; +import JobsDetailHeader from "../../components/jobs-detail-header/jobs-detail-header.component"; +import JobsDocumentsContainer from "../../components/jobs-documents/jobs-documents.container"; +import JobNotesContainer from "../../components/jobs-notes/jobs-notes.container"; +import JobsRatesContainer from "../../components/jobs-rates/jobs-rates.container"; + +export default function JobsDetailPage({ + job, + mutationUpdateJob, + mutationConvertJob, + handleSubmit, + handleChange, + getFieldDecorator, + refetch +}) { + const { t } = useTranslation(); + + const formItemLayout = { + labelCol: { + xs: { span: 12 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 12 } + } + }; + + // const TEMP = ( + //
+ // {" "} + // + // {getFieldDecorator("est_ct_ln", { + // initialValue: jobContext.est_ct_ln + // })()} + // + // + // {getFieldDecorator("est_ct_fn", { + // initialValue: jobContext.est_ct_fn + // })()} + // + // + // {getFieldDecorator("est_ph1", { + // initialValue: jobContext.est_ph1 + // })( + // + // )} + // + // + // {getFieldDecorator("est_ea", { + // initialValue: jobContext.est_ea, + // rules: [ + // { + // type: "email", + // message: "This is not a valid email address." + // } + // ] + // })()} + // + //
+ // ); + + return ( +
+ + + + + + {t("menus.jobsdetail.claimdetail")} + + } + key='claimdetail'> + Claim detail + + + + + {t("menus.jobsdetail.insurance")} + + } + key='insurance'> + Insurance + + + + + {t("menus.jobsdetail.repairdata")} + + } + key='repairdata'> + + + + + + {t("menus.jobsdetail.financials")} + + } + key='financials'> + + + + + + {t("menus.jobsdetail.partssublet")} + + } + key='partssublet'> + Partssublet + + + + + {t("menus.jobsdetail.labor")} + + } + key='labor'> + Labor + + + + + {t("menus.jobsdetail.dates")} + + } + key='dates'> + Dates + + + + + {t("jobs.labels.documents")} + + } + key='#documents'> + + + + + {t("jobs.labels.notes")} + + } + key='#notes'> + + + + + ); +} diff --git a/client/src/pages/jobs-detail/jobs-detail.page.container.jsx b/client/src/pages/jobs-detail/jobs-detail.page.container.jsx index 9b6cc6f3f..3d6691f66 100644 --- a/client/src/pages/jobs-detail/jobs-detail.page.container.jsx +++ b/client/src/pages/jobs-detail/jobs-detail.page.container.jsx @@ -1,38 +1,79 @@ -import { useQuery } from "@apollo/react-hooks"; +import { Form, notification } from "antd"; import React, { useEffect } from "react"; +import { useMutation, useQuery } from "react-apollo"; import { useTranslation } from "react-i18next"; import AlertComponent from "../../components/alert/alert.component"; import SpinComponent from "../../components/loading-spinner/loading-spinner.component"; -import { GET_JOB_BY_PK } from "../../graphql/jobs.queries"; -import JobsDetailPage from "./jobs-detail.page"; +import { + GET_JOB_BY_PK, + UPDATE_JOB, + CONVERT_JOB_TO_RO +} from "../../graphql/jobs.queries"; +import JobsDetailPage from "./jobs-detail.page.component"; -function JobsDetailPageContainer({ match, location }) { +function JobsDetailPageContainer({ match, form }) { const { jobId } = match.params; - const { hash } = location; const { t } = useTranslation(); - const { loading, error, data } = useQuery(GET_JOB_BY_PK, { + + const { loading, error, data, refetch } = useQuery(GET_JOB_BY_PK, { variables: { id: jobId }, fetchPolicy: "network-only" }); + const [mutationUpdateJob] = useMutation(UPDATE_JOB); + const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO); useEffect(() => { - document.title = loading - ? "..." - : t("titles.jobsdetail", { - ro_number: data.jobs_by_pk.ro_number + document.title = + loading && !error + ? "..." + : t("titles.jobsdetail", { + ro_number: data.jobs_by_pk.ro_number + }); + }, [loading, data, t, error]); + + const handleSubmit = e => { + e.preventDefault(); + + form.validateFieldsAndScroll((err, values) => { + if (err) { + notification["error"]({ + message: t("jobs.errors.validationtitle"), + description: t("jobs.errors.validation") }); - }, [loading, data, t]); + } + if (!err) { + mutationUpdateJob({ + variables: { jobId: data.jobs_by_pk.id, job: values } + }).then(r => + notification["success"]({ + message: t("jobs.successes.savetitle") + }) + ); + } + }); + }; + + const handleChange = event => { + //const { name, value } = event.target ? event.target : event; + //setJobContext({ ...jobContext, [name]: value }); + }; if (loading) return ; if (error) return ; - - return ( + return data.jobs_by_pk ? ( + ) : ( + ); } -export default JobsDetailPageContainer; +export default Form.create({ name: "JobsDetailPageContainer" })( + JobsDetailPageContainer +); diff --git a/client/src/pages/jobs-detail/jobs-detail.page.jsx b/client/src/pages/jobs-detail/jobs-detail.page.jsx deleted file mode 100644 index ecc689b03..000000000 --- a/client/src/pages/jobs-detail/jobs-detail.page.jsx +++ /dev/null @@ -1,80 +0,0 @@ -import { Icon, Row, Tabs } from "antd"; -import React from "react"; -import { useTranslation } from "react-i18next"; -import { FaRegStickyNote } from "react-icons/fa"; -import { withRouter } from "react-router-dom"; -import JobLinesContainer from "../../components/job-lines/job-lines.container.component"; -import JobTombstone from "../../components/job-tombstone/job-tombstone.component"; -import JobsDocumentsContainer from "../../components/jobs-documents/jobs-documents.container"; -import JobNotesContainer from "../../components/jobs-notes/jobs-notes.container"; -import JobsRatesContainer from "../../components/jobs-rates/jobs-rates.container"; - -function JobsDetailPage({ jobId, hash, data, match, history }) { - const { t } = useTranslation(); - return ( -
- - - - - { - history.push(p); - }}> - - - {t("jobs.labels.lines")} - - } - key='#lines'> - - - - - {t("jobs.labels.rates")} - - } - key='#rates'> - - - - - {t("jobs.labels.parts")} - - } - key='#parts'> - Estimate Parts - - - - {t("jobs.labels.documents")} - - } - key='#documents'> - - - - - {t("jobs.labels.notes")} - - } - key='#notes'> - - - - -
- ); -} -export default withRouter(JobsDetailPage); diff --git a/client/src/pages/manage/manage.page.jsx b/client/src/pages/manage/manage.page.jsx index 9e450f058..93245792f 100644 --- a/client/src/pages/manage/manage.page.jsx +++ b/client/src/pages/manage/manage.page.jsx @@ -20,6 +20,9 @@ const ProfilePage = lazy(() => import("../profile/profile.container.page")); const JobsDocumentsPage = lazy(() => import("../../components/jobs-documents/jobs-documents.container") ); +const JobsAvailablePage = lazy(() => + import("../jobs-available/jobs-available.page.container") +); const { Header, Content, Footer } = Layout; //This page will handle all routing for the entire application. @@ -43,6 +46,7 @@ export default function Manage({ match }) { + + + diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index a657b41eb..8584f8721 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -55,6 +55,7 @@ "claim_total": "Claim Total", "clm_no": "Claim #", "clm_total": "Claim Total", + "customerowing": "Customer Owing", "date_closed": "Closed", "date_estimated": "Date Estimated", "date_exported": "Exported", @@ -68,10 +69,13 @@ "ownr_ea": "Email", "phone1": "Phone 1", "phoneshort": "PH", + "repairtotal": "Repair Total", "ro_number": "RO #", "scheduled_completion": "Scheduled Completion", "scheduled_delivery": "Scheduled Delivery", "scheduled_in": "Scheduled In", + "servicecar": "Service Car", + "specialcoveragepolicy": "Special Coverage Policy", "status": "Job Status", "vehicle": "Vehicle" }, @@ -108,6 +112,21 @@ "languageselector": "Language", "profile": "Profile" }, + "header": { + "activejobs": "Active Jobs", + "availablejobs": "Available Jobs", + "home": "Home", + "jobs": "Jobs" + }, + "jobsdetail": { + "claimdetail": "Claim Details", + "dates": "Dates", + "financials": "Financials", + "insurance": "Insurance", + "labor": "Labor", + "partssublet": "Parts/Sublet", + "repairdata": "Repair Data" + }, "profilesidebar": { "profile": "My Profile", "shops": "My Shops" @@ -131,7 +150,7 @@ "newnoteplaceholder": "Add a note..." }, "successes": { - "created": "Note created successfully.", + "create": "Note created successfully.", "deleted": "Note deleted successfully.", "updated": "Note updated successfully." } diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index c102ca788..869653e41 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -55,6 +55,7 @@ "claim_total": "Reclamar total", "clm_no": "Reclamación #", "clm_total": "Reclamar total", + "customerowing": "Cliente debido", "date_closed": "Cerrado", "date_estimated": "Fecha estimada", "date_exported": "Exportado", @@ -68,10 +69,13 @@ "ownr_ea": "Email", "phone1": "Teléfono 1", "phoneshort": "PH", + "repairtotal": "Reparación total", "ro_number": "RO #", "scheduled_completion": "Finalización programada", "scheduled_delivery": "Entrega programada", "scheduled_in": "Programado en", + "servicecar": "Auto de servicio", + "specialcoveragepolicy": "Política de cobertura especial", "status": "Estado del trabajo", "vehicle": "Vehículo" }, @@ -108,6 +112,21 @@ "languageselector": "idioma", "profile": "Perfil" }, + "header": { + "activejobs": "Empleos activos", + "availablejobs": "Trabajos disponibles", + "home": "Casa", + "jobs": "Trabajos" + }, + "jobsdetail": { + "claimdetail": "Detalles de la reclamación", + "dates": "fechas", + "financials": "finanzas", + "insurance": "Seguro", + "labor": "Labor", + "partssublet": "Piezas / Subarrendamiento", + "repairdata": "Datos de reparación" + }, "profilesidebar": { "profile": "Mi perfil", "shops": "Mis tiendas" @@ -131,7 +150,7 @@ "newnoteplaceholder": "Agrega una nota..." }, "successes": { - "created": "Nota creada con éxito.", + "create": "Nota creada con éxito.", "deleted": "Nota eliminada con éxito.", "updated": "Nota actualizada con éxito." } diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index bca75b8ae..f067a76a3 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -55,6 +55,7 @@ "claim_total": "Total réclamation", "clm_no": "Prétendre #", "clm_total": "Total réclamation", + "customerowing": "Client propriétaire", "date_closed": "Fermé", "date_estimated": "Date estimée", "date_exported": "Exportés", @@ -68,10 +69,13 @@ "ownr_ea": "Email", "phone1": "Téléphone 1", "phoneshort": "PH", + "repairtotal": "Réparation totale", "ro_number": "RO #", "scheduled_completion": "Achèvement planifié", "scheduled_delivery": "Livraison programmée", "scheduled_in": "Planifié dans", + "servicecar": "Voiture de service", + "specialcoveragepolicy": "Politique de couverture spéciale", "status": "Statut de l'emploi", "vehicle": "Véhicule" }, @@ -108,6 +112,21 @@ "languageselector": "La langue", "profile": "Profil" }, + "header": { + "activejobs": "Emplois actifs", + "availablejobs": "Emplois disponibles", + "home": "Accueil", + "jobs": "Emplois" + }, + "jobsdetail": { + "claimdetail": "Détails de la réclamation", + "dates": "Rendez-vous", + "financials": "Financiers", + "insurance": "Assurance", + "labor": "La main d'oeuvre", + "partssublet": "Pièces / Sous-location", + "repairdata": "Données de réparation" + }, "profilesidebar": { "profile": "Mon profil", "shops": "Mes boutiques" @@ -131,7 +150,7 @@ "newnoteplaceholder": "Ajouter une note..." }, "successes": { - "created": "Remarque créée avec succès.", + "create": "Remarque créée avec succès.", "deleted": "Remarque supprimée avec succès.", "updated": "Remarque mise à jour avec succès." } diff --git a/client/src/utils/CurrencyFormatter.jsx b/client/src/utils/CurrencyFormatter.jsx new file mode 100644 index 000000000..083c2cf70 --- /dev/null +++ b/client/src/utils/CurrencyFormatter.jsx @@ -0,0 +1,13 @@ +import React from "react"; +import NumberFormat from "react-number-format"; + +export default function CurrencyFormatter(props) { + return ( + + ); +} diff --git a/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/down.yaml b/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/down.yaml new file mode 100644 index 000000000..0af0647d9 --- /dev/null +++ b/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" DROP COLUMN "service_Car"; + type: run_sql diff --git a/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/up.yaml b/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/up.yaml new file mode 100644 index 000000000..c0dcd1261 --- /dev/null +++ b/hasura/migrations/1580169338033_alter_table_public_jobs_add_column_service_Car/up.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" ADD COLUMN "service_Car" text NULL; + type: run_sql diff --git a/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..cdb202414 --- /dev/null +++ b/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,212 @@ +- 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 + - 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 + - ciecaid + - claim_total + - 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 + - cust_pr + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - ded_amt + - ded_status + - deductible + - 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 + - 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 + - labor_rate_desc + - labor_rate_id + - local_tax_rate + - loss_cat + - loss_date + - loss_desc + - loss_type + - 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 + - pay_amt + - pay_chknm + - pay_date + - pay_type + - payee_nms + - policy_no + - 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 + - regie_number + - ro_number + - scheduled_completion + - scheduled_delivery + - scheduled_in + - shopid + - state_tax_rate + - statusid + - theft_ind + - tlos_ind + - updated_at + - vehicleid + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..8a6eca121 --- /dev/null +++ b/hasura/migrations/1580169357455_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,213 @@ +- 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 + - 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 + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_Car + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..915f8c6b9 --- /dev/null +++ b/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,210 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..5f1089b37 --- /dev/null +++ b/hasura/migrations/1580169365397_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,211 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - service_Car + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..a1c550dec --- /dev/null +++ b/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,212 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..4f2b760c0 --- /dev/null +++ b/hasura/migrations/1580169373151_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,213 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - service_Car + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/down.yaml b/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/down.yaml new file mode 100644 index 000000000..f39fc6f03 --- /dev/null +++ b/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/down.yaml @@ -0,0 +1,6 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."service_Car" IS E'null' + type: run_sql +- args: + sql: alter table "public"."jobs" rename column "service_car" to "service_Car"; + type: run_sql diff --git a/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/up.yaml b/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/up.yaml new file mode 100644 index 000000000..3321b91b3 --- /dev/null +++ b/hasura/migrations/1580169467694_alter_table_public_jobs_alter_column_service_Car/up.yaml @@ -0,0 +1,6 @@ +- args: + sql: COMMENT ON COLUMN "public"."jobs"."service_Car" IS E'' + type: run_sql +- args: + sql: alter table "public"."jobs" rename column "service_Car" to "service_car"; + type: run_sql diff --git a/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/down.yaml b/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/down.yaml new file mode 100644 index 000000000..d0660650b --- /dev/null +++ b/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/down.yaml @@ -0,0 +1,3 @@ +- args: + sql: ALTER TABLE "public"."jobs" DROP COLUMN "special_coverage_policy"; + type: run_sql diff --git a/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/up.yaml b/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/up.yaml new file mode 100644 index 000000000..353cc12bd --- /dev/null +++ b/hasura/migrations/1580169565651_alter_table_public_jobs_add_column_special_coverage_policy/up.yaml @@ -0,0 +1,4 @@ +- args: + sql: ALTER TABLE "public"."jobs" ADD COLUMN "special_coverage_policy" boolean + NOT NULL DEFAULT false; + type: run_sql diff --git a/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..3717c3ed4 --- /dev/null +++ b/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,213 @@ +- 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 + - 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 + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_car + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..0e582a2c4 --- /dev/null +++ b/hasura/migrations/1580169609143_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,214 @@ +- 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 + - 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 + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_car + - special_coverage_policy + localPresets: + - key: "" + value: "" + set: {} + role: user + table: + name: jobs + schema: public + type: create_insert_permission diff --git a/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..c4be28150 --- /dev/null +++ b/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,211 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - service_car + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..cb7febe8c --- /dev/null +++ b/hasura/migrations/1580169617954_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,212 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - id + - created_at + - updated_at + - shopid + - 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 + - ins_co_id + - ins_co_nm + - ins_addr1 + - ins_addr2 + - ins_city + - ins_st + - ins_zip + - ins_ctry + - ins_ph1 + - ins_ph1x + - ins_ph2 + - ins_ph2x + - ins_fax + - ins_faxx + - ins_ct_ln + - ins_ct_fn + - ins_title + - ins_ct_ph + - ins_ct_phx + - ins_ea + - ins_memo + - policy_no + - ded_amt + - ded_status + - asgn_no + - asgn_date + - asgn_type + - clm_no + - clm_ofc_id + - date_estimated + - date_open + - date_scheduled + - date_invoiced + - date_closed + - date_exported + - clm_total + - owner_owing + - converted + - ciecaid + - loss_date + - clm_ofc_nm + - clm_addr1 + - clm_addr2 + - clm_city + - clm_st + - clm_zip + - clm_ctry + - clm_ph1 + - clm_ph1x + - clm_ph2 + - clm_ph2x + - clm_fax + - clm_faxx + - clm_ct_ln + - clm_ct_fn + - clm_title + - clm_ct_ph + - clm_ct_phx + - clm_ea + - payee_nms + - pay_type + - pay_date + - pay_chknm + - pay_amt + - agt_co_id + - agt_co_nm + - agt_addr1 + - agt_addr2 + - agt_city + - agt_st + - agt_zip + - agt_ctry + - agt_ph1 + - agt_ph1x + - agt_ph2 + - agt_ph2x + - agt_fax + - agt_faxx + - agt_ct_ln + - agt_ct_fn + - agt_ct_ph + - agt_ct_phx + - agt_ea + - agt_lic_no + - loss_type + - loss_desc + - theft_ind + - cat_no + - tlos_ind + - cust_pr + - insd_ln + - insd_fn + - insd_title + - insd_co_nm + - insd_addr1 + - insd_addr2 + - insd_city + - insd_st + - insd_zip + - insd_ctry + - insd_ph1 + - insd_ph1x + - insd_ph2 + - insd_ph2x + - insd_fax + - insd_faxx + - insd_ea + - ownr_ln + - ownr_fn + - ownr_title + - ownr_co_nm + - ownr_addr1 + - ownr_addr2 + - ownr_city + - ownr_st + - ownr_zip + - ownr_ctry + - ownr_ph1 + - ownr_ph1x + - ownr_ph2 + - ownr_ph2x + - ownr_fax + - ownr_faxx + - ownr_ea + - area_of_damage + - loss_cat + - est_number + - service_car + - special_coverage_policy + 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/1580169626079_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580169626079_update_permission_user_public_table_jobs/down.yaml new file mode 100644 index 000000000..c66a2d708 --- /dev/null +++ b/hasura/migrations/1580169626079_update_permission_user_public_table_jobs/down.yaml @@ -0,0 +1,213 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - service_car + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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 diff --git a/hasura/migrations/1580169626079_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580169626079_update_permission_user_public_table_jobs/up.yaml new file mode 100644 index 000000000..0d44decf8 --- /dev/null +++ b/hasura/migrations/1580169626079_update_permission_user_public_table_jobs/up.yaml @@ -0,0 +1,214 @@ +- args: + role: user + table: + name: jobs + schema: public + type: drop_update_permission +- args: + permission: + columns: + - converted + - inproduction + - special_coverage_policy + - asgn_date + - invoice_date + - loss_date + - pay_date + - est_number + - area_of_damage + - claim_total + - clm_total + - ded_amt + - deductible + - federal_tax_rate + - local_tax_rate + - owner_owing + - pay_amt + - 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 + - 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 + - asgn_no + - asgn_type + - cat_no + - 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_zip + - cust_pr + - ded_status + - 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 + - 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 + - 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 + - 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 + - loss_cat + - loss_desc + - loss_type + - 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 + - pay_chknm + - payee_nms + - pay_type + - policy_no + - regie_number + - ro_number + - service_car + - theft_ind + - tlos_ind + - actual_completion + - actual_delivery + - actual_in + - created_at + - date_closed + - date_estimated + - date_exported + - date_invoiced + - date_open + - date_scheduled + - scheduled_completion + - scheduled_delivery + - scheduled_in + - 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