diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 83fbddc1f..52eae341d 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -12847,6 +12847,27 @@
+
+ productionboard
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
productionlist
false
diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx
index a3bf1fdd7..d8bdbab37 100644
--- a/client/src/components/header/header.component.jsx
+++ b/client/src/components/header/header.component.jsx
@@ -6,12 +6,12 @@ import Icon, {
GlobalOutlined,
HomeFilled,
TeamOutlined,
- UserOutlined
+ UserOutlined,
} from "@ant-design/icons";
import { Avatar, Col, Layout, Menu, Row } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
-import { FaCalendarAlt, FaCarCrash } from "react-icons/fa";
+import { FaCalendarAlt, FaCarCrash, FaCreditCard } from "react-icons/fa";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
@@ -19,7 +19,7 @@ import { setModalContext } from "../../redux/modals/modals.actions";
import { signOutStart } from "../../redux/user/user.actions";
import {
selectBodyshop,
- selectCurrentUser
+ selectCurrentUser,
} from "../../redux/user/user.selectors";
import "./header.styles.scss";
@@ -117,12 +117,17 @@ function Header({
{t("menus.header.schedule")}
-
+
{t("menus.header.productionlist")}
+
+
+ {t("menus.header.productionboard")}
+
+
{t("menus.header.activejobs")}
@@ -193,6 +198,7 @@ function Header({
});
}}
>
+
{t("menus.header.enterpayment")}
diff --git a/client/src/components/production-board-kanban/production-board-kanban.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.component.jsx
index f8281b8d2..df726f636 100644
--- a/client/src/components/production-board-kanban/production-board-kanban.component.jsx
+++ b/client/src/components/production-board-kanban/production-board-kanban.component.jsx
@@ -1,49 +1,123 @@
-import React, { useState, useEffect } from "react";
-import Board from "react-trello";
+import { useApolloClient } from "@apollo/react-hooks";
import { Card } from "antd";
-import LoadingSpinner from "../loading-spinner/loading-spinner.component";
-import { selectBodyshop } from "../../redux/user/user.selectors";
+import React from "react";
import { connect } from "react-redux";
+import Board from "react-trello";
import { createStructuredSelector } from "reselect";
+import { generate_UPDATE_JOB_KANBAN } from "../../graphql/jobs.queries";
+import { selectBodyshop } from "../../redux/user/user.selectors";
+import LoadingSpinner from "../loading-spinner/loading-spinner.component";
+import { createBoardData } from "./production-board-kanban.utils.js";
+import _ from "lodash";
+
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
-export function ProductionBoardKanbanComponent({
- loading,
- data,
- columnState,
- bodyshop,
-}) {
- console.log("data", data);
+export function ProductionBoardKanbanComponent({ loading, data, bodyshop }) {
+ const boardLanes = createBoardData(
+ bodyshop.md_ro_statuses.open_statuses,
+ data
+ );
+ console.log("ProductionBoardKanbanComponent -> boardLanes", boardLanes);
- const [cards, setCards] = useState([]);
+ const client = useApolloClient();
- useEffect(() => {
- const cols = bodyshop.md_ro_statuses.open_statuses.map((s) => {
- return {
- id: s,
- title: s,
- cards: [],
- };
+ const handleDataChange = async (data) => {
+ console.log("data", data);
+ };
+
+ const handleDragEnd = async (
+ cardId,
+ sourceLaneId,
+ targetLaneId,
+ position,
+ cardDetails
+ ) => {
+ const oldChildCard = boardLanes.lanes
+ .find((l) => l.id === sourceLaneId)
+ .cards.find((card) => card.kanbanparent === cardId); //.id;
+
+ const newChildCard =
+ sourceLaneId !== targetLaneId
+ ? boardLanes.lanes.find((l) => l.id === targetLaneId).cards[position]
+ : null;
+
+ const lastCardInTargetLane = _.last(
+ boardLanes.lanes.find((l) => l.id === targetLaneId).cards
+ );
+
+ await client.mutate({
+ mutation: generate_UPDATE_JOB_KANBAN(
+ oldChildCard ? oldChildCard.id : null,
+ oldChildCard ? cardDetails.kanbanparent : null,
+ cardDetails.id,
+ (newChildCard && newChildCard.kanbanparent) ||
+ sourceLaneId !== targetLaneId
+ ? lastCardInTargetLane.id
+ : null,
+ targetLaneId,
+ newChildCard ? newChildCard.id : null,
+ newChildCard ? cardDetails.id : null
+ ),
+ //optimisticResponse,
});
- if (data)
- data.forEach((d) =>
- cols
- .find((c) => c.id === d.status)
- .cards.push({ id: d.id, title: d.est_number, description: d.ownr_fn })
- );
- setCards(cols);
- }, [data, bodyshop.md_ro_statuses.open_statuses, setCards]);
+ // const optimisticResponse = {
+ // updateMovedChild: {
+ // __typename: "jobs_mutation_response",
+ // returning: {
+ // id: cardDetails.id,
+ // status: targetLaneId,
+ // kanbanparent: newChildCard.kanbanparent,
+ // __typename: "jobs",
+ // },
+ // },
+ // };
+ // if (oldChildCard) {
+ // optimisticResponse["updateNewChild"] = {
+ // __typename: "jobs_mutation_response",
+ // returning: {
+ // id: oldChildCard.id,
+ // kanbanparent: cardDetails.kanbanparent,
+ // __typename: "jobs",
+ // },
+ // };
+ // }
+ // if (newChildCard) {
+ // optimisticResponse["updateOldChild"] = {
+ // __typename: "jobs_mutation_response",
+ // returning: {
+ // id: newChildCard.id,
+ // kanbanparent: cardDetails.id,
+ // __typename: "jobs",
+ // },
+ // };
+ // }
- const kanbanCard = (card) => {card.title};
+ // console.log("optimisticResponse", optimisticResponse);
+ };
+
+ const kanbanCard = (card) => {
+ return (
+ {`${card.ownr_fn} ${card.ownr_ln}`}
+ );
+ };
if (loading) return ;
return (
-
+
);
}
diff --git a/client/src/components/production-board-kanban/production-board-kanban.container.jsx b/client/src/components/production-board-kanban/production-board-kanban.container.jsx
index 8365cf8c9..70a1896e0 100644
--- a/client/src/components/production-board-kanban/production-board-kanban.container.jsx
+++ b/client/src/components/production-board-kanban/production-board-kanban.container.jsx
@@ -10,8 +10,6 @@ export default function ProductionBoardKanbanContainer({ columnState }) {
);
}
diff --git a/client/src/components/production-board-kanban/production-board-kanban.utils.js b/client/src/components/production-board-kanban/production-board-kanban.utils.js
new file mode 100644
index 000000000..7295d6ea1
--- /dev/null
+++ b/client/src/components/production-board-kanban/production-board-kanban.utils.js
@@ -0,0 +1,47 @@
+import _ from "lodash/";
+
+const sortByParentId = (arr) => {
+ // return arr.reduce((accumulator, currentValue) => {
+ // //Find the parent item.
+ // let item = accumulator.find((x) => x.id === currentValue.kanbanparent);
+ // //Get index of praent item
+ // let index = accumulator.indexOf(item);
+
+ // index = index !== -1 ? index + 1 : 0;
+ // accumulator.splice(index, 0, currentValue);
+ // return accumulator;
+ // }, []);
+
+ var parentId = null;
+ var sortedList = [];
+ var byParentsIdsList = _.groupBy(arr, "kanbanparent"); // Create a new array with objects indexed by parentId
+
+ while (byParentsIdsList[parentId]) {
+ sortedList.push(byParentsIdsList[parentId][0]);
+ parentId = byParentsIdsList[parentId][0].id;
+ }
+ return sortedList;
+};
+
+export const createBoardData = (AllStatuses, Jobs) => {
+ console.log("==========GENERATING BOARD DATA=============");
+ const boardLanes = {
+ lanes: AllStatuses.map((s) => {
+ return {
+ id: s,
+ title: s,
+ //label: "0",
+ cards: [],
+ };
+ }),
+ };
+ const DataGroupedByStatus = _.groupBy(Jobs, (d) => d.status);
+
+ Object.keys(DataGroupedByStatus).map((statusGroupKey) => {
+ boardLanes.lanes.find(
+ (l) => l.id === statusGroupKey
+ ).cards = sortByParentId(DataGroupedByStatus[statusGroupKey]);
+ });
+
+ return boardLanes;
+};
diff --git a/client/src/components/schedule-event/schedule-event.component.jsx b/client/src/components/schedule-event/schedule-event.component.jsx
index e4fcd3abc..ebe32e66d 100644
--- a/client/src/components/schedule-event/schedule-event.component.jsx
+++ b/client/src/components/schedule-event/schedule-event.component.jsx
@@ -1,13 +1,12 @@
import { Button, Popover } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
+import { connect } from "react-redux";
import { Link } from "react-router-dom";
+import { setModalContext } from "../../redux/modals/modals.actions";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import PhoneFormatter from "../../utils/PhoneFormatter";
import DataLabel from "../data-label/data-label.component";
-import { createStructuredSelector } from "reselect";
-import { setModalContext } from "../../redux/modals/modals.actions";
-import { connect } from "react-redux";
const mapDispatchToProps = (dispatch) => ({
setScheduleContext: (context) =>
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 05073307b..2a881f703 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -105,6 +105,7 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
labhrs
larhrs
partcount
+ kanbanparent
}
}
`;
@@ -856,3 +857,57 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
}
}
`;
+
+export const generate_UPDATE_JOB_KANBAN = (
+ oldChildId,
+ oldChildNewParent,
+ movedId,
+ movedNewParent,
+ movedNewStatus,
+ newChildId,
+ newChildParent
+) => {
+ console.log("oldChildId", oldChildId, "oldChildNewParent", oldChildNewParent);
+ console.log("Moved", movedId, movedNewParent, movedNewStatus);
+ console.log("new", newChildId, newChildParent);
+
+ const oldChildQuery = `
+ updateOldChild: update_jobs(where: { id: { _eq: "${oldChildId}" } },
+ _set: {kanbanparent: ${
+ oldChildNewParent ? `"${oldChildNewParent}"` : null
+ }}) {
+ returning {
+ id
+ kanbanparent
+ }
+ }`;
+
+ const movedQuery = `
+ updateMovedChild: update_jobs(where: { id: { _eq: "${movedId}" } },
+ _set: {kanbanparent: ${
+ movedNewParent ? `"${movedNewParent}"` : null
+ } , status: "${movedNewStatus}"}) {
+ returning {
+ id
+ status
+ kanbanparent
+ }
+ }`;
+
+ const newChildQuery = `
+ updateNewChild: update_jobs(where: { id: { _eq: "${newChildId}" } },
+ _set: {kanbanparent: ${newChildParent ? `"${newChildParent}"` : null}}) {
+ returning {
+ id
+ kanbanparent
+ }
+ }`;
+
+ return gql`
+ mutation UPDATE_JOB_KANBAN {
+ ${oldChildId ? oldChildQuery : ""}
+ ${movedId ? movedQuery : ""}
+ ${newChildId ? newChildQuery : ""}
+ }
+ `;
+};
diff --git a/client/src/pages/production-board/production-board.component.jsx b/client/src/pages/production-board/production-board.component.jsx
index ef2d3cc65..9b69da414 100644
--- a/client/src/pages/production-board/production-board.component.jsx
+++ b/client/src/pages/production-board/production-board.component.jsx
@@ -1,6 +1,6 @@
import React from "react";
import ProductionBoardKanbanContainer from "../../components/production-board-kanban/production-board-kanban.container";
-export default function ProductionBoardComponent({ columnState }) {
- return ;
+export default function ProductionBoardComponent() {
+ return ;
}
diff --git a/client/src/pages/production-board/production-board.container.jsx b/client/src/pages/production-board/production-board.container.jsx
index f021cfbb5..7c336d7c7 100644
--- a/client/src/pages/production-board/production-board.container.jsx
+++ b/client/src/pages/production-board/production-board.container.jsx
@@ -1,11 +1,10 @@
-import React, { useEffect, useState } from "react";
+import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { setBreadcrumbs } from "../../redux/application/application.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
import ProductionBoardComponent from "./production-board.component";
-import ProductionListColumns from "../../components/production-list-columns/production-list-columns.data";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -17,27 +16,18 @@ const mapDispatchToProps = (dispatch) => ({
export function ProductionBoardContainer({ setBreadcrumbs, bodyshop }) {
const { t } = useTranslation();
- const columnState = useState(
- (bodyshop.production_config &&
- bodyshop.production_config.columnKeys.map((k) =>
- ProductionListColumns.find((e) => e.key === k)
- )) ||
- []
- );
- // console.log("ProductionListContainer -> columnState", columnState);
useEffect(() => {
document.title = t("titles.productionboard");
setBreadcrumbs([
- { link: "/manage/production/board", label: t("titles.bc.productionboard") },
+ {
+ link: "/manage/production/board",
+ label: t("titles.bc.productionboard"),
+ },
]);
}, [t, setBreadcrumbs]);
- return (
-
- );
+ return ;
}
export default connect(
mapStateToProps,
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 800b6f1e4..24f96e608 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -780,6 +780,7 @@
"jobs": "Jobs",
"owners": "Owners",
"payments": "All Payments",
+ "productionboard": "Production Board",
"productionlist": "Production - List",
"schedule": "Schedule",
"shop": "My Shop",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 47b6c191a..c40e2553c 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -780,6 +780,7 @@
"jobs": "Trabajos",
"owners": "propietarios",
"payments": "",
+ "productionboard": "",
"productionlist": "",
"schedule": "Programar",
"shop": "Mi tienda",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 9d1fd16ce..7d658bc68 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -780,6 +780,7 @@
"jobs": "Emplois",
"owners": "Propriétaires",
"payments": "",
+ "productionboard": "",
"productionlist": "",
"schedule": "Programme",
"shop": "Mon magasin",
diff --git a/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/down.yaml b/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/down.yaml
new file mode 100644
index 000000000..9fe29b9ce
--- /dev/null
+++ b/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/down.yaml
@@ -0,0 +1,5 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."jobs" DROP COLUMN "kanbanparent";
+ type: run_sql
diff --git a/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/up.yaml b/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/up.yaml
new file mode 100644
index 000000000..c95d912b2
--- /dev/null
+++ b/hasura/migrations/1592338644254_alter_table_public_jobs_add_column_kanbanparent/up.yaml
@@ -0,0 +1,5 @@
+- args:
+ cascade: false
+ read_only: false
+ sql: ALTER TABLE "public"."jobs" ADD COLUMN "kanbanparent" uuid NULL;
+ type: run_sql
diff --git a/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..0a78e16c2
--- /dev/null
+++ b/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,257 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_insert_permission
+- args:
+ permission:
+ check:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..1ca9f0a39
--- /dev/null
+++ b/hasura/migrations/1592338664495_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,258 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_insert_permission
+- args:
+ permission:
+ check:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_insert_permission
diff --git a/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..4e4e0f870
--- /dev/null
+++ b/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,255 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..26e7035b1
--- /dev/null
+++ b/hasura/migrations/1592338672542_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,256 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/down.yaml b/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/down.yaml
new file mode 100644
index 000000000..b15051c7a
--- /dev/null
+++ b/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/down.yaml
@@ -0,0 +1,257 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/up.yaml b/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/up.yaml
new file mode 100644
index 000000000..dbe7e0f0b
--- /dev/null
+++ b/hasura/migrations/1592338681306_update_permission_user_public_table_jobs/up.yaml
@@ -0,0 +1,258 @@
+- args:
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: drop_update_permission
+- args:
+ permission:
+ columns:
+ - actual_completion
+ - actual_delivery
+ - actual_in
+ - adj_g_disc
+ - adj_strdis
+ - adj_towdis
+ - adjustment_bottom_line
+ - agt_addr1
+ - agt_addr2
+ - agt_city
+ - agt_co_id
+ - agt_co_nm
+ - agt_ct_fn
+ - agt_ct_ln
+ - agt_ct_ph
+ - agt_ct_phx
+ - agt_ctry
+ - agt_ea
+ - agt_fax
+ - agt_faxx
+ - agt_lic_no
+ - agt_ph1
+ - agt_ph1x
+ - agt_ph2
+ - agt_ph2x
+ - agt_st
+ - agt_zip
+ - area_of_damage
+ - asgn_date
+ - asgn_no
+ - asgn_type
+ - cat_no
+ - cieca_stl
+ - cieca_ttl
+ - ciecaid
+ - clm_addr1
+ - clm_addr2
+ - clm_city
+ - clm_ct_fn
+ - clm_ct_ln
+ - clm_ct_ph
+ - clm_ct_phx
+ - clm_ctry
+ - clm_ea
+ - clm_fax
+ - clm_faxx
+ - clm_no
+ - clm_ofc_id
+ - clm_ofc_nm
+ - clm_ph1
+ - clm_ph1x
+ - clm_ph2
+ - clm_ph2x
+ - clm_st
+ - clm_title
+ - clm_total
+ - clm_zip
+ - converted
+ - created_at
+ - csr
+ - cust_pr
+ - date_closed
+ - date_estimated
+ - date_exported
+ - date_invoiced
+ - date_open
+ - date_scheduled
+ - ded_amt
+ - ded_status
+ - depreciation_taxes
+ - est_addr1
+ - est_addr2
+ - est_city
+ - est_co_nm
+ - est_ct_fn
+ - est_ct_ln
+ - est_ctry
+ - est_ea
+ - est_number
+ - est_ph1
+ - est_st
+ - est_zip
+ - federal_tax_payable
+ - federal_tax_rate
+ - g_bett_amt
+ - id
+ - inproduction
+ - ins_addr1
+ - ins_addr2
+ - ins_city
+ - ins_co_id
+ - ins_co_nm
+ - ins_ct_fn
+ - ins_ct_ln
+ - ins_ct_ph
+ - ins_ct_phx
+ - ins_ctry
+ - ins_ea
+ - ins_fax
+ - ins_faxx
+ - ins_memo
+ - ins_ph1
+ - ins_ph1x
+ - ins_ph2
+ - ins_ph2x
+ - ins_st
+ - ins_title
+ - ins_zip
+ - insd_addr1
+ - insd_addr2
+ - insd_city
+ - insd_co_nm
+ - insd_ctry
+ - insd_ea
+ - insd_fax
+ - insd_faxx
+ - insd_fn
+ - insd_ln
+ - insd_ph1
+ - insd_ph1x
+ - insd_ph2
+ - insd_ph2x
+ - insd_st
+ - insd_title
+ - insd_zip
+ - intakechecklist
+ - invoice_allocation
+ - invoice_date
+ - job_totals
+ - kanbanparent
+ - kmin
+ - kmout
+ - labor_rate_desc
+ - labor_rate_id
+ - local_tax_rate
+ - loss_cat
+ - loss_date
+ - loss_desc
+ - loss_type
+ - other_amount_payable
+ - owner_owing
+ - ownerid
+ - ownr_addr1
+ - ownr_addr2
+ - ownr_city
+ - ownr_co_nm
+ - ownr_ctry
+ - ownr_ea
+ - ownr_fax
+ - ownr_faxx
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - ownr_ph1x
+ - ownr_ph2
+ - ownr_ph2x
+ - ownr_st
+ - ownr_title
+ - ownr_zip
+ - parts_tax_rates
+ - pay_amt
+ - pay_chknm
+ - pay_date
+ - pay_type
+ - payee_nms
+ - plate_no
+ - plate_st
+ - po_number
+ - policy_no
+ - production_vars
+ - rate_atp
+ - rate_la1
+ - rate_la2
+ - rate_la3
+ - rate_la4
+ - rate_laa
+ - rate_lab
+ - rate_lad
+ - rate_lae
+ - rate_laf
+ - rate_lag
+ - rate_lam
+ - rate_lar
+ - rate_las
+ - rate_lau
+ - rate_ma2s
+ - rate_ma2t
+ - rate_ma3s
+ - rate_mabl
+ - rate_macs
+ - rate_mahw
+ - rate_mapa
+ - rate_mash
+ - rate_matd
+ - referral_source
+ - regie_number
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - scheduled_in
+ - selling_dealer
+ - selling_dealer_contact
+ - servicing_dealer
+ - servicing_dealer_contact
+ - shopid
+ - special_coverage_policy
+ - state_tax_rate
+ - status
+ - statusid
+ - storage_payable
+ - tax_lbr_rt
+ - tax_levies_rt
+ - tax_paint_mat_rt
+ - tax_predis
+ - tax_prethr
+ - tax_pstthr
+ - tax_str_rt
+ - tax_sub_rt
+ - tax_thramt
+ - tax_tow_rt
+ - theft_ind
+ - tlos_ind
+ - towing_payable
+ - unit_number
+ - updated_at
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ - v_vin
+ - vehicleid
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ localPresets:
+ - key: ""
+ value: ""
+ set: {}
+ role: user
+ table:
+ name: jobs
+ schema: public
+ type: create_update_permission
diff --git a/hasura/migrations/1592338828686_run_sql_migration/down.yaml b/hasura/migrations/1592338828686_run_sql_migration/down.yaml
new file mode 100644
index 000000000..fe51488c7
--- /dev/null
+++ b/hasura/migrations/1592338828686_run_sql_migration/down.yaml
@@ -0,0 +1 @@
+[]
diff --git a/hasura/migrations/1592338828686_run_sql_migration/up.yaml b/hasura/migrations/1592338828686_run_sql_migration/up.yaml
new file mode 100644
index 000000000..fff1fe20c
--- /dev/null
+++ b/hasura/migrations/1592338828686_run_sql_migration/up.yaml
@@ -0,0 +1,20 @@
+- args:
+ cascade: true
+ read_only: false
+ sql: "CREATE OR REPLACE VIEW \"public\".\"productionview\" AS \n SELECT j.id,\n
+ \ j.status,\n j.ro_number,\n j.est_number,\n j.ownr_fn,\n j.ownr_ln,\n
+ \ j.v_model_yr,\n j.v_model_desc,\n j.clm_no,\n j.v_make_desc,\n
+ \ j.v_color,\n j.plate_no,\n j.actual_in,\n j.scheduled_completion,\n
+ \ j.scheduled_delivery,\n j.ins_co_nm,\n j.clm_total,\n j.ownr_ph1,\n
+ \ j.special_coverage_policy,\n j.production_vars,\n lab.labhrs,\n lar.larhrs,\n
+ \ j.shopid,\n\n parts.partcount, j.kanbanparent\n FROM (((jobs j\n
+ \ LEFT JOIN ( SELECT l.jobid,\n sum(l.mod_lb_hrs) AS labhrs\n
+ \ FROM joblines l\n WHERE (l.mod_lbr_ty = 'LAB'::text)\n GROUP
+ BY l.jobid) lab ON ((lab.jobid = j.id)))\n LEFT JOIN ( SELECT l2.jobid,\n
+ \ sum(l2.mod_lb_hrs) AS larhrs\n FROM joblines l2\n WHERE
+ (l2.mod_lbr_ty = 'LAR'::text)\n GROUP BY l2.jobid) lar ON ((lar.jobid
+ = j.id)))\n LEFT JOIN ( SELECT l3.jobid,\n json_agg(l3.status)
+ AS partcount\n FROM joblines l3\n WHERE (l3.part_type IS
+ NOT NULL)\n GROUP BY l3.jobid) parts ON ((parts.jobid = j.id)))\n WHERE
+ (j.inproduction = true);"
+ type: run_sql
diff --git a/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/down.yaml b/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/down.yaml
new file mode 100644
index 000000000..846706108
--- /dev/null
+++ b/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/down.yaml
@@ -0,0 +1,49 @@
+- args:
+ role: user
+ table:
+ name: productionview
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - id
+ - status
+ - ro_number
+ - est_number
+ - ownr_fn
+ - ownr_ln
+ - v_model_yr
+ - v_model_desc
+ - clm_no
+ - v_make_desc
+ - v_color
+ - plate_no
+ - actual_in
+ - scheduled_completion
+ - scheduled_delivery
+ - ins_co_nm
+ - clm_total
+ - ownr_ph1
+ - special_coverage_policy
+ - production_vars
+ - labhrs
+ - larhrs
+ - shopid
+ - partcount
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: productionview
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/up.yaml b/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/up.yaml
new file mode 100644
index 000000000..d79153df4
--- /dev/null
+++ b/hasura/migrations/1592338856120_update_permission_user_public_table_productionview/up.yaml
@@ -0,0 +1,50 @@
+- args:
+ role: user
+ table:
+ name: productionview
+ schema: public
+ type: drop_select_permission
+- args:
+ permission:
+ allow_aggregations: true
+ columns:
+ - actual_in
+ - clm_no
+ - clm_total
+ - est_number
+ - id
+ - ins_co_nm
+ - kanbanparent
+ - labhrs
+ - larhrs
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
+ - partcount
+ - plate_no
+ - production_vars
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - shopid
+ - special_coverage_policy
+ - status
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
+ computed_fields: []
+ filter:
+ bodyshop:
+ associations:
+ _and:
+ - user:
+ authid:
+ _eq: X-Hasura-User-Id
+ - active:
+ _eq: true
+ role: user
+ table:
+ name: productionview
+ schema: public
+ type: create_select_permission
diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml
index 576eac1c7..2ece6f39c 100644
--- a/hasura/migrations/metadata.yaml
+++ b/hasura/migrations/metadata.yaml
@@ -2041,6 +2041,7 @@ tables:
- invoice_allocation
- invoice_date
- job_totals
+ - kanbanparent
- kmin
- kmout
- labor_rate_desc
@@ -2275,6 +2276,7 @@ tables:
- invoice_allocation
- invoice_date
- job_totals
+ - kanbanparent
- kmin
- kmout
- labor_rate_desc
@@ -2519,6 +2521,7 @@ tables:
- invoice_allocation
- invoice_date
- job_totals
+ - kanbanparent
- kmin
- kmout
- labor_rate_desc
@@ -3303,30 +3306,31 @@ tables:
- role: user
permission:
columns:
- - id
- - status
- - ro_number
- - est_number
- - ownr_fn
- - ownr_ln
- - v_model_yr
- - v_model_desc
- - clm_no
- - v_make_desc
- - v_color
- - plate_no
- actual_in
- - scheduled_completion
- - scheduled_delivery
- - ins_co_nm
+ - clm_no
- clm_total
- - ownr_ph1
- - special_coverage_policy
- - production_vars
+ - est_number
+ - id
+ - ins_co_nm
+ - kanbanparent
- labhrs
- larhrs
- - shopid
+ - ownr_fn
+ - ownr_ln
+ - ownr_ph1
- partcount
+ - plate_no
+ - production_vars
+ - ro_number
+ - scheduled_completion
+ - scheduled_delivery
+ - shopid
+ - special_coverage_policy
+ - status
+ - v_color
+ - v_make_desc
+ - v_model_desc
+ - v_model_yr
filter:
bodyshop:
associations: