tsv2-library 1.1.1-dev-alpha.11 → 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.
@@ -1,6 +1,7 @@
1
1
  import { DefineComponent, Slot } from 'vue';
2
2
  import { FilterOption } from '../../../types/filterOption.type';
3
3
  import { FilterField } from '../../../types/filterField.type';
4
+ import { AssetColField } from '../AssetTable/columns/assetColumns';
4
5
 
5
6
  export interface DialogSelectAssetFilterModels {
6
7
  assetName?: string[];
@@ -142,11 +143,9 @@ export interface DialogSelectAssetProps {
142
143
  */
143
144
  withButton?: boolean;
144
145
  /**
145
- * With print column or not
146
- *
147
- * @default false
146
+ * Define the columns to show
148
147
  */
149
- withPrint?: boolean;
148
+ showColumns?: AssetColField[];
150
149
  /**
151
150
  * Dialog visibility model when not using default button.
152
151
  */
@@ -62711,7 +62711,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62711
62711
  __name: "DialogSelectAsset",
62712
62712
  props: /* @__PURE__ */ mergeModels({
62713
62713
  withButton: { type: Boolean, default: true },
62714
- withPrint: { type: Boolean },
62714
+ showColumns: {},
62715
62715
  visible: { type: Boolean },
62716
62716
  buttonLabel: {},
62717
62717
  currentAssetDetail: {},
@@ -62762,16 +62762,17 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62762
62762
  const filter4 = reactive({});
62763
62763
  const filterQueryParams = ref();
62764
62764
  const columns2 = computed(() => {
62765
+ var _a;
62765
62766
  const tagColumn = {
62766
62767
  field: "tagType",
62767
62768
  header: "TAG",
62768
62769
  sortable: true,
62769
62770
  bodyComponent: (data30) => {
62770
- var _a, _b;
62771
+ var _a2, _b;
62771
62772
  return {
62772
62773
  component: TSTagType,
62773
62774
  props: {
62774
- qr: (_a = data30.tagType) == null ? void 0 : _a.includes("QR"),
62775
+ qr: (_a2 = data30.tagType) == null ? void 0 : _a2.includes("QR"),
62775
62776
  rfid: (_b = data30.tagType) == null ? void 0 : _b.includes("RFID")
62776
62777
  }
62777
62778
  };
@@ -62793,8 +62794,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62793
62794
  sortable: true,
62794
62795
  fixed: false,
62795
62796
  bodyTemplate: (data30) => {
62796
- var _a;
62797
- return ((_a = data30.totalAssets) == null ? void 0 : _a.toString()) ?? "-";
62797
+ var _a2;
62798
+ return ((_a2 = data30.totalAssets) == null ? void 0 : _a2.toString()) ?? "-";
62798
62799
  }
62799
62800
  }
62800
62801
  ];
@@ -62833,7 +62834,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62833
62834
  ...defaultAssetColumns.value["model.name"],
62834
62835
  checkedByDefault: true
62835
62836
  },
62836
- { ...defaultAssetColumns.value["labelStatus"], visible: props.withPrint },
62837
+ {
62838
+ ...defaultAssetColumns.value["labelStatus"],
62839
+ visible: !!((_a = props.showColumns) == null ? void 0 : _a.includes("labelStatus"))
62840
+ },
62837
62841
  { ...defaultAssetColumns.value["tagType"], checkedByDefault: true },
62838
62842
  defaultAssetColumns.value["measurement.name"],
62839
62843
  defaultAssetColumns.value["maintenanceStatus"],
@@ -62846,7 +62850,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62846
62850
  defaultAssetColumns.value["linkedAssetCount"],
62847
62851
  ...customFieldColumns.value
62848
62852
  ];
62849
- 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
+ );
62850
62859
  });
62851
62860
  const filterLists = computed(() => {
62852
62861
  const tagConfig = {