ca-components 2.1.143 → 2.1.151

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.
@@ -56,6 +56,7 @@ import {
56
56
  export class ActiveLoadComponent {
57
57
  @Input() activeLoad!: Array<LoadShortResponse>;
58
58
  @Input() status!: StatusTypeEnum;
59
+ @Input() isAllDispatchBoardsSelected: boolean = true;
59
60
 
60
61
  @Output() dropdownMenuAction: EventEmitter<IDropdownMenuOptionEmit> =
61
62
  new EventEmitter<IDropdownMenuOptionEmit>();
@@ -76,7 +77,8 @@ export class ActiveLoadComponent {
76
77
  private setDropdownOptions(): void {
77
78
  this.dropdownOptions =
78
79
  DropdownMenuContentHelper.getPickupDeliveryDropdownContent(
79
- this.status
80
+ this.status,
81
+ this.isAllDispatchBoardsSelected
80
82
  );
81
83
  }
82
84
 
@@ -42,16 +42,24 @@ export class DropdownMenuContentConditionalItemsHelper {
42
42
  // modifier items
43
43
  // dispatchboard - pickup delivery component
44
44
  static getPickupDeliveryModifierItems(
45
- loadStatus: string
45
+ loadStatus: string,
46
+ isAllDispatchBoardsSelected: boolean
46
47
  ): Partial<IDropdownMenuItem>[] {
47
48
  return [
48
49
  {
49
50
  title: eDropdownMenu.EDIT,
50
51
  hasBorder: loadStatus !== StatusTypeEnum.PENDING,
52
+ isDisabled: isAllDispatchBoardsSelected,
53
+ },
54
+ {
55
+ title: eDropdownMenu.UNASSIGN,
56
+ isDisabled: isAllDispatchBoardsSelected,
51
57
  },
52
58
  {
53
59
  title: eDropdownMenu.DELETE,
54
- isDisabled: loadStatus !== StatusTypeEnum.PENDING,
60
+ isDisabled:
61
+ isAllDispatchBoardsSelected ||
62
+ loadStatus !== StatusTypeEnum.PENDING,
55
63
  },
56
64
  ];
57
65
  }
@@ -33,11 +33,13 @@ export class DropdownMenuContentHelper {
33
33
 
34
34
  // dispatchboard - pickup delivery component
35
35
  static getPickupDeliveryDropdownContent(
36
- loadStatus: string
36
+ loadStatus: string,
37
+ isAllDispatchBoardsSelected: boolean
37
38
  ): IDropdownMenuItem[] {
38
39
  const modifierItems =
39
40
  DropdownMenuContentConditionalItemsHelper.getPickupDeliveryModifierItems(
40
- loadStatus
41
+ loadStatus,
42
+ isAllDispatchBoardsSelected
41
43
  );
42
44
 
43
45
  const sharedItems =
@@ -51,7 +53,8 @@ export class DropdownMenuContentHelper {
51
53
  const conditionalItems =
52
54
  DropdownMenuContentConditionalItemsHelper.getConditionalItems(
53
55
  [eDropdownMenu.UNASSIGN],
54
- false
56
+ false,
57
+ modifierItems
55
58
  );
56
59
 
57
60
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ca-components",
3
- "version": "2.1.143",
3
+ "version": "2.1.151",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.16",
6
6
  "@angular/core": "^20.3.16",