Baseline Parts Order modal functioning.
This commit is contained in:
@@ -14,7 +14,8 @@ export default function JobLinesComponent({
|
||||
setSearchText,
|
||||
selectedLines,
|
||||
setSelectedLines,
|
||||
partsOrderModalVisible
|
||||
partsOrderModalVisible,
|
||||
jobId
|
||||
}) {
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {}
|
||||
@@ -167,6 +168,7 @@ export default function JobLinesComponent({
|
||||
<PartsOrderModalContainer
|
||||
partsOrderModalVisible={partsOrderModalVisible}
|
||||
linesToOrder={selectedLines}
|
||||
jobId={jobId}
|
||||
/>
|
||||
|
||||
<Table
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function JobLinesContainer({ jobId }) {
|
||||
const [searchText, setSearchText] = useState("");
|
||||
const [selectedLines, setSelectedLines] = useState([]);
|
||||
const partsOrderModalVisible = useState(false);
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
|
||||
return (
|
||||
<JobLinesComponent
|
||||
@@ -57,6 +57,7 @@ export default function JobLinesContainer({ jobId }) {
|
||||
selectedLines={selectedLines}
|
||||
setSelectedLines={setSelectedLines}
|
||||
partsOrderModalVisible={partsOrderModalVisible}
|
||||
jobId={jobId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import React, { useState } from "react";
|
||||
import { AutoComplete, Icon } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
export default function PartsOrderModalComponent({ vendorList }) {
|
||||
export default function PartsOrderModalComponent({ vendorList, state }) {
|
||||
const [partsOrder, setPartsOrder] = state;
|
||||
const [vendorComplete, setVendorComplete] = useState(vendorList);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleSearch = value => {
|
||||
if (value === "") setVendorComplete(vendorList);
|
||||
else
|
||||
@@ -14,15 +16,25 @@ export default function PartsOrderModalComponent({ vendorList }) {
|
||||
);
|
||||
};
|
||||
|
||||
const handleSelect = (value, option) => {
|
||||
console.log("option", option);
|
||||
setPartsOrder({ ...partsOrder, vendorid: value });
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
TODO Not sure why name is not populating.
|
||||
<AutoComplete
|
||||
onSearch={handleSearch}
|
||||
onSelect={handleSelect}
|
||||
optionLabelProp='id'
|
||||
backfill
|
||||
dataSource={vendorComplete}
|
||||
placeholder={t("vendors.labels.search")}>
|
||||
{vendorComplete.map(v => (
|
||||
<AutoComplete.Option key={v.id}>
|
||||
{v.name}
|
||||
{v.favorite ? <Icon type='heart' /> : null}
|
||||
<div>{v.name}</div>
|
||||
<div> {v.favorite ? <Icon type='heart' /> : null}</div>
|
||||
</AutoComplete.Option>
|
||||
))}
|
||||
</AutoComplete>
|
||||
|
||||
@@ -1,14 +1,31 @@
|
||||
import React from "react";
|
||||
import { Modal } from "antd";
|
||||
import PartsOrderModalComponent from "./parts-order-modal.component";
|
||||
import React, { useState } from "react";
|
||||
import { useQuery, useMutation } from "react-apollo";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { QUERY_ALL_VENDORS_FOR_ORDER } from "../../graphql/vendors.queries";
|
||||
import { useQuery } from "react-apollo";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import { INSERT_NEW_PARTS_ORDERS } from "../../graphql/parts-orders.queries";
|
||||
import {
|
||||
selectCurrentUser,
|
||||
selectBodyshop
|
||||
} from "../../redux/user/user.selectors";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import PartsOrderModalComponent from "./parts-order-modal.component";
|
||||
|
||||
export default function PartsOrderModalContainer({
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null
|
||||
)(function PartsOrderModalContainer({
|
||||
partsOrderModalVisible,
|
||||
linesToOrder
|
||||
linesToOrder,
|
||||
jobId,
|
||||
currentUser,
|
||||
bodyshop
|
||||
}) {
|
||||
const [modalVisible, setModalVisible] = partsOrderModalVisible;
|
||||
const { loading, error, data } = useQuery(QUERY_ALL_VENDORS_FOR_ORDER, {
|
||||
@@ -16,13 +33,50 @@ export default function PartsOrderModalContainer({
|
||||
skip: !modalVisible
|
||||
});
|
||||
|
||||
const [insertPartOrder] = useMutation(INSERT_NEW_PARTS_ORDERS);
|
||||
|
||||
const partsOrderState = useState({
|
||||
vendorid: null,
|
||||
jobid: jobId,
|
||||
user_email: currentUser.email
|
||||
});
|
||||
|
||||
const [partsOrder, setPartsOrder] = partsOrderState;
|
||||
const handleOk = () => {
|
||||
insertPartOrder({
|
||||
variables: {
|
||||
po: [
|
||||
{
|
||||
...partsOrder,
|
||||
status: bodyshop.md_order_statuses.default_ordered || "Ordered*",
|
||||
parts_order_lines: {
|
||||
data: linesToOrder.reduce((acc, value) => {
|
||||
acc.push({
|
||||
line_desc: value.line_desc,
|
||||
joblineid: value.joblineid
|
||||
});
|
||||
return acc;
|
||||
}, [])
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
setModalVisible(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal visible={modalVisible} onCancel={() => setModalVisible(false)}>
|
||||
<Modal
|
||||
visible={modalVisible}
|
||||
onCancel={() => setModalVisible(false)}
|
||||
onOk={handleOk}>
|
||||
{error ? <AlertComponent message={error.message} type='error' /> : null}
|
||||
<LoadingSpinner loading={loading}>
|
||||
{JSON.stringify(linesToOrder)}
|
||||
<PartsOrderModalComponent vendorList={(data && data.vendors) || []} />
|
||||
<PartsOrderModalComponent
|
||||
vendorList={(data && data.vendors) || []}
|
||||
state={partsOrderState}
|
||||
/>
|
||||
</LoadingSpinner>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
shopname
|
||||
state
|
||||
state_tax_id
|
||||
|
||||
11
client/src/graphql/parts-orders.queries.js
Normal file
11
client/src/graphql/parts-orders.queries.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
export const INSERT_NEW_PARTS_ORDERS = gql`
|
||||
mutation INSERT_NEW_PARTS_ORDERS($po: [parts_orders_insert_input!]!) {
|
||||
insert_parts_orders(objects: $po) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."parts_order"."ordered_by_user_id" IS E'null'
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: alter table "public"."parts_order" rename column "user_email" to "ordered_by_user_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,7 @@
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."parts_order"."ordered_by_user_id" IS E''
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: alter table "public"."parts_order" rename column "ordered_by_user_id" to
|
||||
"user_email";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- user_email
|
||||
- order_number
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,36 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- user_email
|
||||
- order_number
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
computed_fields: []
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,35 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
computed_fields: []
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- user_email
|
||||
- order_number
|
||||
- status
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order" ADD COLUMN "order_number" text
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order" ALTER COLUMN "order_number" DROP NOT NULL
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order" DROP COLUMN "order_number" CASCADE
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order" DROP COLUMN "order_number";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order" ADD COLUMN "order_number" serial NOT NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- order_number
|
||||
- status
|
||||
- user_email
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,35 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
computed_fields: []
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,36 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- order_number
|
||||
- status
|
||||
- user_email
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
computed_fields: []
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- created_at
|
||||
- deliver_by
|
||||
- id
|
||||
- jobid
|
||||
- order_date
|
||||
- status
|
||||
- updated_at
|
||||
- user_email
|
||||
- vendorid
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,38 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- deliver_by
|
||||
- order_date
|
||||
- order_number
|
||||
- status
|
||||
- user_email
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- jobid
|
||||
- vendorid
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: parts_order
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: alter table "public"."parts_orders" rename to "parts_order";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: alter table "public"."parts_order" rename to "parts_orders";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,7 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order_lines" ALTER COLUMN "line_desc" SET NOT
|
||||
NULL;
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."parts_order_lines"."line_desc" IS E'null'
|
||||
type: run_sql
|
||||
@@ -0,0 +1,7 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."parts_order_lines" ALTER COLUMN "line_desc" DROP NOT
|
||||
NULL;
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."parts_order_lines"."line_desc" IS E''
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "md_order_statuses";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "md_order_statuses" jsonb NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- id
|
||||
- insurance_vendor_id
|
||||
- logo_img_path
|
||||
- md_ro_statuses
|
||||
- region_config
|
||||
- shopname
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,41 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- id
|
||||
- shopname
|
||||
- created_at
|
||||
- updated_at
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- state
|
||||
- zip_post
|
||||
- country
|
||||
- email
|
||||
- federal_tax_id
|
||||
- insurance_vendor_id
|
||||
- state_tax_id
|
||||
- logo_img_path
|
||||
- md_ro_statuses
|
||||
- region_config
|
||||
- md_order_statuses
|
||||
computed_fields: []
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- federal_tax_id
|
||||
- insurance_vendor_id
|
||||
- logo_img_path
|
||||
- md_ro_statuses
|
||||
- shopname
|
||||
- state
|
||||
- state_tax_id
|
||||
- updated_at
|
||||
- zip_post
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,43 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- md_order_statuses
|
||||
- md_ro_statuses
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- email
|
||||
- federal_tax_id
|
||||
- insurance_vendor_id
|
||||
- logo_img_path
|
||||
- region_config
|
||||
- shopname
|
||||
- state
|
||||
- state_tax_id
|
||||
- zip_post
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
filter:
|
||||
associations:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
Reference in New Issue
Block a user