Skip to content

Commit cca3e8c

Browse files
committed
fixes
1 parent ef9fcc5 commit cca3e8c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white">{{ 'UPDATE_
601601
@for (char of creatingChars; track char; let idx = $index) {
602602
<div class="flex w-full justify-between">
603603
<div class="align-items-middle align-middle">
604-
<input [checked]="char?.isDefault" (click)="selectDefaultChar(char,idx)" id="disabled-checked" type="checkbox" value=""
604+
<input [checked]="char?.isDefault" (click)="selectDefaultChar(char,idx)" (keydown)="selectDefaultChar(char,idx)" id="disabled-checked" type="checkbox" value=""
605605
class="w-4 h-4 text-purple-600 bg-gray-100 border-gray-300 rounded-full focus:ring-purple-500 focus:ring-2">
606606
@if(numberCharSelected){
607607
<label for="disabled-checked" class="ms-2 text-sm font-medium text-gray-700 dark:text-white text-wrap break-all">{{char.value}} (<i>{{char?.unitOfMeasure}}</i>)</label>
@@ -975,7 +975,7 @@ <h2 class="text-3xl font-bold text-primary-100 ml-4 dark:text-white">{{ 'UPDATE_
975975
</div>
976976
} @else {
977977
<label class="font-bold text-lg dark:text-white">{{ 'UPDATE_PROD_SPEC._relationship_type' | translate }}</label>
978-
<select id="type" (change)="onRelChange($event)"
978+
<select id="rel-type" (change)="onRelChange($event)"
979979
class="shadow bg-white border border-gray-300 text-gray-900 dark:bg-secondary-300 dark:border-secondary-200 dark:text-white text-sm rounded-lg focus:ring-purple-500 focus:border-purple-500 block w-full p-2.5">
980980
<option selected value="migration">{{ 'UPDATE_OFFER._migration' | translate }}</option>
981981
<option value="dependency">{{ 'UPDATE_OFFER._dependency' | translate }}</option>

src/app/shared/forms/offer/offer.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,19 @@ export class OfferComponent implements OnInit, OnDestroy{
137137
}
138138

139139
private normalizeIdArray(arr: any[], key: string = 'id'): string[] {
140-
return Array.isArray(arr) ? arr.map(x => x?.[key]).filter(Boolean).sort() : [];
140+
return Array.isArray(arr) ? arr
141+
.map(x => x?.[key])
142+
.filter(Boolean)
143+
.sort((a, b) => {
144+
const numA = Number(a);
145+
const numB = Number(b);
146+
if (!isNaN(numA) && !isNaN(numB)) return numA - numB;
147+
return String(a).localeCompare(String(b));
148+
})
149+
: [];
141150
}
142151

152+
143153
private normalizeTerms(terms: any[]): Array<{name: string; description: string}> {
144154
const list = Array.isArray(terms) ? terms : [];
145155
return list

0 commit comments

Comments
 (0)