@zeniai/client-epic-state 4.13.65 → 4.13.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.
@@ -228,7 +228,9 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
228
228
  return lineItems.every((lineItem) => {
229
229
  var _a, _b, _c;
230
230
  return lineItem.account != null &&
231
+ Boolean(lineItem.account.qboId) === true &&
231
232
  lineItem.class != null &&
233
+ Boolean(lineItem.class.qboId) === true &&
232
234
  !(((_a = lineItem.account) === null || _a === void 0 ? void 0 : _a.qboId) != null &&
233
235
  [exports.EXPENSE_QBOID, exports.INCOME_QBOID].includes(lineItem.account.qboId)) &&
234
236
  (isVendorTransactionAvailable
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.getMonthEndCloseChecksViewByTenantId = exports.isMonthEndInsightDisabled = void 0;
4
7
  const toolkit_1 = require("@reduxjs/toolkit");
8
+ const isEqual_1 = __importDefault(require("lodash/isEqual"));
5
9
  const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
6
10
  const timePeriod_1 = require("../../commonStateTypes/timePeriod");
7
11
  const zeniDayJS_1 = require("../../zeniDayJS");
@@ -13,6 +17,13 @@ const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToA
13
17
  userAllowedToAccessMonthEndInsights === false) {
14
18
  return true;
15
19
  }
20
+ const previousMonthPeriod = {
21
+ month: (0, timePeriod_1.toMonth)((0, zeniDayJS_1.dateNow)().subtract(1, 'month').month() + 1),
22
+ year: (0, zeniDayJS_1.dateNow)().subtract(1, 'month').year(),
23
+ };
24
+ if (!(0, isEqual_1.default)(previousMonthPeriod, selectedPeriod)) {
25
+ return true;
26
+ }
16
27
  // if the selected period is November 2024, then book close date should not be null and book close date should be 30th November 2024
17
28
  const { bookCloseDate } = currentTenant;
18
29
  const selectedPeriodFirstDay = (0, zeniDayJS_1.date)(`${selectedPeriod.year}-${selectedPeriod.month}-01`);
@@ -83,9 +83,10 @@ const paymentAccountList = (0, toolkit_1.createSlice)({
83
83
  },
84
84
  updatePaymentAccountBalanceStatus(draft, action) {
85
85
  const { paymentAccountId, fetchState, error } = action.payload;
86
- draft.paymentAccountBalanceFetchStatus[paymentAccountId].fetchState =
87
- fetchState;
88
- draft.paymentAccountBalanceFetchStatus[paymentAccountId].error = error;
86
+ draft.paymentAccountBalanceFetchStatus[paymentAccountId] = {
87
+ fetchState,
88
+ error,
89
+ };
89
90
  },
90
91
  clearPaymentAccountList(draft) {
91
92
  Object.assign(draft, exports.initialState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.13.65",
3
+ "version": "4.13.67",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",