Loading packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ <div *ngIf="hasRestrictedCarriers.value"> <ss-multiselect-dropdown [options]="carriersOptions$ | async" [options]="carriersOptions" [settings]="{ displayAllSelectedText: true }" formControlName="carriersIds" class="carriers-dropdown" Loading packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts +34 −16 Original line number Diff line number Diff line Loading @@ -51,22 +51,23 @@ export class WarehouseManageTabsDetailsComponent readonly form: FormGroup; uploaderPlaceholder: string; carriersOptions$: Observable<IMultiSelectOption[]> = concat( of([]), this._carrierRouter.getAllActive().pipe( map((carriers) => carriers .filter((c) => c.isSharedCarrier) .map((c) => { return { id: c.id, name: `${c.firstName} ${c.lastName}`, }; }) ) ) ); carriersOptions: IMultiSelectOption[]; // carriersOptions$: Observable<IMultiSelectOption[]> = concat( // of([]), // this._carrierRouter.getAllActive().pipe( // map((carriers) => // carriers // .filter((c) => c.isSharedCarrier) // .map((c) => { // return { // id: c.id, // name: `${c.firstName} ${c.lastName}`, // }; // }) // ) // ) // ); private _delivery: 'all' | 'onlyStore' | 'preferStore' = 'all'; Loading Loading @@ -166,6 +167,7 @@ export class WarehouseManageTabsDetailsComponent ngOnInit(): void { this.getUploaderPlaceholderText(); this.loadCarriersOptions(); } ngAfterViewInit() { Loading Loading @@ -270,4 +272,20 @@ export class WarehouseManageTabsDetailsComponent this.uploaderPlaceholder = `${res['WAREHOUSE_VIEW.MUTATION.PHOTO']} (${res['OPTIONAL']})`; } private async loadCarriersOptions() { let carriers = await this._carrierRouter .getAllActive() .pipe(first()) .toPromise(); carriers = carriers.filter((c) => c.isSharedCarrier); this.carriersOptions = carriers.map((c) => { return { id: c.id, name: `${c.firstName} ${c.lastName}`, }; }); } } Loading
packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ <div *ngIf="hasRestrictedCarriers.value"> <ss-multiselect-dropdown [options]="carriersOptions$ | async" [options]="carriersOptions" [settings]="{ displayAllSelectedText: true }" formControlName="carriersIds" class="carriers-dropdown" Loading
packages/admin-web-angular/src/app/@shared/warehouse/forms/warehouse-manage-tabs/details/warehouse-manage-tabs-details.component.ts +34 −16 Original line number Diff line number Diff line Loading @@ -51,22 +51,23 @@ export class WarehouseManageTabsDetailsComponent readonly form: FormGroup; uploaderPlaceholder: string; carriersOptions$: Observable<IMultiSelectOption[]> = concat( of([]), this._carrierRouter.getAllActive().pipe( map((carriers) => carriers .filter((c) => c.isSharedCarrier) .map((c) => { return { id: c.id, name: `${c.firstName} ${c.lastName}`, }; }) ) ) ); carriersOptions: IMultiSelectOption[]; // carriersOptions$: Observable<IMultiSelectOption[]> = concat( // of([]), // this._carrierRouter.getAllActive().pipe( // map((carriers) => // carriers // .filter((c) => c.isSharedCarrier) // .map((c) => { // return { // id: c.id, // name: `${c.firstName} ${c.lastName}`, // }; // }) // ) // ) // ); private _delivery: 'all' | 'onlyStore' | 'preferStore' = 'all'; Loading Loading @@ -166,6 +167,7 @@ export class WarehouseManageTabsDetailsComponent ngOnInit(): void { this.getUploaderPlaceholderText(); this.loadCarriersOptions(); } ngAfterViewInit() { Loading Loading @@ -270,4 +272,20 @@ export class WarehouseManageTabsDetailsComponent this.uploaderPlaceholder = `${res['WAREHOUSE_VIEW.MUTATION.PHOTO']} (${res['OPTIONAL']})`; } private async loadCarriersOptions() { let carriers = await this._carrierRouter .getAllActive() .pipe(first()) .toPromise(); carriers = carriers.filter((c) => c.isSharedCarrier); this.carriersOptions = carriers.map((c) => { return { id: c.id, name: `${c.firstName} ${c.lastName}`, }; }); } }