@orbe-agro/client-core 5.3.126 → 5.3.127
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/@types/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.d.ts +1 -1
- package/dist/@types/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.d.ts.map +1 -1
- package/dist/base/hooks/dm/tipoVeiculo/useTipoVeiculoList.js +13 -13
- package/dist/base/hooks/dm/tipoVeiculo/useTipoVeiculoList.js.map +1 -1
- package/dist/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.js +5 -5
- package/dist/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.js.map +1 -1
- package/lib/base/hooks/dm/tipoVeiculo/useTipoVeiculoList.tsx +9 -9
- package/lib/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.tsx +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { TTipoVeiculo } from "@base/@types/models/dm/tipoVeiculo";
|
|
|
3
3
|
type TipoVeiculoResponse = {
|
|
4
4
|
content: TTipoVeiculo[];
|
|
5
5
|
};
|
|
6
|
-
export declare function apiFindDmTipoVeiculo(
|
|
6
|
+
export declare function apiFindDmTipoVeiculo(body: any): Promise<TipoVeiculoResponse>;
|
|
7
7
|
export declare function apiFindDmTipoVeiculoByCodigo(codigo: string): Promise<TTipoVeiculo>;
|
|
8
8
|
export declare function apiFindMonitorTipoVeiculo(body?: IFilterParams): Promise<TQueryResponse<any>>;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TipoVeiculoService.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAKlE,KAAK,mBAAmB,GAAG;IACvB,OAAO,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"TipoVeiculoService.d.ts","sourceRoot":"","sources":["../../../../../../../lib/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAKlE,KAAK,mBAAmB,GAAG;IACvB,OAAO,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,IAAI,KAAA,gCAM9C;AAED,wBAAsB,4BAA4B,CAAC,MAAM,EAAE,MAAM,yBAKhE;AAED,wBAAsB,yBAAyB,CAAC,IAAI,CAAC,EAAE,aAAa,gCAMnE"}
|
|
@@ -2,22 +2,22 @@ import { apiFindDmTipoVeiculo as p } from "../../../services/modules/dm/tipoVeic
|
|
|
2
2
|
import { useTipoVeiculoListStore as f } from "../../../store/dm/tipoVeiculo/tipoVeiculoListStore.js";
|
|
3
3
|
import d from "swr";
|
|
4
4
|
function P() {
|
|
5
|
-
const { tableParams:
|
|
6
|
-
|
|
7
|
-
() => p(),
|
|
5
|
+
const { tableParams: e, filterParams: i, setTableParams: s, setFilterParams: a } = f((o) => o), r = ["/api/tipo-veiculo/find", i], { data: t, error: n, isLoading: c, mutate: l } = d(
|
|
6
|
+
r,
|
|
7
|
+
([, o]) => p(o),
|
|
8
8
|
{ revalidateOnFocus: !1 }
|
|
9
|
-
),
|
|
9
|
+
), u = t?.content || [], m = t?.content.length || 0;
|
|
10
10
|
return {
|
|
11
11
|
data: t,
|
|
12
|
-
tipoVeiculosList:
|
|
13
|
-
tipoVeiculosListTotal:
|
|
14
|
-
error:
|
|
15
|
-
isLoading:
|
|
16
|
-
tableParams:
|
|
17
|
-
filterParams:
|
|
18
|
-
mutate:
|
|
19
|
-
setTableParams:
|
|
20
|
-
setFilterParams:
|
|
12
|
+
tipoVeiculosList: u,
|
|
13
|
+
tipoVeiculosListTotal: m,
|
|
14
|
+
error: n,
|
|
15
|
+
isLoading: c,
|
|
16
|
+
tableParams: e,
|
|
17
|
+
filterParams: i,
|
|
18
|
+
mutate: l,
|
|
19
|
+
setTableParams: s,
|
|
20
|
+
setFilterParams: a
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTipoVeiculoList.js","sources":["../../../../../lib/base/hooks/dm/tipoVeiculo/useTipoVeiculoList.tsx"],"sourcesContent":["import { apiFindDmTipoVeiculo } from '@base/services/modules/dm/tipoVeiculo/TipoVeiculoService'
|
|
1
|
+
{"version":3,"file":"useTipoVeiculoList.js","sources":["../../../../../lib/base/hooks/dm/tipoVeiculo/useTipoVeiculoList.tsx"],"sourcesContent":["import { apiFindDmTipoVeiculo } from '@base/services/modules/dm/tipoVeiculo/TipoVeiculoService'\nimport { useTipoVeiculoListStore } from '@base/store/dm/tipoVeiculo/tipoVeiculoListStore'\nimport useSWR from 'swr'\n\nexport default function useTipoVeiculoList() {\n const { tableParams, filterParams, setTableParams, setFilterParams } =\n useTipoVeiculoListStore((state) => state)\n\n const swrKey = ['/api/tipo-veiculo/find', filterParams]\n\n const { data, error, isLoading, mutate } = useSWR(\n swrKey,\n ([, body]) => apiFindDmTipoVeiculo(body),\n { revalidateOnFocus: false },\n )\n\n const tipoVeiculosList = data?.content || []\n\n const tipoVeiculosListTotal = data?.content.length || 0\n\n return {\n data,\n tipoVeiculosList,\n tipoVeiculosListTotal,\n error,\n isLoading,\n tableParams,\n filterParams,\n mutate,\n setTableParams,\n setFilterParams,\n }\n}\n"],"names":["useTipoVeiculoList","tableParams","filterParams","setTableParams","setFilterParams","useTipoVeiculoListStore","state","swrKey","data","error","isLoading","mutate","useSWR","body","apiFindDmTipoVeiculo","tipoVeiculosList","tipoVeiculosListTotal"],"mappings":";;;AAIA,SAAwBA,IAAqB;AACzC,QAAM,EAAE,aAAAC,GAAa,cAAAC,GAAc,gBAAAC,GAAgB,iBAAAC,MAC/CC,EAAwB,CAACC,MAAUA,CAAK,GAEtCC,IAAS,CAAC,0BAA0BL,CAAY,GAEhD,EAAE,MAAAM,GAAM,OAAAC,GAAO,WAAAC,GAAW,QAAAC,MAAWC;AAAA,IACvCL;AAAA,IACA,CAAC,GAAGM,CAAI,MAAMC,EAAqBD,CAAI;AAAA,IACvC,EAAE,mBAAmB,GAAA;AAAA,EAAM,GAGzBE,IAAmBP,GAAM,WAAW,CAAA,GAEpCQ,IAAwBR,GAAM,QAAQ,UAAU;AAEtD,SAAO;AAAA,IACH,MAAAA;AAAA,IACA,kBAAAO;AAAA,IACA,uBAAAC;AAAA,IACA,OAAAP;AAAA,IACA,WAAAC;AAAA,IACA,aAAAT;AAAA,IACA,cAAAC;AAAA,IACA,QAAAS;AAAA,IACA,gBAAAR;AAAA,IACA,iBAAAC;AAAA,EAAA;AAER;"}
|
|
@@ -2,20 +2,20 @@ import t from "../../../../../@ecme/services/ApiService.js";
|
|
|
2
2
|
import "../../../../configs/index.js";
|
|
3
3
|
import n from "../../../../configs/endpoints.config/endpoints.navigation.js";
|
|
4
4
|
const i = n.dm.tipoVeiculo;
|
|
5
|
-
async function r(o
|
|
5
|
+
async function r(o) {
|
|
6
6
|
return t.fetchDataWithAxios({
|
|
7
7
|
url: i.find.endpoint,
|
|
8
8
|
method: i.find.method,
|
|
9
9
|
data: o
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
async function
|
|
12
|
+
async function a(o) {
|
|
13
13
|
return t.fetchDataWithAxios({
|
|
14
14
|
url: i.findTipoVeiculoByCodigo.endpoint + `${o}`,
|
|
15
15
|
method: i.findTipoVeiculoByCodigo.method
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
async function
|
|
18
|
+
async function c(o) {
|
|
19
19
|
return t.fetchDataWithAxios({
|
|
20
20
|
url: i.findMonitor.endpoint,
|
|
21
21
|
method: i.findMonitor.httpMethod,
|
|
@@ -24,7 +24,7 @@ async function a(o) {
|
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
26
|
r as apiFindDmTipoVeiculo,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
a as apiFindDmTipoVeiculoByCodigo,
|
|
28
|
+
c as apiFindMonitorTipoVeiculo
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=TipoVeiculoService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TipoVeiculoService.js","sources":["../../../../../../lib/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.tsx"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TTipoVeiculo } from \"@base/@types/models/dm/tipoVeiculo\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst TIPO_VEICULO_ENDPOINT = endpointsConfig.dm.tipoVeiculo;\n\ntype TipoVeiculoResponse = {\n content: TTipoVeiculo[];\n};\n\nexport async function apiFindDmTipoVeiculo(
|
|
1
|
+
{"version":3,"file":"TipoVeiculoService.js","sources":["../../../../../../lib/base/services/modules/dm/tipoVeiculo/TipoVeiculoService.tsx"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TTipoVeiculo } from \"@base/@types/models/dm/tipoVeiculo\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst TIPO_VEICULO_ENDPOINT = endpointsConfig.dm.tipoVeiculo;\n\ntype TipoVeiculoResponse = {\n content: TTipoVeiculo[];\n};\n\nexport async function apiFindDmTipoVeiculo(body) {\n return ApiService.fetchDataWithAxios<TipoVeiculoResponse>({\n url: TIPO_VEICULO_ENDPOINT.find.endpoint,\n method: TIPO_VEICULO_ENDPOINT.find.method,\n data: body,\n })\n}\n\nexport async function apiFindDmTipoVeiculoByCodigo(codigo: string) {\n return ApiService.fetchDataWithAxios<TTipoVeiculo>({\n url: TIPO_VEICULO_ENDPOINT.findTipoVeiculoByCodigo.endpoint + `${codigo}`,\n method: TIPO_VEICULO_ENDPOINT.findTipoVeiculoByCodigo.method,\n })\n}\n\nexport async function apiFindMonitorTipoVeiculo(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: TIPO_VEICULO_ENDPOINT.findMonitor.endpoint,\n method: TIPO_VEICULO_ENDPOINT.findMonitor.httpMethod,\n data: body,\n })\n}"],"names":["TIPO_VEICULO_ENDPOINT","endpointsConfig","apiFindDmTipoVeiculo","body","ApiService","apiFindDmTipoVeiculoByCodigo","codigo","apiFindMonitorTipoVeiculo"],"mappings":";;;AAKA,MAAMA,IAAwBC,EAAgB,GAAG;AAMjD,eAAsBC,EAAqBC,GAAM;AAC7C,SAAOC,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAAsB,KAAK;AAAA,IAChC,QAAQA,EAAsB,KAAK;AAAA,IACnC,MAAMG;AAAA,EAAA,CACT;AACL;AAEA,eAAsBE,EAA6BC,GAAgB;AAC/D,SAAOF,EAAW,mBAAiC;AAAA,IAC/C,KAAKJ,EAAsB,wBAAwB,WAAW,GAAGM,CAAM;AAAA,IACvE,QAAQN,EAAsB,wBAAwB;AAAA,EAAA,CACzD;AACL;AAEA,eAAsBO,EAA0BJ,GAAsB;AAClE,SAAOC,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAAsB,YAAY;AAAA,IACvC,QAAQA,EAAsB,YAAY;AAAA,IAC1C,MAAMG;AAAA,EAAA,CACT;AACL;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { apiFindDmTipoVeiculo } from '@base/services/modules/dm/tipoVeiculo/TipoVeiculoService'
|
|
2
|
-
import { useTipoVeiculoListStore } from '@base/store/dm/tipoVeiculo/tipoVeiculoListStore'
|
|
3
|
-
import useSWR from 'swr'
|
|
1
|
+
import { apiFindDmTipoVeiculo } from '@base/services/modules/dm/tipoVeiculo/TipoVeiculoService'
|
|
2
|
+
import { useTipoVeiculoListStore } from '@base/store/dm/tipoVeiculo/tipoVeiculoListStore'
|
|
3
|
+
import useSWR from 'swr'
|
|
4
4
|
|
|
5
5
|
export default function useTipoVeiculoList() {
|
|
6
6
|
const { tableParams, filterParams, setTableParams, setFilterParams } =
|
|
7
|
-
useTipoVeiculoListStore((state) => state)
|
|
7
|
+
useTipoVeiculoListStore((state) => state)
|
|
8
8
|
|
|
9
|
-
const swrKey = [
|
|
9
|
+
const swrKey = ['/api/tipo-veiculo/find', filterParams]
|
|
10
10
|
|
|
11
11
|
const { data, error, isLoading, mutate } = useSWR(
|
|
12
12
|
swrKey,
|
|
13
|
-
() => apiFindDmTipoVeiculo(),
|
|
14
|
-
{ revalidateOnFocus: false }
|
|
15
|
-
)
|
|
13
|
+
([, body]) => apiFindDmTipoVeiculo(body),
|
|
14
|
+
{ revalidateOnFocus: false },
|
|
15
|
+
)
|
|
16
16
|
|
|
17
17
|
const tipoVeiculosList = data?.content || []
|
|
18
18
|
|
|
@@ -30,4 +30,4 @@ export default function useTipoVeiculoList() {
|
|
|
30
30
|
setTableParams,
|
|
31
31
|
setFilterParams,
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
}
|
|
@@ -9,11 +9,11 @@ type TipoVeiculoResponse = {
|
|
|
9
9
|
content: TTipoVeiculo[];
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export async function apiFindDmTipoVeiculo(
|
|
12
|
+
export async function apiFindDmTipoVeiculo(body) {
|
|
13
13
|
return ApiService.fetchDataWithAxios<TipoVeiculoResponse>({
|
|
14
14
|
url: TIPO_VEICULO_ENDPOINT.find.endpoint,
|
|
15
15
|
method: TIPO_VEICULO_ENDPOINT.find.method,
|
|
16
|
-
data,
|
|
16
|
+
data: body,
|
|
17
17
|
})
|
|
18
18
|
}
|
|
19
19
|
|
package/package.json
CHANGED