Added jobs available screens for new and supplement jobs.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: DROP TABLE "public"."available_jobs"
|
||||
type: run_sql
|
||||
@@ -0,0 +1,25 @@
|
||||
- args:
|
||||
sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: "CREATE TABLE \"public\".\"available_jobs\"(\"id\" uuid NOT NULL DEFAULT
|
||||
gen_random_uuid(), \"created_at\" timestamptz NOT NULL DEFAULT now(), \"updated_at\"
|
||||
timestamptz NOT NULL DEFAULT now(), \"uploaded_by\" text NOT NULL, \"cieca_id\"
|
||||
text NOT NULL, \"bodyshopid\" uuid NOT NULL, \"est_data\" jsonb NOT NULL, \"issupplement\"
|
||||
boolean NOT NULL DEFAULT false, \"jobid\" uuid, \"supplement_number\" integer,
|
||||
\"ownr_name\" text, \"vehicle_info\" text, \"clm_amt\" numeric, \"clm_no\" text,
|
||||
\"source_system\" text, PRIMARY KEY (\"id\") , FOREIGN KEY (\"bodyshopid\")
|
||||
REFERENCES \"public\".\"bodyshops\"(\"id\") ON UPDATE cascade ON DELETE cascade,
|
||||
FOREIGN KEY (\"jobid\") REFERENCES \"public\".\"jobs\"(\"id\") ON UPDATE restrict
|
||||
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_available_jobs_updated_at\"\nBEFORE
|
||||
UPDATE ON \"public\".\"available_jobs\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
|
||||
ON TRIGGER \"set_public_available_jobs_updated_at\" ON \"public\".\"available_jobs\"
|
||||
\nIS 'trigger to set value of column \"updated_at\" to current timestamp on
|
||||
row update';\n"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: add_existing_table_or_view
|
||||
@@ -0,0 +1,24 @@
|
||||
- args:
|
||||
relationship: bodyshop
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: job
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: available_jobs
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
- args:
|
||||
relationship: available_jobs
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,40 @@
|
||||
- args:
|
||||
name: bodyshop
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: bodyshopid
|
||||
type: create_object_relationship
|
||||
- args:
|
||||
name: job
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
type: create_object_relationship
|
||||
- args:
|
||||
name: available_jobs
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: bodyshopid
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
- args:
|
||||
name: available_jobs
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: jobid
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_upsert: true
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- uploaded_by
|
||||
- cieca_id
|
||||
- bodyshopid
|
||||
- est_data
|
||||
- issupplement
|
||||
- jobid
|
||||
- supplement_number
|
||||
- ownr_name
|
||||
- vehicle_info
|
||||
- clm_amt
|
||||
- clm_no
|
||||
- source_system
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
@@ -0,0 +1,34 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- issupplement
|
||||
- supplement_number
|
||||
- est_data
|
||||
- clm_amt
|
||||
- cieca_id
|
||||
- clm_no
|
||||
- ownr_name
|
||||
- source_system
|
||||
- uploaded_by
|
||||
- vehicle_info
|
||||
- created_at
|
||||
- updated_at
|
||||
- bodyshopid
|
||||
- id
|
||||
- jobid
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
limit: null
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
@@ -0,0 +1,21 @@
|
||||
- args:
|
||||
permission:
|
||||
columns: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: drop_delete_permission
|
||||
@@ -0,0 +1,16 @@
|
||||
- args:
|
||||
permission:
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: available_jobs
|
||||
schema: public
|
||||
type: create_delete_permission
|
||||
Reference in New Issue
Block a user