Merged in release/2023-04-28 (pull request #720)

Release/2023 04 28
This commit is contained in:
Patrick Fic
2023-04-24 21:45:57 +00:00
10 changed files with 71 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ import { GLOBAL_SEARCH_QUERY } from "../../graphql/search.queries";
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
import AlertComponent from "../alert/alert.component";
import OwnerNameDisplay, {
OwnerNameDisplayFunction
OwnerNameDisplayFunction,
} from "../owner-name-display/owner-name-display.component";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
export default function GlobalSearch() {
@@ -18,11 +18,18 @@ export default function GlobalSearch() {
useLazyQuery(GLOBAL_SEARCH_QUERY);
const executeSearch = (v) => {
if (v && v.variables.search && v.variables.search !== "") callSearch(v);
if (
v &&
v.variables.search &&
v.variables.search !== "" &&
v.variables.search.length >= 3
)
callSearch(v);
};
const debouncedExecuteSearch = _.debounce(executeSearch, 750);
const handleSearch = (value) => {
console.log("Handle Search");
debouncedExecuteSearch({ variables: { search: value } });
};
@@ -177,6 +184,7 @@ export default function GlobalSearch() {
<AutoComplete
options={options}
onSearch={handleSearch}
defaultActiveFirstOption
onSelect={(val, opt) => {
history.push(opt.label.props.to);

View File

@@ -5231,14 +5231,9 @@
- name: job
using:
foreign_key_constraint_on: jobid
array_relationships:
- name: tt_approval_queues
- name: tt_approval_queue
using:
foreign_key_constraint_on:
column: timeticketid
table:
name: tt_approval_queue
schema: public
foreign_key_constraint_on: ttapprovalqueueid
insert_permissions:
- role: user
permission:
@@ -5268,6 +5263,7 @@
- memo
- productivehrs
- rate
- ttapprovalqueueid
- updated_at
select_permissions:
- role: user
@@ -5289,6 +5285,7 @@
- memo
- productivehrs
- rate
- ttapprovalqueueid
- updated_at
filter:
bodyshop:
@@ -5319,6 +5316,7 @@
- memo
- productivehrs
- rate
- ttapprovalqueueid
- updated_at
filter:
bodyshop:
@@ -5442,12 +5440,17 @@
- name: job
using:
foreign_key_constraint_on: jobid
- name: timeticket
using:
foreign_key_constraint_on: timeticketid
- name: user
using:
foreign_key_constraint_on: approved_by
array_relationships:
- name: timetickets
using:
foreign_key_constraint_on:
column: ttapprovalqueueid
table:
name: timetickets
schema: public
insert_permissions:
- role: user
permission:
@@ -5461,44 +5464,42 @@
authid:
_eq: X-Hasura-User-Id
columns:
- id
- created_at
- updated_at
- bodyshopid
- jobid
- employeeid
- timeticketid
- approved_by
- approved_at
- actualhrs
- productivehrs
- rate
- flat_rate
- approved_at
- approved_by
- bodyshopid
- ciecacode
- cost_center
- created_at
- date
- employeeid
- flat_rate
- id
- jobid
- memo
- productivehrs
- rate
- updated_at
select_permissions:
- role: user
permission:
columns:
- flat_rate
- date
- actualhrs
- productivehrs
- rate
- approved_at
- approved_by
- bodyshopid
- ciecacode
- cost_center
- memo
- approved_at
- created_at
- updated_at
- bodyshopid
- date
- employeeid
- flat_rate
- id
- jobid
- timeticketid
- memo
- productivehrs
- rate
- updated_at
filter:
bodyshop:
associations:
@@ -5513,23 +5514,22 @@
- role: user
permission:
columns:
- flat_rate
- date
- actualhrs
- productivehrs
- rate
- approved_at
- approved_by
- bodyshopid
- ciecacode
- cost_center
- memo
- approved_at
- created_at
- updated_at
- bodyshopid
- date
- employeeid
- flat_rate
- id
- jobid
- timeticketid
- memo
- productivehrs
- rate
- updated_at
filter:
bodyshop:
associations:

View File

@@ -0,0 +1,5 @@
alter table "public"."tt_approval_queue"
add constraint "tt_approval_queue_timeticketid_fkey"
foreign key ("timeticketid")
references "public"."timetickets"
("id") on update cascade on delete cascade;

View File

@@ -0,0 +1 @@
alter table "public"."tt_approval_queue" drop constraint "tt_approval_queue_timeticketid_fkey";

View File

@@ -0,0 +1,2 @@
alter table "public"."tt_approval_queue" alter column "timeticketid" drop not null;
alter table "public"."tt_approval_queue" add column "timeticketid" uuid;

View File

@@ -0,0 +1 @@
alter table "public"."tt_approval_queue" drop column "timeticketid" cascade;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."timetickets" add column "ttapprovalqueueid" uuid
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."timetickets" add column "ttapprovalqueueid" uuid
null;

View File

@@ -0,0 +1 @@
alter table "public"."timetickets" drop constraint "timetickets_ttapprovalqueueid_fkey";

View File

@@ -0,0 +1,5 @@
alter table "public"."timetickets"
add constraint "timetickets_ttapprovalqueueid_fkey"
foreign key ("ttapprovalqueueid")
references "public"."tt_approval_queue"
("id") on update cascade on delete set null;