@7365admin1/core 3.32.2-staging.51 → 3.32.2-staging.53

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/index.js CHANGED
@@ -27372,14 +27372,10 @@ function useVehicleService() {
27372
27372
  if (hasSecurityBypass) {
27373
27373
  addedByPM = true;
27374
27374
  }
27375
- if (!isBlocklist) {
27376
- value.status = "active" /* ACTIVE */;
27377
- }
27375
+ value.status = "active" /* ACTIVE */;
27378
27376
  if (addedBySecurity && !hasSecurityBypass) {
27379
27377
  value.status = "pending" /* PENDING */;
27380
27378
  }
27381
- if (isBlocklist)
27382
- value.status = "inactive" /* INACTIVE */;
27383
27379
  const _type = value.type;
27384
27380
  const _mode = isBlocklist ? "TrafficBlackList" /* TRAFFIC_BLACKLIST */ : "TrafficRedList" /* TRAFFIC_REDLIST */;
27385
27381
  const hasStart = typeof value.start === "string" ? value.start.trim() !== "" : !!value.start;
@@ -27445,6 +27441,11 @@ function useVehicleService() {
27445
27441
  end
27446
27442
  };
27447
27443
  if (vehicleValue.status && vehicleValue.status !== "pending" /* PENDING */) {
27444
+ const siteObjectId = new import_mongodb50.ObjectId(vehicleValue.site);
27445
+ const existingPlateNumber = await findOne({ plateNumber, site: siteObjectId });
27446
+ if (existingPlateNumber) {
27447
+ throw new import_node_server_utils78.BadRequestError(`Vehicle plate number ${plateNumber} already exists.`);
27448
+ }
27448
27449
  for (const camera of siteCameras) {
27449
27450
  const { host, username, password } = camera;
27450
27451
  const plateNumber2 = vehicleValue.plateNumber;
@@ -64946,6 +64947,7 @@ var BillingPaymentStatus = /* @__PURE__ */ ((BillingPaymentStatus2) => {
64946
64947
  BillingPaymentStatus2["SUCCESS"] = "success";
64947
64948
  BillingPaymentStatus2["FAILED"] = "failed";
64948
64949
  BillingPaymentStatus2["PARTIAL"] = "partial";
64950
+ BillingPaymentStatus2["CANCELLED"] = "cancelled";
64949
64951
  return BillingPaymentStatus2;
64950
64952
  })(BillingPaymentStatus || {});
64951
64953
  var schemaBillingItems = import_joi126.default.object({
@@ -65614,6 +65616,7 @@ function useRedDotPaymentController() {
65614
65616
  return;
65615
65617
  } catch (error2) {
65616
65618
  next(error2);
65619
+ return;
65617
65620
  }
65618
65621
  }
65619
65622
  return {