tsv2-library 1.0.59 → 1.0.61-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.
- package/dist/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
- package/dist/src/components/v2/DialogConfirm/DialogConfirm.vue.d.ts +4 -0
- package/dist/src/components/v2/HardwareSync/HardwareSync.vue.d.ts +8 -0
- package/dist/src/services/scanLog.service.d.ts +13 -0
- package/dist/src/utils/date.util.d.ts +15 -9
- package/dist/tsv2-library.es.js +3767 -3663
- package/dist/tsv2-library.umd.js +76 -76
- package/package.json +1 -1
- package/src/components/v2/ButtonScan/ButtonScan.vue.d.ts +6 -0
- package/src/components/v2/DialogConfirm/DialogConfirm.vue.d.ts +4 -0
- package/src/services/scanLog.service.ts +37 -0
package/package.json
CHANGED
|
@@ -125,6 +125,12 @@ export interface ButtonScanProps extends TSButtonProps {
|
|
|
125
125
|
* @default false
|
|
126
126
|
*/
|
|
127
127
|
labelOnly?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Base z-index for dialog of scan
|
|
130
|
+
*
|
|
131
|
+
* @default 0
|
|
132
|
+
*/
|
|
133
|
+
baseZIndex?: number;
|
|
128
134
|
size: 'small' | 'large';
|
|
129
135
|
}
|
|
130
136
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import axios, { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
|
|
3
|
+
export interface ServiceOptions {
|
|
4
|
+
headers?: Record<string, unknown>;
|
|
5
|
+
params?: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const API = ({
|
|
9
|
+
headers = {},
|
|
10
|
+
params = {},
|
|
11
|
+
}: ServiceOptions = {}): AxiosInstance => {
|
|
12
|
+
const user = JSON.parse(localStorage.getItem('user') ?? '{}');
|
|
13
|
+
const BASE_URL = import.meta.env.VITE_APP_TAGSAMURAI_API;
|
|
14
|
+
|
|
15
|
+
const instance = axios.create({
|
|
16
|
+
baseURL: `${BASE_URL}/tag/v2/scan-log`,
|
|
17
|
+
headers: {
|
|
18
|
+
'Content-type': 'application/json',
|
|
19
|
+
'Authorization': `Bearer ${user.token}`,
|
|
20
|
+
...headers,
|
|
21
|
+
},
|
|
22
|
+
params,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return instance;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const postScanLog = (body: {
|
|
29
|
+
tag: string;
|
|
30
|
+
serialNumber: string;
|
|
31
|
+
}): Promise<AxiosResponse> => {
|
|
32
|
+
return API().post('/', body);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
postScanLog,
|
|
37
|
+
};
|