@zeniai/client-epic-state 4.11.41 → 4.11.43

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.
@@ -525,7 +525,7 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
525
525
  bulkSelectExceptionInfo: undefined,
526
526
  };
527
527
  if (isBookClosedForBill) {
528
- if (selectedTab === 'scheduled' ||
528
+ if ((selectedTab === 'scheduled' && !bill.isRecurring) ||
529
529
  (selectedTab === 'pending_approval' && !isAwaitingMyApproval)) {
530
530
  return {
531
531
  isSelectableForBulkAction: false,
@@ -537,15 +537,14 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
537
537
  if (selectedTab === 'scheduled') {
538
538
  //for cases where user attempts select all on scheduled tab
539
539
  if (firstBillSelected == null && firstSelectableBill != null) {
540
+ if (bill.isRecurring) {
541
+ return {
542
+ isSelectableForBulkAction: false,
543
+ isSelectableForBulkActionSelectAll: false,
544
+ bulkSelectExceptionInfo: 'noActionRecurring',
545
+ };
546
+ }
540
547
  if (firstSelectableBill.billPayInfo.billPaymentStatus.code === 'processing') {
541
- if (bill.isRecurring &&
542
- Boolean(firstSelectableBill.isRecurring) === false) {
543
- return {
544
- isSelectableForBulkAction: true,
545
- isSelectableForBulkActionSelectAll: false,
546
- bulkSelectExceptionInfo: undefined,
547
- };
548
- }
549
548
  if (bill.billPayInfo.billPaymentStatus.code !== 'processing') {
550
549
  return {
551
550
  isSelectableForBulkAction: true,
@@ -565,15 +564,33 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
565
564
  }
566
565
  }
567
566
  }
568
- if ((firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.billPayInfo.billPaymentStatus.code) === 'processing') {
569
- if (bill.isRecurring &&
570
- Boolean(firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.isRecurring) === false) {
567
+ //no bulk action allowed on recurringBill in scheduled tab
568
+ if (bill.isRecurring) {
569
+ if (firstBillSelected != null) {
570
+ if ((firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.billPayInfo.billPaymentStatus.code) === 'processing') {
571
+ return {
572
+ isSelectableForBulkAction: false,
573
+ isSelectableForBulkActionSelectAll: false,
574
+ bulkSelectExceptionInfo: 'cancelRecurring',
575
+ };
576
+ }
577
+ else {
578
+ return {
579
+ isSelectableForBulkAction: false,
580
+ isSelectableForBulkActionSelectAll: false,
581
+ bulkSelectExceptionInfo: 'deleteRecurring',
582
+ };
583
+ }
584
+ }
585
+ else {
571
586
  return {
572
587
  isSelectableForBulkAction: false,
573
- isSelectableForBulkActionSelectAll: true,
574
- bulkSelectExceptionInfo: 'cancelRecurring',
588
+ isSelectableForBulkActionSelectAll: false,
589
+ bulkSelectExceptionInfo: 'noActionRecurring',
575
590
  };
576
591
  }
592
+ }
593
+ if ((firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.billPayInfo.billPaymentStatus.code) === 'processing') {
577
594
  if (bill.billPayInfo.billPaymentStatus.code !== 'processing') {
578
595
  return {
579
596
  isSelectableForBulkAction: false,
@@ -22,7 +22,7 @@ export interface BulkReviewState {
22
22
  };
23
23
  }
24
24
  export declare type BulkOperationType = 'approve' | 'reject' | 'send_for_approval' | 'delete' | 'cancel' | 'review';
25
- export declare type BulkSelectExceptionInfoType = 'bookCloseDateDelete' | 'bookCloseDateProcessing' | 'processingSelectTogether' | 'processingWithOthers' | 'cancelProcessing' | 'cancelRecurring';
25
+ export declare type BulkSelectExceptionInfoType = 'bookCloseDateDelete' | 'bookCloseDateProcessing' | 'processingSelectTogether' | 'processingWithOthers' | 'cancelProcessing' | 'cancelRecurring' | 'deleteRecurring' | 'noActionRecurring';
26
26
  export declare const BULK_REVIEW_STATUS_CODES: readonly ["valid", "error", "warning"];
27
27
  export declare const toBulkReviewStatusCode: (v: string) => "error" | "valid" | "warning";
28
28
  export declare type BulkReviewStatusCode = ReturnType<typeof toBulkReviewStatusCode>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.41",
3
+ "version": "4.11.43",
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",