|
1 | 1 | @if (vm$ | async; as vm) {
|
2 | 2 | <div>
|
3 |
| - <div |
| 3 | + <span |
4 | 4 | #popoverOrganizationTarget
|
5 | 5 | class="inline-block"
|
6 | 6 | >
|
7 |
| - <div |
8 |
| - class="row align-items-center" |
| 7 | + <button |
| 8 | + vcl-button |
| 9 | + [selectable]="true" |
9 | 10 | (click)="
|
10 | 11 | templatePopoverOrganization.toggle();
|
11 | 12 | onClickGlobalOrganizationSelector()
|
12 | 13 | "
|
| 14 | + class="half-transparent organization" |
13 | 15 | >
|
14 |
| - <button |
15 |
| - vcl-button |
16 |
| - class="half-transparent organization" |
17 |
| - (click)="resetGlobalSelectOrganization($event)" |
18 |
| - > |
19 |
| - <vcl-icon icon="vcl:home"></vcl-icon> |
20 |
| - </button> |
21 |
| - <button |
22 |
| - vcl-button |
23 |
| - class="half-transparent organization" |
24 |
| - (click)="lastSelectedGlobalOrganization($event)" |
25 |
| - > |
26 |
| - <vcl-icon icon="vcl:arrow-left"></vcl-icon> |
27 |
| - </button> |
28 |
| - <div class="row"> |
| 16 | + <vcl-icogram> |
| 17 | + <vcl-icon icon="mdi:home-outline" /> |
29 | 18 | {{ vm.globalOrganization?.name }}
|
30 |
| - </div> |
31 |
| - |
32 |
| - <button |
33 |
| - vcl-button |
34 |
| - class="half-transparent organization" |
35 |
| - > |
36 |
| - <vcl-icon icon="vcl:arrow-down"></vcl-icon> |
37 |
| - </button> |
38 |
| - </div> |
39 |
| - </div> |
| 19 | + <vcl-icon icon="mdi:chevron-down" /> |
| 20 | + </vcl-icogram> |
| 21 | + </button> |
| 22 | + </span> |
40 | 23 |
|
41 | 24 | <span
|
42 | 25 | #popoverAccountTarget
|
|
65 | 48 | [positions]="rightOrientedPositions"
|
66 | 49 | >
|
67 | 50 | <!-- This are children -->
|
68 |
| - <vcl-select-list |
69 |
| - (valueChange)=" |
70 |
| - onSelectGlobalOrganization($event, vm.globalOrganization?.id ?? ''); |
71 |
| - templatePopoverOrganization.close() |
72 |
| - " |
73 |
| - > |
74 |
| - <vcl-select-list-item |
75 |
| - [value]="o?.id" |
76 |
| - *ngFor="let o of vm.organizations" |
| 51 | + <div> |
| 52 | + <div class="row justify-content-between align-items-center"> |
| 53 | + <div class="flex p-2"> |
| 54 | + @if (vm.globalOrganization?.parentId) { |
| 55 | + <button |
| 56 | + vcl-button |
| 57 | + class="half-transparent organization" |
| 58 | + (click)="resetGlobalSelectOrganization($event)" |
| 59 | + > |
| 60 | + <vcl-icon icon="vcl:home"></vcl-icon> |
| 61 | + </button> |
| 62 | + |
| 63 | + <button |
| 64 | + vcl-button |
| 65 | + class="half-transparent organization" |
| 66 | + (click)="lastSelectedGlobalOrganization($event)" |
| 67 | + > |
| 68 | + <vcl-icon icon="vcl:arrow-left"></vcl-icon> |
| 69 | + </button> |
| 70 | + } |
| 71 | + </div> |
| 72 | + <div class="overflow-ellipsis flex p-2"> |
| 73 | + {{ vm.globalOrganization?.name }} |
| 74 | + </div> |
| 75 | + |
| 76 | + <div class="flex"></div> |
| 77 | + </div> |
| 78 | + |
| 79 | + <vcl-data-list |
| 80 | + [noBorder]="true" |
| 81 | + [value]="vm.globalOrganization?.id" |
| 82 | + class="m-0" |
| 83 | + (valueChange)=" |
| 84 | + onSelectGlobalOrganization($event, vm.globalOrganization?.id ?? ''); |
| 85 | + templatePopoverOrganization.close() |
| 86 | + " |
77 | 87 | >
|
78 |
| - {{ o?.name }} |
79 |
| - </vcl-select-list-item> |
80 |
| - </vcl-select-list> |
| 88 | + @for (organization of vm.organizations; track $index) { |
| 89 | + <vcl-data-list-item [value]="organization.id"> |
| 90 | + <div class="p-2">{{ organization?.name }}</div> |
| 91 | + </vcl-data-list-item> |
| 92 | + } |
| 93 | + </vcl-data-list> |
| 94 | + </div> |
81 | 95 | </ng-template>
|
82 | 96 |
|
83 | 97 | <ng-template
|
|
0 commit comments