@zauru-sdk/utils 1.0.17 → 1.0.20

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/zauru/bitacora-edicion-masiva.utils.d.ts +3 -3
  3. package/dist/zauru/bitacora-edicion-masiva.utils.js +6 -6
  4. package/dist/zauru/consolidated-history.utils.d.ts +3 -3
  5. package/dist/zauru/consolidated-history.utils.js +6 -6
  6. package/dist/zauru/costos-items.utils.d.ts +9 -9
  7. package/dist/zauru/costos-items.utils.js +17 -17
  8. package/dist/zauru/discharges-histsory.utils.d.ts +3 -3
  9. package/dist/zauru/discharges-histsory.utils.js +6 -6
  10. package/dist/zauru/items.utils.d.ts +4 -10
  11. package/dist/zauru/items.utils.js +7 -42
  12. package/dist/zauru/motivos-rechazo.utils.d.ts +2 -2
  13. package/dist/zauru/motivos-rechazo.utils.js +4 -4
  14. package/dist/zauru/payees.utils.d.ts +5 -5
  15. package/dist/zauru/payees.utils.js +10 -10
  16. package/dist/zauru/specialItem.utils.d.ts +4 -4
  17. package/dist/zauru/specialItem.utils.js +9 -9
  18. package/dist/zauru/templates.utils.d.ts +6 -6
  19. package/dist/zauru/templates.utils.js +12 -12
  20. package/dist/zauru/tiposMuestra.utils.d.ts +4 -4
  21. package/dist/zauru/tiposMuestra.utils.js +8 -8
  22. package/dist/zauru/webapp-tables.utils.d.ts +2 -9
  23. package/dist/zauru/webapp-tables.utils.js +2 -37
  24. package/package.json +3 -3
  25. package/src/zauru/bitacora-edicion-masiva.utils.ts +9 -9
  26. package/src/zauru/consolidated-history.utils.ts +9 -9
  27. package/src/zauru/costos-items.utils.ts +31 -25
  28. package/src/zauru/discharges-histsory.utils.ts +9 -9
  29. package/src/zauru/items.utils.ts +9 -57
  30. package/src/zauru/motivos-rechazo.utils.ts +6 -6
  31. package/src/zauru/payees.utils.ts +15 -15
  32. package/src/zauru/specialItem.utils.ts +25 -15
  33. package/src/zauru/templates.utils.ts +18 -18
  34. package/src/zauru/tiposMuestra.utils.ts +12 -12
  35. package/src/zauru/webapp-tables.utils.ts +3 -61
@@ -19,10 +19,10 @@ import {
19
19
  * @param session Session object.
20
20
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
21
21
  */
22
- export async function getConsolidatedHistories(
22
+ export const getConsolidatedHistories = (
23
23
  headers: any,
24
24
  session: Session
25
- ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<ConsolidatedHistory>[]>> {
25
+ ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<ConsolidatedHistory>[]>> => {
26
26
  return handlePossibleAxiosErrors(async () => {
27
27
  const { purchase_order_consolidates_web_app_table_id } =
28
28
  await getVariablesByName(headers, session, [
@@ -44,7 +44,7 @@ export async function getConsolidatedHistories(
44
44
 
45
45
  return history;
46
46
  });
47
- }
47
+ };
48
48
 
49
49
  /**
50
50
  * Create a template in the web app table.
@@ -53,11 +53,11 @@ export async function getConsolidatedHistories(
53
53
  * @param body ConsolidatedHistory data to be created.
54
54
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory>.
55
55
  */
56
- export async function createConsolidatedHistory(
56
+ export const createConsolidatedHistory = (
57
57
  headers: any,
58
58
  session: Session,
59
59
  body: ConsolidatedHistory
60
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
60
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
61
61
  return handlePossibleAxiosErrors(async () => {
62
62
  const { purchase_order_consolidates_web_app_table_id } =
63
63
  await getVariablesByName(headers, session, [
@@ -70,7 +70,7 @@ export async function createConsolidatedHistory(
70
70
  );
71
71
  return response;
72
72
  });
73
- }
73
+ };
74
74
 
75
75
  /**
76
76
  * Put updateConsolidatedHistory from the web app table.
@@ -78,12 +78,12 @@ export async function createConsolidatedHistory(
78
78
  * @param session Session object.
79
79
  * @returns A Promise of AxiosUtilsResponse<ConsolidatedHistory[]>.
80
80
  */
81
- export async function updateConsolidatedHistory(
81
+ export const updateConsolidatedHistory = (
82
82
  headers: any,
83
83
  session: Session,
84
84
  body: ConsolidatedHistory,
85
85
  id_registro: string | number
86
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
86
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
87
87
  return handlePossibleAxiosErrors(async () => {
88
88
  const { purchase_order_consolidates_web_app_table_id } =
89
89
  await getVariablesByName(headers, session, [
@@ -99,4 +99,4 @@ export async function updateConsolidatedHistory(
99
99
 
100
100
  return response;
101
101
  });
102
- }
102
+ };
@@ -16,7 +16,13 @@ import {
16
16
  } from "@zauru-sdk/types";
17
17
  import moment from "moment";
18
18
  import { createSpecialItem, updateSpecialItem } from "./specialItem.utils.js";
19
- import { createWebAppTableRegister, getPurchasesList, getVariablesByName, getWebAppTableRegisters, updateWebAppTableRegister } from "@zauru-sdk/services";
19
+ import {
20
+ createWebAppTableRegister,
21
+ getPurchasesList,
22
+ getVariablesByName,
23
+ getWebAppTableRegisters,
24
+ updateWebAppTableRegister,
25
+ } from "@zauru-sdk/services";
20
26
  import { updatePurchaseItemPrice } from "./purchase-orders.utils.js";
21
27
 
22
28
  /**
@@ -203,7 +209,7 @@ const logTotal = (total: number) => {
203
209
  * @param body
204
210
  * @returns
205
211
  */
206
- export async function updateOneItemPrice(
212
+ export const updateOneItemPrice = (
207
213
  headers: any,
208
214
  session: Session,
209
215
  body: {
@@ -212,7 +218,7 @@ export async function updateOneItemPrice(
212
218
  item: number;
213
219
  price: number;
214
220
  }
215
- ): Promise<AxiosUtilsResponse<any>> {
221
+ ): Promise<AxiosUtilsResponse<any>> => {
216
222
  return handlePossibleAxiosErrors(async () => {
217
223
  //PASO 1
218
224
  //Obtengo todas las órdenes de compra dentro del rango de fechas
@@ -336,7 +342,7 @@ export async function updateOneItemPrice(
336
342
 
337
343
  return response.data;
338
344
  });
339
- }
345
+ };
340
346
 
341
347
  /**
342
348
  * changePricesInit
@@ -346,12 +352,12 @@ export async function updateOneItemPrice(
346
352
  * @param body
347
353
  * @returns
348
354
  */
349
- export async function changePricesInit(
355
+ export const changePricesInit = (
350
356
  headers: any,
351
357
  session: Session,
352
358
  specialItems: WebAppRowGraphQL<SpecialItem>[],
353
359
  body: BitacoraCostosItems
354
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
360
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
355
361
  return handlePossibleAxiosErrors(async () => {
356
362
  //PASO 1
357
363
  //Obtengo todas las órdenes de compra dentro del rango de fechas
@@ -452,7 +458,7 @@ export async function changePricesInit(
452
458
 
453
459
  return response.data;
454
460
  });
455
- }
461
+ };
456
462
 
457
463
  /**
458
464
  * changePrice
@@ -461,10 +467,10 @@ export async function changePricesInit(
461
467
  * @param body
462
468
  * @returns
463
469
  */
464
- export async function changePrice(
470
+ export const changePrice = async (
465
471
  headers: any,
466
472
  costo: PurchaseOrderCosto
467
- ): Promise<PurchaseOrderCosto> {
473
+ ): Promise<PurchaseOrderCosto> => {
468
474
  const x = costo;
469
475
 
470
476
  const msgActualizando = `==============================> ACTUALIZANDO ÓRDEN DE COMPRA: ID: ${
@@ -504,7 +510,7 @@ export async function changePrice(
504
510
  costo.finalizado = true;
505
511
  }
506
512
  return costo;
507
- }
513
+ };
508
514
 
509
515
  /**
510
516
  * changePrices
@@ -513,12 +519,12 @@ export async function changePrice(
513
519
  * @param body
514
520
  * @returns
515
521
  */
516
- export async function changePrices(
522
+ export const changePrices = (
517
523
  headers: any,
518
524
  session: Session,
519
525
  bitacora: BitacoraCostosItems,
520
526
  id_bitacora: string
521
- ): Promise<AxiosUtilsResponse<any>> {
527
+ ): Promise<AxiosUtilsResponse<any>> => {
522
528
  return handlePossibleAxiosErrors(async () => {
523
529
  const costosWithPurchaseIds = bitacora.costosActualizados;
524
530
  const costosEspecialesWithPurchaseIds =
@@ -630,7 +636,7 @@ export async function changePrices(
630
636
 
631
637
  return response.data;
632
638
  });
633
- }
639
+ };
634
640
 
635
641
  /**
636
642
  * corregirCostos
@@ -639,12 +645,12 @@ export async function changePrices(
639
645
  * @param costos
640
646
  * @returns
641
647
  */
642
- export async function corregirCostos(
648
+ export const corregirCostos = (
643
649
  headers: any,
644
650
  session: Session,
645
651
  costos: PurchaseOrderCosto[],
646
652
  costosEspeciales: PurchaseOrderCosto[]
647
- ) {
653
+ ) => {
648
654
  return handlePossibleAxiosErrors(async () => {
649
655
  //PASO 1
650
656
  //Hago una copia
@@ -773,7 +779,7 @@ export async function corregirCostos(
773
779
 
774
780
  return response.data;
775
781
  });
776
- }
782
+ };
777
783
 
778
784
  /**
779
785
  * Get saveBitacoraCostos from the web app table.
@@ -781,11 +787,11 @@ export async function corregirCostos(
781
787
  * @param session Session object.
782
788
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
783
789
  */
784
- export async function saveBitacoraCostos(
790
+ export const saveBitacoraCostos = (
785
791
  headers: any,
786
792
  session: Session,
787
793
  body: BitacoraCostosItems
788
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
794
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
789
795
  return handlePossibleAxiosErrors(async () => {
790
796
  const { bitacora_costos_verduras_web_app_table_id } =
791
797
  await getVariablesByName(headers, session, [
@@ -800,7 +806,7 @@ export async function saveBitacoraCostos(
800
806
 
801
807
  return response;
802
808
  });
803
- }
809
+ };
804
810
 
805
811
  /**
806
812
  * Put updateBitacoraCostos from the web app table.
@@ -808,12 +814,12 @@ export async function saveBitacoraCostos(
808
814
  * @param session Session object.
809
815
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
810
816
  */
811
- export async function updateBitacoraCostos(
817
+ export const updateBitacoraCostos = (
812
818
  headers: any,
813
819
  session: Session,
814
820
  body: BitacoraCostosItems,
815
821
  id_registro: string | number
816
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
822
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
817
823
  return handlePossibleAxiosErrors(async () => {
818
824
  const { bitacora_costos_verduras_web_app_table_id } =
819
825
  await getVariablesByName(headers, session, [
@@ -829,7 +835,7 @@ export async function updateBitacoraCostos(
829
835
 
830
836
  return response;
831
837
  });
832
- }
838
+ };
833
839
 
834
840
  /**
835
841
  * Get getCostosBitacora from the web app table.
@@ -837,10 +843,10 @@ export async function updateBitacoraCostos(
837
843
  * @param session Session object.
838
844
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>.
839
845
  */
840
- export async function getCostosBitacora(
846
+ export const getCostosBitacora = (
841
847
  headers: any,
842
848
  session: Session
843
- ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>> {
849
+ ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<BitacoraCostosItems>[]>> => {
844
850
  return handlePossibleAxiosErrors(async () => {
845
851
  const { bitacora_costos_verduras_web_app_table_id } =
846
852
  await getVariablesByName(headers, session, [
@@ -862,4 +868,4 @@ export async function getCostosBitacora(
862
868
 
863
869
  return bitacora;
864
870
  });
865
- }
871
+ };
@@ -19,10 +19,10 @@ import {
19
19
  * @param session Session object.
20
20
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
21
21
  */
22
- export async function getDischargeHistories(
22
+ export const getDischargeHistories = (
23
23
  headers: any,
24
24
  session: Session
25
- ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<DischargeHistory>[]>> {
25
+ ): Promise<AxiosUtilsResponse<WebAppRowGraphQL<DischargeHistory>[]>> => {
26
26
  return handlePossibleAxiosErrors(async () => {
27
27
  const { discharge_history_web_app_table_id } = await getVariablesByName(
28
28
  headers,
@@ -45,7 +45,7 @@ export async function getDischargeHistories(
45
45
 
46
46
  return history;
47
47
  });
48
- }
48
+ };
49
49
 
50
50
  /**
51
51
  * Create a template in the web app table.
@@ -54,11 +54,11 @@ export async function getDischargeHistories(
54
54
  * @param body DischargeHistory data to be created.
55
55
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory>.
56
56
  */
57
- export async function createDischargeHistory(
57
+ export const createDischargeHistory = (
58
58
  headers: any,
59
59
  session: Session,
60
60
  body: DischargeHistory
61
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
61
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
62
62
  return handlePossibleAxiosErrors(async () => {
63
63
  const { discharge_history_web_app_table_id } = await getVariablesByName(
64
64
  headers,
@@ -72,7 +72,7 @@ export async function createDischargeHistory(
72
72
  );
73
73
  return response;
74
74
  });
75
- }
75
+ };
76
76
 
77
77
  /**
78
78
  * Put updateDischargeHistory from the web app table.
@@ -80,12 +80,12 @@ export async function createDischargeHistory(
80
80
  * @param session Session object.
81
81
  * @returns A Promise of AxiosUtilsResponse<DischargeHistory[]>.
82
82
  */
83
- export async function updateDischargeHistory(
83
+ export const updateDischargeHistory = (
84
84
  headers: any,
85
85
  session: Session,
86
86
  body: DischargeHistory,
87
87
  id_registro: string | number
88
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
88
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
89
89
  return handlePossibleAxiosErrors(async () => {
90
90
  const { discharge_history_web_app_table_id } = await getVariablesByName(
91
91
  headers,
@@ -102,4 +102,4 @@ export async function updateDischargeHistory(
102
102
 
103
103
  return response;
104
104
  });
105
- }
105
+ };
@@ -11,7 +11,6 @@ import {
11
11
  getItemsBySuperCategoryId,
12
12
  getVariablesByName,
13
13
  } from "@zauru-sdk/services";
14
- import httpZauru from "@zauru-sdk/services/dist/zauru/httpZauru.server.js";
15
14
  import {
16
15
  AxiosUtilsResponse,
17
16
  ItemGraphQL,
@@ -119,63 +118,16 @@ export const getItemServicesByLabCategory = async (
119
118
  });
120
119
  };
121
120
 
122
- /**
123
- *
124
- * @param headers
125
- * @returns
126
- */
127
- export const getItemsDataTable = async (
128
- headers: any,
129
- search: SearchItemParams
130
- ): Promise<AxiosUtilsResponse<ItemDataTable[]>> => {
131
- return handlePossibleAxiosErrors(async () => {
132
- const response = await httpZauru.post<ResponseItemList>(
133
- `/settings/items/datatables.json`,
134
- search,
135
- { headers }
136
- );
137
-
138
- const items: ItemDataTable[] =
139
- response.data?.data?.map((x) => formatHTMLItemList(x)) ?? [];
140
-
141
- return items;
142
- });
143
- };
144
-
145
- //============================ FORMATEADO DE ITEMS
146
- function extractIdFromURL(input: string): number {
147
- const regex = /\/items\/(\d+)/;
148
- const match = input.match(regex);
149
- return match ? parseInt(match[1], 10) : -1;
150
- }
151
-
152
- function formatHTMLItemList(item: HTMLItemListSchema): ItemDataTable {
153
- return {
154
- zid: parseInt(extractValueBetweenTags(item.zid, "a"), 10),
155
- itemId: extractIdFromURL(item.cod),
156
- name: extractValueBetweenTags(item.name, "a"),
157
- stck: extractValueBetweenTags(item.stck, "i") || null,
158
- act: extractValueBetweenTags(item.act, "i") || null,
159
- sell: extractValueBetweenTags(item.sell, "i") || null,
160
- purch: extractValueBetweenTags(item.purch, "i") || null,
161
- vat: extractValueBetweenTags(item.vat, "i") || null,
162
- cat: item.cat,
163
- warr: item.warr,
164
- cat_note: item.cat_note,
165
- DT_RowId: parseInt(item.DT_RowId.replace("settings-item-", ""), 10),
166
- };
167
- }
168
-
169
121
  /**
170
122
  * getLabItemCategories
171
123
  * @param session
172
124
  * @param headers
173
125
  * @returns
174
126
  */
175
- export async function getLabItemCategories(
127
+ export const getLabItemCategories = (
176
128
  headers: any,
177
129
  session: Session
178
- ): Promise<AxiosUtilsResponse<ItemCategoryGraphQL[]>> {
130
+ ): Promise<AxiosUtilsResponse<ItemCategoryGraphQL[]>> => {
179
131
  return handlePossibleAxiosErrors(async () => {
180
132
  const { lab_super_category_item_id } = await getVariablesByName(
181
133
  headers,
@@ -194,7 +146,7 @@ export async function getLabItemCategories(
194
146
 
195
147
  return response.data;
196
148
  });
197
- }
149
+ };
198
150
 
199
151
  /**
200
152
  * createNewLaboratoryClient
@@ -203,11 +155,11 @@ export async function getLabItemCategories(
203
155
  * @param body
204
156
  * @returns
205
157
  */
206
- export async function createNewLaboratoryItemCategory(
158
+ export const createNewLaboratoryItemCategory = (
207
159
  session: Session,
208
160
  headers: any,
209
161
  body: Partial<ItemCategoryGraphQL>
210
- ): Promise<AxiosUtilsResponse<boolean>> {
162
+ ): Promise<AxiosUtilsResponse<boolean>> => {
211
163
  return handlePossibleAxiosErrors(async () => {
212
164
  const { lab_super_category_item_id } = await getVariablesByName(
213
165
  headers,
@@ -231,7 +183,7 @@ export async function createNewLaboratoryItemCategory(
231
183
 
232
184
  return true;
233
185
  });
234
- }
186
+ };
235
187
 
236
188
  /**
237
189
  * createNewLaboratoryItem
@@ -240,10 +192,10 @@ export async function createNewLaboratoryItemCategory(
240
192
  * @param body
241
193
  * @returns
242
194
  */
243
- export async function createNewLaboratoryItem(
195
+ export const createNewLaboratoryItem = (
244
196
  headers: any,
245
197
  body: Partial<ItemGraphQL>
246
- ): Promise<AxiosUtilsResponse<ItemGraphQL>> {
198
+ ): Promise<AxiosUtilsResponse<ItemGraphQL>> => {
247
199
  return handlePossibleAxiosErrors(async () => {
248
200
  const sendBody = {
249
201
  active: true,
@@ -266,4 +218,4 @@ export async function createNewLaboratoryItem(
266
218
 
267
219
  return createResponse.data;
268
220
  });
269
- }
221
+ };
@@ -12,11 +12,11 @@ import {
12
12
  WebAppTableUpdateResponse,
13
13
  } from "@zauru-sdk/types";
14
14
 
15
- export function formatearMotivoDeRechazo(
15
+ export const formatearMotivoDeRechazo = (
16
16
  entity: WebAppRowGraphQL<MotivoRechazo>
17
- ): BasicIdNameSchema {
17
+ ): BasicIdNameSchema => {
18
18
  return { id: entity.id, name: entity.data.Nombre } as BasicIdNameSchema;
19
- }
19
+ };
20
20
 
21
21
  /**
22
22
  * Post saveBitacoraPOMassive from the web app table.
@@ -24,11 +24,11 @@ export function formatearMotivoDeRechazo(
24
24
  * @param session Session object.
25
25
  * @returns A Promise of AxiosUtilsResponse<WebAppRowGraphQL<BitacoraPOMassive>[]>.
26
26
  */
27
- export async function saveRechazoCanastas(
27
+ export const saveRechazoCanastas = (
28
28
  headers: any,
29
29
  session: Session,
30
30
  body: any
31
- ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> {
31
+ ): Promise<AxiosUtilsResponse<WebAppTableUpdateResponse>> => {
32
32
  return handlePossibleAxiosErrors(async () => {
33
33
  const { recepciones_rejections_webapp_table_id } = await getVariablesByName(
34
34
  headers,
@@ -44,4 +44,4 @@ export async function saveRechazoCanastas(
44
44
 
45
45
  return response;
46
46
  });
47
- }
47
+ };
@@ -30,9 +30,9 @@ export const TEXT_PAYEE_CATEGORY_NAME_FOR_PRICE = "CAT-LABORATORIO: ";
30
30
  * @param headers
31
31
  * @returns
32
32
  */
33
- export async function getClientesLaboratorio(
33
+ export const getClientesLaboratorio = (
34
34
  session: Session
35
- ): Promise<AxiosUtilsResponse<PayeeGraphQL[]>> {
35
+ ): Promise<AxiosUtilsResponse<PayeeGraphQL[]>> => {
36
36
  return handlePossibleAxiosErrors(async () => {
37
37
  const clientesResponse = await getPayeeCategoriesByNotesMatch(
38
38
  session,
@@ -48,7 +48,7 @@ export async function getClientesLaboratorio(
48
48
 
49
49
  return clientes;
50
50
  });
51
- }
51
+ };
52
52
 
53
53
  /**
54
54
  * createNewLaboratoryClient
@@ -57,10 +57,10 @@ export async function getClientesLaboratorio(
57
57
  * @param body
58
58
  * @returns
59
59
  */
60
- export async function createNewLaboratoryClient(
60
+ export const createNewLaboratoryClient = (
61
61
  headers: any,
62
62
  body: Partial<PayeeGraphQL>
63
- ): Promise<AxiosUtilsResponse<boolean>> {
63
+ ): Promise<AxiosUtilsResponse<boolean>> => {
64
64
  return handlePossibleAxiosErrors(async () => {
65
65
  const sendBody = {
66
66
  ...body,
@@ -80,7 +80,7 @@ export async function createNewLaboratoryClient(
80
80
 
81
81
  return true;
82
82
  });
83
- }
83
+ };
84
84
 
85
85
  /**
86
86
  * createNewLaboratoryClientCategoryPrice
@@ -89,10 +89,10 @@ export async function createNewLaboratoryClient(
89
89
  * @param body
90
90
  * @returns
91
91
  */
92
- export async function updateLaboratoryClientCategoryPrice(
92
+ export const updateLaboratoryClientCategoryPrice = (
93
93
  headers: any,
94
94
  body: Partial<PayeeCategoryGraphQL>
95
- ): Promise<AxiosUtilsResponse<boolean>> {
95
+ ): Promise<AxiosUtilsResponse<boolean>> => {
96
96
  return handlePossibleAxiosErrors(async () => {
97
97
  const sendBody: Partial<PayeeCategoryGraphQL> = {
98
98
  ...body,
@@ -110,7 +110,7 @@ export async function updateLaboratoryClientCategoryPrice(
110
110
 
111
111
  return true;
112
112
  });
113
- }
113
+ };
114
114
 
115
115
  /**
116
116
  * createNewLaboratoryClientCategoryPrice
@@ -119,11 +119,11 @@ export async function updateLaboratoryClientCategoryPrice(
119
119
  * @param body
120
120
  * @returns
121
121
  */
122
- export async function createNewLaboratoryClientCategoryPrice(
122
+ export const createNewLaboratoryClientCategoryPrice = (
123
123
  headers: any,
124
124
  session: Session,
125
125
  body: Partial<PayeeCategoryGraphQL>
126
- ): Promise<AxiosUtilsResponse<boolean>> {
126
+ ): Promise<AxiosUtilsResponse<boolean>> => {
127
127
  return handlePossibleAxiosErrors(async () => {
128
128
  const sendBody: Partial<PayeeCategoryGraphQL> = {
129
129
  ...body,
@@ -191,7 +191,7 @@ export async function createNewLaboratoryClientCategoryPrice(
191
191
  }
192
192
  return true;
193
193
  });
194
- }
194
+ };
195
195
 
196
196
  /**
197
197
  * deleteLaboratoryClientCategoryPrice
@@ -199,10 +199,10 @@ export async function createNewLaboratoryClientCategoryPrice(
199
199
  * @param body
200
200
  * @returns
201
201
  */
202
- export async function deleteLaboratoryClientCategoryPrice(
202
+ export const deleteLaboratoryClientCategoryPrice = (
203
203
  headers: any,
204
204
  body: Partial<PayeeCategoryGraphQL>
205
- ): Promise<AxiosUtilsResponse<boolean>> {
205
+ ): Promise<AxiosUtilsResponse<boolean>> => {
206
206
  return handlePossibleAxiosErrors(async () => {
207
207
  //Elimino la categoría
208
208
  await deletePayeeCategory(headers, body.id ?? "");
@@ -210,4 +210,4 @@ export async function deleteLaboratoryClientCategoryPrice(
210
210
  await deletePriceList(headers, body.price_list_id ?? "");
211
211
  return true;
212
212
  });
213
- }
213
+ };