tsv2-library 1.1.1-dev-alpha.10 → 1.1.1-dev-alpha.12

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.
@@ -30498,6 +30498,7 @@ const ASSET_COL_FIELDS = [
30498
30498
  "category.name",
30499
30499
  "brand.name",
30500
30500
  "model.name",
30501
+ "labelStatus",
30501
30502
  "tagType",
30502
30503
  "measurement.name",
30503
30504
  "maintenanceStatus",
@@ -30623,6 +30624,18 @@ const defaultAssetColumns = computed(() => {
30623
30624
  };
30624
30625
  }
30625
30626
  },
30627
+ "labelStatus": {
30628
+ header: "Print Status",
30629
+ field: "labelStatus",
30630
+ sortable: true,
30631
+ bodyComponent: (data30) => ({
30632
+ component: _sfc_main$1P,
30633
+ props: {
30634
+ label: data30.labelStatus,
30635
+ severity: data30.labelStatus === "Printed" ? "success" : "warning"
30636
+ }
30637
+ })
30638
+ },
30626
30639
  "tagType": {
30627
30640
  header: "TAG",
30628
30641
  field: "tagType",
@@ -62362,6 +62375,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62362
62375
  category: "category.name",
62363
62376
  brand: "brand.name",
62364
62377
  model: "model.name",
62378
+ labelStatus: "labelStatus",
62365
62379
  tagType: "tagType",
62366
62380
  group: "group.name",
62367
62381
  isTransactionable: "transactions",
@@ -62375,6 +62389,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62375
62389
  "category",
62376
62390
  "brand",
62377
62391
  "model",
62392
+ "labelStatus",
62378
62393
  "tagType",
62379
62394
  "group",
62380
62395
  "maintenanceAuditStatus",
@@ -62384,6 +62399,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62384
62399
  "warrantyStatus",
62385
62400
  "customField"
62386
62401
  ];
62402
+ const LABEL_STATUS_OPTIONS = ["Printed", "Not Printed"];
62387
62403
  const TRANSACTIONAL_POLICY_OPTIONS = [
62388
62404
  { label: "Transactionable", value: true },
62389
62405
  { label: "Non-Transactionable", value: false }
@@ -62466,11 +62482,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62466
62482
  const optionOrResData = await props.fetchOptions(params);
62467
62483
  if (optionOrResData && "data" in optionOrResData) {
62468
62484
  const { data: data30 } = optionOrResData;
62469
- const customFieldOption = (_a = data30.data.customFieldOptions) == null ? void 0 : _a[field2];
62485
+ const customFieldOption = (_a = data30 == null ? void 0 : data30.data.customFieldOptions) == null ? void 0 : _a[field2];
62470
62486
  if (customFieldOption) {
62471
62487
  filterOptions2.value[field2] = customFieldOption;
62472
62488
  } else {
62473
- filterOptions2.value[field2] = data30.data[field2];
62489
+ filterOptions2.value[field2] = (data30 == null ? void 0 : data30.data[field2]) ?? [];
62474
62490
  }
62475
62491
  } else if (Array.isArray(optionOrResData)) {
62476
62492
  filterOptions2.value[field2] = optionOrResData;
@@ -62566,22 +62582,31 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62566
62582
  "option-value": "value",
62567
62583
  placeholder: "Select model/type"
62568
62584
  }, null, 8, ["modelValue", "loading", "options"])) : createCommentVNode("", true),
62569
- showFilterList.value.includes("tagType") && props.tagType !== "RFID & QR" ? (openBlock(), createBlock(_sfc_main$17, {
62585
+ showFilterList.value.includes("labelStatus") ? (openBlock(), createBlock(_sfc_main$17, {
62570
62586
  key: 6,
62587
+ modelValue: filter4.value.labelStatus,
62588
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => filter4.value.labelStatus = $event),
62589
+ options: LABEL_STATUS_OPTIONS,
62590
+ "data-ts-section": "label-status-filter-input",
62591
+ label: "Print Status",
62592
+ placeholder: "Select status"
62593
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true),
62594
+ showFilterList.value.includes("tagType") && props.tagType !== "RFID & QR" ? (openBlock(), createBlock(_sfc_main$17, {
62595
+ key: 7,
62571
62596
  modelValue: filter4.value.tagType,
62572
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => filter4.value.tagType = $event),
62597
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => filter4.value.tagType = $event),
62573
62598
  options: TAG_OPTIONS.value,
62574
62599
  "data-ts-section": "tag-filter-input",
62575
62600
  label: "TAG",
62576
62601
  placeholder: "Select TAG"
62577
62602
  }, null, 8, ["modelValue", "options"])) : createCommentVNode("", true),
62578
62603
  showFilterList.value.includes("measurement") ? (openBlock(), createBlock(_sfc_main$17, {
62579
- key: 7,
62604
+ key: 8,
62580
62605
  modelValue: filter4.value.measurement,
62581
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => filter4.value.measurement = $event),
62606
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => filter4.value.measurement = $event),
62582
62607
  loading: loadingOptions2.value.measurementOptions,
62583
62608
  options: filterOptions2.value.measurementOptions,
62584
- onShow: _cache[10] || (_cache[10] = ($event) => getFilterOptions("measurementOptions")),
62609
+ onShow: _cache[11] || (_cache[11] = ($event) => getFilterOptions("measurementOptions")),
62585
62610
  "data-ts-section": "measurement-filter-input",
62586
62611
  label: "Measurement",
62587
62612
  "option-label": "label",
@@ -62589,18 +62614,18 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62589
62614
  placeholder: "Select measurement"
62590
62615
  }, null, 8, ["modelValue", "loading", "options"])) : createCommentVNode("", true),
62591
62616
  showFilterList.value.includes("maintenanceAuditStatus") ? (openBlock(), createBlock(_sfc_main$17, {
62592
- key: 8,
62617
+ key: 9,
62593
62618
  modelValue: filter4.value.maintenanceAuditStatus,
62594
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => filter4.value.maintenanceAuditStatus = $event),
62619
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => filter4.value.maintenanceAuditStatus = $event),
62595
62620
  options: IN_MAINTENANCE_AUDIT_OPTIONS,
62596
62621
  "data-ts-section": "maintenance-audit-filter-input",
62597
62622
  label: "In Maintenance/Audit",
62598
62623
  placeholder: "Select status"
62599
62624
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
62600
62625
  showFilterList.value.includes("isTransactionable") ? (openBlock(), createBlock(_sfc_main$17, {
62601
- key: 9,
62626
+ key: 10,
62602
62627
  modelValue: filter4.value.isTransactionable,
62603
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => filter4.value.isTransactionable = $event),
62628
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => filter4.value.isTransactionable = $event),
62604
62629
  options: TRANSACTIONAL_POLICY_OPTIONS,
62605
62630
  "data-ts-section": "transactional-policy-filter-input",
62606
62631
  label: "Transactional Policy",
@@ -62609,22 +62634,22 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
62609
62634
  placeholder: "Select policy"
62610
62635
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
62611
62636
  showFilterList.value.includes("warrantyStatus") ? (openBlock(), createBlock(_sfc_main$17, {
62612
- key: 10,
62637
+ key: 11,
62613
62638
  modelValue: filter4.value.warrantyStatus,
62614
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => filter4.value.warrantyStatus = $event),
62639
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => filter4.value.warrantyStatus = $event),
62615
62640
  options: WARRANTY_STATUS_OPTIONS,
62616
62641
  "data-ts-section": "warranty-filter-input",
62617
62642
  label: "Warranty",
62618
62643
  placeholder: "Select status"
62619
62644
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
62620
62645
  showFilterList.value.includes("lastScannedAt") ? (openBlock(), createBlock(_sfc_main$12, {
62621
- key: 11,
62646
+ key: 12,
62622
62647
  modelValue: filter4.value.lastScannedAt,
62623
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => filter4.value.lastScannedAt = $event),
62648
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => filter4.value.lastScannedAt = $event),
62624
62649
  label: "Last Scanned",
62625
62650
  mode: "range"
62626
62651
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
62627
- showFilterList.value.includes("customField") ? (openBlock(true), createElementBlock(Fragment, { key: 12 }, renderList(visibleCustomFieldFilterFields.value, (field2) => {
62652
+ showFilterList.value.includes("customField") ? (openBlock(true), createElementBlock(Fragment, { key: 13 }, renderList(visibleCustomFieldFilterFields.value, (field2) => {
62628
62653
  return openBlock(), createElementBlock(Fragment, {
62629
62654
  key: JSON.stringify(field2)
62630
62655
  }, [
@@ -62686,6 +62711,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62686
62711
  __name: "DialogSelectAsset",
62687
62712
  props: /* @__PURE__ */ mergeModels({
62688
62713
  withButton: { type: Boolean, default: true },
62714
+ showColumns: {},
62689
62715
  visible: { type: Boolean },
62690
62716
  buttonLabel: {},
62691
62717
  currentAssetDetail: {},
@@ -62736,16 +62762,17 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62736
62762
  const filter4 = reactive({});
62737
62763
  const filterQueryParams = ref();
62738
62764
  const columns2 = computed(() => {
62765
+ var _a;
62739
62766
  const tagColumn = {
62740
62767
  field: "tagType",
62741
62768
  header: "TAG",
62742
62769
  sortable: true,
62743
62770
  bodyComponent: (data30) => {
62744
- var _a, _b;
62771
+ var _a2, _b;
62745
62772
  return {
62746
62773
  component: TSTagType,
62747
62774
  props: {
62748
- qr: (_a = data30.tagType) == null ? void 0 : _a.includes("QR"),
62775
+ qr: (_a2 = data30.tagType) == null ? void 0 : _a2.includes("QR"),
62749
62776
  rfid: (_b = data30.tagType) == null ? void 0 : _b.includes("RFID")
62750
62777
  }
62751
62778
  };
@@ -62767,8 +62794,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62767
62794
  sortable: true,
62768
62795
  fixed: false,
62769
62796
  bodyTemplate: (data30) => {
62770
- var _a;
62771
- return ((_a = data30.totalAssets) == null ? void 0 : _a.toString()) ?? "-";
62797
+ var _a2;
62798
+ return ((_a2 = data30.totalAssets) == null ? void 0 : _a2.toString()) ?? "-";
62772
62799
  }
62773
62800
  }
62774
62801
  ];
@@ -62807,6 +62834,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62807
62834
  ...defaultAssetColumns.value["model.name"],
62808
62835
  checkedByDefault: true
62809
62836
  },
62837
+ {
62838
+ ...defaultAssetColumns.value["labelStatus"],
62839
+ visible: !!((_a = props.showColumns) == null ? void 0 : _a.includes("labelStatus"))
62840
+ },
62810
62841
  { ...defaultAssetColumns.value["tagType"], checkedByDefault: true },
62811
62842
  defaultAssetColumns.value["measurement.name"],
62812
62843
  defaultAssetColumns.value["maintenanceStatus"],
@@ -62819,7 +62850,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62819
62850
  defaultAssetColumns.value["linkedAssetCount"],
62820
62851
  ...customFieldColumns.value
62821
62852
  ];
62822
- return assetColumn.filter((col) => col.visible !== false);
62853
+ return assetColumn.filter((col) => col.visible !== false).filter(
62854
+ (col) => {
62855
+ var _a2;
62856
+ return props.showColumns ? (_a2 = props.showColumns) == null ? void 0 : _a2.includes(col.field) : true;
62857
+ }
62858
+ );
62823
62859
  });
62824
62860
  const filterLists = computed(() => {
62825
62861
  const tagConfig = {
@@ -62974,7 +63010,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62974
63010
  };
62975
63011
  const handleFetchOptions = async (baseParams) => {
62976
63012
  if (props.unpaired)
62977
- return [];
63013
+ return {};
62978
63014
  const tagType = getTagTypeQuery();
62979
63015
  const excludeId = JSON.stringify(props.selectedAssets ?? []);
62980
63016
  const finalParams = {