Admin vehicle/owner reassociation IO-157

This commit is contained in:
Patrick Fic
2021-01-19 09:34:43 -08:00
parent 56cb193460
commit 5a1eb37544
18 changed files with 655 additions and 5 deletions

View File

@@ -348,6 +348,7 @@ export const GET_JOB_BY_PK = gql`
v_model_desc
v_make_desc
v_color
vehicleid
vehicle {
id
plate_no
@@ -413,6 +414,7 @@ export const GET_JOB_BY_PK = gql`
ownr_ph1
production_vars
ca_gst_registrant
ownerid
owner {
id
ownr_fn

View File

@@ -19,6 +19,33 @@ export const QUERY_SEARCH_OWNER_BY_IDX = gql`
}
`;
export const SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE = gql`
query SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
owners_by_pk(id: $id) {
id
ownr_fn
ownr_ln
ownr_co_nm
ownr_addr1
}
}
`;
export const SEARCH_OWNERS_FOR_AUTOCOMPLETE = gql`
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
search_owners(
args: { search: $search }
limit: 50
order_by: { ownr_ln: desc_nulls_last }
) {
id
ownr_fn
ownr_ln
ownr_co_nm
ownr_addr1
}
}
`;
export const QUERY_OWNER_BY_ID = gql`
query QUERY_OWNER_BY_ID($id: uuid!) {
owners_by_pk(id: $id) {

View File

@@ -132,3 +132,26 @@ export const SEARCH_VEHICLE_BY_VIN = gql`
}
}
`;
export const SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE = gql`
query SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
vehicles_by_pk(id: $id) {
id
v_vin
v_model_yr
v_make_desc
v_model_desc
}
}
`;
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
search_vehicles(args: { search: $search }, limit: 50) {
id
v_vin
v_model_yr
v_make_desc
v_model_desc
}
}
`;