console.log("event", event)}
+ components={{
+ event: Event,
+ dateCellWrapper: DateCellWrapper
+ }}
+ />
+ );
+}
diff --git a/client/src/components/schedule-calendar/schedule-calendar.container.jsx b/client/src/components/schedule-calendar/schedule-calendar.container.jsx
new file mode 100644
index 000000000..b0e38bba6
--- /dev/null
+++ b/client/src/components/schedule-calendar/schedule-calendar.container.jsx
@@ -0,0 +1,31 @@
+import React from "react";
+import { useQuery } from "react-apollo";
+import ScheduleCalendarComponent from "./schedule-calendar.component";
+import { QUERY_ALL_APPOINTMENTS } from "../../graphql/appointments.queries";
+import LoadingSpinner from "../loading-spinner/loading-spinner.component";
+import AlertComponent from "../alert/alert.component";
+
+export default function ScheduleCalendarContainer() {
+ const { loading, error, data, refetch } = useQuery(QUERY_ALL_APPOINTMENTS, {
+ fetchPolicy: "network-only"
+ });
+
+ if (loading) return ;
+ if (error) return ;
+ let normalizedData = data.appointments.map(e => {
+ //Required becuase Hasura returns a string instead of a date object.
+ return Object.assign(
+ {},
+ e,
+ { start: new Date(e.start) },
+ { end: new Date(e.end) }
+ );
+ });
+
+ return (
+
+ );
+}
diff --git a/client/src/components/schedule-datecellwrapper/schedule-datecellwrapper.component.jsx b/client/src/components/schedule-datecellwrapper/schedule-datecellwrapper.component.jsx
new file mode 100644
index 000000000..9cf39f1bf
--- /dev/null
+++ b/client/src/components/schedule-datecellwrapper/schedule-datecellwrapper.component.jsx
@@ -0,0 +1,24 @@
+import React from "react";
+
+export default function ScheduleDateCellWrapper(dateCellWrapperProps) {
+ // Show 'click me' text in arbitrary places by using the range prop
+ const hasAlert = dateCellWrapperProps.range
+ ? dateCellWrapperProps.range.some(date => {
+ return date.getDate() % 12 === 0;
+ })
+ : false;
+
+ const style = {
+ display: "flex",
+ flex: 1,
+ borderLeft: "1px solid #DDD",
+ backgroundColor: hasAlert ? "#f5f5dc" : "#fff"
+ };
+ return (
+
+ DateCellWrapper
+ {hasAlert && }
+ {dateCellWrapperProps.children}
+
+ );
+}
diff --git a/client/src/components/schedule-event/schedule-event.component.js b/client/src/components/schedule-event/schedule-event.component.js
new file mode 100644
index 000000000..32eee1978
--- /dev/null
+++ b/client/src/components/schedule-event/schedule-event.component.js
@@ -0,0 +1,25 @@
+import React from "react";
+import { Popover, Button } from "antd";
+import CurrencyFormatter from "../../utils/CurrencyFormatter";
+import { Link } from "react-router-dom";
+
+export default function Event({ event }) {
+ const popoverContent = (
+
+ Job Total: {event.job.clm_total}
+
+
+
+
+ );
+
+ return (
+
+ {`${event.job.ownr_fn || ""} ${event.job.ownr_ln || ""}`}
+
+ {`${event.job.vehicle.v_model_yr || ""} ${event.job.vehicle
+ .v_make_desc || ""} ${event.job.vehicle.v_model_desc || ""}`}
+
+
+ );
+}
diff --git a/client/src/graphql/appointments.queries.js b/client/src/graphql/appointments.queries.js
new file mode 100644
index 000000000..17e7144b9
--- /dev/null
+++ b/client/src/graphql/appointments.queries.js
@@ -0,0 +1,24 @@
+import { gql } from "apollo-boost";
+
+export const QUERY_ALL_APPOINTMENTS = gql`
+ query QUERY_ALL_APPOINTMENTS {
+ appointments {
+ start
+ id
+ end
+ job {
+ ro_number
+ ownr_ln
+ ownr_fn
+ clm_total
+ id
+ vehicle {
+ id
+ v_model_yr
+ v_make_desc
+ v_model_desc
+ }
+ }
+ }
+ }
+`;
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 472779f40..4ada884ae 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -47,7 +47,7 @@ export const QUERY_ALL_OPEN_JOBS = gql`
name
}
updated_at
- claim_total
+ clm_total
ded_amt
vehicle {
id
@@ -269,7 +269,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
name
}
updated_at
- claim_total
+ clm_total
ded_amt
documents(limit: 3, order_by: { created_at: desc }) {
id
diff --git a/client/src/pages/manage/manage.page.jsx b/client/src/pages/manage/manage.page.jsx
index 0ce1ce70a..066cb818f 100644
--- a/client/src/pages/manage/manage.page.jsx
+++ b/client/src/pages/manage/manage.page.jsx
@@ -27,6 +27,9 @@ const JobsAvailablePage = lazy(() =>
const ChatWindowContainer = lazy(() =>
import("../../components/chat-window/chat-window.container")
);
+const ScheduleContainer = lazy(() =>
+ import("../schedule/schedule.page.container")
+);
const { Header, Content, Footer } = Layout;
//This page will handle all routing for the entire application.
@@ -72,6 +75,12 @@ export default function Manage({ match }) {
component={ProfilePage}
/>
+
+
;
+}
diff --git a/client/src/pages/schedule/schedule.page.container.jsx b/client/src/pages/schedule/schedule.page.container.jsx
new file mode 100644
index 000000000..8a21042cd
--- /dev/null
+++ b/client/src/pages/schedule/schedule.page.container.jsx
@@ -0,0 +1,12 @@
+import React, { useEffect } from "react";
+import SchedulePageComponent from "./schedule.page.component";
+import { useTranslation } from "react-i18next";
+export default function SchedulePageContainer() {
+ const { t } = useTranslation();
+
+ useEffect(() => {
+ document.title = t("titles.schedule");
+ }, [t]);
+
+ return ;
+}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index a6b07413f..ae09231a4 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -216,7 +216,8 @@
"activejobs": "Active Jobs",
"availablejobs": "Available Jobs",
"home": "Home",
- "jobs": "Jobs"
+ "jobs": "Jobs",
+ "schedule": "Schedule"
},
"jobsdetail": {
"claimdetail": "Claim Details",
@@ -279,7 +280,8 @@
"jobsavailable": "Available Jobs | $t(titles.app)",
"jobsdetail": "Job {{ro_number}} | $t(titles.app)",
"jobsdocuments": "Job Documents {{ro_number}} | $t(titles.app)",
- "profile": "My Profile | $t(titles.app)"
+ "profile": "My Profile | $t(titles.app)",
+ "schedule": "Schedule | $t(titles.app)"
},
"user": {
"actions": {
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index cd7e5e987..e63c16e79 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -216,7 +216,8 @@
"activejobs": "Empleos activos",
"availablejobs": "Trabajos disponibles",
"home": "Casa",
- "jobs": "Trabajos"
+ "jobs": "Trabajos",
+ "schedule": "Programar"
},
"jobsdetail": {
"claimdetail": "Detalles de la reclamación",
@@ -279,7 +280,8 @@
"jobsavailable": "Empleos disponibles | $t(titles.app)",
"jobsdetail": "Trabajo {{ro_number}} | $t(titles.app)",
"jobsdocuments": "Documentos de trabajo {{ro_number}} | $ t (títulos.app)",
- "profile": "Mi perfil | $t(titles.app)"
+ "profile": "Mi perfil | $t(titles.app)",
+ "schedule": "Horario | $t(titles.app)"
},
"user": {
"actions": {
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 2682efddb..cf8401ff1 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -216,7 +216,8 @@
"activejobs": "Emplois actifs",
"availablejobs": "Emplois disponibles",
"home": "Accueil",
- "jobs": "Emplois"
+ "jobs": "Emplois",
+ "schedule": "Programme"
},
"jobsdetail": {
"claimdetail": "Détails de la réclamation",
@@ -279,7 +280,8 @@
"jobsavailable": "Emplois disponibles | $t(titles.app)",
"jobsdetail": "Travail {{ro_number}} | $t(titles.app)",
"jobsdocuments": "Documents de travail {{ro_number}} | $ t (titres.app)",
- "profile": "Mon profil | $t(titles.app)"
+ "profile": "Mon profil | $t(titles.app)",
+ "schedule": "Horaire | $t(titles.app)"
},
"user": {
"actions": {
diff --git a/client/src/utils/dates.js b/client/src/utils/dates.js
new file mode 100644
index 000000000..60d0c25ef
--- /dev/null
+++ b/client/src/utils/dates.js
@@ -0,0 +1,170 @@
+/* eslint no-fallthrough: off */
+import * as dates from "date-arithmetic";
+
+export {
+ milliseconds,
+ seconds,
+ minutes,
+ hours,
+ month,
+ startOf,
+ endOf,
+ add,
+ eq,
+ gte,
+ gt,
+ lte,
+ lt,
+ inRange,
+ min,
+ max
+} from "date-arithmetic";
+
+const MILLI = {
+ seconds: 1000,
+ minutes: 1000 * 60,
+ hours: 1000 * 60 * 60,
+ day: 1000 * 60 * 60 * 24
+};
+
+const MONTHS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+
+export function monthsInYear(year) {
+ let date = new Date(year, 0, 1);
+
+ return MONTHS.map(i => dates.month(date, i));
+}
+
+export function firstVisibleDay(date, localizer) {
+ let firstOfMonth = dates.startOf(date, "month");
+
+ return dates.startOf(firstOfMonth, "week", localizer.startOfWeek());
+}
+
+export function lastVisibleDay(date, localizer) {
+ let endOfMonth = dates.endOf(date, "month");
+
+ return dates.endOf(endOfMonth, "week", localizer.startOfWeek());
+}
+
+export function visibleDays(date, localizer) {
+ let current = firstVisibleDay(date, localizer),
+ last = lastVisibleDay(date, localizer),
+ days = [];
+
+ while (dates.lte(current, last, "day")) {
+ days.push(current);
+ current = dates.add(current, 1, "day");
+ }
+
+ return days;
+}
+
+export function ceil(date, unit) {
+ let floor = dates.startOf(date, unit);
+
+ return dates.eq(floor, date) ? floor : dates.add(floor, 1, unit);
+}
+
+export function range(start, end, unit = "day") {
+ let current = start,
+ days = [];
+
+ while (dates.lte(current, end, unit)) {
+ days.push(current);
+ current = dates.add(current, 1, unit);
+ }
+
+ return days;
+}
+
+export function merge(date, time) {
+ if (time == null && date == null) return null;
+
+ if (time == null) time = new Date();
+ if (date == null) date = new Date();
+
+ date = dates.startOf(date, "day");
+ date = dates.hours(date, dates.hours(time));
+ date = dates.minutes(date, dates.minutes(time));
+ date = dates.seconds(date, dates.seconds(time));
+ return dates.milliseconds(date, dates.milliseconds(time));
+}
+
+export function eqTime(dateA, dateB) {
+ return (
+ dates.hours(dateA) === dates.hours(dateB) &&
+ dates.minutes(dateA) === dates.minutes(dateB) &&
+ dates.seconds(dateA) === dates.seconds(dateB)
+ );
+}
+
+export function isJustDate(date) {
+ return (
+ dates.hours(date) === 0 &&
+ dates.minutes(date) === 0 &&
+ dates.seconds(date) === 0 &&
+ dates.milliseconds(date) === 0
+ );
+}
+
+export function duration(start, end, unit, firstOfWeek) {
+ if (unit === "day") unit = "date";
+ return Math.abs(
+ dates[unit](start, undefined, firstOfWeek) -
+ dates[unit](end, undefined, firstOfWeek)
+ );
+}
+
+export function diff(dateA, dateB, unit) {
+ if (!unit || unit === "milliseconds") return Math.abs(+dateA - +dateB);
+
+ // the .round() handles an edge case
+ // with DST where the total won't be exact
+ // since one day in the range may be shorter/longer by an hour
+ return Math.round(
+ Math.abs(
+ +dates.startOf(dateA, unit) / MILLI[unit] -
+ +dates.startOf(dateB, unit) / MILLI[unit]
+ )
+ );
+}
+
+export function total(date, unit) {
+ let ms = date.getTime(),
+ div = 1;
+
+ switch (unit) {
+ case "week":
+ div *= 7;
+ case "day":
+ div *= 24;
+ case "hours":
+ div *= 60;
+ case "minutes":
+ div *= 60;
+ case "seconds":
+ div *= 1000;
+ }
+
+ return ms / div;
+}
+
+export function week(date) {
+ var d = new Date(date);
+ d.setHours(0, 0, 0);
+ d.setDate(d.getDate() + 4 - (d.getDay() || 7));
+ return Math.ceil(((d - new Date(d.getFullYear(), 0, 1)) / 8.64e7 + 1) / 7);
+}
+
+export function today() {
+ return dates.startOf(new Date(), "day");
+}
+
+export function yesterday() {
+ return dates.add(dates.startOf(new Date(), "day"), -1, "day");
+}
+
+export function tomorrow() {
+ return dates.add(dates.startOf(new Date(), "day"), 1, "day");
+}
diff --git a/client/yarn.lock b/client/yarn.lock
index 5d1c69033..a7990eadc 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -1026,7 +1026,7 @@
dependencies:
regenerator-runtime "^0.13.2"
-"@babel/runtime@^7.5.5":
+"@babel/runtime@^7.1.5", "@babel/runtime@^7.5.5":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308"
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==
@@ -1620,6 +1620,11 @@
resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.1.0.tgz#0e81ce56b4883b4b2a3001ebe1ab298b84237204"
integrity sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==
+"@restart/hooks@^0.3.12":
+ version "0.3.20"
+ resolved "https://registry.yarnpkg.com/@restart/hooks/-/hooks-0.3.20.tgz#e7179ab41e5f346b2feca091261fbdad77e8bc19"
+ integrity sha512-Q1eeEqcxHQ4oqty7C5Me8/hzWwdCRR643nR/6EHxv8BVxLVYHe4IoWAHg8MIGkE4VtSm3/JnNhkoLJhCkLx5aw==
+
"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
@@ -1839,6 +1844,14 @@
"@types/prop-types" "*"
csstype "^2.2.0"
+"@types/react@^16.9.11":
+ version "16.9.19"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.19.tgz#c842aa83ea490007d29938146ff2e4d9e4360c40"
+ integrity sha512-LJV97//H+zqKWMms0kvxaKYJDG05U2TtQB3chRLF8MPNs+MQh/H1aGlyDUxjaHvu08EAGerdX2z4LTBc7ns77A==
+ dependencies:
+ "@types/prop-types" "*"
+ csstype "^2.2.0"
+
"@types/stack-utils@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
@@ -3483,6 +3496,11 @@ clone-deep@^4.0.1:
kind-of "^6.0.2"
shallow-clone "^3.0.0"
+clsx@^1.0.4:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702"
+ integrity sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA==
+
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
@@ -4103,7 +4121,7 @@ cssstyle@^1.0.0, cssstyle@^1.1.1:
dependencies:
cssom "0.3.x"
-csstype@^2.2.0:
+csstype@^2.2.0, csstype@^2.6.7:
version "2.6.8"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.8.tgz#0fb6fc2417ffd2816a418c9336da74d7f07db431"
integrity sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA==
@@ -4149,6 +4167,11 @@ data-urls@^1.0.0, data-urls@^1.1.0:
whatwg-mimetype "^2.2.0"
whatwg-url "^7.0.0"
+date-arithmetic@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/date-arithmetic/-/date-arithmetic-4.1.0.tgz#e5d6434e9deb71f79760a37b729e4a515e730ddf"
+ integrity sha512-QWxYLR5P/6GStZcdem+V1xoto6DMadYWpMXU82ES3/RfR3Wdwr3D0+be7mgOJ+Ov0G9D5Dmb9T17sNLQYj9XOg==
+
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -4409,6 +4432,14 @@ dom-converter@^0.2:
dependencies:
utila "~0.4"
+dom-helpers@^5.1.0:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.3.tgz#7233248eb3a2d1f74aafca31e52c5299cc8ce821"
+ integrity sha512-nZD1OtwfWGRBWlpANxacBEZrEuLa16o1nh7YopFWeoF68Zt8GGEmzHu6Xv4F3XaFIC+YXtTLrzgqKxFgLEe4jw==
+ dependencies:
+ "@babel/runtime" "^7.6.3"
+ csstype "^2.6.7"
+
dom-matches@>=1.0.1:
version "2.0.0"
resolved "https://registry.yarnpkg.com/dom-matches/-/dom-matches-2.0.0.tgz#d2728b416a87533980eb089b848d253cf23a758c"
@@ -7487,6 +7518,11 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"
+lodash-es@^4.17.11:
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
+ integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
+
lodash._reinterpolate@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
@@ -7689,6 +7725,11 @@ mem@^4.0.0:
mimic-fn "^2.0.0"
p-is-promise "^2.0.0"
+memoize-one@^4.0.3:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906"
+ integrity sha512-2GApq0yI/b22J2j9rhbrAlsHb0Qcz+7yWxeLG8h+95sl1XPUgeLimQSOdur4Vw7cUhrBHwaUZxWFZueojqNRzA==
+
memoize-one@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0"
@@ -8908,6 +8949,11 @@ pnp-webpack-plugin@1.5.0:
dependencies:
ts-pnp "^1.1.2"
+popper.js@^1.15.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
+ integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==
+
portfinder@^1.0.9:
version "1.0.25"
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
@@ -10342,6 +10388,24 @@ react-app-polyfill@^1.0.4:
regenerator-runtime "^0.13.3"
whatwg-fetch "^3.0.0"
+react-big-calendar@^0.23.0:
+ version "0.23.0"
+ resolved "https://registry.yarnpkg.com/react-big-calendar/-/react-big-calendar-0.23.0.tgz#cc780481548fcefabb04cea05dd1a08456702a67"
+ integrity sha512-f/v1J/oqvEJqXcT5clJ5wzFIWKRNUeMCvLLzH6PYszcR15mUgqQb31HH+2Ev+YZHVW3YSStcZn2HWEhmvFr9ew==
+ dependencies:
+ "@babel/runtime" "^7.1.5"
+ clsx "^1.0.4"
+ date-arithmetic "^4.0.1"
+ dom-helpers "^5.1.0"
+ invariant "^2.2.4"
+ lodash "^4.17.11"
+ lodash-es "^4.17.11"
+ memoize-one "^4.0.3"
+ prop-types "^15.6.2"
+ react-overlays "^2.0.0-0"
+ uncontrollable "^7.0.0"
+ warning "^4.0.2"
+
react-chartjs-2@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/react-chartjs-2/-/react-chartjs-2-2.8.0.tgz#1c24de91fb3755f8c4302675de7d66fdda339759"
@@ -10452,6 +10516,19 @@ react-number-format@^4.3.1:
dependencies:
prop-types "^15.7.2"
+react-overlays@^2.0.0-0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-2.1.1.tgz#ffe2090c4a10da6b8947a1c7b1a67d0457648a0d"
+ integrity sha512-gaQJwmb8Ij2IGVt4D1HmLtl4A0mDVYxlsv/8i0dHWK7Mw0kNat6ORelbbEWzaXTK1TqMeQtJw/jraL3WOADz3w==
+ dependencies:
+ "@babel/runtime" "^7.4.5"
+ "@restart/hooks" "^0.3.12"
+ dom-helpers "^5.1.0"
+ popper.js "^1.15.0"
+ prop-types "^15.7.2"
+ uncontrollable "^7.0.0"
+ warning "^4.0.3"
+
react-popopo@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/react-popopo/-/react-popopo-2.1.9.tgz#d93f70a8fb68227907d00c0cea4d8f5d321053ea"
@@ -12389,6 +12466,16 @@ uglify-js@^3.1.4:
commander "~2.20.3"
source-map "~0.6.1"
+uncontrollable@^7.0.0:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/uncontrollable/-/uncontrollable-7.1.1.tgz#f67fed3ef93637126571809746323a9db815d556"
+ integrity sha512-EcPYhot3uWTS3w00R32R2+vS8Vr53tttrvMj/yA1uYRhf8hbTG2GyugGqWDY0qIskxn0uTTojVd6wPYW9ZEf8Q==
+ dependencies:
+ "@babel/runtime" "^7.6.3"
+ "@types/react" "^16.9.11"
+ invariant "^2.2.4"
+ react-lifecycles-compat "^3.0.4"
+
unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
diff --git a/hasura/migrations/1580924578754_create_table_public_appointments/down.yaml b/hasura/migrations/1580924578754_create_table_public_appointments/down.yaml
new file mode 100644
index 000000000..df54499c7
--- /dev/null
+++ b/hasura/migrations/1580924578754_create_table_public_appointments/down.yaml
@@ -0,0 +1,3 @@
+- args:
+ sql: DROP TABLE "public"."appointments"
+ type: run_sql
diff --git a/hasura/migrations/1580924578754_create_table_public_appointments/up.yaml b/hasura/migrations/1580924578754_create_table_public_appointments/up.yaml
new file mode 100644
index 000000000..f3de9b6bb
--- /dev/null
+++ b/hasura/migrations/1580924578754_create_table_public_appointments/up.yaml
@@ -0,0 +1,21 @@
+- args:
+ sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
+ type: run_sql
+- args:
+ sql: "CREATE TABLE \"public\".\"appointments\"(\"id\" uuid NOT NULL DEFAULT gen_random_uuid(),
+ \"created_at\" timestamptz NOT NULL DEFAULT now(), \"updated_at\" timestamptz
+ NOT NULL DEFAULT now(), \"jobid\" uuid NOT NULL, \"start\" timestamptz NOT NULL,
+ \"end\" timestamptz NOT NULL, PRIMARY KEY (\"id\") , FOREIGN KEY (\"jobid\")
+ REFERENCES \"public\".\"jobs\"(\"id\") ON UPDATE cascade ON DELETE cascade);\nCREATE
+ OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS
+ TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\"
+ = NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_appointments_updated_at\"\nBEFORE
+ UPDATE ON \"public\".\"appointments\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
+ ON TRIGGER \"set_public_appointments_updated_at\" ON \"public\".\"appointments\"
+ \nIS 'trigger to set value of column \"updated_at\" to current timestamp on
+ row update';\n"
+ type: run_sql
+- args:
+ name: appointments
+ schema: public
+ type: add_existing_table_or_view
diff --git a/hasura/migrations/1580924597777_track_all_relationships/down.yaml b/hasura/migrations/1580924597777_track_all_relationships/down.yaml
new file mode 100644
index 000000000..40a2859e9
--- /dev/null
+++ b/hasura/migrations/1580924597777_track_all_relationships/down.yaml
@@ -0,0 +1,12 @@
+- args:
+ relationship: job
+ table:
+ name: appointments
+ schema: public
+ type: drop_relationship
+- args:
+ relationship: appointments
+ table:
+ name: jobs
+ schema: public
+ type: drop_relationship
diff --git a/hasura/migrations/1580924597777_track_all_relationships/up.yaml b/hasura/migrations/1580924597777_track_all_relationships/up.yaml
new file mode 100644
index 000000000..a42e807b4
--- /dev/null
+++ b/hasura/migrations/1580924597777_track_all_relationships/up.yaml
@@ -0,0 +1,20 @@
+- args:
+ name: job
+ table:
+ name: appointments
+ schema: public
+ using:
+ foreign_key_constraint_on: jobid
+ type: create_object_relationship
+- args:
+ name: appointments
+ table:
+ name: jobs
+ schema: public
+ using:
+ foreign_key_constraint_on:
+ column: jobid
+ table:
+ name: appointments
+ schema: public
+ type: create_array_relationship
diff --git a/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/down.yaml b/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/down.yaml
new file mode 100644
index 000000000..360bed4cf
--- /dev/null
+++ b/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: drop_insert_permission
diff --git a/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/up.yaml b/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/up.yaml
new file mode 100644
index 000000000..0b2e1b916
--- /dev/null
+++ b/hasura/migrations/1580924636108_update_permission_user_public_table_appointments/up.yaml
@@ -0,0 +1,29 @@
+- args:
+ permission:
+ allow_upsert: true
+ check:
+ job:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ columns:
+ - created_at
+ - end
+ - start
+ - updated_at
+ - id
+ - jobid
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/down.yaml b/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/down.yaml
new file mode 100644
index 000000000..cb1497747
--- /dev/null
+++ b/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: drop_select_permission
diff --git a/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/up.yaml b/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/up.yaml
new file mode 100644
index 000000000..00c8ca764
--- /dev/null
+++ b/hasura/migrations/1580924643897_update_permission_user_public_table_appointments/up.yaml
@@ -0,0 +1,26 @@
+- args:
+ permission:
+ allow_aggregations: false
+ columns:
+ - created_at
+ - end
+ - start
+ - updated_at
+ - id
+ - jobid
+ filter:
+ job:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ limit: null
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/down.yaml b/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/down.yaml
new file mode 100644
index 000000000..9e035c24f
--- /dev/null
+++ b/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: drop_update_permission
diff --git a/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/up.yaml b/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/up.yaml
new file mode 100644
index 000000000..f4adc60da
--- /dev/null
+++ b/hasura/migrations/1580924650229_update_permission_user_public_table_appointments/up.yaml
@@ -0,0 +1,28 @@
+- args:
+ permission:
+ columns:
+ - created_at
+ - end
+ - start
+ - updated_at
+ - id
+ - jobid
+ filter:
+ job:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/down.yaml b/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/down.yaml
new file mode 100644
index 000000000..58bced28e
--- /dev/null
+++ b/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: drop_delete_permission
diff --git a/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/up.yaml b/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/up.yaml
new file mode 100644
index 000000000..119e09bbc
--- /dev/null
+++ b/hasura/migrations/1580924654728_update_permission_user_public_table_appointments/up.yaml
@@ -0,0 +1,17 @@
+- args:
+ permission:
+ filter:
+ job:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: appointments
+ schema: public
+ type: create_delete_permission
diff --git a/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..a1e5cbdde
--- /dev/null
+++ b/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,244 @@
+- 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
+ - csr
+ - po_number
+ - unit_number
+ - kmin
+ - kmout
+ - referral_source
+ - selling_dealer
+ - servicing_dealer
+ - servicing_dealer_contact
+ - selling_dealer_contact
+ - depreciation_taxes
+ - federal_tax_payable
+ - other_amount_payable
+ - towing_payable
+ - storage_payable
+ - adjustment_bottom_line
+ - tax_pstthr
+ - tax_tow_rt
+ - tax_sub_rt
+ - tax_paint_mat_rt
+ - tax_levies_rt
+ - tax_prethr
+ - tax_thramt
+ - tax_str_rt
+ - tax_lbr_rt
+ - adj_g_disc
+ - adj_towdis
+ - adj_strdis
+ - tax_predis
+ - rate_laa
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..50eccd57f
--- /dev/null
+++ b/hasura/migrations/1580931183725_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,243 @@
+- 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
+ - 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
+ - deductible
+ - 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
+ - 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
+ - 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
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - po_number
+ - policy_no
+ - 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
+ - service_car
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - 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
+ - vehicleid
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1580931192674_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580931192674_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..57466d6e6
--- /dev/null
+++ b/hasura/migrations/1580931192674_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,242 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: false
+ columns:
+ - converted
+ - inproduction
+ - special_coverage_policy
+ - theft_ind
+ - tlos_ind
+ - asgn_date
+ - invoice_date
+ - loss_date
+ - pay_date
+ - kmin
+ - kmout
+ - est_number
+ - area_of_damage
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - claim_total
+ - clm_total
+ - ded_amt
+ - deductible
+ - depreciation_taxes
+ - federal_tax_payable
+ - federal_tax_rate
+ - local_tax_rate
+ - other_amount_payable
+ - owner_owing
+ - pay_amt
+ - 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
+ - state_tax_rate
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_str_rt
+ - tax_thramt
+ - towing_payable
+ - 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
+ - csr
+ - 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
+ - po_number
+ - referral_source
+ - regie_number
+ - ro_number
+ - selling_dealer
+ - selling_dealer_contact
+ - service_car
+ - servicing_dealer
+ - servicing_dealer_contact
+ - unit_number
+ - 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
+ - tax_pstthr
+ - tax_sub_rt
+ - tax_tow_rt
+ 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/1580931192674_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580931192674_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..79e220620
--- /dev/null
+++ b/hasura/migrations/1580931192674_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,241 @@
+- 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
+ - 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
+ - deductible
+ - 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
+ - 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
+ - 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
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - po_number
+ - policy_no
+ - 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
+ - service_car
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - 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
+ - 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/1580931206615_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1580931206615_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..4371eaab0
--- /dev/null
+++ b/hasura/migrations/1580931206615_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,244 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - converted
+ - inproduction
+ - special_coverage_policy
+ - theft_ind
+ - tlos_ind
+ - asgn_date
+ - invoice_date
+ - loss_date
+ - pay_date
+ - kmin
+ - kmout
+ - est_number
+ - area_of_damage
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - claim_total
+ - clm_total
+ - ded_amt
+ - deductible
+ - depreciation_taxes
+ - federal_tax_payable
+ - federal_tax_rate
+ - local_tax_rate
+ - other_amount_payable
+ - owner_owing
+ - pay_amt
+ - 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
+ - state_tax_rate
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_str_rt
+ - tax_thramt
+ - towing_payable
+ - 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
+ - csr
+ - 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
+ - po_number
+ - referral_source
+ - regie_number
+ - ro_number
+ - selling_dealer
+ - selling_dealer_contact
+ - service_car
+ - servicing_dealer
+ - servicing_dealer_contact
+ - unit_number
+ - 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
+ - tax_pstthr
+ - tax_sub_rt
+ - tax_tow_rt
+ 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/1580931206615_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1580931206615_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..e25202215
--- /dev/null
+++ b/hasura/migrations/1580931206615_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,243 @@
+- 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
+ - 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
+ - deductible
+ - 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
+ - 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
+ - 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
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - po_number
+ - policy_no
+ - 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
+ - service_car
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - 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
+ - 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/1580931212931_alter_table_public_jobs_drop_column_claim_total/down.yaml b/hasura/migrations/1580931212931_alter_table_public_jobs_drop_column_claim_total/down.yaml
new file mode 100644
index 000000000..93fb7a1c5
--- /dev/null
+++ b/hasura/migrations/1580931212931_alter_table_public_jobs_drop_column_claim_total/down.yaml
@@ -0,0 +1,9 @@
+- args:
+ sql: ALTER TABLE "public"."jobs" ADD COLUMN "claim_total" numeric
+ type: run_sql
+- args:
+ sql: ALTER TABLE "public"."jobs" ALTER COLUMN "claim_total" DROP NOT NULL
+ type: run_sql
+- args:
+ sql: ALTER TABLE "public"."jobs" ALTER COLUMN "claim_total" SET DEFAULT 0
+ type: run_sql
diff --git a/hasura/migrations/1580931212931_alter_table_public_jobs_drop_column_claim_total/up.yaml b/hasura/migrations/1580931212931_alter_table_public_jobs_drop_column_claim_total/up.yaml
new file mode 100644
index 000000000..cbb44e742
--- /dev/null
+++ b/hasura/migrations/1580931212931_alter_table_public_jobs_drop_column_claim_total/up.yaml
@@ -0,0 +1,3 @@
+- args:
+ sql: ALTER TABLE "public"."jobs" DROP COLUMN "claim_total" CASCADE
+ type: run_sql
diff --git a/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/down.yaml b/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/down.yaml
new file mode 100644
index 000000000..323a4f792
--- /dev/null
+++ b/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/down.yaml
@@ -0,0 +1,6 @@
+- args:
+ sql: ALTER TABLE ONLY "public"."jobs" ALTER COLUMN "clm_total" SET DEFAULT 0;
+ type: run_sql
+- args:
+ sql: COMMENT ON COLUMN "public"."jobs"."clm_total" IS E'null'
+ type: run_sql
diff --git a/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/up.yaml b/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/up.yaml
new file mode 100644
index 000000000..dfcd0015d
--- /dev/null
+++ b/hasura/migrations/1580931234225_alter_table_public_jobs_alter_column_clm_total/up.yaml
@@ -0,0 +1,6 @@
+- args:
+ sql: ALTER TABLE ONLY "public"."jobs" ALTER COLUMN "clm_total" SET DEFAULT 0;
+ type: run_sql
+- args:
+ sql: COMMENT ON COLUMN "public"."jobs"."clm_total" IS E''
+ type: run_sql