tsv2-library 1.0.65 → 1.1.0-dev-alpha.0

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.
Files changed (93) hide show
  1. package/dist/no-data-fa-7f1ccd18.js +4 -0
  2. package/dist/src/build-entry.d.ts +7 -4
  3. package/dist/src/components/v2/Animation/Animation.vue.d.ts +1 -1
  4. package/dist/src/components/v2/AssetTable/AssetFilters.vue.d.ts +70 -0
  5. package/dist/src/components/v2/{AssetAttribute → AssetTable}/UrlFormat.vue.d.ts +6 -7
  6. package/dist/src/components/v2/AssetTable/columns/assetColumns.d.ts +7 -0
  7. package/dist/src/components/v2/AssetTable/helpers/assetFilters.d.ts +7 -0
  8. package/dist/src/components/v2/AssetTable/helpers/formatAssetData.d.ts +3 -0
  9. package/dist/src/components/v2/AssetTable/helpers/index.d.ts +2 -0
  10. package/dist/src/components/v2/AssetTable/store/assetTable.store.d.ts +16 -0
  11. package/dist/src/components/v2/AssetTable/store/index.d.ts +1 -0
  12. package/dist/src/components/v2/Calendar/Calendar.vue.d.ts +31 -0
  13. package/dist/src/components/v2/Calendar/CustomCalendar.vue.d.ts +12 -0
  14. package/dist/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +1 -1
  15. package/dist/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  16. package/dist/src/components/v2/DatePicker/DatePicker.vue.d.ts +23 -0
  17. package/dist/src/components/v2/DayOfYearPicker/DayOfYearPicker.vue.d.ts +97 -0
  18. package/dist/src/components/v2/DayPicker/DayPicker.vue.d.ts +23 -0
  19. package/dist/src/components/v2/DialogCoordinate/services/googleMapsService.d.ts +23 -3
  20. package/dist/src/components/v2/DialogDataLocked/DialogDataLocked.vue.d.ts +6 -0
  21. package/dist/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +1 -1
  22. package/dist/src/components/v2/DialogSelectAssetName/DialogSelectAssetName.vue.d.ts +75 -0
  23. package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +9 -1
  24. package/dist/src/components/v2/Dropdown/Dropdown.vue.d.ts +1 -0
  25. package/dist/src/components/v2/Image/Image.vue.d.ts +5 -0
  26. package/dist/src/components/v2/InputNumber/InputNumber.vue.d.ts +6 -0
  27. package/dist/src/components/v2/InputRangeNumber/InputRangeNumber.vue.d.ts +2 -2
  28. package/dist/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  29. package/dist/src/components/v2/MultiSelect/MultiSelect.vue.d.ts +4 -0
  30. package/dist/src/components/v2/Textarea/Textarea.vue.d.ts +5 -0
  31. package/dist/src/components/v2/index.d.ts +5 -3
  32. package/dist/src/dto/customField.dto.d.ts +9 -0
  33. package/dist/src/event-bus/index.d.ts +10 -3
  34. package/dist/src/presets/datepicker/index.js +13 -1
  35. package/dist/src/presets/dayofyearpicker/index.js +73 -0
  36. package/dist/src/presets/daypicker/index.js +14 -2
  37. package/dist/src/services/assetName.service.d.ts +8 -6
  38. package/dist/src/services/assets.service.d.ts +13 -13
  39. package/dist/src/services/damage.service.d.ts +1 -1
  40. package/dist/src/services/dataLock.service.d.ts +7 -0
  41. package/dist/src/services/globalSettings.service.d.ts +6 -0
  42. package/dist/src/services/missing.service.d.ts +1 -1
  43. package/dist/src/services/scanLog.service.d.ts +1 -1
  44. package/dist/src/services/settingsAttribute.service.d.ts +2 -0
  45. package/dist/src/services/tagQr.service.d.ts +1 -1
  46. package/dist/src/services/tagTransaction.service.d.ts +1 -1
  47. package/dist/src/services/tracking.service.d.ts +2 -2
  48. package/dist/src/services/transferTransaction.service.d.ts +1 -1
  49. package/dist/src/types/assets.type.d.ts +64 -1
  50. package/dist/src/types/globalSettings.type.d.ts +9 -0
  51. package/dist/src/types/settingsAttribute.type.d.ts +0 -14
  52. package/dist/src/utils/getVisibleColumns.util.d.ts +2 -0
  53. package/dist/src/utils/index.d.ts +3 -2
  54. package/dist/src/utils/role.util.d.ts +1 -1
  55. package/dist/src/utils/textFormater.util.d.ts +0 -2
  56. package/dist/style.css +1 -1
  57. package/dist/tsv2-library.es.js +58961 -57256
  58. package/dist/tsv2-library.umd.js +7 -7
  59. package/package.json +4 -3
  60. package/src/components/v2/Animation/Animation.vue.d.ts +1 -1
  61. package/src/components/v2/AssetTable/AssetFilters.vue.d.ts +70 -0
  62. package/src/components/v2/Calendar/Calendar.vue.d.ts +31 -0
  63. package/src/components/v2/CustomColumn/CustomColumn.vue.d.ts +1 -1
  64. package/src/components/v2/DataTable/DataTable.vue.d.ts +15 -0
  65. package/src/components/v2/DatePicker/DatePicker.vue.d.ts +23 -0
  66. package/src/components/v2/DayOfYearPicker/DayOfYearPicker.vue.d.ts +97 -0
  67. package/src/components/v2/DayPicker/DayPicker.vue.d.ts +23 -0
  68. package/src/components/v2/DialogSelectAsset/DialogSelectAsset.vue.d.ts +1 -1
  69. package/src/components/v2/DialogSelectAssetName/DialogSelectAssetName.vue.d.ts +75 -0
  70. package/src/components/v2/Dropdown/Dropdown.vue.d.ts +1 -0
  71. package/src/components/v2/Image/Image.vue.d.ts +5 -0
  72. package/src/components/v2/InputNumber/InputNumber.vue.d.ts +6 -0
  73. package/src/components/v2/InputRangeNumber/InputRangeNumber.vue.d.ts +2 -2
  74. package/src/components/v2/InputText/InputText.vue.d.ts +6 -0
  75. package/src/components/v2/MultiSelect/MultiSelect.vue.d.ts +4 -0
  76. package/src/components/v2/Textarea/Textarea.vue.d.ts +5 -0
  77. package/src/module.d.ts +3 -0
  78. package/src/presets/datepicker/index.js +13 -1
  79. package/src/presets/dayofyearpicker/index.js +73 -0
  80. package/src/presets/daypicker/index.js +14 -2
  81. package/src/services/assetDamage.service.ts +1 -1
  82. package/src/services/assetName.service.ts +10 -0
  83. package/src/services/column.service.ts +2 -2
  84. package/src/services/dataLock.service.ts +33 -0
  85. package/src/services/globalSettings.service.ts +33 -0
  86. package/src/services/settingsAttribute.service.ts +13 -0
  87. package/dist/src/components/v2/DialogCoordinate/services/openStreetMapService.d.ts +0 -59
  88. package/dist/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +0 -20
  89. package/dist/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +0 -17
  90. package/dist/src/store/assetAttribute.store.d.ts +0 -12
  91. package/dist/src/store/index.d.ts +0 -1
  92. package/src/components/v2/FilterAssetValue/FilterAssetValue.vue.d.ts +0 -20
  93. package/src/components/v2/FilterCustomField/FilterCustomField.vue.d.ts +0 -17
@@ -109,6 +109,7 @@ export interface DropdownProps {
109
109
  }
110
110
 
111
111
  export interface DropdownSlots {
112
+ 'value': Slot<{ value: OptionValue }>;
112
113
  'option': Slot<{ option: DropdownOption }>;
113
114
  'addon-left': Slot;
114
115
  'addon-right': Slot;
@@ -260,6 +260,11 @@ export interface ImageProps {
260
260
  * @defaultValue false
261
261
  */
262
262
  unstyled?: boolean;
263
+ /**
264
+ * Determines the thumbnail's width and height in pixels.
265
+ */
266
+ thumbnailWidth?: number;
267
+ thumbnailHeight?: number;
263
268
  }
264
269
 
265
270
  /**
@@ -69,6 +69,12 @@ export interface InputNumberProps {
69
69
  * @default true;
70
70
  */
71
71
  showValidatorMessage?: boolean;
72
+ /**
73
+ * Wether to format the message
74
+ *
75
+ * @default true
76
+ */
77
+ formatValidatorMessage?: boolean;
72
78
  /**
73
79
  * Specify the input placeholder.
74
80
  *
@@ -7,7 +7,7 @@ export interface InputRangeNumberProps {
7
7
  /**
8
8
  * Number modelValue of the input.
9
9
  */
10
- modelValue?: number[];
10
+ modelValue?: (number | null)[];
11
11
  /**
12
12
  * The input label. Tell the user what input is this.
13
13
  */
@@ -43,7 +43,7 @@ export type InputRangeNumberEmits = {
43
43
  /**
44
44
  * Emits when the both input already filled.
45
45
  */
46
- 'update:modelValue': [payload?: number[]];
46
+ 'update:modelValue': [payload?: (number | null)[]];
47
47
  };
48
48
 
49
49
  /**
@@ -66,6 +66,12 @@ export interface InputTextProps {
66
66
  * Classes for validator message in input field.
67
67
  */
68
68
  validatorMessageClass?: string;
69
+ /**
70
+ * Wether to format the message
71
+ *
72
+ * @default true
73
+ */
74
+ formatValidatorMessage?: boolean;
69
75
  /**
70
76
  * Specify the input placeholder.
71
77
  *
@@ -108,6 +108,10 @@ export interface MultiSelectProps {
108
108
  * Decides how many selected item labels to show at most.
109
109
  */
110
110
  maxSelectedLabels?: number;
111
+ /**
112
+ * Set custom invalid state.
113
+ */
114
+ invalid?: boolean;
111
115
  }
112
116
 
113
117
  /**
@@ -102,6 +102,10 @@ export interface TextareaProps
102
102
  * @default unlimited
103
103
  */
104
104
  maxLength?: number;
105
+ /**
106
+ * Auto blur while input value has reached the max length.
107
+ */
108
+ blurOnReachMax?: boolean;
105
109
  invalid?: boolean;
106
110
  customValidation?: CustomValidation;
107
111
  inputClass?: string;
@@ -129,6 +133,7 @@ export type TextareaEmits = {
129
133
  */
130
134
  'update:modelValue': [value: Nullable<string>];
131
135
  'blur': [value?: Nullable<string>];
136
+ 'input': [value?: Nullable<string>];
132
137
  };
133
138
 
134
139
  /**
@@ -33,24 +33,26 @@ import TSDataTable from './DataTable/DataTable.vue';
33
33
  import TSDropdown from './Dropdown/Dropdown.vue';
34
34
  import TSDatePicker from './DatePicker/DatePicker.vue';
35
35
  import TSDayPicker from './DayPicker/DayPicker.vue';
36
+ import TSDayOfYearPicker from './DayOfYearPicker/DayOfYearPicker.vue';
36
37
  import TSDialog from './Dialog/Dialog.vue';
37
38
  import TSDialogApprovalList from './DialogApprovalList/DialogApprovalList.vue';
38
39
  import TSDialogAssetNameDetail from './DialogAssetNameDetail/DialogAssetNameDetail.vue';
39
40
  import TSDialogConfirm from './DialogConfirm/DialogConfirm.vue';
40
41
  import TSDialogCoordinate from './DialogCoordinate/DialogCoordinate.vue';
42
+ import TSDialogDataLocked from './DialogDataLocked/DialogDataLocked.vue';
41
43
  import TSDialogForm from './DialogForm/DialogForm.vue';
42
44
  import TSDialogLinkedAsset from './DialogLinkedAsset/DialogLinkedAsset.vue';
43
45
  import TSDialogPrintQR from './DialogPrintQR/DialogPrintQR.vue';
44
46
  import TSDialogReportDamage from './DialogReportDamage/DialogReportDamage.vue';
45
47
  import TSDialogReportMissing from './DialogReportMissing/DialogReportMissing.vue';
46
48
  import TSDialogReportTag from './DialogReportTag/DialogReportTag.vue';
49
+ import TSDialogSelectAssetName from './DialogSelectAssetName/DialogSelectAssetName.vue';
47
50
  import TSDialogSelectTree from './DialogSelectTree/DialogSelectTree.vue';
48
51
  import TSDialogSelectUser from './DialogSelectUser/DialogSelectUser.vue';
49
52
  import TSDisposalReport from './DisposalReport/DisposalReport.vue';
50
53
  import TSFailedLoad from './FailedLoad/FailedLoad.vue';
51
54
  import TSFilterContainer from './FilterContainer/FilterContainer.vue';
52
- import TSFilterAssetValue from './FilterAssetValue/FilterAssetValue.vue';
53
- import TSFilterCustomField from './FilterCustomField/FilterCustomField.vue';
55
+ import TSAssetFilters from './AssetTable/AssetFilters.vue';
54
56
  import TSFileUpload from './FileUpload/FileUpload.vue';
55
57
  import TSForm from './Form/Form.vue';
56
58
  import TSIcon from './Icon/Icon.vue';
@@ -88,4 +90,4 @@ import TSTree from './Tree/Tree.vue';
88
90
  import TSTreeSearchInput from './TreeSearchInput/TreeSearchInput.vue';
89
91
  import TSUserWithIcon from './UserWithIcon/UserWithIcon.vue';
90
92
  import TSValidatorMessage from './ValidatorMessage/ValidatorMessage.vue';
91
- export { DialogTransferLog, DialogDamageLog, DialogMissingLog, TSAnimation, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearch, TSButtonSearchByScan, TSButtonSelectTree, TSButtonSelectUser, TSButtonSync, TSButtonToggle, TSCalendar, TSCard, TSCarousel, TSCheckbox, TSCustomColumn, TSDataTable, TSDatePicker, TSDayPicker, TSDialog, TSDialogApprovalList, TSDialogAssetNameDetail, TSDialogConfirm, TSDialogCoordinate, TSDialogForm, TSDialogLinkedAsset, TSDialogPrintQR, TSDialogReportDamage, TSDialogReportMissing, TSDialogReportTag, TSDialogSelectTree, TSDialogSelectAsset, TSDialogSelectUser, TSDisposalReport, TSDropdown, TSFailedLoad, TSFilterContainer, TSFilterAssetValue, TSFilterCustomField, TSFileUpload, TSForm, TSIcon, TSImage, TSImageCompressor, TSInlineMessage, TSInputBadge, TSInputCurrency, TSInputCurrencyReference, TSInputCoordinate, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputSearch, TSInputText, TSInputTextArea, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, };
93
+ export { DialogTransferLog, DialogDamageLog, DialogMissingLog, TSAnimation, TSAssetInfo, TSApproverInfo, TSBadge, TSBadgeGroup, TSBreadcrumb, TSButton, TSButtonAddByScan, TSButtonBulkAction, TSButtonCopy, TSButtonDownload, TSButtonFilter, TSButtonLogHistory, TSButtonRadio, TSButtonViewLog, TSButtonScan, TSButtonSearch, TSButtonSearchByScan, TSButtonSelectTree, TSButtonSelectUser, TSButtonSync, TSButtonToggle, TSCalendar, TSCard, TSCarousel, TSCheckbox, TSCustomColumn, TSDataTable, TSDatePicker, TSDayPicker, TSDayOfYearPicker, TSDialog, TSDialogApprovalList, TSDialogAssetNameDetail, TSDialogConfirm, TSDialogCoordinate, TSDialogDataLocked, TSDialogForm, TSDialogLinkedAsset, TSDialogPrintQR, TSDialogReportDamage, TSDialogReportMissing, TSDialogReportTag, TSDialogSelectAssetName, TSDialogSelectTree, TSDialogSelectAsset, TSDialogSelectUser, TSDisposalReport, TSDropdown, TSFailedLoad, TSFilterContainer, TSAssetFilters, TSFileUpload, TSForm, TSIcon, TSImage, TSImageCompressor, TSInlineMessage, TSInputBadge, TSInputCurrency, TSInputCurrencyReference, TSInputCoordinate, TSInputEmail, TSInputNumber, TSInputOTP, TSInputPassword, TSInputPhoneNumber, TSInputRangeNumber, TSInputSearch, TSInputText, TSInputTextArea, TSInputURL, TSLoading, TSMenu, TSMultiSelect, TSOverlayPanel, TSPaginator, TSProgressBar, TSSteps, TSTabMenu, TSTagType, TSTextarea, TSTimeline, TSToast, TSTransactionRoles, TSTree, TSTreeSearchInput, TSUserWithIcon, TSValidatorMessage, };
@@ -0,0 +1,9 @@
1
+ export type CustomFieldTypeParams = 'general' | 'purchase' | 'accounting';
2
+ export type CustomFieldQueryParams = {
3
+ page?: number;
4
+ limit?: number;
5
+ sortBy?: string;
6
+ sortOrder?: number;
7
+ search?: string;
8
+ category?: string | string[];
9
+ };
@@ -1,8 +1,15 @@
1
+ import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
1
2
  import { Emitter } from './mitt';
2
3
  export type TableEvent = {
3
4
  tableName?: string;
4
5
  };
5
- export type Events<CustomEvents = Record<string, unknown>> = CustomEvents;
6
- declare const eventBus: Emitter<Record<string, unknown>>;
7
- export declare const extendEventBus: <T extends Record<string, unknown>>() => Emitter<T>;
6
+ type PredefinedEvents = {
7
+ 'data-table:update-column': {
8
+ tableId: string;
9
+ columns: TableColumn[];
10
+ };
11
+ };
12
+ export type Events<CustomEvents = Record<string, unknown>> = CustomEvents extends undefined ? PredefinedEvents : CustomEvents & PredefinedEvents;
13
+ declare const eventBus: Emitter<Record<string, unknown> & PredefinedEvents>;
14
+ export declare const extendEventBus: <T extends Record<string, unknown>>() => Emitter<Events<T>>;
8
15
  export default eventBus;
@@ -16,7 +16,11 @@ export default {
16
16
  },
17
17
 
18
18
  panelcontent: {
19
- class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)] p-6'],
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)]'],
20
24
  },
21
25
 
22
26
  date: {
@@ -36,4 +40,12 @@ export default {
36
40
  'text-center p-2 cursor-pointer',
37
41
  ],
38
42
  },
43
+
44
+ overlaymessage: {
45
+ class: 'self-start text-xs font-medium',
46
+ },
47
+
48
+ validatormessage: {
49
+ class: 'self-start',
50
+ },
39
51
  };
@@ -0,0 +1,73 @@
1
+ export default {
2
+ inputgroup: {
3
+ class: ['grid grid-cols-[1fr,max-content] !items-center gap-1 px-3 py-1'],
4
+ },
5
+
6
+ inputtext: {
7
+ class: ['!p-0'],
8
+ },
9
+
10
+ inputtrigger: {
11
+ class: ['w-4 h-4 shrink-0 !text-general-500'],
12
+ },
13
+
14
+ panel: {
15
+ class: ['border-none !mt-0 !shadow-panel'],
16
+ },
17
+
18
+ panelcontent: {
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-7 grid-rows-[repeat(5,max-content)]'],
24
+ },
25
+
26
+ header: {
27
+ class: 'flex items-center justify-between',
28
+ },
29
+
30
+ title: {
31
+ class: 'text-xs font-medium',
32
+ },
33
+
34
+ previousButton: {
35
+ class:
36
+ 'relative inline-flex items-center justify-center p-1.5 m-0 text-general-800 dark:text-general-950 border-0 rounded-full bg-transparent hover:bg-general-50 dark:hover:bg-general-300 cursor-pointer overflow-hidden',
37
+ },
38
+
39
+ nextButton: {
40
+ class:
41
+ 'relative inline-flex items-center justify-center p-1.5 m-0 text-general-800 dark:text-general-950 border-0 rounded-full bg-transparent hover:bg-general-50 dark:hover:bg-general-300 cursor-pointer overflow-hidden',
42
+ },
43
+
44
+ date: {
45
+ class: [
46
+ 'text-body-medium text-general-800',
47
+ 'bg-white hover:bg-primary-100',
48
+ 'rounded-[20px]',
49
+ // In range selection
50
+ '[&[data-in-range="true"]]:bg-primary-200',
51
+ '[&[data-in-range="true"]]:text-general-800',
52
+ '[&[data-in-range="true"]]:rounded-[0]',
53
+
54
+ // Selected State
55
+ '[&[aria-selected="true"]]:bg-primary-500',
56
+ '[&[aria-selected="true"]]:text-white',
57
+
58
+ // Disabled State
59
+ '[&[aria-disabled="true"]]:cursor-default',
60
+ '[&[aria-disabled="true"]]:opacity-40',
61
+
62
+ 'text-center p-2 cursor-pointer',
63
+ ],
64
+ },
65
+
66
+ overlaymessage: {
67
+ class: 'self-start text-xs font-medium',
68
+ },
69
+
70
+ validatormessage: {
71
+ class: 'self-start',
72
+ },
73
+ };
@@ -16,7 +16,11 @@ export default {
16
16
  },
17
17
 
18
18
  panelcontent: {
19
- class: ['grid grid-cols-3 grid-rows-[repeat(3,max-content)] p-6 gap-y-4'],
19
+ class: 'flex flex-col m-6 gap-2.5 w-[224px]',
20
+ },
21
+
22
+ dayscontainer: {
23
+ class: ['grid grid-cols-3 grid-rows-[repeat(3,max-content)] gap-y-4'],
20
24
  },
21
25
 
22
26
  day: {
@@ -32,7 +36,15 @@ export default {
32
36
  '[&[aria-selected="true"]]:text-white',
33
37
  '[&[aria-selected="true"]]:rounded-[20px]',
34
38
 
35
- 'last:col-span-3 text-center p-2 cursor-pointer',
39
+ 'last:col-span-3 text-center py-2 cursor-pointer',
36
40
  ],
37
41
  },
42
+
43
+ overlaymessage: {
44
+ class: 'self-start text-xs font-medium',
45
+ },
46
+
47
+ validatormessage: {
48
+ class: 'self-start',
49
+ },
38
50
  };
@@ -10,6 +10,7 @@ export type AssetNameOptionsQueryParams = {
10
10
  export type GetAssetNameListQueryParams = {
11
11
  assetName?: string;
12
12
  tagType?: string;
13
+ category?: string;
13
14
  };
14
15
  export interface AssetNameDropdownOption {
15
16
  _id: string;
@@ -27,11 +28,12 @@ export interface GetAssetNameDropdownResponse {
27
28
  }
28
29
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
29
30
  declare const _default: {
30
- getAssetNameDetail: (id: string) => Promise<AxiosResponse<any, any>>;
31
- getAssetNameList: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
32
- getAssetsByAssetName: (id: string, params?: Partial<Record<string, unknown>> | undefined) => Promise<AxiosResponse<any, any>>;
33
- getUnpairedAssetName: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any>>;
34
- getAssetNameDropdown: () => Promise<AxiosResponse<GetAssetNameDropdownResponse, any>>;
35
- getOptions: (params: AssetNameOptionsQueryParams) => Promise<AxiosResponse<any, any>>;
31
+ getAssetNameDetail: (id: string) => Promise<AxiosResponse<any, any, {}>>;
32
+ getAssetNameList: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any, {}>>;
33
+ getAssetsByAssetName: (id: string, params?: Partial<Record<string, unknown>> | undefined) => Promise<AxiosResponse<any, any, {}>>;
34
+ getUnpairedAssetName: (params: GetAssetNameListQueryParams) => Promise<AxiosResponse<any, any, {}>>;
35
+ getAssetNameDropdown: () => Promise<AxiosResponse<GetAssetNameDropdownResponse, any, {}>>;
36
+ getOptions: (params: AssetNameOptionsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
37
+ postAssetNameList: (params?: GetAssetNameListQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
36
38
  };
37
39
  export default _default;
@@ -8,22 +8,22 @@ export interface ServiceOptions {
8
8
  }
9
9
  export declare const API: ({ headers, params, usePrefix, }?: ServiceOptions) => AxiosInstance;
10
10
  declare const _default: {
11
- getAllAssets: (params: GetAllAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
12
- postAssetList: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
13
- postAssetOption: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
14
- getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
15
- postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any>>;
16
- getAssetsById: (_id: string, params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
17
- getAssetDetail: (id: string, params?: GetAssetDetailParams | undefined) => Promise<AxiosResponse<any, any>>;
18
- matchAssetWithTag: (id: string, tag?: string | undefined) => Promise<AxiosResponse<any, any>>;
19
- getLinkedAssetFamily: (id?: string | undefined) => Promise<AxiosResponse<GetLinkedAssetFamiliesResponse, any>>;
20
- getUnlinkedAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any>>;
11
+ getAllAssets: (params: GetAllAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
12
+ postAssetList: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
13
+ postAssetOption: (params?: GetAllAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
14
+ getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
15
+ postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
16
+ getAssetsById: (_id: string, params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
17
+ getAssetDetail: (id: string, params?: GetAssetDetailParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
18
+ matchAssetWithTag: (id: string, tag?: string | undefined) => Promise<AxiosResponse<any, any, {}>>;
19
+ getLinkedAssetFamily: (id?: string | undefined) => Promise<AxiosResponse<GetLinkedAssetFamiliesResponse, any, {}>>;
20
+ getUnlinkedAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
21
21
  getOptions: (endpoint?: "unlinked" | "by-id" | undefined, params?: (Partial<Record<AssetOptionField, boolean>> & {
22
22
  group?: string | undefined;
23
23
  excludeId?: string | undefined;
24
24
  mode?: string | undefined;
25
- }) | undefined) => Promise<AxiosResponse<any, any>>;
26
- scanAsset: (tag: string) => Promise<AxiosResponse<any, any>>;
27
- getAssetMaps: (params?: GetAssetMapParams | undefined) => Promise<AxiosResponse<GetAssetMapResponse, any>>;
25
+ }) | undefined) => Promise<AxiosResponse<any, any, {}>>;
26
+ scanAsset: (tag: string) => Promise<AxiosResponse<any, any, {}>>;
27
+ getAssetMaps: (params?: GetAssetMapParams | undefined) => Promise<AxiosResponse<GetAssetMapResponse, any, {}>>;
28
28
  };
29
29
  export default _default;
@@ -6,6 +6,6 @@ export interface ServiceOptions {
6
6
  }
7
7
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
8
8
  declare const _default: {
9
- reportDamage: (id: string, body: ReportDamageBody) => Promise<AxiosResponse<any, any>>;
9
+ reportDamage: (id: string, body: ReportDamageBody) => Promise<AxiosResponse<any, any, {}>>;
10
10
  };
11
11
  export default _default;
@@ -0,0 +1,7 @@
1
+ import { AxiosResponse } from 'axios';
2
+ declare const DataLockService: {
3
+ getDataLock: () => Promise<AxiosResponse>;
4
+ postDataLock: () => Promise<AxiosResponse>;
5
+ deleteDataLock: () => Promise<AxiosResponse>;
6
+ };
7
+ export default DataLockService;
@@ -0,0 +1,6 @@
1
+ import { ApplicationSettingResponse } from '../types/globalSettings.type';
2
+ import { AxiosResponse } from 'axios';
3
+ declare const GlobalSettingsServices: {
4
+ getApplicationSetting: () => Promise<AxiosResponse<ApplicationSettingResponse>>;
5
+ };
6
+ export default GlobalSettingsServices;
@@ -6,6 +6,6 @@ export interface ServiceOptions {
6
6
  }
7
7
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
8
8
  declare const _default: {
9
- reportMissing: (id: string, body: ReportMissingBody) => Promise<AxiosResponse<any, any>>;
9
+ reportMissing: (id: string, body: ReportMissingBody) => Promise<AxiosResponse<any, any, {}>>;
10
10
  };
11
11
  export default _default;
@@ -8,6 +8,6 @@ declare const _default: {
8
8
  postScanLog: (body: {
9
9
  tag: string;
10
10
  serialNumber: string;
11
- }) => Promise<AxiosResponse<any, any>>;
11
+ }) => Promise<AxiosResponse<any, any, {}>>;
12
12
  };
13
13
  export default _default;
@@ -1,8 +1,10 @@
1
1
  import { ShortFetchResponse } from '../components/v2/DataTable/DataTable.vue.d';
2
+ import { CustomFieldQueryParams, CustomFieldTypeParams } from '../dto/customField.dto';
2
3
  import { CustomField, DepreciationCategory } from '../types/settingsAttribute.type';
3
4
  import { AxiosResponse } from 'axios';
4
5
  declare const SettingsAttributeServices: {
5
6
  getGeneralCustomFields: () => Promise<AxiosResponse<ShortFetchResponse<CustomField[]>>>;
6
7
  getDepreciationCategory: () => Promise<AxiosResponse<ShortFetchResponse<DepreciationCategory[]>>>;
8
+ getAvailableAssetNameList: (type: CustomFieldTypeParams, queryParams?: CustomFieldQueryParams) => Promise<AxiosResponse>;
7
9
  };
8
10
  export default SettingsAttributeServices;
@@ -5,6 +5,6 @@ export interface ServiceOptions {
5
5
  }
6
6
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
7
7
  declare const _default: {
8
- createQr: (amount: number) => Promise<AxiosResponse<any, any>>;
8
+ createQr: (amount: number) => Promise<AxiosResponse<any, any, {}>>;
9
9
  };
10
10
  export default _default;
@@ -6,6 +6,6 @@ export interface ServiceOptions {
6
6
  }
7
7
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
8
8
  declare const _default: {
9
- reportTag: (body: ReportTagBody) => Promise<AxiosResponse<any, any>>;
9
+ reportTag: (body: ReportTagBody) => Promise<AxiosResponse<any, any, {}>>;
10
10
  };
11
11
  export default _default;
@@ -6,7 +6,7 @@ export interface ServiceOptions {
6
6
  }
7
7
  export declare const API: ({ headers, params, }?: ServiceOptions) => AxiosInstance;
8
8
  declare const _default: {
9
- reportPermanentlyMissing: (trackingId: string, body: ReportMissingBody) => Promise<AxiosResponse<any, any>>;
10
- getTrackingDetail: (trackingId: string) => Promise<AxiosResponse<any, any>>;
9
+ reportPermanentlyMissing: (trackingId: string, body: ReportMissingBody) => Promise<AxiosResponse<any, any, {}>>;
10
+ getTrackingDetail: (trackingId: string) => Promise<AxiosResponse<any, any, {}>>;
11
11
  };
12
12
  export default _default;
@@ -3,6 +3,6 @@ export declare const api: ({ headers, params }?: {
3
3
  params?: {} | undefined;
4
4
  }) => import("axios").AxiosInstance;
5
5
  declare const _default: {
6
- getTransactionLog: (id: string) => Promise<import("axios").AxiosResponse<any, any>>;
6
+ getTransactionLog: (id: string) => Promise<import("axios").AxiosResponse<any, any, {}>>;
7
7
  };
8
8
  export default _default;
@@ -2,7 +2,6 @@ import { CurrencyValue } from '../components/v2/InputCurrency/InputCurrency.vue.
2
2
  import { LinkedAsset } from '../components/v2/DialogLinkedAsset/DialogLinkedAsset.vue.d';
3
3
  export type AssetFieldObject = {
4
4
  _id?: string;
5
- key?: number;
6
5
  name?: string;
7
6
  };
8
7
  export type ChildAsset = {
@@ -88,9 +87,73 @@ export type TransactionPolicyType = {
88
87
  audit: boolean;
89
88
  repairTicketing: boolean;
90
89
  tracking: boolean;
90
+ assetControl: boolean;
91
+ map: boolean;
91
92
  };
92
93
  export interface AssetMap {
93
94
  _id: string;
94
95
  latitude: number;
95
96
  longitude: number;
96
97
  }
98
+ export interface AssetValue {
99
+ name: string;
100
+ value: number;
101
+ formattedValue?: string;
102
+ currency: string;
103
+ isDefault: boolean;
104
+ }
105
+ export interface AssetCustomField {
106
+ _id: string;
107
+ name: string;
108
+ dataType: string;
109
+ value?: string;
110
+ }
111
+ export interface AssetPurchase {
112
+ value: number;
113
+ currency: string;
114
+ }
115
+ export interface AssetCoordinate {
116
+ longitude: number;
117
+ latitude: number;
118
+ }
119
+ export interface AssetGroup {
120
+ _id?: string;
121
+ name?: string;
122
+ fullPath?: string;
123
+ code?: string;
124
+ }
125
+ export interface AssetTableData {
126
+ _id: string;
127
+ assetImage?: string;
128
+ name?: AssetName;
129
+ aliasName?: string;
130
+ assetId?: string;
131
+ assetStatus?: string;
132
+ group?: AssetGroup;
133
+ brand?: AssetFieldObject;
134
+ model?: AssetFieldObject;
135
+ category?: AssetFieldObject;
136
+ tagType?: string;
137
+ measurement?: AssetFieldObject;
138
+ maintenanceStatus?: string;
139
+ auditStatus?: string;
140
+ transactions?: TransactionPolicyType;
141
+ coordinates?: AssetCoordinate;
142
+ address?: string;
143
+ warrantyStatus?: string;
144
+ lastScannedAt?: string;
145
+ linkedAssetCount?: number;
146
+ purchaseDate?: string;
147
+ purchase?: AssetPurchase;
148
+ customFields?: Record<string, AssetCustomField>;
149
+ assetValues?: Record<string, AssetValue>;
150
+ }
151
+ export interface AssetTableDataPrint extends Partial<Omit<AssetTableData, 'coordinates' | 'linkedAssetCount' | 'transactions' | 'assetValues' | 'customFields'>> {
152
+ coordinates?: string;
153
+ maintenanceAuditStatus?: ('In Maintenance' | 'In Audit' | 'None')[];
154
+ linkedAssetCount?: string;
155
+ transactions?: number;
156
+ transactionsObject?: TransactionPolicyType;
157
+ assetValues?: Partial<Record<string, Partial<AssetValue>>>;
158
+ customFields?: Partial<Record<string, Partial<AssetCustomField>>>;
159
+ }
@@ -0,0 +1,9 @@
1
+ type ApplicationSetting = {
2
+ _id: string;
3
+ maxAssetCustomField: number;
4
+ };
5
+ type ApplicationSettingResponse = {
6
+ message: string;
7
+ data: ApplicationSetting;
8
+ };
9
+ export type { ApplicationSettingResponse };
@@ -1,17 +1,3 @@
1
- export interface AssetAttributeTableData {
2
- customFields?: Partial<{
3
- [key: string]: Pick<CustomField, 'name' | 'dataType'> & {
4
- value?: string;
5
- };
6
- }>;
7
- assetValues?: Partial<{
8
- [key: string]: Pick<DepreciationCategory, 'name' | 'isDefault'> & {
9
- value?: string;
10
- formattedValue?: string | null;
11
- currency?: string;
12
- };
13
- }>;
14
- }
15
1
  export declare const FILTERABLE_CUSTOM_FIELD_TYPES: readonly ["Dropdown", "MultiDropdown", "Date", "Datetime", "Currency"];
16
2
  export type FilterableCustomFieldTypes = (typeof FILTERABLE_CUSTOM_FIELD_TYPES)[number];
17
3
  export type CustomFieldTypes = FilterableCustomFieldTypes | 'Text' | 'Textarea' | 'Numeric' | 'Phone' | 'Percentage' | 'Email' | 'URL' | 'Document';
@@ -0,0 +1,2 @@
1
+ import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
2
+ export declare const getVisibleColumns: (tableName: string | undefined, newTableConfig: TableColumn[] | undefined) => Promise<Record<string, boolean>>;
@@ -1,4 +1,4 @@
1
- import { formatAssetValue, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName } from './textFormater.util';
1
+ import { formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName } from './textFormater.util';
2
2
  import handleTokenExpiration from './handleTokenExpiration.util';
3
3
  import exportToExcel from './exportToExcel.util';
4
4
  import { formatGoDate, formatDate, formatDateReadable, getUserLocale } from './date.util';
@@ -16,7 +16,8 @@ import reLogin from './reLogin.util';
16
16
  import { isValidJSONString } from './json.util';
17
17
  import { buildBodyParams } from './request.util';
18
18
  import { formatLogResponseData } from './changelog.util';
19
+ import { getVisibleColumns } from './getVisibleColumns.util';
19
20
  import { googleMapLoader } from './googleMapLoader.util';
20
21
  declare const isObjectEmpty: (object: object) => boolean;
21
22
  declare const getNestedProperyValue: (object: object, property: string) => string | boolean | number | object;
22
- export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatAssetValue, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
23
+ export { isObjectEmpty, getNestedProperyValue, handleTokenExpiration, getImageURL, downloadFile, formatUserName, formatVowelSoundLabel, formatDisplayAssetId, formatDisplayAssetName, exportToExcel, formatGoDate, formatDate, getUserLocale, formatDateReadable, useToast, listenSidebarChanges, unListenSidebarChanges, getCurrency, formatCurrency, getBaseURL, getHostName, useI18n, getSeverityByAssetStatus, clearStorage, forceLogout, reLogin, isValidJSONString, buildBodyParams, formatLogResponseData, googleMapLoader, getVisibleColumns, getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasMonitoringReportRole, hasAnyMonitoringReportRole, hasStaffRole, hasAccessToAssetDetail, };
@@ -11,7 +11,7 @@ export type SystemRole = {
11
11
  update: boolean;
12
12
  delete: boolean;
13
13
  };
14
- export type SystemRoleAttribute = 'importData' | 'assetAttribute' | 'assetPolicies' | 'depreciationGroup' | 'depreciationMethod' | 'documentDeletion' | 'group' | 'iotReader' | 'license' | 'purchaseDocument' | 'purchaseInformation' | 'userAndRole' | 'tag' | 'tagType' | 'registerAsset';
14
+ export type SystemRoleAttribute = 'importData' | 'assetAttribute' | 'assetPolicies' | 'depreciationGroup' | 'depreciationMethod' | 'documentDeletion' | 'group' | 'iotReader' | 'license' | 'purchaseDocument' | 'purchaseInformation' | 'userAndRole' | 'openApi' | 'tag' | 'tagType' | 'registerAsset';
15
15
  export type TransactionAttribute = 'borrowingRole' | 'assignmentRole' | 'disposalRole' | 'transferRole' | 'auditRole' | 'maintenanceRole' | 'repairRole' | 'trackingRole' | 'damagedRole' | 'registrationRole' | 'missingRole';
16
16
  export interface UserLogin {
17
17
  transactionRoles: Record<TransactionAttribute, TransactionRole>;
@@ -1,6 +1,4 @@
1
1
  import { Asset } from '../types/assets.type';
2
- import { AssetAttributeTableData } from '../types/settingsAttribute.type';
3
- export declare const formatAssetValue: (each: AssetAttributeTableData) => AssetAttributeTableData;
4
2
  export declare const formatVowelSoundLabel: (label?: string) => string;
5
3
  export declare const formatUserName: (name?: string) => string;
6
4
  export declare const formatTagCode: (tagCode?: string) => string;