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
@@ -15,7 +15,7 @@ const API = ({ headers = {}, params = {} } = {}): AxiosInstance => {
15
15
  const BASE_URL = getBaseURL('APP_TAGSAMURAI_API');
16
16
 
17
17
  const instance = axios.create({
18
- baseURL: `${BASE_URL}/repair/v2/damage`,
18
+ baseURL: `${BASE_URL}/damage-repair-ticketing/v2/damage`,
19
19
  headers: {
20
20
  'Content-type': 'application/json',
21
21
  'Authorization': `Bearer ${user.token}`,
@@ -1,5 +1,6 @@
1
1
  import axios, { AxiosInstance, AxiosResponse } from 'axios';
2
2
  import { QueryParams } from '@/components/v2/DataTable/DataTable.vue.d';
3
+ import { buildBodyParams } from '@/utils';
3
4
 
4
5
  export interface ServiceOptions {
5
6
  headers?: Record<string, unknown>;
@@ -14,6 +15,7 @@ export type AssetNameOptionsQueryParams = {
14
15
  export type GetAssetNameListQueryParams = {
15
16
  assetName?: string;
16
17
  tagType?: string;
18
+ category?: string;
17
19
  };
18
20
 
19
21
  export interface AssetNameDropdownOption {
@@ -87,6 +89,13 @@ const getAssetNameDropdown = (): Promise<
87
89
  return API().get('/dropdown');
88
90
  };
89
91
 
92
+ const postAssetNameList = (
93
+ params?: GetAssetNameListQueryParams,
94
+ ): Promise<AxiosResponse> => {
95
+ const body = buildBodyParams(params);
96
+ return API().post('/list', body);
97
+ };
98
+
90
99
  export default {
91
100
  getAssetNameDetail,
92
101
  getAssetNameList,
@@ -94,4 +103,5 @@ export default {
94
103
  getUnpairedAssetName,
95
104
  getAssetNameDropdown,
96
105
  getOptions,
106
+ postAssetNameList,
97
107
  };
@@ -7,10 +7,10 @@ const getUser = (): Record<string, string> =>
7
7
  export const API = ({ headers = {}, params = {} } = {}): AxiosInstance => {
8
8
  const user = getUser();
9
9
 
10
- const BASE_URL = import.meta.env.VITE_APP_GLOBAL_SETTINGS_API;
10
+ const BASE_URL = import.meta.env.VITE_APP_TAGSAMURAI_API;
11
11
 
12
12
  const instance = axios.create({
13
- baseURL: `${BASE_URL}/v1/global-settings`,
13
+ baseURL: `${BASE_URL}/global-settings`,
14
14
  headers: {
15
15
  'Content-type': 'application/json',
16
16
  'Authorization': `Bearer ${user.token}`,
@@ -0,0 +1,33 @@
1
+ import { getBaseURL } from '@/utils';
2
+ import axios, { AxiosInstance, AxiosResponse } from 'axios';
3
+
4
+ const API = ({ headers = {}, params = {} } = {}): AxiosInstance => {
5
+ const user = JSON.parse(localStorage.getItem('user') as string) ?? {};
6
+ const BASE_URL = getBaseURL('APP_TAGSAMURAI_API');
7
+
8
+ const instance = axios.create({
9
+ baseURL: `${BASE_URL}/settings-attribute/v2`,
10
+ headers: {
11
+ 'Content-Type': 'application/json',
12
+ 'Authorization': `Bearer ${user.token}`,
13
+ ...headers,
14
+ },
15
+ params,
16
+ });
17
+
18
+ return instance;
19
+ };
20
+
21
+ const DataLockService = {
22
+ getDataLock: (): Promise<AxiosResponse> => {
23
+ return API().get('/data-lock');
24
+ },
25
+ postDataLock: (): Promise<AxiosResponse> => {
26
+ return API().post('/data-lock');
27
+ },
28
+ deleteDataLock: (): Promise<AxiosResponse> => {
29
+ return API().delete('/data-lock', { fetchOptions: { keepalive: true } });
30
+ },
31
+ };
32
+
33
+ export default DataLockService;
@@ -0,0 +1,33 @@
1
+ import { ApplicationSettingResponse } from '@/types/globalSettings.type';
2
+ import axios, { AxiosInstance, AxiosResponse } from 'axios';
3
+
4
+ const getUser = (): Record<string, string> =>
5
+ JSON.parse(localStorage.getItem('user') ?? '{}');
6
+
7
+ const API = ({ headers = {}, params = {} } = {}): AxiosInstance => {
8
+ const user = getUser();
9
+
10
+ const BASE_URL = import.meta.env.VITE_APP_TAGSAMURAI_API;
11
+
12
+ const instance = axios.create({
13
+ baseURL: `${BASE_URL}/global-settings`,
14
+ headers: {
15
+ 'Content-type': 'application/json',
16
+ 'Authorization': `Bearer ${user.token}`,
17
+ ...headers,
18
+ },
19
+ params,
20
+ });
21
+
22
+ return instance;
23
+ };
24
+
25
+ const GlobalSettingsServices = {
26
+ getApplicationSetting: (): Promise<
27
+ AxiosResponse<ApplicationSettingResponse>
28
+ > => {
29
+ return API().get('/application-setting');
30
+ },
31
+ };
32
+
33
+ export default GlobalSettingsServices;
@@ -1,4 +1,8 @@
1
1
  import { ShortFetchResponse } from '@/components/v2/DataTable/DataTable.vue.d';
2
+ import {
3
+ CustomFieldQueryParams,
4
+ CustomFieldTypeParams,
5
+ } from '@/dto/customField.dto';
2
6
  import {
3
7
  CustomField,
4
8
  DepreciationCategory,
@@ -36,6 +40,15 @@ const SettingsAttributeServices = {
36
40
  > => {
37
41
  return API().get('/depreciation-category');
38
42
  },
43
+
44
+ getAvailableAssetNameList: (
45
+ type: CustomFieldTypeParams,
46
+ queryParams?: CustomFieldQueryParams,
47
+ ): Promise<AxiosResponse> => {
48
+ return API({ params: queryParams }).get(
49
+ `/custom-field/${type}/asset-name/available`,
50
+ );
51
+ },
39
52
  };
40
53
 
41
54
  export default SettingsAttributeServices;
@@ -1,59 +0,0 @@
1
- export interface NominatimResponse {
2
- place_id: number;
3
- licence: string;
4
- osm_type: string;
5
- osm_id: number;
6
- lat: string;
7
- lon: string;
8
- class: string;
9
- type: string;
10
- place_rank: number;
11
- importance: number;
12
- addresstype: string;
13
- name?: string;
14
- display_name: string;
15
- address?: {
16
- house_number?: string;
17
- road?: string;
18
- suburb?: string;
19
- city?: string;
20
- town?: string;
21
- village?: string;
22
- county?: string;
23
- state?: string;
24
- postcode?: string;
25
- country?: string;
26
- country_code?: string;
27
- [key: string]: string | undefined;
28
- };
29
- boundingbox: string[];
30
- }
31
- export interface ReverseGeocodeResult {
32
- displayName: string;
33
- address?: {
34
- house_number?: string;
35
- road?: string;
36
- suburb?: string;
37
- city?: string;
38
- town?: string;
39
- village?: string;
40
- county?: string;
41
- state?: string;
42
- postcode?: string;
43
- country?: string;
44
- country_code?: string;
45
- };
46
- }
47
- /**
48
- * Reverse geocodes coordinates to get full address using OpenStreetMap Nominatim API
49
- * @param lat - Latitude coordinate
50
- * @param lon - Longitude coordinate
51
- * @returns Promise with the reverse geocoding result or null if failed
52
- */
53
- export declare const reverseGeocode: (lat: number, lon: number) => Promise<ReverseGeocodeResult | null>;
54
- /**
55
- * Formats the address object into a readable string
56
- * @param address - Address object from the API response
57
- * @returns Formatted address string
58
- */
59
- export declare const formatAddress: (address: NonNullable<ReverseGeocodeResult['address']>) => string;
@@ -1,20 +0,0 @@
1
- import { DefineComponent } from 'vue';
2
- import { QueryParams } from '../DataTable/DataTable.vue.d';
3
-
4
- export interface FilterAssetAttributeProps {
5
- /**
6
- * The filter object.
7
- */
8
- filter: QueryParams;
9
- }
10
-
11
- export type FilterAssetAttributeEmits = {
12
- updateFields: [];
13
- };
14
-
15
- declare const FilterAssetValue: DefineComponent<
16
- FilterAssetAttributeProps,
17
- FilterAssetAttributeEmits
18
- >;
19
-
20
- export default FilterAssetValue;
@@ -1,17 +0,0 @@
1
- import { DefineComponent } from 'vue';
2
- import {
3
- FilterAssetAttributeProps,
4
- FilterAssetAttributeEmits,
5
- } from '../FilterAssetValue/FilterAssetValue.vue.d';
6
- import { FilterField } from '../../../types/filterField.type';
7
-
8
- export interface FilterCustomFieldProps extends FilterAssetAttributeProps {
9
- customFieldFetchOptionFn: FilterField<QueryParams>['fetchOptionFn'];
10
- }
11
-
12
- declare const FilterCustomField: DefineComponent<
13
- FilterCustomFieldProps,
14
- FilterAssetAttributeEmits
15
- >;
16
-
17
- export default FilterCustomField;
@@ -1,12 +0,0 @@
1
- import { TableColumn } from '../components/v2/DataTable/DataTable.vue.d';
2
- import { FilterField } from '../types/filterField.type';
3
- import { Ref } from 'vue';
4
- export interface AssetAttributeStore {
5
- customFieldColumns: Ref<TableColumn[]>;
6
- assetValueColumns: Ref<TableColumn[]>;
7
- customFieldFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
8
- assetValueFilterFields: Ref<Omit<FilterField, 'fetchOptionFn'>[] | undefined>;
9
- getFields: () => void;
10
- }
11
- declare const useAssetAttributeStore: () => AssetAttributeStore;
12
- export default useAssetAttributeStore;
@@ -1 +0,0 @@
1
- export { default as useAssetAttributeStore } from './assetAttribute.store';
@@ -1,20 +0,0 @@
1
- import { DefineComponent } from 'vue';
2
- import { QueryParams } from '../DataTable/DataTable.vue.d';
3
-
4
- export interface FilterAssetAttributeProps {
5
- /**
6
- * The filter object.
7
- */
8
- filter: QueryParams;
9
- }
10
-
11
- export type FilterAssetAttributeEmits = {
12
- updateFields: [];
13
- };
14
-
15
- declare const FilterAssetValue: DefineComponent<
16
- FilterAssetAttributeProps,
17
- FilterAssetAttributeEmits
18
- >;
19
-
20
- export default FilterAssetValue;
@@ -1,17 +0,0 @@
1
- import { DefineComponent } from 'vue';
2
- import {
3
- FilterAssetAttributeProps,
4
- FilterAssetAttributeEmits,
5
- } from '../FilterAssetValue/FilterAssetValue.vue.d';
6
- import { FilterField } from '@/types/filterField.type';
7
-
8
- export interface FilterCustomFieldProps extends FilterAssetAttributeProps {
9
- customFieldFetchOptionFn: FilterField<QueryParams>['fetchOptionFn'];
10
- }
11
-
12
- declare const FilterCustomField: DefineComponent<
13
- FilterCustomFieldProps,
14
- FilterAssetAttributeEmits
15
- >;
16
-
17
- export default FilterCustomField;