diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js
index f9a227fab..8b38e5287 100644
--- a/client/src/components/production-list-columns/production-list-columns.data.js
+++ b/client/src/components/production-list-columns/production-list-columns.data.js
@@ -6,6 +6,7 @@ import { Link } from "react-router-dom";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { TimeFormatter } from "../../utils/DateFormatter";
import PhoneFormatter from "../../utils/PhoneFormatter";
+import { onlyUnique } from "../../utils/arrayHelper";
import { alphaSort, dateSort, statusSort } from "../../utils/sorters";
import JobAltTransportChange from "../job-at-change/job-at-change.component";
import JobPartsQueueCount from "../job-parts-queue-count/job-parts-queue-count.component";
@@ -573,12 +574,17 @@ const r = ({ technician, state, activeStatuses, data, bodyshop }) => {
sortOrder:
state.sortedInfo.columnKey === "estimator" && state.sortedInfo.order,
filters:
- data?.map((s) => {
- return {
- text: `${s.est_ct_fn || ""} ${s.est_ct_ln || ""}`.trim(),
- value: [`${s.est_ct_fn || ""} ${s.est_ct_ln || ""}`.trim()],
- };
- }) || [],
+ (data &&
+ data
+ .map((j) => `${j.est_ct_fn || ""} ${j.est_ct_ln || ""}`.trim())
+ .filter(onlyUnique)
+ .map((s) => {
+ return {
+ text: s || "N/A",
+ value: [s],
+ };
+ })) ||
+ [],
onFilter: (value, record) =>
value.includes(
`${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim()
diff --git a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
index d811eb794..928b4286b 100644
--- a/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
+++ b/client/src/components/shop-teams/shop-employee-teams.form.component.jsx
@@ -2,11 +2,11 @@ import { DeleteFilled } from "@ant-design/icons";
import { useMutation, useQuery } from "@apollo/client";
import {
Button,
- Space,
Card,
Form,
Input,
InputNumber,
+ Space,
Switch,
notification,
} from "antd";
@@ -157,6 +157,18 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
>
+
+
+
{(fields, { add, remove, move }) => {
@@ -199,7 +211,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
},
]}
>
-
+
{
},
group: "customers",
},
+ load_level: {
+ title: i18n.t("reportcenter.templates.load_level"),
+ subject: i18n.t("reportcenter.templates.load_level"),
+ key: "load_level",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_open"),
+ },
+ group: "jobs",
+ enhanced_payroll: true,
+ },
}
: {}),
...(!type || type === "courtesycarcontract"
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 216ac8c48..9867b3f8e 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -2023,24 +2023,24 @@
- active:
_eq: true
columns:
- - labor_rates
- - percentage
- created_at
- - updated_at
- employeeid
- id
+ - labor_rates
+ - percentage
- teamid
+ - updated_at
select_permissions:
- role: user
permission:
columns:
- - labor_rates
- - percentage
- created_at
- - updated_at
- employeeid
- id
+ - labor_rates
+ - percentage
- teamid
+ - updated_at
filter:
employee_team:
bodyshop:
@@ -2055,13 +2055,13 @@
- role: user
permission:
columns:
- - labor_rates
- - percentage
- created_at
- - updated_at
- employeeid
- id
+ - labor_rates
+ - percentage
- teamid
+ - updated_at
filter:
employee_team:
bodyshop:
@@ -2123,21 +2123,23 @@
_eq: true
columns:
- active
- - name
- - created_at
- - updated_at
- bodyshopid
+ - created_at
- id
+ - max_load
+ - name
+ - updated_at
select_permissions:
- role: user
permission:
columns:
- active
- - name
- - created_at
- - updated_at
- bodyshopid
+ - created_at
- id
+ - max_load
+ - name
+ - updated_at
filter:
bodyshop:
associations:
@@ -2153,6 +2155,7 @@
columns:
- active
- bodyshopid
+ - max_load
- name
- updated_at
filter:
diff --git a/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/down.sql b/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/down.sql
new file mode 100644
index 000000000..8df675f00
--- /dev/null
+++ b/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."employee_team_members" add column "max_load" numeric
+-- not null default '10000';
diff --git a/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/up.sql b/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/up.sql
new file mode 100644
index 000000000..7b49a8dcd
--- /dev/null
+++ b/hasura/migrations/1704401074280_alter_table_public_employee_team_members_add_column_max_load/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."employee_team_members" add column "max_load" numeric
+ not null default '10000';
diff --git a/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/down.sql b/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/down.sql
new file mode 100644
index 000000000..a869e6890
--- /dev/null
+++ b/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/down.sql
@@ -0,0 +1,3 @@
+alter table "public"."employee_team_members" alter column "max_load" set default '10000'::numeric;
+alter table "public"."employee_team_members" alter column "max_load" drop not null;
+alter table "public"."employee_team_members" add column "max_load" numeric;
diff --git a/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/up.sql b/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/up.sql
new file mode 100644
index 000000000..18bf59cf3
--- /dev/null
+++ b/hasura/migrations/1704403786392_alter_table_public_employee_team_members_drop_column_max_load/up.sql
@@ -0,0 +1 @@
+alter table "public"."employee_team_members" drop column "max_load" cascade;
diff --git a/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/down.sql b/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/down.sql
new file mode 100644
index 000000000..58a0f9b6d
--- /dev/null
+++ b/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."employee_teams" add column "max_load" numeric
+-- not null default '10000';
diff --git a/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/up.sql b/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/up.sql
new file mode 100644
index 000000000..c55ba33d0
--- /dev/null
+++ b/hasura/migrations/1704403846373_alter_table_public_employee_teams_add_column_max_load/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."employee_teams" add column "max_load" numeric
+ not null default '10000';