tsv2-library 1.0.61-alpha.31 → 1.0.61-alpha.32
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.
|
@@ -2,8 +2,8 @@ import type { PropType as __PropType } from 'vue';
|
|
|
2
2
|
type Field = 'brand' | 'model' | 'group' | 'status';
|
|
3
3
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
4
|
id: {
|
|
5
|
-
type: __PropType<string>;
|
|
6
|
-
required:
|
|
5
|
+
type: __PropType<string | undefined>;
|
|
6
|
+
required: false;
|
|
7
7
|
};
|
|
8
8
|
fields: {
|
|
9
9
|
type: __PropType<Field[] | undefined>;
|
|
@@ -15,8 +15,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
15
15
|
};
|
|
16
16
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
id: {
|
|
18
|
-
type: __PropType<string>;
|
|
19
|
-
required:
|
|
18
|
+
type: __PropType<string | undefined>;
|
|
19
|
+
required: false;
|
|
20
20
|
};
|
|
21
21
|
fields: {
|
|
22
22
|
type: __PropType<Field[] | undefined>;
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -27977,8 +27977,8 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
27977
27977
|
return ((_h = (_g = (_f = asset.value) == null ? void 0 : _f.name) == null ? void 0 : _g.aliasCode) == null ? void 0 : _h.length) ? `(${(_j = (_i = asset.value) == null ? void 0 : _i.name) == null ? void 0 : _j.aliasCode})` : "";
|
|
27978
27978
|
});
|
|
27979
27979
|
const assetTagType = computed(() => {
|
|
27980
|
-
var _a, _b;
|
|
27981
|
-
return ((_a = asset.value) == null ? void 0 : _a.assetTagType) ?? ((_b = asset.value) == null ? void 0 : _b.tagType);
|
|
27980
|
+
var _a, _b, _c;
|
|
27981
|
+
return ((_a = asset.value) == null ? void 0 : _a.assetTagType) ?? ((_b = asset.value) == null ? void 0 : _b.tagType) ?? ((_c = props.transactionDetail) == null ? void 0 : _c.tagType);
|
|
27982
27982
|
});
|
|
27983
27983
|
const assetName = computed(() => {
|
|
27984
27984
|
var _a, _b;
|
|
@@ -27991,6 +27991,8 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
27991
27991
|
}
|
|
27992
27992
|
]);
|
|
27993
27993
|
const fetchAssetDetail = async () => {
|
|
27994
|
+
if (!props.id)
|
|
27995
|
+
return;
|
|
27994
27996
|
try {
|
|
27995
27997
|
setLoading(true);
|
|
27996
27998
|
const { data: response } = await AssetsServices.getAssetDetail(props.id);
|
|
@@ -28011,8 +28013,44 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
28011
28013
|
{ deep: true }
|
|
28012
28014
|
);
|
|
28013
28015
|
__expose({ asset });
|
|
28016
|
+
const nameWithSequence = computed(
|
|
28017
|
+
() => {
|
|
28018
|
+
var _a, _b;
|
|
28019
|
+
return ((_a = assetName.value) == null ? void 0 : _a.nameWithSequence) ?? ((_b = props.transactionDetail) == null ? void 0 : _b.nameWithSequence) ?? "-";
|
|
28020
|
+
}
|
|
28021
|
+
);
|
|
28022
|
+
const assetId = computed(
|
|
28023
|
+
() => {
|
|
28024
|
+
var _a, _b;
|
|
28025
|
+
return ((_a = asset.value) == null ? void 0 : _a.assetId) ?? ((_b = props.transactionDetail) == null ? void 0 : _b.assetId) ?? "-";
|
|
28026
|
+
}
|
|
28027
|
+
);
|
|
28028
|
+
const brand = computed(
|
|
28029
|
+
() => {
|
|
28030
|
+
var _a, _b, _c, _d, _e;
|
|
28031
|
+
return ((_b = (_a = asset.value) == null ? void 0 : _a.assetBrand) == null ? void 0 : _b.name) ?? ((_d = (_c = asset.value) == null ? void 0 : _c.brand) == null ? void 0 : _d.name) ?? ((_e = props.transactionDetail) == null ? void 0 : _e.assetBrand) ?? "-";
|
|
28032
|
+
}
|
|
28033
|
+
);
|
|
28034
|
+
const model = computed(
|
|
28035
|
+
() => {
|
|
28036
|
+
var _a, _b, _c, _d, _e;
|
|
28037
|
+
return ((_b = (_a = asset.value) == null ? void 0 : _a.assetModel) == null ? void 0 : _b.name) ?? ((_d = (_c = asset.value) == null ? void 0 : _c.model) == null ? void 0 : _d.name) ?? ((_e = props.transactionDetail) == null ? void 0 : _e.assetModel) ?? "-";
|
|
28038
|
+
}
|
|
28039
|
+
);
|
|
28040
|
+
const group = computed(
|
|
28041
|
+
() => {
|
|
28042
|
+
var _a, _b, _c, _d, _e;
|
|
28043
|
+
return ((_b = (_a = asset.value) == null ? void 0 : _a.assetGroup) == null ? void 0 : _b.name) ?? ((_d = (_c = asset.value) == null ? void 0 : _c.group) == null ? void 0 : _d.name) ?? ((_e = props.transactionDetail) == null ? void 0 : _e.assetGroup) ?? "-";
|
|
28044
|
+
}
|
|
28045
|
+
);
|
|
28046
|
+
const status = computed(
|
|
28047
|
+
() => {
|
|
28048
|
+
var _a, _b;
|
|
28049
|
+
return ((_a = asset.value) == null ? void 0 : _a.status) ?? ((_b = props.transactionDetail) == null ? void 0 : _b.status) ?? "-";
|
|
28050
|
+
}
|
|
28051
|
+
);
|
|
28014
28052
|
return (_ctx, _cache) => {
|
|
28015
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
28053
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
28016
28054
|
return openBlock(), createElementBlock("div", _hoisted_1$1Y, [
|
|
28017
28055
|
createVNode(unref(_sfc_main$Q), {
|
|
28018
28056
|
preview: defaultImage.value.preview,
|
|
@@ -28021,61 +28059,59 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
28021
28059
|
createElementVNode("div", _hoisted_2$1y, [
|
|
28022
28060
|
createElementVNode("div", _hoisted_3$D, [
|
|
28023
28061
|
createElementVNode("div", _hoisted_4$q, [
|
|
28024
|
-
createElementVNode("div", _hoisted_5$i, toDisplayString$1(
|
|
28062
|
+
createElementVNode("div", _hoisted_5$i, toDisplayString$1(nameWithSequence.value), 1),
|
|
28025
28063
|
unref(user).userType !== "Basic" ? (openBlock(), createElementBlock("a", {
|
|
28026
28064
|
key: 0,
|
|
28027
|
-
href: `/assets/detail/${((
|
|
28065
|
+
href: `/assets/detail/${((_a = asset.value) == null ? void 0 : _a.asset) ?? ((_b = asset.value) == null ? void 0 : _b._id)}`,
|
|
28028
28066
|
class: "text-primary-500",
|
|
28029
28067
|
target: "_blank"
|
|
28030
28068
|
}, " Asset Detail > ", 8, _hoisted_6$d)) : createCommentVNode("", true)
|
|
28031
28069
|
]),
|
|
28032
28070
|
createElementVNode("div", _hoisted_7$a, [
|
|
28033
|
-
createElementVNode("span", _hoisted_8$6, toDisplayString$1(
|
|
28071
|
+
createElementVNode("span", _hoisted_8$6, toDisplayString$1(assetId.value) + " " + toDisplayString$1(aliasCode.value), 1),
|
|
28034
28072
|
_hoisted_9$3,
|
|
28035
28073
|
createVNode(unref(TSTagType), {
|
|
28036
|
-
qr: (
|
|
28037
|
-
rfid: (
|
|
28074
|
+
qr: (_c = assetTagType.value) == null ? void 0 : _c.includes("QR"),
|
|
28075
|
+
rfid: (_d = assetTagType.value) == null ? void 0 : _d.includes("RFID")
|
|
28038
28076
|
}, null, 8, ["qr", "rfid"])
|
|
28039
28077
|
])
|
|
28040
28078
|
]),
|
|
28041
28079
|
createElementVNode("div", _hoisted_10$3, [
|
|
28042
|
-
!props.fields || ((
|
|
28080
|
+
!props.fields || ((_e = props.fields) == null ? void 0 : _e.includes("brand")) ? (openBlock(), createElementBlock("div", _hoisted_11$3, [
|
|
28043
28081
|
createElementVNode("span", {
|
|
28044
28082
|
class: normalizeClass(itemWidthClass.value)
|
|
28045
28083
|
}, " Brand ", 2),
|
|
28046
28084
|
_hoisted_12$2,
|
|
28047
28085
|
createVNode(unref(_sfc_main$1l), {
|
|
28048
|
-
label:
|
|
28086
|
+
label: brand.value,
|
|
28049
28087
|
severity: "dark"
|
|
28050
28088
|
}, null, 8, ["label"])
|
|
28051
28089
|
])) : createCommentVNode("", true),
|
|
28052
|
-
!props.fields || ((
|
|
28090
|
+
!props.fields || ((_f = props.fields) == null ? void 0 : _f.includes("model")) ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
|
|
28053
28091
|
createElementVNode("span", {
|
|
28054
28092
|
class: normalizeClass(itemWidthClass.value)
|
|
28055
28093
|
}, " Model/Type ", 2),
|
|
28056
28094
|
_hoisted_14$2,
|
|
28057
28095
|
createVNode(unref(_sfc_main$1l), {
|
|
28058
|
-
label:
|
|
28096
|
+
label: model.value,
|
|
28059
28097
|
severity: "dark"
|
|
28060
28098
|
}, null, 8, ["label"])
|
|
28061
28099
|
])) : createCommentVNode("", true),
|
|
28062
|
-
!props.fields || ((
|
|
28100
|
+
!props.fields || ((_g = props.fields) == null ? void 0 : _g.includes("group")) ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
28063
28101
|
createElementVNode("span", {
|
|
28064
28102
|
class: normalizeClass(itemWidthClass.value)
|
|
28065
28103
|
}, " Group ", 2),
|
|
28066
28104
|
_hoisted_16$2,
|
|
28067
|
-
createVNode(unref(_sfc_main$1l), {
|
|
28068
|
-
label: ((_s = (_r = asset.value) == null ? void 0 : _r.assetGroup) == null ? void 0 : _s.name) ?? ((_u = (_t2 = asset.value) == null ? void 0 : _t2.group) == null ? void 0 : _u.name) ?? "-"
|
|
28069
|
-
}, null, 8, ["label"])
|
|
28105
|
+
createVNode(unref(_sfc_main$1l), { label: group.value }, null, 8, ["label"])
|
|
28070
28106
|
])) : createCommentVNode("", true),
|
|
28071
|
-
((
|
|
28107
|
+
((_h = props.fields) == null ? void 0 : _h.includes("status")) ? (openBlock(), createElementBlock("div", _hoisted_17$2, [
|
|
28072
28108
|
createElementVNode("span", {
|
|
28073
28109
|
class: normalizeClass(itemWidthClass.value)
|
|
28074
28110
|
}, " Asset Status ", 2),
|
|
28075
28111
|
_hoisted_18$2,
|
|
28076
28112
|
createVNode(unref(_sfc_main$1l), {
|
|
28077
|
-
label:
|
|
28078
|
-
severity: unref(getSeverityByAssetStatus)(
|
|
28113
|
+
label: status.value,
|
|
28114
|
+
severity: unref(getSeverityByAssetStatus)(status.value),
|
|
28079
28115
|
format: "nowrap"
|
|
28080
28116
|
}, null, 8, ["label", "severity"])
|
|
28081
28117
|
])) : createCommentVNode("", true)
|