feat(avrop): Updated Avrop response model and fixed mappings. (TV-873)
Squashed commit of the following: commit a03d179cd05a2266b11ac01acb2f2e07f9bb943d Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Nov 4 08:31:59 2021 +0100 Updated name of AvropData model to AvropAndMeta commit d5e40567c991c15b23ac5b0978b3cc9c7084d697 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Thu Nov 4 08:26:42 2021 +0100 Updated Avrop response model and mapping function
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, OnDestroy } from '@angular/core';
|
||||||
import { AvropCompact, AvropCompactData } from '@msfa-models/avrop.model';
|
import { Avrop, AvropAndMeta } from '@msfa-models/avrop.model';
|
||||||
import { Handledare } from '@msfa-models/handledare.model';
|
import { Handledare } from '@msfa-models/handledare.model';
|
||||||
import { AvropService } from '@msfa-services/avrop.service';
|
import { AvropService } from '@msfa-services/avrop.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
@@ -14,8 +14,8 @@ export class AvropComponent implements OnDestroy {
|
|||||||
readonly totalAmountOfSteps = 3;
|
readonly totalAmountOfSteps = 3;
|
||||||
currentStep$: Observable<number> = this.avropService.currentStep$;
|
currentStep$: Observable<number> = this.avropService.currentStep$;
|
||||||
error$: Observable<string> = this.avropService.error$;
|
error$: Observable<string> = this.avropService.error$;
|
||||||
avropData$: Observable<AvropCompactData> = this.avropService.avropData$;
|
avropData$: Observable<AvropAndMeta> = this.avropService.avropData$;
|
||||||
selectedAvrop$: Observable<AvropCompact[]> = this.avropService.selectedAvrop$;
|
selectedAvrop$: Observable<Avrop[]> = this.avropService.selectedAvrop$;
|
||||||
availableHandledare$: Observable<Handledare[]> = this.avropService.availableHandledare$;
|
availableHandledare$: Observable<Handledare[]> = this.avropService.availableHandledare$;
|
||||||
selectedHandledare$: Observable<Handledare | null> = this.avropService.selectedHandledare$;
|
selectedHandledare$: Observable<Handledare | null> = this.avropService.selectedHandledare$;
|
||||||
avropIsLocked$: Observable<boolean> = this.avropService.avropIsLocked$;
|
avropIsLocked$: Observable<boolean> = this.avropService.avropIsLocked$;
|
||||||
@@ -30,7 +30,7 @@ export class AvropComponent implements OnDestroy {
|
|||||||
this.returnToStep1();
|
this.returnToStep1();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSelectedAvrop(deltagareList: AvropCompact[], currentStep: number): void {
|
updateSelectedAvrop(deltagareList: Avrop[], currentStep: number): void {
|
||||||
if (currentStep !== 1 && !deltagareList.length) {
|
if (currentStep !== 1 && !deltagareList.length) {
|
||||||
this.avropService.goToStep1();
|
this.avropService.goToStep1();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { Avrop, AvropCompact } from '@msfa-models/avrop.model';
|
import { Avrop } from '@msfa-models/avrop.model';
|
||||||
import { Handledare } from '@msfa-models/handledare.model';
|
import { Handledare } from '@msfa-models/handledare.model';
|
||||||
import { PaginationMeta } from '@msfa-models/pagination-meta.model';
|
import { PaginationMeta } from '@msfa-models/pagination-meta.model';
|
||||||
|
|
||||||
@@ -10,18 +10,18 @@ import { PaginationMeta } from '@msfa-models/pagination-meta.model';
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class AvropListComponent {
|
export class AvropListComponent {
|
||||||
@Input() availableAvrop: AvropCompact[];
|
@Input() availableAvrop: Avrop[];
|
||||||
@Input() paginationMeta: PaginationMeta;
|
@Input() paginationMeta: PaginationMeta;
|
||||||
@Input() selectedAvrop: AvropCompact[];
|
@Input() selectedAvrop: Avrop[];
|
||||||
@Input() handledare: Handledare;
|
@Input() handledare: Handledare;
|
||||||
@Input() isLocked: boolean;
|
@Input() isLocked: boolean;
|
||||||
@Input() isSubmitted: boolean;
|
@Input() isSubmitted: boolean;
|
||||||
@Input() handledareConfirmed: boolean;
|
@Input() handledareConfirmed: boolean;
|
||||||
@Input() avropLoading: boolean;
|
@Input() avropLoading: boolean;
|
||||||
@Output() selectionChanged = new EventEmitter<AvropCompact[]>();
|
@Output() selectionChanged = new EventEmitter<Avrop[]>();
|
||||||
@Output() paginated = new EventEmitter<number>();
|
@Output() paginated = new EventEmitter<number>();
|
||||||
|
|
||||||
get avropRows(): AvropCompact[] {
|
get avropRows(): Avrop[] {
|
||||||
return this.isLocked ? this.selectedAvrop : this.availableAvrop;
|
return this.isLocked ? this.selectedAvrop : this.availableAvrop;
|
||||||
}
|
}
|
||||||
get currentPage(): number {
|
get currentPage(): number {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ButtonVariation } from '@af/digi-ng/_button/button';
|
import { ButtonVariation } from '@af/digi-ng/_button/button';
|
||||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { AvropCompact } from '@msfa-models/avrop.model';
|
import { Avrop } from '@msfa-models/avrop.model';
|
||||||
import { Handledare } from '@msfa-models/handledare.model';
|
import { Handledare } from '@msfa-models/handledare.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -10,7 +10,7 @@ import { Handledare } from '@msfa-models/handledare.model';
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class AvropRowComponent {
|
export class AvropRowComponent {
|
||||||
@Input() avrop: AvropCompact;
|
@Input() avrop: Avrop;
|
||||||
@Input() isSelected: boolean;
|
@Input() isSelected: boolean;
|
||||||
@Input() isLocked: boolean;
|
@Input() isLocked: boolean;
|
||||||
@Input() isSubmitted: boolean;
|
@Input() isSubmitted: boolean;
|
||||||
|
|||||||
@@ -2,38 +2,28 @@ import { PaginationMeta } from '@msfa-models/pagination-meta.model';
|
|||||||
|
|
||||||
export interface AvropResponse {
|
export interface AvropResponse {
|
||||||
id: string;
|
id: string;
|
||||||
deltagare: string;
|
fullName: string;
|
||||||
genomforandeReferens: number;
|
tjanst: string;
|
||||||
orgId: string;
|
startDate: Date;
|
||||||
leverantorId: number;
|
endDate: Date;
|
||||||
organisationsnummer: string;
|
originalEndDate: string | null;
|
||||||
utforandeVerksamhetId: number;
|
sprakstod: string | null;
|
||||||
utforandeverksamhet: string;
|
tolkbehov: string | null;
|
||||||
kommunKod: string;
|
utforandeVerksamhet: string;
|
||||||
kommun: string;
|
utforandeAdress: string;
|
||||||
utforandeAdressId: number;
|
|
||||||
adress: string;
|
|
||||||
ordernummer: string;
|
|
||||||
bokningsId: number;
|
|
||||||
personnummer: string;
|
|
||||||
sokandeId: number;
|
|
||||||
tjanstekod: string;
|
|
||||||
tjansteNamn: string;
|
|
||||||
deltagandeGrad: number;
|
|
||||||
startdatumAvrop: string;
|
|
||||||
slutdatumAvrop: string;
|
|
||||||
aktnummerDiariet: string;
|
|
||||||
tolkbehov: string;
|
|
||||||
sprakstod: string;
|
|
||||||
sparkod: string;
|
sparkod: string;
|
||||||
sparNamn: string;
|
genomforandeReferens: number;
|
||||||
handledareCiamUserId: string;
|
participationFrequency: number;
|
||||||
|
receivedTimestamp: Date;
|
||||||
|
handledareCiamUserId: string | null;
|
||||||
handledare: string;
|
handledare: string;
|
||||||
recievedTimestamp: Date;
|
hasAvbrott: boolean;
|
||||||
hasGemensamPlanering: boolean;
|
hasGemensamPlanering: boolean;
|
||||||
|
|
||||||
|
//personnummer: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AvropApiResponse {
|
export interface AvropAndMetaResponse {
|
||||||
data: AvropResponse[];
|
data: AvropResponse[];
|
||||||
meta: PaginationMeta;
|
meta: PaginationMeta;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,83 +1,85 @@
|
|||||||
import { TrackName } from '@msfa-enums/track-name.enum';
|
import { TrackName } from '@msfa-enums/track-name.enum';
|
||||||
import { mapStringToSsn } from '@msfa-utils/map-string-to-ssn.util';
|
|
||||||
import { AvropResponse } from './api/avrop.response.model';
|
import { AvropResponse } from './api/avrop.response.model';
|
||||||
import { PaginationMeta } from './pagination-meta.model';
|
import { PaginationMeta } from './pagination-meta.model';
|
||||||
|
|
||||||
export interface AvropCompact {
|
export interface Avrop {
|
||||||
id: string; // id
|
id: string;
|
||||||
sokandeId: number; // sokandeId
|
fullName: string;
|
||||||
fullName: string; // deltagare
|
tjanst: string;
|
||||||
tjanst: string; // tjansteNamn
|
startDate: Date;
|
||||||
startDate: Date; // startdatumAvrop
|
endDate: Date;
|
||||||
endDate: Date; // slutdatumAvrop
|
originalEndDate: Date;
|
||||||
tolkbehov: string; // tolkbehov
|
sprakstod: string;
|
||||||
sprakstod: string; // sprakstod
|
tolkbehov: string;
|
||||||
kommun: string; // kommun
|
utforandeVerksamhet: string;
|
||||||
utforandeAdress: string; // adress
|
utforandeAdress: string;
|
||||||
trackCode: string; // sparkod
|
trackCode: string;
|
||||||
trackName: TrackName; // sparNamn
|
trackName: TrackName;
|
||||||
genomforandeReferens: number; // genomforandeReferens
|
genomforandeReferens: number;
|
||||||
}
|
participationFrequency: number;
|
||||||
|
|
||||||
export interface Avrop extends AvropCompact {
|
|
||||||
ssn: string; // personnummer
|
|
||||||
genomforandeReferens: number; // genomforandeReferens
|
|
||||||
participationFrequency: number; // deltagandeGrad
|
|
||||||
utforandeVerksamhet: string; // utforandeverksamhet
|
|
||||||
handledareCiamUserId: string;
|
handledareCiamUserId: string;
|
||||||
handledare: string;
|
handledare: string;
|
||||||
receivedTimestamp: Date;
|
receivedTimestamp: Date;
|
||||||
hasGemensamPlanering: boolean;
|
hasGemensamPlanering: boolean;
|
||||||
|
hasAvbrott: boolean;
|
||||||
|
|
||||||
|
ssn: string; // personnummer
|
||||||
|
kommun: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AvropCompactData {
|
export interface AvropAndMeta {
|
||||||
data: AvropCompact[];
|
data: Avrop[];
|
||||||
meta: PaginationMeta;
|
meta: PaginationMeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mapAvropResponseToAvrop(data: AvropResponse): Avrop {
|
export function mapAvropResponseToAvrop(data: AvropResponse): Avrop {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
sokandeId,
|
fullName,
|
||||||
deltagare,
|
tjanst,
|
||||||
tjansteNamn,
|
startDate,
|
||||||
startdatumAvrop,
|
endDate,
|
||||||
slutdatumAvrop,
|
originalEndDate,
|
||||||
tolkbehov,
|
|
||||||
sprakstod,
|
sprakstod,
|
||||||
kommun,
|
tolkbehov,
|
||||||
adress,
|
utforandeAdress,
|
||||||
|
utforandeVerksamhet,
|
||||||
sparkod,
|
sparkod,
|
||||||
personnummer,
|
|
||||||
genomforandeReferens,
|
genomforandeReferens,
|
||||||
deltagandeGrad,
|
participationFrequency,
|
||||||
utforandeverksamhet,
|
receivedTimestamp,
|
||||||
handledareCiamUserId,
|
handledareCiamUserId,
|
||||||
handledare,
|
handledare,
|
||||||
recievedTimestamp,
|
hasAvbrott,
|
||||||
hasGemensamPlanering,
|
hasGemensamPlanering,
|
||||||
|
|
||||||
|
// kommun
|
||||||
|
// personnummer,
|
||||||
} = data;
|
} = data;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
sokandeId,
|
fullName,
|
||||||
fullName: deltagare,
|
tjanst,
|
||||||
tjanst: tjansteNamn,
|
startDate: new Date(startDate),
|
||||||
startDate: new Date(startdatumAvrop),
|
endDate: new Date(endDate),
|
||||||
endDate: new Date(slutdatumAvrop),
|
originalEndDate: new Date(originalEndDate),
|
||||||
tolkbehov: tolkbehov,
|
tolkbehov,
|
||||||
sprakstod: sprakstod,
|
sprakstod,
|
||||||
kommun,
|
utforandeVerksamhet,
|
||||||
utforandeAdress: adress,
|
utforandeAdress,
|
||||||
|
// kommun,
|
||||||
|
kommun: '',
|
||||||
trackCode: sparkod,
|
trackCode: sparkod,
|
||||||
trackName: (TrackName[sparkod] || TrackName.UNKNOWN) as TrackName,
|
trackName: (TrackName[sparkod] || TrackName.UNKNOWN) as TrackName,
|
||||||
ssn: mapStringToSsn(personnummer),
|
// ssn: mapStringToSsn(personnummer),
|
||||||
|
ssn: '',
|
||||||
genomforandeReferens,
|
genomforandeReferens,
|
||||||
participationFrequency: deltagandeGrad,
|
participationFrequency,
|
||||||
utforandeVerksamhet: utforandeverksamhet,
|
handledareCiamUserId,
|
||||||
handledareCiamUserId: handledareCiamUserId,
|
|
||||||
handledare,
|
handledare,
|
||||||
receivedTimestamp: new Date(recievedTimestamp),
|
receivedTimestamp: new Date(receivedTimestamp),
|
||||||
|
hasAvbrott,
|
||||||
hasGemensamPlanering,
|
hasGemensamPlanering,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import { HttpClient } from '@angular/common/http';
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { environment } from '@msfa-environment';
|
import { environment } from '@msfa-environment';
|
||||||
import { AvropFilterResponse } from '@msfa-models/api/avrop-filter.response.model';
|
import { AvropFilterResponse } from '@msfa-models/api/avrop-filter.response.model';
|
||||||
import { AvropApiResponse } from '@msfa-models/api/avrop.response.model';
|
import { AvropAndMetaResponse } from '@msfa-models/api/avrop.response.model';
|
||||||
import { Params } from '@msfa-models/api/params.model';
|
import { Params } from '@msfa-models/api/params.model';
|
||||||
import { AvropFilter, mapResponseToAvropFilter } from '@msfa-models/avrop-filter.model';
|
import { AvropFilter, mapResponseToAvropFilter } from '@msfa-models/avrop-filter.model';
|
||||||
import { AvropCompact, AvropCompactData, mapAvropResponseToAvrop } from '@msfa-models/avrop.model';
|
import { Avrop, AvropAndMeta, mapAvropResponseToAvrop } from '@msfa-models/avrop.model';
|
||||||
import { CustomError, errorToCustomError } from '@msfa-models/error/custom-error';
|
import { CustomError, errorToCustomError } from '@msfa-models/error/custom-error';
|
||||||
import { Handledare } from '@msfa-models/handledare.model';
|
import { Handledare } from '@msfa-models/handledare.model';
|
||||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||||
@@ -16,20 +16,20 @@ import { catchError, filter, map } from 'rxjs/operators';
|
|||||||
})
|
})
|
||||||
export class AvropApiService {
|
export class AvropApiService {
|
||||||
private _apiBaseUrl = `${environment.api.url}/avrop`;
|
private _apiBaseUrl = `${environment.api.url}/avrop`;
|
||||||
private _lockedAvropSnapshot$ = new BehaviorSubject<AvropCompact[]>(null);
|
private _lockedAvropSnapshot$ = new BehaviorSubject<Avrop[]>(null);
|
||||||
private _availableHandledareSnapshot$ = new BehaviorSubject<Handledare[]>(null);
|
private _availableHandledareSnapshot$ = new BehaviorSubject<Handledare[]>(null);
|
||||||
private _showUnauthorizedError$ = new BehaviorSubject<boolean>(false);
|
private _showUnauthorizedError$ = new BehaviorSubject<boolean>(false);
|
||||||
public showUnauthorizedError$: Observable<boolean> = this._showUnauthorizedError$.asObservable();
|
public showUnauthorizedError$: Observable<boolean> = this._showUnauthorizedError$.asObservable();
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient) {}
|
constructor(private httpClient: HttpClient) {}
|
||||||
|
|
||||||
get lockedAvropValue(): AvropCompact[] {
|
get lockedAvropValue(): Avrop[] {
|
||||||
return this._lockedAvropSnapshot$.getValue();
|
return this._lockedAvropSnapshot$.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchAvrop$(params: Params): Observable<AvropCompactData | null> {
|
fetchAvrop$(params: Params): Observable<AvropAndMeta | null> {
|
||||||
return this.httpClient
|
return this.httpClient
|
||||||
.get<AvropApiResponse>(`${this._apiBaseUrl}`, { params })
|
.get<AvropAndMetaResponse>(`${this._apiBaseUrl}`, { params })
|
||||||
.pipe(
|
.pipe(
|
||||||
map(({ data, meta }) => ({ data: data.map(avrop => mapAvropResponseToAvrop(avrop)), meta })),
|
map(({ data, meta }) => ({ data: data.map(avrop => mapAvropResponseToAvrop(avrop)), meta })),
|
||||||
catchError((error: Error & { status: number }) => {
|
catchError((error: Error & { status: number }) => {
|
||||||
@@ -72,7 +72,7 @@ export class AvropApiService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async assignHandledare(avrop: AvropCompact[], handledareId: string): Promise<void> {
|
async assignHandledare(avrop: Avrop[], handledareId: string): Promise<void> {
|
||||||
const params: Params = {
|
const params: Params = {
|
||||||
avropIds: avrop.map(deltagare => deltagare.id),
|
avropIds: avrop.map(deltagare => deltagare.id),
|
||||||
ciamUserId: handledareId,
|
ciamUserId: handledareId,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { AvropParams, Params } from '@msfa-models/api/params.model';
|
import { AvropParams, Params } from '@msfa-models/api/params.model';
|
||||||
import { AvropCompact, AvropCompactData } from '@msfa-models/avrop.model';
|
import { Avrop, AvropAndMeta } from '@msfa-models/avrop.model';
|
||||||
import { Handledare } from '@msfa-models/handledare.model';
|
import { Handledare } from '@msfa-models/handledare.model';
|
||||||
import { AvropApiService } from '@msfa-services/api/avrop-api.service';
|
import { AvropApiService } from '@msfa-services/api/avrop-api.service';
|
||||||
import { MultiselectFilterOption } from '@msfa-shared/components/multiselect/multiselect-filter-option';
|
import { MultiselectFilterOption } from '@msfa-shared/components/multiselect/multiselect-filter-option';
|
||||||
@@ -22,7 +22,7 @@ const DEFAULT_PARAMS: AvropParams = {
|
|||||||
})
|
})
|
||||||
export class AvropService {
|
export class AvropService {
|
||||||
private _params$ = new BehaviorSubject<AvropParams>(DEFAULT_PARAMS);
|
private _params$ = new BehaviorSubject<AvropParams>(DEFAULT_PARAMS);
|
||||||
private _selectedAvrop$ = new BehaviorSubject<AvropCompact[]>([]);
|
private _selectedAvrop$ = new BehaviorSubject<Avrop[]>([]);
|
||||||
private _avropIsLocked$ = new BehaviorSubject<boolean>(null);
|
private _avropIsLocked$ = new BehaviorSubject<boolean>(null);
|
||||||
private _selectedHandledareId$ = new BehaviorSubject<string>(null);
|
private _selectedHandledareId$ = new BehaviorSubject<string>(null);
|
||||||
private _handledareIsConfirmed$ = new BehaviorSubject<boolean>(false);
|
private _handledareIsConfirmed$ = new BehaviorSubject<boolean>(false);
|
||||||
@@ -47,7 +47,7 @@ export class AvropService {
|
|||||||
map(({ filteredKommuner }) => filteredKommuner),
|
map(({ filteredKommuner }) => filteredKommuner),
|
||||||
distinctUntilChanged()
|
distinctUntilChanged()
|
||||||
);
|
);
|
||||||
public selectedAvrop$: Observable<AvropCompact[]> = this._selectedAvrop$.asObservable();
|
public selectedAvrop$: Observable<Avrop[]> = this._selectedAvrop$.asObservable();
|
||||||
public avropIsLocked$: Observable<boolean> = this._avropIsLocked$.asObservable();
|
public avropIsLocked$: Observable<boolean> = this._avropIsLocked$.asObservable();
|
||||||
public selectedHandledare$: Observable<Handledare | null> = this._selectedHandledareId$.pipe(
|
public selectedHandledare$: Observable<Handledare | null> = this._selectedHandledareId$.pipe(
|
||||||
switchMap(handledareId =>
|
switchMap(handledareId =>
|
||||||
@@ -58,7 +58,7 @@ export class AvropService {
|
|||||||
: of(null as null)
|
: of(null as null)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
public avropData$: Observable<AvropCompactData> = combineLatest([this._avropIsSubmitted$, this._params$]).pipe(
|
public avropData$: Observable<AvropAndMeta> = combineLatest([this._avropIsSubmitted$, this._params$]).pipe(
|
||||||
switchMap(() => {
|
switchMap(() => {
|
||||||
this._avropLoading$.next(true);
|
this._avropLoading$.next(true);
|
||||||
return this.avropApiService.fetchAvrop$(this._filtersForAvrop).pipe(
|
return this.avropApiService.fetchAvrop$(this._filtersForAvrop).pipe(
|
||||||
@@ -99,7 +99,7 @@ export class AvropService {
|
|||||||
shareReplay(1)
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
private _lockedAvrop$: Observable<AvropCompact[]> = combineLatest([this.selectedAvrop$, this.avropIsLocked$]).pipe(
|
private _lockedAvrop$: Observable<Avrop[]> = combineLatest([this.selectedAvrop$, this.avropIsLocked$]).pipe(
|
||||||
map(([selectedAvrop, isLocked]) => (isLocked ? selectedAvrop : null))
|
map(([selectedAvrop, isLocked]) => (isLocked ? selectedAvrop : null))
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ export class AvropService {
|
|||||||
|
|
||||||
constructor(private avropApiService: AvropApiService, private handledareApiService: HandledareApiService) {}
|
constructor(private avropApiService: AvropApiService, private handledareApiService: HandledareApiService) {}
|
||||||
|
|
||||||
public setSelectedAvrop(deltagare: AvropCompact[]): void {
|
public setSelectedAvrop(deltagare: Avrop[]): void {
|
||||||
this._selectedAvrop$.next(deltagare);
|
this._selectedAvrop$.next(deltagare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user