BOD-67 Implemented baseline job supplementing

This commit is contained in:
Patrick Fic
2020-04-24 08:34:54 -07:00
parent faa93a5e21
commit 7fffa57bdc
20 changed files with 1099 additions and 54 deletions

View File

@@ -1,4 +1,8 @@
import { DeleteFilled, PlusCircleFilled, SyncOutlined } from "@ant-design/icons";
import {
DeleteFilled,
PlusCircleFilled,
SyncOutlined,
} from "@ant-design/icons";
import { Button, notification, Table } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -22,13 +26,13 @@ export default function JobsAvailableSupplementComponent({
deleteAllNewJobs,
loadEstData,
estData,
importOptionsState
importOptionsState,
}) {
const { t } = useTranslation();
const [state, setState] = useState({
sortedInfo: {},
filteredInfo: { text: "" }
filteredInfo: { text: "" },
});
const handleTableChange = (pagination, filters, sorter) => {
@@ -45,7 +49,7 @@ export default function JobsAvailableSupplementComponent({
// filteredValue: state.filteredInfo.text || null,
sorter: (a, b) => alphaSort(a, b),
sortOrder:
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order,
},
{
title: t("jobs.fields.ro_number"),
@@ -57,7 +61,7 @@ export default function JobsAvailableSupplementComponent({
sorter: (a, b) => alphaSort(a, b),
sortOrder:
state.sortedInfo.columnKey === "cieca_id" && state.sortedInfo.order,
render: (text, record) => <div>{record.job && record.job.ro_number}</div>
render: (text, record) => <div>{record.job && record.job.ro_number}</div>,
},
{
title: t("jobs.fields.owner"),
@@ -67,7 +71,7 @@ export default function JobsAvailableSupplementComponent({
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
//width: "25%",
sortOrder:
state.sortedInfo.columnKey === "ownr_name" && state.sortedInfo.order
state.sortedInfo.columnKey === "ownr_name" && state.sortedInfo.order,
},
{
title: t("jobs.fields.vehicle"),
@@ -75,7 +79,7 @@ export default function JobsAvailableSupplementComponent({
key: "vehicle_info",
sorter: (a, b) => alphaSort(a.vehicle_info, b.vehicle_info),
sortOrder:
state.sortedInfo.columnKey === "vehicle_info" && state.sortedInfo.order
state.sortedInfo.columnKey === "vehicle_info" && state.sortedInfo.order,
//ellipsis: true
},
{
@@ -84,7 +88,7 @@ export default function JobsAvailableSupplementComponent({
key: "clm_no",
sorter: (a, b) => alphaSort(a.clm_no, b.clm_no),
sortOrder:
state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order
state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order,
//width: "12%",
//ellipsis: true
},
@@ -97,7 +101,7 @@ export default function JobsAvailableSupplementComponent({
state.sortedInfo.columnKey === "clm_amt" && state.sortedInfo.order,
render: (text, record) => (
<CurrencyFormatter>{record.clm_amt}</CurrencyFormatter>
)
),
//width: "12%",
//ellipsis: true
},
@@ -107,7 +111,7 @@ export default function JobsAvailableSupplementComponent({
key: "uploaded_by",
sorter: (a, b) => alphaSort(a.uploaded_by, b.uploaded_by),
sortOrder:
state.sortedInfo.columnKey === "uploaded_by" && state.sortedInfo.order
state.sortedInfo.columnKey === "uploaded_by" && state.sortedInfo.order,
//width: "12%",
//ellipsis: true
},
@@ -120,7 +124,7 @@ export default function JobsAvailableSupplementComponent({
state.sortedInfo.columnKey === "updated_at" && state.sortedInfo.order,
render: (text, record) => (
<DateTimeFormatter>{record.updated_at}</DateTimeFormatter>
)
),
//width: "12%",
//ellipsis: true
},
@@ -131,31 +135,46 @@ export default function JobsAvailableSupplementComponent({
<span>
<Button
onClick={() => {
deleteJob({ variables: { id: record.id } }).then(r => {
deleteJob({ variables: { id: record.id } }).then((r) => {
notification["success"]({
message: t("jobs.successes.deleted")
message: t("jobs.successes.deleted"),
});
refetch();
});
}}
>
}}>
<DeleteFilled />
</Button>
<Button
onClick={() => {
loadEstData({ variables: { id: record.id } });
setModalVisible(true);
}}
>
}}>
<PlusCircleFilled />
</Button>
</span>
)
),
//width: "12%",
//ellipsis: true
}
},
];
const handleDeleteAll = () => {
deleteAllNewJobs()
.then((r) => {
notification["success"]({
message: t("jobs.successes.all_deleted", {
count: r.data.delete_available_jobs.affected_rows,
}),
});
refetch();
})
.catch((r) => {
notification["error"]({
message: t("jobs.errors.deleted") + " " + r.message,
});
});
};
return (
<div>
<JobsFindModalContainer
@@ -177,37 +196,17 @@ export default function JobsAvailableSupplementComponent({
<Button
onClick={() => {
refetch();
}}
>
}}>
<SyncOutlined />
</Button>
<Button
onClick={() => {
deleteAllNewJobs()
.then(r => {
notification["success"]({
message: t("jobs.successes.all_deleted", {
count: r.data.delete_available_jobs.affected_rows
})
});
refetch();
})
.catch(r => {
notification["error"]({
message: t("jobs.errors.deleted") + " " + r.message
});
});
}}
>
Delete All
</Button>
<Button onClick={handleDeleteAll}>Delete All</Button>
</div>
);
}}
size="small"
size='small'
pagination={{ position: "top" }}
columns={columns.map(item => ({ ...item }))}
rowKey="id"
columns={columns}
rowKey='id'
dataSource={data && data.available_jobs}
onChange={handleTableChange}
/>

View File

@@ -1,4 +1,4 @@
import { useMutation, useQuery } from "@apollo/react-hooks";
import { useMutation, useQuery, useApolloClient } from "@apollo/react-hooks";
import { notification } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -6,13 +6,18 @@ import { connect } from "react-redux";
import { useHistory } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { CalculateJob } from "../../components/job-totals-table/job-totals.utility";
import { DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS, QUERY_AVAILABLE_SUPPLEMENT_JOBS } from "../../graphql/available-jobs.queries";
import {
DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS,
QUERY_AVAILABLE_SUPPLEMENT_JOBS,
} from "../../graphql/available-jobs.queries";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import JobsAvailableSupplementComponent from "./jobs-available-supplement.component";
import HeaderFields from "./jobs-available-supplement.headerfields";
import { GetSupplementDelta } from "./jobs-available-supplement.estlines.util";
import { gql } from "apollo-boost";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -31,6 +36,7 @@ export function JobsAvailableSupplementContainer({
);
const { t } = useTranslation();
const history = useHistory();
const client = useApolloClient();
const [deleteAllNewJobs] = useMutation(DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS);
const [modalVisible, setModalVisible] = useState(false);
@@ -40,7 +46,8 @@ export function JobsAvailableSupplementContainer({
const [loadEstData, estData] = estDataLazyLoad;
const importOptionsState = useState({ overrideHeaders: false });
const importOptions = importOptionsState[0];
const onModalOk = () => {
const onModalOk = async () => {
setModalVisible(false);
setInsertLoading(true);
@@ -61,10 +68,8 @@ export function JobsAvailableSupplementContainer({
let supp = estData.data.available_jobs_by_pk.est_data;
console.log("supp before", supp);
//TODO How to update the estimate lines.
delete supp.owner;
delete supp.vehicle;
if (importOptions.overrideHeaders) {
HeaderFields.forEach((item) => delete supp[item]);
}
@@ -77,8 +82,19 @@ export function JobsAvailableSupplementContainer({
bodyshop.shoprates
);
console.log('newTotals', newTotals)
let suppDelta = await GetSupplementDelta(
client,
selectedJob,
estData.data.available_jobs_by_pk.est_data.joblines.data
);
console.log("onModalOk -> suppDelta", suppDelta);
delete supp.joblines;
await client.mutate({
mutation: gql`
${suppDelta}
`,
});
updateJob({
variables: {
jobId: selectedJob,
@@ -123,12 +139,11 @@ export function JobsAvailableSupplementContainer({
setSelectedJob(null);
};
if (error) return <AlertComponent type="error" message={error.message} />;
if (error) return <AlertComponent type='error' message={error.message} />;
return (
<LoadingSpinner
loading={insertLoading}
message={t("jobs.labels.creating_new_job")}
>
message={t("jobs.labels.creating_new_job")}>
<JobsAvailableSupplementComponent
loading={loading}
data={data}

View File

@@ -0,0 +1,93 @@
import { GET_JOB_LINES_BY_PK } from "../../graphql/jobs-lines.queries";
import { gql } from "apollo-boost";
export const GetSupplementDelta = async (client, jobId, newLines) => {
console.log("-----Begin Supplement-----");
console.log("Supplement delta for jobId", jobId);
console.log("New Lines", newLines);
const {
data: { joblines: existingLines },
} = await client.query({
query: GET_JOB_LINES_BY_PK,
variables: { id: jobId },
});
const linesToInsert = [];
const linesToUpdate = [];
newLines.forEach((newLine) => {
const matchingIndex = existingLines.findIndex(
(eL) => eL.unq_seq === newLine.unq_seq
);
if (matchingIndex >= 0) {
//Found a relevant matching line. Add it to lines to update.
linesToUpdate.push({
id: existingLines[matchingIndex].id,
newData: newLine,
});
//Splice out item we found for performance.
existingLines.splice(matchingIndex, 1);
} else {
//Didn't find a match. Must be a new line.
linesToInsert.push(newLine);
}
});
//Wahtever is left in the existing lines, are lines that should be removed.
const insertQueries = linesToInsert.reduce((acc, value, idx) => {
return acc + generateInsertQuery(value, idx, jobId);
}, "");
const updateQueries = linesToUpdate.reduce((acc, value, idx) => {
return acc + generateUpdateQuery(value, idx);
}, "");
const removeQueries = existingLines.reduce((acc, value, idx) => {
return acc + generateRemoveQuery(value, idx);
}, "");
return new Promise((resolve, reject) => {
resolve(gql`
mutation SUPPLEMENT_EST_LINES{
${insertQueries + updateQueries + removeQueries}
}
`);
});
};
const generateInsertQuery = (lineToInsert, index, jobId) => {
lineToInsert.jobid = jobId;
return `
insert_joblines${index}: insert_joblines(objects: ${JSON.stringify(
lineToInsert
).replace(/"(\w+)"\s*:/g, "$1:")}) {
returning {
id
}
}`;
};
const generateUpdateQuery = (lineToUpdate, index) => {
return `
update_joblines${index}: update_joblines(where: { id: { _eq: "${
lineToUpdate.id
}" } }, _set: ${JSON.stringify(lineToUpdate.newData).replace(
/"(\w+)"\s*:/g,
"$1:"
)}) {
returning {
id
}
}`;
};
const generateRemoveQuery = (lineToRemove, index) => {
return `
update_joblines_r${index}: update_joblines(where: {id: {_eq: "${lineToRemove.id}"}}, _set: {removed: true}) {
returning{
id
}
}`;
};

View File

@@ -2,8 +2,9 @@ import { gql } from "apollo-boost";
export const GET_JOB_LINES_BY_PK = gql`
query GET_JOB_LINES_BY_PK($id: uuid!) {
joblines(where: { jobid: { _eq: $id } }, order_by: { unq_seq: asc }) {
joblines(where: { jobid: { _eq: $id } }, order_by: { line_no: asc }) {
id
line_no
unq_seq
line_ind
line_desc

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."joblines" DROP COLUMN "removed";
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."joblines" ADD COLUMN "removed" boolean NOT NULL DEFAULT
false;
type: run_sql

View File

@@ -0,0 +1,76 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- id
- created_at
- updated_at
- jobid
- unq_seq
- line_ind
- line_desc
- part_type
- oem_partno
- est_seq
- db_ref
- line_ref
- tax_part
- db_price
- act_price
- part_qty
- alt_partno
- mod_lbr_ty
- db_hrs
- mod_lb_hrs
- lbr_op
- lbr_amt
- glass_flag
- price_inc
- alt_part_i
- price_j
- cert_part
- alt_co_id
- alt_overrd
- alt_partm
- prt_dsmk_p
- prt_dsmk_m
- lbr_inc
- lbr_hrs_j
- lbr_typ_j
- lbr_op_j
- paint_stg
- paint_tone
- lbr_tax
- misc_amt
- misc_sublt
- misc_tax
- bett_type
- bett_pctg
- bett_amt
- bett_tax
- op_code_desc
- status
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,77 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,74 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- alt_overrd
- alt_part_i
- bett_tax
- cert_part
- glass_flag
- lbr_hrs_j
- lbr_inc
- lbr_op_j
- lbr_tax
- lbr_typ_j
- misc_sublt
- misc_tax
- price_inc
- price_j
- tax_part
- est_seq
- paint_stg
- paint_tone
- part_qty
- unq_seq
- act_price
- bett_amt
- bett_pctg
- db_hrs
- db_price
- lbr_amt
- line_ref
- misc_amt
- mod_lb_hrs
- prt_dsmk_m
- prt_dsmk_p
- alt_co_id
- alt_partm
- alt_partno
- bett_type
- db_ref
- lbr_op
- line_desc
- line_ind
- mod_lbr_ty
- oem_partno
- op_code_desc
- part_type
- status
- created_at
- updated_at
- id
- jobid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: joblines
schema: public
type: create_select_permission

View File

@@ -0,0 +1,75 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: joblines
schema: public
type: create_select_permission

View File

@@ -0,0 +1,76 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_update_permission
- args:
permission:
columns:
- alt_overrd
- alt_part_i
- bett_tax
- cert_part
- glass_flag
- lbr_hrs_j
- lbr_inc
- lbr_op_j
- lbr_tax
- lbr_typ_j
- misc_sublt
- misc_tax
- price_inc
- price_j
- tax_part
- est_seq
- paint_stg
- paint_tone
- part_qty
- unq_seq
- act_price
- bett_amt
- bett_pctg
- db_hrs
- db_price
- lbr_amt
- line_ref
- misc_amt
- mod_lb_hrs
- prt_dsmk_m
- prt_dsmk_p
- alt_co_id
- alt_partm
- alt_partno
- bett_type
- db_ref
- lbr_op
- line_desc
- line_ind
- mod_lbr_ty
- oem_partno
- op_code_desc
- part_type
- status
- created_at
- 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: joblines
schema: public
type: create_update_permission

View File

@@ -0,0 +1,77 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_update_permission
- args:
permission:
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_update_permission

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."joblines" DROP COLUMN "line_no";
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."joblines" ADD COLUMN "line_no" integer NULL;
type: run_sql

View File

@@ -0,0 +1,77 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,78 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_no
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,75 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: joblines
schema: public
type: create_select_permission

View File

@@ -0,0 +1,76 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_no
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: joblines
schema: public
type: create_select_permission

View File

@@ -0,0 +1,77 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_update_permission
- args:
permission:
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_update_permission

View File

@@ -0,0 +1,78 @@
- args:
role: user
table:
name: joblines
schema: public
type: drop_update_permission
- args:
permission:
columns:
- act_price
- alt_co_id
- alt_overrd
- alt_part_i
- alt_partm
- alt_partno
- bett_amt
- bett_pctg
- bett_tax
- bett_type
- cert_part
- created_at
- db_hrs
- db_price
- db_ref
- est_seq
- glass_flag
- id
- jobid
- lbr_amt
- lbr_hrs_j
- lbr_inc
- lbr_op
- lbr_op_j
- lbr_tax
- lbr_typ_j
- line_desc
- line_ind
- line_no
- line_ref
- misc_amt
- misc_sublt
- misc_tax
- mod_lb_hrs
- mod_lbr_ty
- oem_partno
- op_code_desc
- paint_stg
- paint_tone
- part_qty
- part_type
- price_inc
- price_j
- prt_dsmk_m
- prt_dsmk_p
- removed
- status
- tax_part
- unq_seq
- updated_at
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: joblines
schema: public
type: create_update_permission