tsv2-library 1.0.61-alpha.81 → 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.
package/dist/tsv2-library.es.js
CHANGED
|
@@ -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 (
|
|
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.",
|
|
@@ -70679,6 +70685,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
70679
70685
|
const field2 = reactive({
|
|
70680
70686
|
value: props.initialValue ?? props.modelValue ?? []
|
|
70681
70687
|
});
|
|
70688
|
+
const inputBadgeKey = ref(0);
|
|
70682
70689
|
const inputId = computed(() => {
|
|
70683
70690
|
var _a;
|
|
70684
70691
|
return ((_a = props.label) == null ? void 0 : _a.toLowerCase) + "-badge-input";
|
|
@@ -70734,8 +70741,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
70734
70741
|
}
|
|
70735
70742
|
};
|
|
70736
70743
|
const onBeforeAddLabel = (event2) => {
|
|
70737
|
-
|
|
70738
|
-
const isRedundant = (_a = field2.value) == null ? void 0 : _a.some((label8) => label8 === newLabel.value);
|
|
70744
|
+
const isRedundant = checkRedundant(newLabel.value);
|
|
70739
70745
|
if (isRedundant) {
|
|
70740
70746
|
return;
|
|
70741
70747
|
}
|
|
@@ -70767,10 +70773,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
70767
70773
|
};
|
|
70768
70774
|
const onEditBadge = (text2, index2) => {
|
|
70769
70775
|
if (field2.value && text2) {
|
|
70776
|
+
const isRedundant = checkRedundant(text2);
|
|
70777
|
+
if (isRedundant) {
|
|
70778
|
+
inputBadgeKey.value++;
|
|
70779
|
+
return;
|
|
70780
|
+
}
|
|
70770
70781
|
field2.value[index2] = text2;
|
|
70771
70782
|
emit("update:modelValue", field2.value);
|
|
70772
70783
|
}
|
|
70773
70784
|
};
|
|
70785
|
+
const checkRedundant = (text2) => {
|
|
70786
|
+
var _a;
|
|
70787
|
+
return (_a = field2.value) == null ? void 0 : _a.some((label8) => label8 === text2);
|
|
70788
|
+
};
|
|
70774
70789
|
const isFirefoxBased = navigator.userAgent.includes("Firefox");
|
|
70775
70790
|
watch(
|
|
70776
70791
|
() => props.initialValue,
|
|
@@ -70803,7 +70818,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
70803
70818
|
"tooltip-pos": _ctx.fieldTooltipPos
|
|
70804
70819
|
}, {
|
|
70805
70820
|
default: withCtx(() => [
|
|
70806
|
-
|
|
70821
|
+
(openBlock(), createElementBlock("div", {
|
|
70822
|
+
key: inputBadgeKey.value,
|
|
70807
70823
|
class: normalizeClass([
|
|
70808
70824
|
"flex flex-wrap gap-x-0.5 gap-y-[5px] items-center",
|
|
70809
70825
|
"min-h-[26px] h-fit w-full",
|
|
@@ -70890,7 +70906,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
70890
70906
|
_: 1
|
|
70891
70907
|
}, 512)
|
|
70892
70908
|
], 32)
|
|
70893
|
-
], 2),
|
|
70909
|
+
], 2)),
|
|
70894
70910
|
props.showValidatorMessage && props.label ? (openBlock(), createBlock(_sfc_main$19, {
|
|
70895
70911
|
key: 0,
|
|
70896
70912
|
message: invalidMessage.value
|