tsv2-library 1.0.61-beta.13 → 1.0.61-beta.14

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.
@@ -23,7 +23,7 @@ import { handleTokenExpiration, exportToExcel, formatGoDate, formatDate, getUser
23
23
  import { default as eventBus, extendEventBus } from './event-bus';
24
24
  import { flattenTreeNodeChildren, parseNodeKeys, filterNodeKeys } from './components/v2/Tree/helpers';
25
25
  import useLoadingStore from './components/v2/Loading/store/loading.store';
26
- import useAssetAttributeStore from './store/assetAttribute.store';
26
+ import { useAssetAttributeStore } from './store';
27
27
  import Tooltip from '../node_modules/primevue/tooltip';
28
28
  import Focus from './directives/v-focus';
29
29
  import VueHtmlToPaper from './plugins/VueHtmlToPaper';
@@ -3,6 +3,7 @@ export type TransactionRoles = Addon & {
3
3
  assignment: boolean;
4
4
  transfer: boolean;
5
5
  disposal: boolean;
6
+ registration: boolean;
6
7
  };
7
8
 
8
9
  export type Addon = {
@@ -1,7 +1,7 @@
1
1
  import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
2
2
  import { FilterField } from '../types/filterField.type';
3
3
  import { Ref } from 'vue';
4
- interface AssetAttributeStore {
4
+ export interface AssetAttributeStore {
5
5
  customFieldColumns: Ref<TableColumn[]>;
6
6
  assetValueColumns: Ref<TableColumn[]>;
7
7
  customFieldFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
@@ -0,0 +1 @@
1
+ export { default as useAssetAttributeStore } from './assetAttribute.store';
@@ -26242,6 +26242,10 @@ const CustomFieldFilterMap = {
26242
26242
  Currency: "rangenumber"
26243
26243
  };
26244
26244
  const getBodyTemplate = (customField) => {
26245
+ if (["MultiDropdown", "Dropdown", "Document"].includes(
26246
+ customField.dataType
26247
+ ))
26248
+ return void 0;
26245
26249
  return (data30) => {
26246
26250
  var _a, _b;
26247
26251
  const dataValue = (_b = (_a = data30.customFields) == null ? void 0 : _a[customField._id]) == null ? void 0 : _b.value;
@@ -64888,29 +64892,40 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
64888
64892
  label: "Borrowing",
64889
64893
  icon: "borrow",
64890
64894
  info: getRoleInfo(roleData, "borrowing"),
64891
- severity: getRoleSeverity(roleData, "borrowing")
64895
+ severity: getRoleSeverity(roleData, "borrowing"),
64896
+ visible: true
64892
64897
  },
64893
64898
  {
64894
64899
  label: "Assignment",
64895
64900
  icon: "assignment",
64896
64901
  info: getRoleInfo(roleData, "assignment"),
64897
- severity: getRoleSeverity(roleData, "assignment")
64902
+ severity: getRoleSeverity(roleData, "assignment"),
64903
+ visible: true
64898
64904
  },
64899
64905
  {
64900
64906
  label: "Transfer",
64901
64907
  icon: "exchange",
64902
64908
  info: getRoleInfo(roleData, "transfer"),
64903
- severity: getRoleSeverity(roleData, "transfer")
64909
+ severity: getRoleSeverity(roleData, "transfer"),
64910
+ visible: true
64904
64911
  },
64905
64912
  {
64906
64913
  label: "Disposal",
64907
64914
  icon: "disposal",
64908
64915
  info: getRoleInfo(roleData, "disposal"),
64909
- severity: getRoleSeverity(roleData, "disposal")
64916
+ severity: getRoleSeverity(roleData, "disposal"),
64917
+ visible: true
64918
+ },
64919
+ {
64920
+ label: "Registration",
64921
+ icon: "asset",
64922
+ info: getRoleInfo(roleData, "registration"),
64923
+ severity: getRoleSeverity(roleData, "registration"),
64924
+ visible: type.value === "user"
64910
64925
  }
64911
64926
  ];
64912
64927
  if (props.type === "transaction-policy")
64913
- return transaction;
64928
+ return transaction.filter((item3) => item3.visible);
64914
64929
  const assetControlAddon = type.value === "asset" ? [
64915
64930
  {
64916
64931
  label: "Asset Control",
@@ -64941,7 +64956,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
64941
64956
  icon: "map-2-line",
64942
64957
  info: getRoleInfo(roleData, "map"),
64943
64958
  severity: getRoleSeverity(roleData, "map"),
64944
- visible: companyAddons.map
64959
+ visible: companyAddons.map && type.value === "asset"
64945
64960
  },
64946
64961
  {
64947
64962
  label: "Repair Ticketing",
@@ -64958,7 +64973,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
64958
64973
  visible: companyAddons.tracking
64959
64974
  }
64960
64975
  ].filter((item3) => item3.visible);
64961
- return [...props.type === "transaction" ? transaction : [], ...addons];
64976
+ return [
64977
+ ...props.type === "transaction" ? transaction.filter((item3) => item3.visible) : [],
64978
+ ...addons
64979
+ ];
64962
64980
  });
64963
64981
  const getRoleMessage = (hasRole2, role) => {
64964
64982
  if (props.type === "transaction-policy")
@@ -64986,6 +65004,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
64986
65004
  return "This user has maintenance routine role";
64987
65005
  case "tracking":
64988
65006
  return "This user has tracking role";
65007
+ case "registration":
65008
+ return "This user has registration role";
64989
65009
  default:
64990
65010
  return "This user doesn't have role";
64991
65011
  }
@@ -65037,6 +65057,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
65037
65057
  return "This asset has Repair Ticketing Addon";
65038
65058
  case "tracking":
65039
65059
  return "This asset has Tracking Addon";
65060
+ default:
65061
+ return "-";
65040
65062
  }
65041
65063
  };
65042
65064
  const userDoesNotHaveRoleMessage = (role) => {
@@ -65057,6 +65079,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
65057
65079
  return "This user doesn't have maintenance routine role";
65058
65080
  case "tracking":
65059
65081
  return "This user doesn't have tracking role";
65082
+ case "registration":
65083
+ return "This user doesn't have registration role";
65060
65084
  default:
65061
65085
  return "This user doesn't have role";
65062
65086
  }
@@ -65080,6 +65104,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
65080
65104
  return "This asset doesn't have Repair Ticketing Addon";
65081
65105
  case "tracking":
65082
65106
  return "This asset doesn't have Tracking Addon";
65107
+ default:
65108
+ return "-";
65083
65109
  }
65084
65110
  };
65085
65111
  const hasRole = (data30, role) => {