@trackunit/filters-graphql-hook 0.0.156 → 0.0.158
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/index.cjs.js +15 -1
- package/index.esm.js +15 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -203,6 +203,18 @@ const metadataCompleteness = {
|
|
|
203
203
|
COMPLETE: "COMPLETE",
|
|
204
204
|
PARTIAL: "PARTIAL",
|
|
205
205
|
};
|
|
206
|
+
const rentalStatus = {
|
|
207
|
+
AVAILABLE: "AVAILABLE",
|
|
208
|
+
IN_REPAIR: "IN_REPAIR",
|
|
209
|
+
NOT_ON_CONTRACT: "NOT_ON_CONTRACT",
|
|
210
|
+
OFF_RENT: "OFF_RENT",
|
|
211
|
+
ON_RENT: "ON_RENT",
|
|
212
|
+
OTHER: "OTHER",
|
|
213
|
+
PICK_UP_READY: "PICK_UP_READY",
|
|
214
|
+
RESERVED: "RESERVED",
|
|
215
|
+
RETURNED: "RETURNED",
|
|
216
|
+
TRANSFER: "TRANSFER",
|
|
217
|
+
};
|
|
206
218
|
const servicePlanStatus = {
|
|
207
219
|
COMPLETE: "COMPLETE",
|
|
208
220
|
DRAFT: "DRAFT",
|
|
@@ -324,6 +336,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
324
336
|
siteTypes: fixTypes(filters.siteType, siteTypeSFS),
|
|
325
337
|
rentalCustomerName: stringArrayOrUndefined(filters.rentalCustomerName),
|
|
326
338
|
rentalStatus: fixTypes(filters.rentalStatus, legacyRentalStatus),
|
|
339
|
+
rentalStatuses: fixTypes(filters.rentalStatuses, rentalStatus),
|
|
327
340
|
customFields: valuesIfNotEmpty(customFields),
|
|
328
341
|
systemOfMeasurement: systemOfMeasurement,
|
|
329
342
|
customerIds: valueNameArrayOrUndefined(filters.customerIds),
|
|
@@ -333,7 +346,8 @@ const useActiveAssetFilters = (filters) => {
|
|
|
333
346
|
};
|
|
334
347
|
const isBoundingBox = (value) => {
|
|
335
348
|
return value
|
|
336
|
-
?
|
|
349
|
+
? // eslint-disable-next-line local-rules/prefer-custom-object-keys
|
|
350
|
+
typeof value === "object" && Object.keys(value).includes("nw") && Object.keys(value).includes("se")
|
|
337
351
|
: false;
|
|
338
352
|
};
|
|
339
353
|
|
package/index.esm.js
CHANGED
|
@@ -199,6 +199,18 @@ const metadataCompleteness = {
|
|
|
199
199
|
COMPLETE: "COMPLETE",
|
|
200
200
|
PARTIAL: "PARTIAL",
|
|
201
201
|
};
|
|
202
|
+
const rentalStatus = {
|
|
203
|
+
AVAILABLE: "AVAILABLE",
|
|
204
|
+
IN_REPAIR: "IN_REPAIR",
|
|
205
|
+
NOT_ON_CONTRACT: "NOT_ON_CONTRACT",
|
|
206
|
+
OFF_RENT: "OFF_RENT",
|
|
207
|
+
ON_RENT: "ON_RENT",
|
|
208
|
+
OTHER: "OTHER",
|
|
209
|
+
PICK_UP_READY: "PICK_UP_READY",
|
|
210
|
+
RESERVED: "RESERVED",
|
|
211
|
+
RETURNED: "RETURNED",
|
|
212
|
+
TRANSFER: "TRANSFER",
|
|
213
|
+
};
|
|
202
214
|
const servicePlanStatus = {
|
|
203
215
|
COMPLETE: "COMPLETE",
|
|
204
216
|
DRAFT: "DRAFT",
|
|
@@ -320,6 +332,7 @@ const useActiveAssetFilters = (filters) => {
|
|
|
320
332
|
siteTypes: fixTypes(filters.siteType, siteTypeSFS),
|
|
321
333
|
rentalCustomerName: stringArrayOrUndefined(filters.rentalCustomerName),
|
|
322
334
|
rentalStatus: fixTypes(filters.rentalStatus, legacyRentalStatus),
|
|
335
|
+
rentalStatuses: fixTypes(filters.rentalStatuses, rentalStatus),
|
|
323
336
|
customFields: valuesIfNotEmpty(customFields),
|
|
324
337
|
systemOfMeasurement: systemOfMeasurement,
|
|
325
338
|
customerIds: valueNameArrayOrUndefined(filters.customerIds),
|
|
@@ -329,7 +342,8 @@ const useActiveAssetFilters = (filters) => {
|
|
|
329
342
|
};
|
|
330
343
|
const isBoundingBox = (value) => {
|
|
331
344
|
return value
|
|
332
|
-
?
|
|
345
|
+
? // eslint-disable-next-line local-rules/prefer-custom-object-keys
|
|
346
|
+
typeof value === "object" && Object.keys(value).includes("nw") && Object.keys(value).includes("se")
|
|
333
347
|
: false;
|
|
334
348
|
};
|
|
335
349
|
|