tsv2-library 1.1.1-dev-alpha.7 → 1.1.1-dev-alpha.10

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tsv2-library",
3
3
  "author": "fixedassetv2-fe",
4
- "version": "1.1.1-dev-alpha.7",
4
+ "version": "1.1.1-dev-alpha.10",
5
5
  "license": "ISC",
6
6
  "homepage": "https://github.com/fixedassetv2-fe/tsv2-library#readme",
7
7
  "repository": {
@@ -1,5 +1,5 @@
1
1
  import { Slot } from 'vue';
2
- import { FormPayload, FormProps } from 'v2/Form/Form.vue.d';
2
+ import FormInstance, { FormPayload, FormProps } from 'v2/Form/Form.vue.d';
3
3
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
4
4
  import { GenericObject } from 'vee-validate';
5
5
  import { TSVueIcons } from 'v2/Icon/Icon.vue.d';
@@ -216,7 +216,18 @@ declare class DialogForm extends ClassComponent<
216
216
  DialogFormProps,
217
217
  DialogFormSlots,
218
218
  DialogFormEmits
219
- > {}
219
+ > {
220
+ /**
221
+ * The form instance.
222
+ */
223
+ form: FormInstance;
224
+ /**
225
+ * Callback function for clear button click.
226
+ *
227
+ * @returns {void}
228
+ */
229
+ clearField(): void;
230
+ }
220
231
 
221
232
  declare module '@vue/runtime-core' {
222
233
  interface GlobalComponents {
@@ -12,12 +12,21 @@ export type Label = {
12
12
  * Props for DialogSelectAsset component
13
13
  */
14
14
  export interface DialogPrintLabelProps {
15
- selectedData: Partial<
16
- Pick<AssetTableData, 'name' | 'assetId' | 'category' | 'purchaseDate'>
15
+ selectedData: Pick<
16
+ AssetTableData,
17
+ '_id' | 'name' | 'category' | 'purchaseDate'
17
18
  >[];
18
19
  visible: boolean;
19
20
  }
20
21
 
22
+ /**
23
+ * Emits for DialogSelectAsset component
24
+ */
25
+ export type DialogPrintLabelEmits = {
26
+ 'printed': [];
27
+ 'update:visible': [state: boolean];
28
+ };
29
+
21
30
  /**
22
31
  * TSVue - DialogPrintLabel
23
32
  *
@@ -4,6 +4,8 @@ export type TransactionRoles = Addon & {
4
4
  transfer: boolean;
5
5
  disposal: boolean;
6
6
  registration: boolean;
7
+ damage: boolean;
8
+ missing: boolean;
7
9
  };
8
10
 
9
11
  export type Addon = {
@@ -155,6 +155,10 @@ const getAssetMaps = (
155
155
  }).get('/asset-maps', { signal: abortController.signal });
156
156
  };
157
157
 
158
+ const printLabel = (assets: string[]): Promise<AxiosResponse> => {
159
+ return API().put('/print-label', { assets });
160
+ };
161
+
158
162
  export default {
159
163
  getAllAssets,
160
164
  postAssetList,
@@ -170,4 +174,5 @@ export default {
170
174
  getOptions,
171
175
  scanAsset,
172
176
  getAssetMaps,
177
+ printLabel,
173
178
  };