@zauru-sdk/utils 1.0.16 → 1.0.18
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/CHANGELOG.md +16 -0
- package/dist/zauru/4pinos-receptions-form-history.utils.d.ts +4 -4
- package/dist/zauru/4pinos-receptions-form-history.utils.js +8 -8
- package/dist/zauru/bitacora-edicion-masiva.utils.d.ts +3 -3
- package/dist/zauru/bitacora-edicion-masiva.utils.js +6 -6
- package/dist/zauru/consolidated-history.utils.d.ts +3 -3
- package/dist/zauru/consolidated-history.utils.js +6 -6
- package/dist/zauru/costos-items.utils.d.ts +9 -9
- package/dist/zauru/costos-items.utils.js +17 -17
- package/dist/zauru/discharges-histsory.utils.d.ts +3 -3
- package/dist/zauru/discharges-histsory.utils.js +6 -6
- package/dist/zauru/items.utils.d.ts +3 -3
- package/dist/zauru/items.utils.js +6 -6
- package/dist/zauru/motivos-rechazo.utils.d.ts +2 -2
- package/dist/zauru/motivos-rechazo.utils.js +4 -4
- package/dist/zauru/payees.utils.d.ts +5 -5
- package/dist/zauru/payees.utils.js +10 -10
- package/dist/zauru/specialItem.utils.d.ts +4 -4
- package/dist/zauru/specialItem.utils.js +9 -9
- package/dist/zauru/templates.utils.d.ts +6 -6
- package/dist/zauru/templates.utils.js +12 -12
- package/dist/zauru/tiposMuestra.utils.d.ts +4 -4
- package/dist/zauru/tiposMuestra.utils.js +8 -8
- package/dist/zauru/webapp-tables.utils.d.ts +1 -1
- package/dist/zauru/webapp-tables.utils.js +2 -2
- package/package.json +3 -3
- package/src/zauru/4pinos-receptions-form-history.utils.ts +12 -12
- package/src/zauru/bitacora-edicion-masiva.utils.ts +9 -9
- package/src/zauru/consolidated-history.utils.ts +9 -9
- package/src/zauru/costos-items.utils.ts +31 -25
- package/src/zauru/discharges-histsory.utils.ts +9 -9
- package/src/zauru/items.utils.ts +9 -9
- package/src/zauru/motivos-rechazo.utils.ts +6 -6
- package/src/zauru/payees.utils.ts +15 -15
- package/src/zauru/specialItem.utils.ts +25 -15
- package/src/zauru/templates.utils.ts +18 -18
- package/src/zauru/tiposMuestra.utils.ts +12 -12
- package/src/zauru/webapp-tables.utils.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.18](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.17...v1.0.18) (2024-03-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zauru-sdk/utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.17](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.16...v1.0.17) (2024-03-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zauru-sdk/utils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.0.16](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.15...v1.0.16) (2024-03-21)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @zauru-sdk/utils
|
|
@@ -12,7 +12,7 @@ export declare const ESTADOS_COLA_RECEPCIONES: {
|
|
|
12
12
|
* @param session Session object.
|
|
13
13
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
14
14
|
*/
|
|
15
|
-
export declare
|
|
15
|
+
export declare const getQueueFormReceptionHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<QueueFormReceptionWebAppTable>[]>>;
|
|
16
16
|
/**
|
|
17
17
|
* Create a template in the web app table.
|
|
18
18
|
* @param headers Request headers.
|
|
@@ -20,18 +20,18 @@ export declare function getQueueFormReceptionHistories(headers: any, session: Se
|
|
|
20
20
|
* @param body QueueFormReceptionWebAppTable data to be created.
|
|
21
21
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable>.
|
|
22
22
|
*/
|
|
23
|
-
export declare
|
|
23
|
+
export declare const createQueueFormReceptionHistory: (headers: any, session: Session, body: QueueFormReceptionWebAppTable) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
24
24
|
/**
|
|
25
25
|
* Put updateQueueFormReception from the web app table.
|
|
26
26
|
* @param headers Request headers.
|
|
27
27
|
* @param session Session object.
|
|
28
28
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
29
29
|
*/
|
|
30
|
-
export declare
|
|
30
|
+
export declare const updateQueueFormReceptionHistory: (headers: any, session: Session, body: Partial<QueueFormReceptionWebAppTable>, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
31
31
|
/**
|
|
32
32
|
* Delete QueueFormReceptionHistory from the web app table.
|
|
33
33
|
* @param headers Request headers.
|
|
34
34
|
* @param session Session object.
|
|
35
35
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
36
36
|
*/
|
|
37
|
-
export declare
|
|
37
|
+
export declare const deleteQueueFormReceptionHistory: (headers: any, session: Session, id: string) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -12,7 +12,7 @@ export const ESTADOS_COLA_RECEPCIONES = {
|
|
|
12
12
|
* @param session Session object.
|
|
13
13
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export const getQueueFormReceptionHistories = (headers, session) => {
|
|
16
16
|
return handlePossibleAxiosErrors(async () => {
|
|
17
17
|
const { queue_form_recepcion_submited_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
18
18
|
"queue_form_recepcion_submited_web_app_table_id",
|
|
@@ -24,7 +24,7 @@ export async function getQueueFormReceptionHistories(headers, session) {
|
|
|
24
24
|
const history = response?.data ?? [];
|
|
25
25
|
return history;
|
|
26
26
|
});
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
/**
|
|
29
29
|
* Create a template in the web app table.
|
|
30
30
|
* @param headers Request headers.
|
|
@@ -32,7 +32,7 @@ export async function getQueueFormReceptionHistories(headers, session) {
|
|
|
32
32
|
* @param body QueueFormReceptionWebAppTable data to be created.
|
|
33
33
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable>.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export const createQueueFormReceptionHistory = (headers, session, body) => {
|
|
36
36
|
return handlePossibleAxiosErrors(async () => {
|
|
37
37
|
const { queue_form_recepcion_submited_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
38
38
|
"queue_form_recepcion_submited_web_app_table_id",
|
|
@@ -40,14 +40,14 @@ export async function createQueueFormReceptionHistory(headers, session, body) {
|
|
|
40
40
|
const response = await createWebAppTableRegister(headers, queue_form_recepcion_submited_web_app_table_id, body);
|
|
41
41
|
return response;
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
};
|
|
44
44
|
/**
|
|
45
45
|
* Put updateQueueFormReception from the web app table.
|
|
46
46
|
* @param headers Request headers.
|
|
47
47
|
* @param session Session object.
|
|
48
48
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
50
|
+
export const updateQueueFormReceptionHistory = (headers, session, body, id_registro) => {
|
|
51
51
|
return handlePossibleAxiosErrors(async () => {
|
|
52
52
|
const { queue_form_recepcion_submited_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
53
53
|
"queue_form_recepcion_submited_web_app_table_id",
|
|
@@ -55,14 +55,14 @@ export async function updateQueueFormReceptionHistory(headers, session, body, id
|
|
|
55
55
|
const response = await updateWebAppTableRegister(headers, queue_form_recepcion_submited_web_app_table_id, id_registro, { ...body });
|
|
56
56
|
return response;
|
|
57
57
|
});
|
|
58
|
-
}
|
|
58
|
+
};
|
|
59
59
|
/**
|
|
60
60
|
* Delete QueueFormReceptionHistory from the web app table.
|
|
61
61
|
* @param headers Request headers.
|
|
62
62
|
* @param session Session object.
|
|
63
63
|
* @returns A Promise of AxiosUtilsResponse<QueueFormReceptionWebAppTable[]>.
|
|
64
64
|
*/
|
|
65
|
-
export
|
|
65
|
+
export const deleteQueueFormReceptionHistory = (headers, session, id) => {
|
|
66
66
|
return handlePossibleAxiosErrors(async () => {
|
|
67
67
|
const { queue_form_recepcion_submited_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
68
68
|
"queue_form_recepcion_submited_web_app_table_id",
|
|
@@ -70,4 +70,4 @@ export async function deleteQueueFormReceptionHistory(headers, session, id) {
|
|
|
70
70
|
const response = await deleteWebAppTableRegister(headers, queue_form_recepcion_submited_web_app_table_id, Number(id));
|
|
71
71
|
return response;
|
|
72
72
|
});
|
|
73
|
-
}
|
|
73
|
+
};
|
|
@@ -6,18 +6,18 @@ import { AxiosUtilsResponse, WebAppTableUpdateResponse, BitacoraPOMassive, WebAp
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare const saveBitacoraPOMassive: (headers: any, session: Session, body: BitacoraPOMassive) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
10
10
|
/**
|
|
11
11
|
* Get getBitacorasPOMassive from the web app table.
|
|
12
12
|
* @param headers Request headers.
|
|
13
13
|
* @param session Session object.
|
|
14
14
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
16
|
+
export declare const getBitacorasPOMassive: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>>;
|
|
17
17
|
/**
|
|
18
18
|
* Put updateBitacorasPOMassive from the web app table.
|
|
19
19
|
* @param headers Request headers.
|
|
20
20
|
* @param session Session object.
|
|
21
21
|
* @returns A Promise of AxiosUtilsResponse<BitacorasPOMassiveWebAppTable[]>.
|
|
22
22
|
*/
|
|
23
|
-
export declare
|
|
23
|
+
export declare const updateBitacorasPOMassive: (headers: any, session: Session, body: BitacoraPOMassive, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export const saveBitacoraPOMassive = (headers, session, body) => {
|
|
10
10
|
return handlePossibleAxiosErrors(async () => {
|
|
11
11
|
const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
12
12
|
"bitacora_ediciones_masivas_web_app_table_id",
|
|
@@ -14,14 +14,14 @@ export async function saveBitacoraPOMassive(headers, session, body) {
|
|
|
14
14
|
const response = await createWebAppTableRegister(headers, bitacora_ediciones_masivas_web_app_table_id, { ...body, modificadoPor: session.get("name") });
|
|
15
15
|
return response;
|
|
16
16
|
});
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
/**
|
|
19
19
|
* Get getBitacorasPOMassive from the web app table.
|
|
20
20
|
* @param headers Request headers.
|
|
21
21
|
* @param session Session object.
|
|
22
22
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export const getBitacorasPOMassive = (headers, session) => {
|
|
25
25
|
return handlePossibleAxiosErrors(async () => {
|
|
26
26
|
const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
27
27
|
"bitacora_ediciones_masivas_web_app_table_id",
|
|
@@ -32,14 +32,14 @@ export async function getBitacorasPOMassive(headers, session) {
|
|
|
32
32
|
}
|
|
33
33
|
return response.data;
|
|
34
34
|
});
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
/**
|
|
37
37
|
* Put updateBitacorasPOMassive from the web app table.
|
|
38
38
|
* @param headers Request headers.
|
|
39
39
|
* @param session Session object.
|
|
40
40
|
* @returns A Promise of AxiosUtilsResponse<BitacorasPOMassiveWebAppTable[]>.
|
|
41
41
|
*/
|
|
42
|
-
export
|
|
42
|
+
export const updateBitacorasPOMassive = (headers, session, body, id_registro) => {
|
|
43
43
|
return handlePossibleAxiosErrors(async () => {
|
|
44
44
|
const { bitacora_ediciones_masivas_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
45
45
|
"bitacora_ediciones_masivas_web_app_table_id",
|
|
@@ -47,4 +47,4 @@ export async function updateBitacorasPOMassive(headers, session, body, id_regist
|
|
|
47
47
|
const response = await updateWebAppTableRegister(headers, bitacora_ediciones_masivas_web_app_table_id, id_registro, { ...body, modificadoPor: session.get("name") });
|
|
48
48
|
return response;
|
|
49
49
|
});
|
|
50
|
-
}
|
|
50
|
+
};
|
|
@@ -6,7 +6,7 @@ import { AxiosUtilsResponse, WebAppRowGraphQL, ConsolidatedHistory, WebAppTableU
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare const getConsolidatedHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<ConsolidatedHistory>[]>>;
|
|
10
10
|
/**
|
|
11
11
|
* Create a template in the web app table.
|
|
12
12
|
* @param headers Request headers.
|
|
@@ -14,11 +14,11 @@ export declare function getConsolidatedHistories(headers: any, session: Session)
|
|
|
14
14
|
* @param body ConsolidatedHistory data to be created.
|
|
15
15
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory>.
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const createConsolidatedHistory: (headers: any, session: Session, body: ConsolidatedHistory) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
18
18
|
/**
|
|
19
19
|
* Put updateConsolidatedHistory from the web app table.
|
|
20
20
|
* @param headers Request headers.
|
|
21
21
|
* @param session Session object.
|
|
22
22
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
|
|
23
23
|
*/
|
|
24
|
-
export declare
|
|
24
|
+
export declare const updateConsolidatedHistory: (headers: any, session: Session, body: ConsolidatedHistory, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export const getConsolidatedHistories = (headers, session) => {
|
|
10
10
|
return handlePossibleAxiosErrors(async () => {
|
|
11
11
|
const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
12
12
|
"purchase_order_consolidates_web_app_table_id",
|
|
@@ -18,7 +18,7 @@ export async function getConsolidatedHistories(headers, session) {
|
|
|
18
18
|
const history = response?.data ?? [];
|
|
19
19
|
return history;
|
|
20
20
|
});
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
/**
|
|
23
23
|
* Create a template in the web app table.
|
|
24
24
|
* @param headers Request headers.
|
|
@@ -26,7 +26,7 @@ export async function getConsolidatedHistories(headers, session) {
|
|
|
26
26
|
* @param body ConsolidatedHistory data to be created.
|
|
27
27
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory>.
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export const createConsolidatedHistory = (headers, session, body) => {
|
|
30
30
|
return handlePossibleAxiosErrors(async () => {
|
|
31
31
|
const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
32
32
|
"purchase_order_consolidates_web_app_table_id",
|
|
@@ -34,14 +34,14 @@ export async function createConsolidatedHistory(headers, session, body) {
|
|
|
34
34
|
const response = await createWebAppTableRegister(headers, purchase_order_consolidates_web_app_table_id, body);
|
|
35
35
|
return response;
|
|
36
36
|
});
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
/**
|
|
39
39
|
* Put updateConsolidatedHistory from the web app table.
|
|
40
40
|
* @param headers Request headers.
|
|
41
41
|
* @param session Session object.
|
|
42
42
|
* @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
|
|
43
43
|
*/
|
|
44
|
-
export
|
|
44
|
+
export const updateConsolidatedHistory = (headers, session, body, id_registro) => {
|
|
45
45
|
return handlePossibleAxiosErrors(async () => {
|
|
46
46
|
const { purchase_order_consolidates_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
47
47
|
"purchase_order_consolidates_web_app_table_id",
|
|
@@ -49,4 +49,4 @@ export async function updateConsolidatedHistory(headers, session, body, id_regis
|
|
|
49
49
|
const response = await updateWebAppTableRegister(headers, purchase_order_consolidates_web_app_table_id, id_registro, { ...body });
|
|
50
50
|
return response;
|
|
51
51
|
});
|
|
52
|
-
}
|
|
52
|
+
};
|
|
@@ -25,12 +25,12 @@ export declare const obtenerSemanaAnterior: () => {
|
|
|
25
25
|
* @param body
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
|
-
export declare
|
|
28
|
+
export declare const updateOneItemPrice: (headers: any, session: Session, body: {
|
|
29
29
|
fechaInicio: string;
|
|
30
30
|
fechaFin: string;
|
|
31
31
|
item: number;
|
|
32
32
|
price: number;
|
|
33
|
-
})
|
|
33
|
+
}) => Promise<AxiosUtilsResponse<any>>;
|
|
34
34
|
/**
|
|
35
35
|
* changePricesInit
|
|
36
36
|
* @param headers
|
|
@@ -39,7 +39,7 @@ export declare function updateOneItemPrice(headers: any, session: Session, body:
|
|
|
39
39
|
* @param body
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
export declare
|
|
42
|
+
export declare const changePricesInit: (headers: any, session: Session, specialItems: WebAppRowGraphQL<SpecialItem>[], body: BitacoraCostosItems) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
43
43
|
/**
|
|
44
44
|
* changePrice
|
|
45
45
|
* @param headers
|
|
@@ -47,7 +47,7 @@ export declare function changePricesInit(headers: any, session: Session, special
|
|
|
47
47
|
* @param body
|
|
48
48
|
* @returns
|
|
49
49
|
*/
|
|
50
|
-
export declare
|
|
50
|
+
export declare const changePrice: (headers: any, costo: PurchaseOrderCosto) => Promise<PurchaseOrderCosto>;
|
|
51
51
|
/**
|
|
52
52
|
* changePrices
|
|
53
53
|
* @param headers
|
|
@@ -55,7 +55,7 @@ export declare function changePrice(headers: any, costo: PurchaseOrderCosto): Pr
|
|
|
55
55
|
* @param body
|
|
56
56
|
* @returns
|
|
57
57
|
*/
|
|
58
|
-
export declare
|
|
58
|
+
export declare const changePrices: (headers: any, session: Session, bitacora: BitacoraCostosItems, id_bitacora: string) => Promise<AxiosUtilsResponse<any>>;
|
|
59
59
|
/**
|
|
60
60
|
* corregirCostos
|
|
61
61
|
* @param headers
|
|
@@ -63,25 +63,25 @@ export declare function changePrices(headers: any, session: Session, bitacora: B
|
|
|
63
63
|
* @param costos
|
|
64
64
|
* @returns
|
|
65
65
|
*/
|
|
66
|
-
export declare
|
|
66
|
+
export declare const corregirCostos: (headers: any, session: Session, costos: PurchaseOrderCosto[], costosEspeciales: PurchaseOrderCosto[]) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
67
67
|
/**
|
|
68
68
|
* Get saveBitacoraCostos from the web app table.
|
|
69
69
|
* @param headers Request headers.
|
|
70
70
|
* @param session Session object.
|
|
71
71
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
72
72
|
*/
|
|
73
|
-
export declare
|
|
73
|
+
export declare const saveBitacoraCostos: (headers: any, session: Session, body: BitacoraCostosItems) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
74
74
|
/**
|
|
75
75
|
* Put updateBitacoraCostos from the web app table.
|
|
76
76
|
* @param headers Request headers.
|
|
77
77
|
* @param session Session object.
|
|
78
78
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
79
79
|
*/
|
|
80
|
-
export declare
|
|
80
|
+
export declare const updateBitacoraCostos: (headers: any, session: Session, body: BitacoraCostosItems, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
81
81
|
/**
|
|
82
82
|
* Get getCostosBitacora from the web app table.
|
|
83
83
|
* @param headers Request headers.
|
|
84
84
|
* @param session Session object.
|
|
85
85
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
86
86
|
*/
|
|
87
|
-
export declare
|
|
87
|
+
export declare const getCostosBitacora: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { handlePossibleAxiosErrors, localDateToUSDate, } from "@zauru-sdk/common";
|
|
2
2
|
import moment from "moment";
|
|
3
3
|
import { createSpecialItem, updateSpecialItem } from "./specialItem.utils.js";
|
|
4
|
-
import { createWebAppTableRegister, getPurchasesList, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister } from "@zauru-sdk/services";
|
|
4
|
+
import { createWebAppTableRegister, getPurchasesList, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister, } from "@zauru-sdk/services";
|
|
5
5
|
import { updatePurchaseItemPrice } from "./purchase-orders.utils.js";
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
@@ -121,7 +121,7 @@ const logTotal = (total) => {
|
|
|
121
121
|
* @param body
|
|
122
122
|
* @returns
|
|
123
123
|
*/
|
|
124
|
-
export
|
|
124
|
+
export const updateOneItemPrice = (headers, session, body) => {
|
|
125
125
|
return handlePossibleAxiosErrors(async () => {
|
|
126
126
|
//PASO 1
|
|
127
127
|
//Obtengo todas las órdenes de compra dentro del rango de fechas
|
|
@@ -219,7 +219,7 @@ export async function updateOneItemPrice(headers, session, body) {
|
|
|
219
219
|
}
|
|
220
220
|
return response.data;
|
|
221
221
|
});
|
|
222
|
-
}
|
|
222
|
+
};
|
|
223
223
|
/**
|
|
224
224
|
* changePricesInit
|
|
225
225
|
* @param headers
|
|
@@ -228,7 +228,7 @@ export async function updateOneItemPrice(headers, session, body) {
|
|
|
228
228
|
* @param body
|
|
229
229
|
* @returns
|
|
230
230
|
*/
|
|
231
|
-
export
|
|
231
|
+
export const changePricesInit = (headers, session, specialItems, body) => {
|
|
232
232
|
return handlePossibleAxiosErrors(async () => {
|
|
233
233
|
//PASO 1
|
|
234
234
|
//Obtengo todas las órdenes de compra dentro del rango de fechas
|
|
@@ -303,7 +303,7 @@ export async function changePricesInit(headers, session, specialItems, body) {
|
|
|
303
303
|
}
|
|
304
304
|
return response.data;
|
|
305
305
|
});
|
|
306
|
-
}
|
|
306
|
+
};
|
|
307
307
|
/**
|
|
308
308
|
* changePrice
|
|
309
309
|
* @param headers
|
|
@@ -311,7 +311,7 @@ export async function changePricesInit(headers, session, specialItems, body) {
|
|
|
311
311
|
* @param body
|
|
312
312
|
* @returns
|
|
313
313
|
*/
|
|
314
|
-
export async
|
|
314
|
+
export const changePrice = async (headers, costo) => {
|
|
315
315
|
const x = costo;
|
|
316
316
|
const msgActualizando = `==============================> ACTUALIZANDO ÓRDEN DE COMPRA: ID: ${x.id} PRICE: ${x.purchase_order_details
|
|
317
317
|
.map((x) => x.unit_cost)
|
|
@@ -346,7 +346,7 @@ export async function changePrice(headers, costo) {
|
|
|
346
346
|
costo.finalizado = true;
|
|
347
347
|
}
|
|
348
348
|
return costo;
|
|
349
|
-
}
|
|
349
|
+
};
|
|
350
350
|
/**
|
|
351
351
|
* changePrices
|
|
352
352
|
* @param headers
|
|
@@ -354,7 +354,7 @@ export async function changePrice(headers, costo) {
|
|
|
354
354
|
* @param body
|
|
355
355
|
* @returns
|
|
356
356
|
*/
|
|
357
|
-
export
|
|
357
|
+
export const changePrices = (headers, session, bitacora, id_bitacora) => {
|
|
358
358
|
return handlePossibleAxiosErrors(async () => {
|
|
359
359
|
const costosWithPurchaseIds = bitacora.costosActualizados;
|
|
360
360
|
const costosEspecialesWithPurchaseIds = bitacora.costosEspecialesActualizados;
|
|
@@ -438,7 +438,7 @@ export async function changePrices(headers, session, bitacora, id_bitacora) {
|
|
|
438
438
|
}
|
|
439
439
|
return response.data;
|
|
440
440
|
});
|
|
441
|
-
}
|
|
441
|
+
};
|
|
442
442
|
/**
|
|
443
443
|
* corregirCostos
|
|
444
444
|
* @param headers
|
|
@@ -446,7 +446,7 @@ export async function changePrices(headers, session, bitacora, id_bitacora) {
|
|
|
446
446
|
* @param costos
|
|
447
447
|
* @returns
|
|
448
448
|
*/
|
|
449
|
-
export
|
|
449
|
+
export const corregirCostos = (headers, session, costos, costosEspeciales) => {
|
|
450
450
|
return handlePossibleAxiosErrors(async () => {
|
|
451
451
|
//PASO 1
|
|
452
452
|
//Hago una copia
|
|
@@ -549,14 +549,14 @@ export async function corregirCostos(headers, session, costos, costosEspeciales)
|
|
|
549
549
|
}
|
|
550
550
|
return response.data;
|
|
551
551
|
});
|
|
552
|
-
}
|
|
552
|
+
};
|
|
553
553
|
/**
|
|
554
554
|
* Get saveBitacoraCostos from the web app table.
|
|
555
555
|
* @param headers Request headers.
|
|
556
556
|
* @param session Session object.
|
|
557
557
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
558
558
|
*/
|
|
559
|
-
export
|
|
559
|
+
export const saveBitacoraCostos = (headers, session, body) => {
|
|
560
560
|
return handlePossibleAxiosErrors(async () => {
|
|
561
561
|
const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
562
562
|
"bitacora_costos_verduras_web_app_table_id",
|
|
@@ -564,14 +564,14 @@ export async function saveBitacoraCostos(headers, session, body) {
|
|
|
564
564
|
const response = await createWebAppTableRegister(headers, bitacora_costos_verduras_web_app_table_id, { ...body, modificadoPor: session.get("name") });
|
|
565
565
|
return response;
|
|
566
566
|
});
|
|
567
|
-
}
|
|
567
|
+
};
|
|
568
568
|
/**
|
|
569
569
|
* Put updateBitacoraCostos from the web app table.
|
|
570
570
|
* @param headers Request headers.
|
|
571
571
|
* @param session Session object.
|
|
572
572
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
573
573
|
*/
|
|
574
|
-
export
|
|
574
|
+
export const updateBitacoraCostos = (headers, session, body, id_registro) => {
|
|
575
575
|
return handlePossibleAxiosErrors(async () => {
|
|
576
576
|
const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
577
577
|
"bitacora_costos_verduras_web_app_table_id",
|
|
@@ -579,14 +579,14 @@ export async function updateBitacoraCostos(headers, session, body, id_registro)
|
|
|
579
579
|
const response = await updateWebAppTableRegister(headers, bitacora_costos_verduras_web_app_table_id, id_registro, { ...body, modificadoPor: session.get("name") });
|
|
580
580
|
return response;
|
|
581
581
|
});
|
|
582
|
-
}
|
|
582
|
+
};
|
|
583
583
|
/**
|
|
584
584
|
* Get getCostosBitacora from the web app table.
|
|
585
585
|
* @param headers Request headers.
|
|
586
586
|
* @param session Session object.
|
|
587
587
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
|
|
588
588
|
*/
|
|
589
|
-
export
|
|
589
|
+
export const getCostosBitacora = (headers, session) => {
|
|
590
590
|
return handlePossibleAxiosErrors(async () => {
|
|
591
591
|
const { bitacora_costos_verduras_web_app_table_id } = await getVariablesByName(headers, session, [
|
|
592
592
|
"bitacora_costos_verduras_web_app_table_id",
|
|
@@ -598,4 +598,4 @@ export async function getCostosBitacora(headers, session) {
|
|
|
598
598
|
const bitacora = response.data ?? [];
|
|
599
599
|
return bitacora;
|
|
600
600
|
});
|
|
601
|
-
}
|
|
601
|
+
};
|
|
@@ -6,7 +6,7 @@ import { AxiosUtilsResponse, WebAppRowGraphQL, DischargeHistory, WebAppTableUpda
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
|
|
8
8
|
*/
|
|
9
|
-
export declare
|
|
9
|
+
export declare const getDischargeHistories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<WebAppRowGraphQL<DischargeHistory>[]>>;
|
|
10
10
|
/**
|
|
11
11
|
* Create a template in the web app table.
|
|
12
12
|
* @param headers Request headers.
|
|
@@ -14,11 +14,11 @@ export declare function getDischargeHistories(headers: any, session: Session): P
|
|
|
14
14
|
* @param body DischargeHistory data to be created.
|
|
15
15
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory>.
|
|
16
16
|
*/
|
|
17
|
-
export declare
|
|
17
|
+
export declare const createDischargeHistory: (headers: any, session: Session, body: DischargeHistory) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
18
18
|
/**
|
|
19
19
|
* Put updateDischargeHistory from the web app table.
|
|
20
20
|
* @param headers Request headers.
|
|
21
21
|
* @param session Session object.
|
|
22
22
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
|
|
23
23
|
*/
|
|
24
|
-
export declare
|
|
24
|
+
export declare const updateDischargeHistory: (headers: any, session: Session, body: DischargeHistory, id_registro: string | number) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|
|
@@ -6,7 +6,7 @@ import { createWebAppTableRegister, getVariablesByName, getWebAppTableRegisters,
|
|
|
6
6
|
* @param session Session object.
|
|
7
7
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export const getDischargeHistories = (headers, session) => {
|
|
10
10
|
return handlePossibleAxiosErrors(async () => {
|
|
11
11
|
const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
|
|
12
12
|
const response = await getWebAppTableRegisters(session, discharge_history_web_app_table_id);
|
|
@@ -16,7 +16,7 @@ export async function getDischargeHistories(headers, session) {
|
|
|
16
16
|
const history = response?.data ?? [];
|
|
17
17
|
return history;
|
|
18
18
|
});
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
/**
|
|
21
21
|
* Create a template in the web app table.
|
|
22
22
|
* @param headers Request headers.
|
|
@@ -24,23 +24,23 @@ export async function getDischargeHistories(headers, session) {
|
|
|
24
24
|
* @param body DischargeHistory data to be created.
|
|
25
25
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory>.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export const createDischargeHistory = (headers, session, body) => {
|
|
28
28
|
return handlePossibleAxiosErrors(async () => {
|
|
29
29
|
const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
|
|
30
30
|
const response = await createWebAppTableRegister(headers, discharge_history_web_app_table_id, body);
|
|
31
31
|
return response;
|
|
32
32
|
});
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
/**
|
|
35
35
|
* Put updateDischargeHistory from the web app table.
|
|
36
36
|
* @param headers Request headers.
|
|
37
37
|
* @param session Session object.
|
|
38
38
|
* @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export const updateDischargeHistory = (headers, session, body, id_registro) => {
|
|
41
41
|
return handlePossibleAxiosErrors(async () => {
|
|
42
42
|
const { discharge_history_web_app_table_id } = await getVariablesByName(headers, session, ["discharge_history_web_app_table_id"]);
|
|
43
43
|
const response = await updateWebAppTableRegister(headers, discharge_history_web_app_table_id, id_registro, { ...body });
|
|
44
44
|
return response;
|
|
45
45
|
});
|
|
46
|
-
}
|
|
46
|
+
};
|
|
@@ -33,7 +33,7 @@ export declare const getItemsDataTable: (headers: any, search: SearchItemParams)
|
|
|
33
33
|
* @param headers
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
export declare
|
|
36
|
+
export declare const getLabItemCategories: (headers: any, session: Session) => Promise<AxiosUtilsResponse<ItemCategoryGraphQL[]>>;
|
|
37
37
|
/**
|
|
38
38
|
* createNewLaboratoryClient
|
|
39
39
|
* @param session
|
|
@@ -41,7 +41,7 @@ export declare function getLabItemCategories(headers: any, session: Session): Pr
|
|
|
41
41
|
* @param body
|
|
42
42
|
* @returns
|
|
43
43
|
*/
|
|
44
|
-
export declare
|
|
44
|
+
export declare const createNewLaboratoryItemCategory: (session: Session, headers: any, body: Partial<ItemCategoryGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
|
|
45
45
|
/**
|
|
46
46
|
* createNewLaboratoryItem
|
|
47
47
|
* @param session
|
|
@@ -49,4 +49,4 @@ export declare function createNewLaboratoryItemCategory(session: Session, header
|
|
|
49
49
|
* @param body
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
|
-
export declare
|
|
52
|
+
export declare const createNewLaboratoryItem: (headers: any, body: Partial<ItemGraphQL>) => Promise<AxiosUtilsResponse<ItemGraphQL>>;
|
|
@@ -92,7 +92,7 @@ function formatHTMLItemList(item) {
|
|
|
92
92
|
* @param headers
|
|
93
93
|
* @returns
|
|
94
94
|
*/
|
|
95
|
-
export
|
|
95
|
+
export const getLabItemCategories = (headers, session) => {
|
|
96
96
|
return handlePossibleAxiosErrors(async () => {
|
|
97
97
|
const { lab_super_category_item_id } = await getVariablesByName(headers, session, ["lab_super_category_item_id"]);
|
|
98
98
|
const response = await getItemCategoriesBySuperCategoryId(session, lab_super_category_item_id);
|
|
@@ -101,7 +101,7 @@ export async function getLabItemCategories(headers, session) {
|
|
|
101
101
|
}
|
|
102
102
|
return response.data;
|
|
103
103
|
});
|
|
104
|
-
}
|
|
104
|
+
};
|
|
105
105
|
/**
|
|
106
106
|
* createNewLaboratoryClient
|
|
107
107
|
* @param session
|
|
@@ -109,7 +109,7 @@ export async function getLabItemCategories(headers, session) {
|
|
|
109
109
|
* @param body
|
|
110
110
|
* @returns
|
|
111
111
|
*/
|
|
112
|
-
export
|
|
112
|
+
export const createNewLaboratoryItemCategory = (session, headers, body) => {
|
|
113
113
|
return handlePossibleAxiosErrors(async () => {
|
|
114
114
|
const { lab_super_category_item_id } = await getVariablesByName(headers, session, ["lab_super_category_item_id"]);
|
|
115
115
|
const sendBody = {
|
|
@@ -123,7 +123,7 @@ export async function createNewLaboratoryItemCategory(session, headers, body) {
|
|
|
123
123
|
}
|
|
124
124
|
return true;
|
|
125
125
|
});
|
|
126
|
-
}
|
|
126
|
+
};
|
|
127
127
|
/**
|
|
128
128
|
* createNewLaboratoryItem
|
|
129
129
|
* @param session
|
|
@@ -131,7 +131,7 @@ export async function createNewLaboratoryItemCategory(session, headers, body) {
|
|
|
131
131
|
* @param body
|
|
132
132
|
* @returns
|
|
133
133
|
*/
|
|
134
|
-
export
|
|
134
|
+
export const createNewLaboratoryItem = (headers, body) => {
|
|
135
135
|
return handlePossibleAxiosErrors(async () => {
|
|
136
136
|
const sendBody = {
|
|
137
137
|
active: true,
|
|
@@ -149,4 +149,4 @@ export async function createNewLaboratoryItem(headers, body) {
|
|
|
149
149
|
}
|
|
150
150
|
return createResponse.data;
|
|
151
151
|
});
|
|
152
|
-
}
|
|
152
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Session } from "@remix-run/node";
|
|
2
2
|
import { AxiosUtilsResponse, BasicIdNameSchema, MotivoRechazo, WebAppRowGraphQL, WebAppTableUpdateResponse } from "@zauru-sdk/types";
|
|
3
|
-
export declare
|
|
3
|
+
export declare const formatearMotivoDeRechazo: (entity: WebAppRowGraphQL<MotivoRechazo>) => BasicIdNameSchema;
|
|
4
4
|
/**
|
|
5
5
|
* Post saveBitacoraPOMassive from the web app table.
|
|
6
6
|
* @param headers Request headers.
|
|
7
7
|
* @param session Session object.
|
|
8
8
|
* @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
|
|
9
9
|
*/
|
|
10
|
-
export declare
|
|
10
|
+
export declare const saveRechazoCanastas: (headers: any, session: Session, body: any) => Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>>;
|