@adventurelabs/scout-core 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/helpers/parts.js
CHANGED
|
@@ -246,7 +246,9 @@ export async function get_parts_by_herd_ids(client, herd_ids) {
|
|
|
246
246
|
.select(`
|
|
247
247
|
*,
|
|
248
248
|
devices!parts_device_id_fkey(herd_id),
|
|
249
|
-
product_numbers!parts_product_number_fkey(
|
|
249
|
+
product_numbers!parts_product_number_fkey(
|
|
250
|
+
products!product_numbers_product_id_fkey(*)
|
|
251
|
+
)
|
|
250
252
|
`)
|
|
251
253
|
.in("devices.herd_id", herd_ids)
|
|
252
254
|
.eq("lifecycle", "active")
|
|
@@ -5,7 +5,7 @@ export async function server_get_product_compatibilities(primary_product_number,
|
|
|
5
5
|
const supabase = await newServerClient();
|
|
6
6
|
const { data: primary, error: primaryError } = await supabase
|
|
7
7
|
.from("product_numbers")
|
|
8
|
-
.select("product_id, products!inner(manufacturers!inner(id))")
|
|
8
|
+
.select("product_id, products!product_numbers_product_id_fkey!inner(manufacturers!inner(id))")
|
|
9
9
|
.eq("product_number", primary_product_number)
|
|
10
10
|
.eq("lifecycle", "active")
|
|
11
11
|
.eq("products.lifecycle", "active")
|
|
@@ -19,7 +19,7 @@ export async function server_get_product_compatibilities(primary_product_number,
|
|
|
19
19
|
}
|
|
20
20
|
const { data, error } = await supabase
|
|
21
21
|
.from("product_compatibilities")
|
|
22
|
-
.select("*, product_numbers!product_compatibilities_accessory_product_number_fkey!inner(products!inner(manufacturers!inner(id)))")
|
|
22
|
+
.select("*, product_numbers!product_compatibilities_accessory_product_number_fkey!inner(products!product_numbers_product_id_fkey!inner(manufacturers!inner(id)))")
|
|
23
23
|
.eq("primary_product_id", primary.product_id)
|
|
24
24
|
.eq("role", role)
|
|
25
25
|
.eq("product_numbers.lifecycle", "active")
|
|
@@ -30,7 +30,7 @@ export async function server_get_product_for_product_number(product_number) {
|
|
|
30
30
|
const supabase = await newServerClient();
|
|
31
31
|
const { data, error } = await supabase
|
|
32
32
|
.from("product_numbers")
|
|
33
|
-
.select("products(*)")
|
|
33
|
+
.select("products!product_numbers_product_id_fkey(*)")
|
|
34
34
|
.eq("product_number", product_number)
|
|
35
35
|
.maybeSingle();
|
|
36
36
|
if (error) {
|