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.
- package/fesm2022/ca-components.mjs +45 -21
- package/fesm2022/ca-components.mjs.map +1 -1
- package/index.d.ts +437 -7
- package/lib/components/ca-checkbox/ca-checkbox.component.scss +26 -3
- package/lib/components/ca-checkbox-selected-count/ca-checkbox-selected-count.component.scss +1 -1
- package/lib/components/ca-pickup-delivery-block/ca-pickup-delivery-block.component.html +1 -0
- package/lib/components/ca-pickup-delivery-block/ca-pickup-delivery-block.component.ts +1 -0
- package/lib/components/ca-pickup-delivery-block/components/ca-load/ca-load.component.html +6 -0
- package/lib/components/ca-pickup-delivery-block/components/ca-load/ca-load.component.ts +1 -0
- package/lib/components/ca-pickup-delivery-block/components/ca-load/components/ca-load-list/ca-load-list.component.ts +3 -1
- package/lib/components/ca-pickup-delivery-block/components/ca-load/components/ca-load-single/ca-load-single.component.ts +3 -1
- package/lib/utils/helpers/dropdown-menu-content-conditional-items.helper.ts +10 -2
- package/lib/utils/helpers/dropdown-menu-content.helper.ts +6 -3
- package/package.json +1 -1
|
@@ -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:
|
|
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 [
|