Removed references to allocations objects. Added new fields to job for employee assignment + created new component. BOD-100
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[]
|
||||
20
hasura/migrations/1594932730719_run_sql_migration/up.yaml
Normal file
20
hasura/migrations/1594932730719_run_sql_migration/up.yaml
Normal file
@@ -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 parts.partcount,\n j.kanbanparent,\n j.employee_body,\n
|
||||
\ j.employee_refinish\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
|
||||
Reference in New Issue
Block a user