@zeniai/client-epic-state 5.0.15 → 5.0.16-betaJK1

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.
@@ -14,8 +14,8 @@ export declare const cancelAiAccountantOnboarding: import("@reduxjs/toolkit").Ac
14
14
  }, "aiAccountantView/cancelAiAccountantOnboardingSuccess", never, never>, clearAiAccountantView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/clearAiAccountantView">, fetchAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/fetchAiAccountantCustomers">, fetchAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, fetchNextPage?: boolean | undefined], {
15
15
  tenantId: string;
16
16
  fetchNextPage: boolean;
17
- }, "aiAccountantView/fetchAiAccountantJobs", never, never>, setSelectedTenantIdsForJobTrigger: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "aiAccountantView/setSelectedTenantIdsForJobTrigger">, triggerAiAccountantJob: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[operationType: "onboard" | "offboard" | "retrain" | "full_pipeline" | "cancel_onboarding", startDate: string, endDate: string], {
18
- operationType: "onboard" | "offboard" | "retrain" | "full_pipeline" | "cancel_onboarding";
17
+ }, "aiAccountantView/fetchAiAccountantJobs", never, never>, setSelectedTenantIdsForJobTrigger: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "aiAccountantView/setSelectedTenantIdsForJobTrigger">, triggerAiAccountantJob: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[operationType: "onboard" | "offboard" | "retrain" | "evaluate" | "full_pipeline" | "cancel_onboarding", startDate: string, endDate: string], {
18
+ operationType: "onboard" | "offboard" | "retrain" | "evaluate" | "full_pipeline" | "cancel_onboarding";
19
19
  startDate: string;
20
20
  endDate: string;
21
21
  }, "aiAccountantView/triggerAiAccountantJob", never, never>, triggerAiAccountantJobFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiAccountantView/triggerAiAccountantJobFailure">, triggerAiAccountantJobSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantView/triggerAiAccountantJobSuccess">, updateAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload[], "aiAccountantView/updateAiAccountantCustomers">, updateAiAccountantCustomersFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiAccountantView/updateAiAccountantCustomersFailure">, updateAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, nextPageToken?: string | null | undefined], {
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getMonthEndCloseChecksViewByTenantId = exports.isMonthEndInsightDisabled = void 0;
7
4
  const toolkit_1 = require("@reduxjs/toolkit");
8
- const isEqual_1 = __importDefault(require("lodash/isEqual"));
9
5
  const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
10
6
  const timePeriod_1 = require("../../commonStateTypes/timePeriod");
11
7
  const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
@@ -13,22 +9,18 @@ const fetchAllTenantsEpic_1 = require("../../entity/tenant/epic/fetchAllTenantsE
13
9
  const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
14
10
  const zeniDayJS_1 = require("../../zeniDayJS");
15
11
  const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary) => {
12
+ console.log('jklogs ~ isMonthEndInsightDisabled ~ selectedPeriod:', selectedPeriod);
16
13
  if (auditSummary != null) {
17
14
  if (auditSummary.auditScorePercentage < 75 &&
18
15
  userAllowedToAccessMonthEndInsights === false) {
19
16
  return true;
20
17
  }
21
- const previousMonthPeriod = {
22
- month: (0, timePeriod_1.toMonth)((0, zeniDayJS_1.dateNow)().subtract(1, 'month').month() + 1),
23
- year: (0, zeniDayJS_1.dateNow)().subtract(1, 'month').year(),
24
- };
25
- if (!(0, isEqual_1.default)(previousMonthPeriod, selectedPeriod)) {
26
- return true;
27
- }
28
18
  // if the selected period is November 2024, then book close date should not be null and book close date should be 30th November 2024
29
19
  const { bookCloseDate } = currentTenant;
20
+ console.log('jklogs ~ isMonthEndInsightDisabled ~ bookCloseDate:', bookCloseDate);
30
21
  const selectedPeriodFirstDay = (0, zeniDayJS_1.date)(`${selectedPeriod.year}-${selectedPeriod.month}-01`);
31
22
  const selectedPeriodLastDay = selectedPeriodFirstDay.endOf('month');
23
+ console.log('jklogs ~ isMonthEndInsightDisabled ~ selectedPeriodLastDay:', selectedPeriodLastDay);
32
24
  if (bookCloseDate == null ||
33
25
  bookCloseDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT) !==
34
26
  selectedPeriodLastDay.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.15",
3
+ "version": "5.0.16-betaJK1",
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
  "module": "lib/esm/index.js",