tsv2-library 1.0.61-alpha.82 → 1.0.61-alpha.83

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.
@@ -73,4 +73,6 @@ export type Asset = {
73
73
  assetImageBig?: string;
74
74
  assetImage?: string;
75
75
  setDefault?: 'firstImage' | 'secondImage';
76
+ auditStatus?: string;
77
+ maintenanceStatus?: string;
76
78
  };
@@ -30963,8 +30963,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
30963
30963
  ...props.queryParams,
30964
30964
  tag: payload.code,
30965
30965
  page: 1,
30966
- limit: 1,
30967
- maintenanceAuditStatus: ["None"]
30966
+ limit: 1
30968
30967
  };
30969
30968
  const { data: response } = await AssetsServices.postAssetList(
30970
30969
  "Available",
@@ -30972,10 +30971,17 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
30972
30971
  );
30973
30972
  if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.length) {
30974
30973
  const asset = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data[0];
30974
+ const inAuditMaintenance = !!asset.auditStatus || !!asset.maintenanceStatus;
30975
30975
  const isAlreadyOnTheList = (_d = props.modelValue) == null ? void 0 : _d.some(
30976
30976
  (item3) => item3._id === asset._id
30977
30977
  );
30978
- if (isAlreadyOnTheList) {
30978
+ if (inAuditMaintenance) {
30979
+ toast2.add({
30980
+ severity: "error",
30981
+ message: "Error, this asset is in audit/maintenance.",
30982
+ group: "add-by-scan-error"
30983
+ });
30984
+ } else if (isAlreadyOnTheList) {
30979
30985
  toast2.add({
30980
30986
  severity: "error",
30981
30987
  message: "Error, this asset already exists in the list.",