@appcorp/stellar-solutions-invoice-module 0.1.66 → 0.1.67

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.
@@ -239,7 +239,11 @@ var usePaymentState = function () {
239
239
  updateCallback: updateCallback,
240
240
  updateDeps: [state],
241
241
  updateParams: updateParams,
242
- }), byIdError = _b.byIdError, byIdFetchNow = _b.byIdFetchNow, byIdLoading = _b.byIdLoading, deleteError = _b.deleteError, deleteFetchNow = _b.deleteFetchNow, deleteLoading = _b.deleteLoading, listError = _b.listError, listFetchNow = _b.listFetchNow, listLoading = _b.listLoading, updateError = _b.updateError, updateFetchNow = _b.updateFetchNow, updateLoading = _b.updateLoading;
242
+ }), byIdError = _b.byIdError,
243
+ // byIdFetchNow,
244
+ byIdLoading = _b.byIdLoading, deleteError = _b.deleteError,
245
+ // deleteFetchNow,
246
+ deleteLoading = _b.deleteLoading, listError = _b.listError, listFetchNow = _b.listFetchNow, listLoading = _b.listLoading, updateError = _b.updateError, updateFetchNow = _b.updateFetchNow, updateLoading = _b.updateLoading;
243
247
  // ---------------------------------------------------------------------------
244
248
  // EFFECTS
245
249
  // ---------------------------------------------------------------------------
@@ -301,16 +305,22 @@ var usePaymentState = function () {
301
305
  // ---------------------------------------------------------------------------
302
306
  // CRUD OPERATION HANDLERS
303
307
  // ---------------------------------------------------------------------------
304
- var handleEdit = (0, react_1.useCallback)(function (id) {
305
- byIdFetchNow(undefined, {
306
- body: JSON.stringify({ id: id }),
307
- });
308
- }, [byIdFetchNow]);
309
- var handleDelete = (0, react_1.useCallback)(function (id) {
310
- deleteFetchNow === null || deleteFetchNow === void 0 ? void 0 : deleteFetchNow(undefined, {
311
- body: JSON.stringify({ id: id }),
312
- });
313
- }, [deleteFetchNow]);
308
+ // const handleEdit = useCallback(
309
+ // (id: string) => {
310
+ // byIdFetchNow(undefined, {
311
+ // body: JSON.stringify({ id }),
312
+ // });
313
+ // },
314
+ // [byIdFetchNow]
315
+ // );
316
+ // const handleDelete = useCallback(
317
+ // (id: string) => {
318
+ // deleteFetchNow?.(undefined, {
319
+ // body: JSON.stringify({ id }),
320
+ // });
321
+ // },
322
+ // [deleteFetchNow]
323
+ // );
314
324
  var handleSubmit = (0, react_1.useCallback)(function () {
315
325
  dispatch({
316
326
  payload: { disableSaveButton: true },
@@ -336,8 +346,7 @@ var usePaymentState = function () {
336
346
  // FORM HANDLERS
337
347
  // ---------------------------------------------------------------------------
338
348
  var handleChange = (0, react_1.useCallback)(function (key, value) {
339
- var _a, _b, _c, _d;
340
- console.log("_>>>", state.invoice);
349
+ var _a, _b, _c;
341
350
  if (key === "amount" && typeof value === "string") {
342
351
  if (Number((_a = state === null || state === void 0 ? void 0 : state.invoice) === null || _a === void 0 ? void 0 : _a.total) > Number(value)) {
343
352
  dispatch({
@@ -351,12 +360,11 @@ var usePaymentState = function () {
351
360
  payload: { key: "paymentType", value: types_1.PAYMENT_TYPE.FULL_AMOUNT },
352
361
  });
353
362
  }
354
- console.log(Number(Number((_c = state === null || state === void 0 ? void 0 : state.invoice) === null || _c === void 0 ? void 0 : _c.total) - Number(value)).toFixed(2));
355
363
  dispatch({
356
364
  type: actions_1.PAYMENT_ACTION_TYPES.SET_INPUT_FIELD,
357
365
  payload: {
358
366
  key: "balance",
359
- value: Number(Number((_d = state === null || state === void 0 ? void 0 : state.invoice) === null || _d === void 0 ? void 0 : _d.total) - Number(value)).toFixed(2),
367
+ value: Number(Number((_c = state === null || state === void 0 ? void 0 : state.invoice) === null || _c === void 0 ? void 0 : _c.total) - Number(value)).toFixed(2),
360
368
  },
361
369
  });
362
370
  }
@@ -413,20 +421,7 @@ var usePaymentState = function () {
413
421
  // TABLE ACTIONS
414
422
  // ---------------------------------------------------------------------------
415
423
  var headerActions = (0, react_1.useMemo)(function () { return []; }, []);
416
- var rowActions = (0, react_1.useMemo)(function () { return [
417
- {
418
- enabled: true,
419
- handleAction: function (id) { return handleEdit(id); },
420
- label: t("actionsButtonEdit"),
421
- order: 1,
422
- },
423
- {
424
- enabled: true,
425
- handleAction: function (id) { return handleDelete(id); },
426
- label: t("actionsButtonDelete"),
427
- order: 2,
428
- },
429
- ]; }, [handleEdit, handleDelete, t]);
424
+ var rowActions = (0, react_1.useMemo)(function () { return []; }, []);
430
425
  // ---------------------------------------------------------------------------
431
426
  // RETURN STATE
432
427
  // ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/stellar-solutions-invoice-module",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "scripts": {
5
5
  "automate": "./automate.sh",
6
6
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",