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