|
116 | 116 | @let visibleYears = versions.slice(0, showMoreCount > 0 ? 3 : maxVisible);
|
117 | 117 |
|
118 | 118 | @if (count > 0) {
|
119 |
| - @for (year of visibleYears; track year) { |
120 |
| - <span class="px-3 py-1 bg-[#F4F7F9] rounded-md text-[#1689CA] text-[10px] font-medium mr-1"> |
121 |
| - {{ year }} |
122 |
| - </span> |
123 |
| - } |
124 |
| - @if (showMoreCount > 0) { |
125 |
| - <a #popoverTarget class="text-blue-600 cursor-pointer text-[10px] font-medium hover:underline" (click)="popover.toggle($event)"> |
126 |
| - +{{ showMoreCount }} more |
127 |
| - </a> |
| 119 | + <div |
| 120 | + (click)="$event.stopPropagation()" |
| 121 | + (keydown.enter)="$event.stopPropagation()" |
| 122 | + class="w-max-[90px] flex flex-wrap items-center gap-2"> |
| 123 | + @for (year of visibleYears; track year) { |
| 124 | + <span |
| 125 | + (keydown.enter)="openResultByYear(result.result_official_code, year)" |
| 126 | + (click)="openResultByYear(result.result_official_code, year)" |
| 127 | + class="px-3 py-1 bg-[#F4F7F9] rounded-md text-[#1689CA] text-[12px] font-medium cursor-pointer"> |
| 128 | + {{ year }} |
| 129 | + </span> |
| 130 | + } |
| 131 | + @if (showMoreCount > 0) { |
| 132 | + <a #popoverTarget class="text-[#035BA9] cursor-pointer text-[13px] underline" (click)="popover.toggle($event)"> |
| 133 | + +{{ showMoreCount }} more |
| 134 | + </a> |
128 | 135 |
|
129 |
| - <p-popover #popover [baseZIndex]="10000" styleClass="rounded-lg p-4 shadow-lg"> |
130 |
| - <div class="text-center mb-3 font-semibold text-lg">Approved Versions</div> |
131 |
| - <div class="grid grid-cols-2 gap-2"> |
132 |
| - @for (year of versions; track year) { |
133 |
| - <span class="px-3 py-1 bg-[#F4F7F9] rounded-md text-[#1689CA] text-[10px] font-medium"> |
134 |
| - {{ year }} |
135 |
| - </span> |
136 |
| - } |
137 |
| - </div> |
138 |
| - </p-popover> |
139 |
| - } |
| 136 | + <p-popover #popover [baseZIndex]="10000" styleClass="rounded-lg p-1 "> |
| 137 | + <div class="text-center mb-3 text-[14px] text-[#173F6F]">Approved Versions</div> |
| 138 | + <div class="grid grid-cols-2 gap-2"> |
| 139 | + @for (year of versions; track year) { |
| 140 | + <span |
| 141 | + (keydown.enter)="openResultByYear(result.result_official_code, year)" |
| 142 | + (click)="openResultByYear(result.result_official_code, year)" |
| 143 | + class="px-3 py-1 bg-[#F4F7F9] rounded-md text-[#1689CA] text-[12px] font-medium cursor-pointer"> |
| 144 | + {{ year }} |
| 145 | + </span> |
| 146 | + } |
| 147 | + </div> |
| 148 | + </p-popover> |
| 149 | + } |
| 150 | + </div> |
140 | 151 | } @else {
|
141 | 152 | <span>None</span>
|
142 | 153 | }
|
|
0 commit comments