tsv2-library 1.1.0-dev-alpha.15 → 1.1.0-dev-alpha.16

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.
@@ -2,7 +2,8 @@ import { AssetMap } from '../types/assets.type';
2
2
  import { DataTableParams } from '../types/dataTable.type';
3
3
  import { DialogSelectAssetFilterModels } from '../components/v2/DialogSelectAsset/DialogSelectAsset.vue.d';
4
4
  export type DialogSelectAssetFilterQueryParams = Partial<Record<keyof DialogSelectAssetFilterModels, string>>;
5
- export type GetAllAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQueryParams & {
5
+ export type GetAssetsQueryParams = DataTableParams & DialogSelectAssetFilterQueryParams & {
6
+ _id?: string;
6
7
  status?: string;
7
8
  search?: string;
8
9
  excludeId?: string;
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance, AxiosResponse } from 'axios';
2
- import { GetAllAssetsQueryParams, GetAssetDetailParams, GetAssetMapParams, GetAssetMapResponse, GetAvailableAssetsQueryParams, GetLinkedAssetFamiliesResponse } from '../dto/assets.dto';
2
+ import { GetAssetsQueryParams, GetAssetDetailParams, GetAssetMapParams, GetAssetMapResponse, GetAvailableAssetsQueryParams, GetLinkedAssetFamiliesResponse } from '../dto/assets.dto';
3
3
  import { AssetOptionField } from '../components/v2/DialogSelectAsset/DialogSelectAsset.vue.d';
4
4
  export interface ServiceOptions {
5
5
  headers?: Record<string, unknown>;
@@ -8,11 +8,11 @@ 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, {}>>;
11
+ getAllAssets: (params: GetAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
12
+ postAssetList: (params?: GetAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
13
+ postAssetOption: (params?: GetAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
14
14
  getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
15
- postAssetAvailableList: (params?: GetAllAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
15
+ postAssetAvailableList: (params?: GetAssetsQueryParams | GetAvailableAssetsQueryParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
16
16
  postAvailableListOptions: (params?: Partial<Record<string, unknown>> | undefined) => Promise<AxiosResponse<any, any, {}>>;
17
17
  getAssetsById: (_id: string, params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<any, any, {}>>;
18
18
  getAssetDetail: (id: string, params?: GetAssetDetailParams | undefined) => Promise<AxiosResponse<any, any, {}>>;
@@ -71915,7 +71915,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
71915
71915
  const matchTag = async (type, tag2, device2) => {
71916
71916
  var _a;
71917
71917
  try {
71918
- const { data: body } = await AssetsServices.matchAssetWithTag(props.id, tag2);
71918
+ const { data: body } = await AssetsServices.postAssetList({
71919
+ _id: props.id,
71920
+ tag: tag2
71921
+ });
71919
71922
  serialNumber.value = device2;
71920
71923
  if (!((_a = body == null ? void 0 : body.data) == null ? void 0 : _a.totalRecords)) {
71921
71924
  toast2.add({
@@ -73153,7 +73156,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
73153
73156
  _id: JSON.stringify(assetId),
73154
73157
  [optionField]: true
73155
73158
  };
73156
- const { data: data30 } = await AssetsServices.postAvailableListOptions(
73159
+ const { data: data30 } = await AssetsServices.postAssetOption(
73157
73160
  params
73158
73161
  );
73159
73162
  filterOptions2.value[optionField] = (_c = data30.data) == null ? void 0 : _c[optionField];
@@ -73398,7 +73401,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
73398
73401
  try {
73399
73402
  setLoading(true);
73400
73403
  const assets = sessionStorage.getItem("assetsDisposalReport") ?? "[]";
73401
- const { data: data30 } = await AssetsServices.postAssetAvailableList({
73404
+ const { data: data30 } = await AssetsServices.postAssetList({
73402
73405
  _id: assets
73403
73406
  });
73404
73407
  data30.data.data.forEach((d) => {