Merge branch 'next' into develop
This commit is contained in:
@@ -51,14 +51,12 @@
|
||||
af-label="Välj handledare att tilldela"
|
||||
af-placeholder="Välj handledare"
|
||||
[afRequired]="true"
|
||||
af-validation="error"
|
||||
af-validation-text="Handledare måste väljas"
|
||||
[afValidation]="(error$ | async) ? 'error' : 'neutral'"
|
||||
(afOnChange)="changeHandledare($event.detail)"
|
||||
>
|
||||
<option
|
||||
*ngFor="let availableHandledare of availableHandledare"
|
||||
[value]="availableHandledare.ciamUserId"
|
||||
>
|
||||
{{ availableHandledare.fullName }}
|
||||
<option *ngFor="let handledare of availableHandledare" [value]="handledare.ciamUserId">
|
||||
{{ handledare.fullName }}
|
||||
</option>
|
||||
</digi-form-select>
|
||||
|
||||
@@ -68,7 +66,7 @@
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<h3>Välj deltagare att tilldela handledare</h3>
|
||||
<h3 *ngIf="currentStep === 1">Välj deltagare att tilldela handledare</h3>
|
||||
<msfa-avrop-list
|
||||
[availableAvrop]="avropData.data"
|
||||
[paginationMeta]="avropData.meta"
|
||||
|
||||
@@ -17,7 +17,7 @@ export class AvropComponent {
|
||||
avropData$: Observable<AvropCompactData> = this.avropService.avropData$;
|
||||
selectedAvrop$: Observable<AvropCompact[]> = this.avropService.selectedAvrop$;
|
||||
availableHandledare$: Observable<Handledare[]> = this.avropService.availableHandledare$;
|
||||
selectedHandledare$: Observable<Handledare> = this.avropService.selectedHandledare$;
|
||||
selectedHandledare$: Observable<Handledare | null> = this.avropService.selectedHandledare$;
|
||||
avropIsLocked$: Observable<boolean> = this.avropService.avropIsLocked$;
|
||||
handledareConfirmed$: Observable<boolean> = this.avropService.handledareIsConfirmed$;
|
||||
avropIsSubmitted$: Observable<boolean> = this.avropService.avropIsSubmitted$;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<digi-typography>
|
||||
<digi-typography *ngIf="avrop">
|
||||
<div
|
||||
class="avrop-row"
|
||||
[ngClass]="{'avrop-row--locked': isLocked, 'avrop-row--deletable': handledareConfirmed && !isSubmitted}"
|
||||
@@ -12,41 +12,38 @@
|
||||
</div>
|
||||
<dl class="avrop-row__name">
|
||||
<dt class="avrop-table__label">Namn:</dt>
|
||||
<dd *ngIf="avrop?.fullName; else emptyText">{{avrop?.fullName}}</dd>
|
||||
<dd *ngIf="avrop.fullName; else emptyText">{{avrop.fullName}}</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__tjanst">
|
||||
<dt class="avrop-table__label">Tjänst:</dt>
|
||||
<dd *ngIf="avrop?.tjanst; else emptyText">{{avrop?.tjanst}}</dd>
|
||||
<dd *ngIf="avrop.tjanst; else emptyText">{{avrop.tjanst}}</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__start">
|
||||
<dt class="avrop-table__label">Startdatum:</dt>
|
||||
<dd>
|
||||
<digi-typography-time
|
||||
*ngIf="avrop?.startDate; else emptyText"
|
||||
[afDateTime]="avrop?.startDate"
|
||||
*ngIf="avrop.startDate; else emptyText"
|
||||
[afDateTime]="avrop.startDate"
|
||||
></digi-typography-time>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__end">
|
||||
<dt class="avrop-table__label">Slutdatum:</dt>
|
||||
<dd>
|
||||
<digi-typography-time
|
||||
*ngIf="avrop?.endDate; else emptyText"
|
||||
[afDateTime]="avrop?.endDate"
|
||||
></digi-typography-time>
|
||||
<digi-typography-time *ngIf="avrop.endDate; else emptyText" [afDateTime]="avrop.endDate"></digi-typography-time>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__translator">
|
||||
<dt class="avrop-table__label">Språkstöd/Tolk:</dt>
|
||||
<dd>{{avrop?.sprakstod || '- '}}/{{avrop?.tolkbehov || ' -'}}</dd>
|
||||
<dd>{{avrop.sprakstod || '- '}}/{{avrop.tolkbehov || ' -'}}</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__address">
|
||||
<dt class="avrop-table__label">Utförande adress:</dt>
|
||||
<dd *ngIf="avrop?.utforandeAdress; else emptyText">{{avrop?.utforandeAdress}}</dd>
|
||||
<dd *ngIf="avrop.utforandeAdress; else emptyText">{{avrop.utforandeAdress}}</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__level">
|
||||
<dt class="avrop-table__label">Spår/nivå:</dt>
|
||||
<dd *ngIf="avrop?.trackCode; else emptyText">{{avrop?.trackCode}}</dd>
|
||||
<dd *ngIf="avrop.trackCode; else emptyText">{{avrop.trackName}}</dd>
|
||||
</dl>
|
||||
<dl class="avrop-row__handledare" *ngIf="isLocked">
|
||||
<dt class="avrop-table__label">Vald handledare:</dt>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export enum TrackName {
|
||||
A012SP1 = 'Nivå A',
|
||||
A012SP2 = 'Nivå B',
|
||||
A012SP3 = 'Nivå C',
|
||||
UNKNOWN = 'Info saknas',
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { TrackName } from '@msfa-enums/track-name.enum';
|
||||
import { AvropResponse } from './api/avrop.response.model';
|
||||
import { PaginationMeta } from './pagination-meta.model';
|
||||
|
||||
@@ -59,7 +60,7 @@ export function mapAvropResponseToAvrop(data: AvropResponse): Avrop {
|
||||
sprakstod: sprakstod,
|
||||
utforandeAdress: adress,
|
||||
trackCode: sparkod,
|
||||
trackName: sparNamn,
|
||||
trackName: TrackName[sparkod] || TrackName.UNKNOWN,
|
||||
genomforandeReferens,
|
||||
participationFrequency: deltagandeGrad,
|
||||
utforandeVerksamhet: utforandeverksamhet,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AvropCompact, AvropCompactData } from '@msfa-models/avrop.model';
|
||||
import { Handledare } from '@msfa-models/handledare.model';
|
||||
import { AvropApiService } from '@msfa-services/api/avrop-api.service';
|
||||
import { MultiselectFilterOption } from '@msfa-shared/components/multiselect/multiselect-filter-option';
|
||||
import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
|
||||
import { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';
|
||||
import { filter, map, switchMap, tap } from 'rxjs/operators';
|
||||
|
||||
type Step = 1 | 2 | 3 | 4;
|
||||
@@ -34,12 +34,13 @@ export class AvropService {
|
||||
public filteredKommuner$: Observable<MultiselectFilterOption[]> = this._filteredKommuner$.asObservable();
|
||||
public selectedAvrop$: Observable<AvropCompact[]> = this._selectedAvrop$.asObservable();
|
||||
public avropIsLocked$: Observable<boolean> = this._avropIsLocked$.asObservable();
|
||||
public selectedHandledare$: Observable<Handledare> = this._selectedHandledareId$.pipe(
|
||||
filter(selectedHandledare => !!selectedHandledare),
|
||||
public selectedHandledare$: Observable<Handledare | null> = this._selectedHandledareId$.pipe(
|
||||
switchMap(handledareId =>
|
||||
this.availableHandledare$.pipe(
|
||||
map(availableHandledare => availableHandledare.find(handledare => handledare.ciamUserId === handledareId))
|
||||
)
|
||||
handledareId
|
||||
? this.availableHandledare$.pipe(
|
||||
map(availableHandledare => availableHandledare.find(handledare => handledare.ciamUserId === handledareId))
|
||||
)
|
||||
: of(null as null)
|
||||
)
|
||||
);
|
||||
public handledareIsConfirmed$: Observable<boolean> = this._handledareIsConfirmed$.asObservable();
|
||||
@@ -201,6 +202,7 @@ export class AvropService {
|
||||
|
||||
public unconfirmHandledare(): void {
|
||||
this.resetError();
|
||||
this._selectedHandledareId$.next(null);
|
||||
this._handledareIsConfirmed$.next(false);
|
||||
}
|
||||
|
||||
@@ -221,6 +223,7 @@ export class AvropService {
|
||||
}
|
||||
|
||||
public assignHandledare(handledareId: string): void {
|
||||
this.resetError();
|
||||
this._selectedHandledareId$.next(handledareId);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
- **deltagare:** Now fetching data using "genomforandeReferens" instead of "sokandeId" to avoid wrong data. [TV-692](https://jira.arbetsformedlingen.se/browse/TV-692)
|
||||
- **authorization:** Whenever the API throws a "403 Forbidden" error we now show an unauthorized message. [TV-695](https://jira.arbetsformedlingen.se/browse/TV-695)
|
||||
- **avrop:** Now showing spårnamn instead of spårkod inside avrop. [TV-691](https://jira.arbetsformedlingen.se/browse/TV-691)
|
||||
- **avrop:** Fixed error-state on handledare select. [TV-699](https://jira.arbetsformedlingen.se/browse/TV-699)
|
||||
|
||||
## [2.0.0](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web/compare/diff?targetBranch=refs%2Ftags%2Fv1.5.0&sourceBranch=refs%2Ftags%2Fv2.0.0) (2021-09-24)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user