Skip to content
Snippets Groups Projects
Commit 21f06a25 authored by Makhtar DIAGNE's avatar Makhtar DIAGNE
Browse files

[FIX DLAB-3306] Sort subrogations

parent 9295ecc9
No related branches found
No related tags found
1 merge request!1Feature/design/1
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* The fact that you are presently reading this means that you have had * The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms. * knowledge of the CeCILL-C license and that you accept its terms.
*/ */
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { MenuOption } from '../navbar'; import { MenuOption } from '../navbar';
import { CustomerMenuService } from '../navbar/customer-menu/customer-menu.service'; import { CustomerMenuService } from '../navbar/customer-menu/customer-menu.service';
...@@ -44,7 +44,7 @@ import { CustomerMenuService } from '../navbar/customer-menu/customer-menu.servi ...@@ -44,7 +44,7 @@ import { CustomerMenuService } from '../navbar/customer-menu/customer-menu.servi
templateUrl: './customer-select-content.component.html', templateUrl: './customer-select-content.component.html',
styleUrls: ['./customer-select-content.component.scss'] styleUrls: ['./customer-select-content.component.scss']
}) })
export class CustomerSelectContentComponent { export class CustomerSelectContentComponent implements OnInit {
@Input() customers: MenuOption[]; @Input() customers: MenuOption[];
@Input() isModalMenu: boolean; @Input() isModalMenu: boolean;
...@@ -56,6 +56,12 @@ export class CustomerSelectContentComponent { ...@@ -56,6 +56,12 @@ export class CustomerSelectContentComponent {
private route: ActivatedRoute, private route: ActivatedRoute,
private customerMenuService: CustomerMenuService) { } private customerMenuService: CustomerMenuService) { }
ngOnInit(): void {
if (this.customers) {
this.customers.sort((c1, c2) => c1.label.localeCompare(c2.label));
}
}
selectCustomerId(customerId: string) { selectCustomerId(customerId: string) {
if (this.isModalMenu) { if (this.isModalMenu) {
this.customerMenuService.sendSelectedCustomerId(customerId); this.customerMenuService.sendSelectedCustomerId(customerId);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment