fix byte av leverantör

This commit is contained in:
Daniel Appelgren
2021-11-12 14:14:50 +01:00
parent dbb879f47d
commit 71e145f082
7 changed files with 62 additions and 54 deletions

View File

@@ -52,10 +52,15 @@ export interface SlutredovisningFormDataMainOccupationStillUnemployed {
stillUnemployed: SlutredovisningFormDataMainOccupationStillUnemployedDetails;
}
export interface SlutredovisningFormDataMainOccupationChangeVendor {
type: MainOccupation.ByteTillNyLeverantorIRustaOchMatcha;
}
export type SlutredovisningFormDataMainOccupationDetails =
| SlutredovisningFormDataMainOccupationWork
| SlutredovisningFormDataMainOccupationEducation
| SlutredovisningFormDataMainOccupationOther
| SlutredovisningFormDataMainOccupationChangeVendor
| SlutredovisningFormDataMainOccupationStillUnemployed;
export interface SlutredovisningFormData {

View File

@@ -37,16 +37,4 @@
</footer>
</ng-template>
</div>
<!--<ui-loader *ngIf="submitIsLoading$ | async" uiType="absolute"></ui-loader>-->
<!--<msfa-report-description-list [avrop]="avrop">-->
<!-- <dt>Orsak till slutredovisning:</dt>-->
<!-- <dd>bbbb</dd>-->
<!--</msfa-report-description-list>-->
<!--<digi-notification-alert-->
<!-- *ngIf="submitError$ | async as error"-->
<!-- af-variation="danger"-->
<!-- af-heading="Någonting gick fel"-->
<!--&gt;-->
<!-- <p>Kunde inte spara slutredovisning. Ladda om sidan och försök igen.</p>-->
<!-- <p *ngIf="error.message" class="msfa__small-text">{{error.message}}</p>-->
<!--</digi-notification-alert>-->
<pre>{{slutredovisning$|async|json}}</pre>

View File

@@ -24,10 +24,10 @@ export class SlutredovisningFormStep3Component {
submittedDate$ = new BehaviorSubject<Date | null>(null);
slutredovisning$ = this.slutredovisningFormService.yrkeToTextMap$.pipe(
map(yrkeToText => this._appendYrkeNames(this.slutredovisningFormData, yrkeToText))
map(yrkeToText => this._formDataToSlutredovisning(this.slutredovisningFormData, yrkeToText))
);
private _appendYrkeNames(
private _formDataToSlutredovisning(
slutredovisningFormData: SlutredovisningFormData,
yrkeToText: { [key: string]: string }
): Slutredovisning {

View File

@@ -51,40 +51,43 @@
</ng-template>
</div>
<!-- <h2>Step 0 valueChanges:</h2>-->
<!-- <pre>-->
<!-- {{ step0FormGroup.valueChanges | async | json}}-->
<!-- </pre>-->
<!-- <h2>Step 1 valueChanges:</h2>-->
<!-- <pre>-->
<!-- {{ step1FormGroup.valueChanges | async | json}}-->
<!-- </pre>-->
<!-- <h2>Step 2 valueChanges:</h2>-->
<!-- <pre>-->
<!-- {{ step2FormGroup.valueChanges | async | json}}-->
<!-- </pre>-->
<h2>Step 0 valueChanges:</h2>
<pre>
{{ step0FormGroup.valueChanges | async | json}}
</pre
>
<h2>Step 1 valueChanges:</h2>
<pre>
{{ step1FormGroup.valueChanges | async | json}}
</pre
>
<h2>Step 2 valueChanges:</h2>
<pre>
{{ step2FormGroup.valueChanges | async | json}}
</pre
>
<!-- <h2>Step 0 data:</h2>-->
<!-- <pre>-->
<!-- {{step0FormData$ | async | json}}-->
<!-- </pre-->
<!-- >-->
<h2>Step 0 data:</h2>
<pre>
{{step0FormData$ | async | json}}
</pre
>
<!-- <h2>Step 1 data:</h2>-->
<!-- <pre>-->
<!-- {{step1FormData$ | async | json}}-->
<!-- </pre-->
<!-- >-->
<!-- <h2>Step 2 data:</h2>-->
<!-- <pre>-->
<!-- {{step2FormData$ | async | json}}-->
<!-- </pre-->
<!-- >-->
<!-- <h2>requestData$ data:</h2>-->
<!-- <pre>-->
<!-- {{slutredovisning$ | async | json}}-->
<!-- </pre-->
<!-- >-->
<h2>Step 1 data:</h2>
<pre>
{{step1FormData$ | async | json}}
</pre
>
<h2>Step 2 data:</h2>
<pre>
{{step2FormData$ | async | json}}
</pre
>
<h2>slutredovisningFormData$ data:</h2>
<pre>
{{slutredovisningFormData$ | async | json}}
</pre
>
</msfa-report-layout>
</msfa-layout>
<ng-template #skeletonRef>

View File

@@ -1,14 +1,14 @@
import {
SlutredovisningRequest,
SlutredovisningRequestMainOccupationDetails,
} from '@msfa-models/api/slutredovisning.request.model';
import { SlutredovisningRequest } from '@msfa-models/api/slutredovisning.request.model';
import {
Anstallningsform,
MainOccupation,
Omfattning,
StillUnemployedReason,
} from '@msfa-models/slutredovisning.model';
import { SlutredovisningFormData } from '../models/slutredovisning-form-data.model';
import {
SlutredovisningFormData,
SlutredovisningFormDataMainOccupationDetails,
} from '../models/slutredovisning-form-data.model';
import { SlutredovisningStep0FormData } from '../slutredovisning-form-step0/slutredovisning-form-step0.component';
import { SlutredovisningStep1FormData } from '../slutredovisning-form-step1/slutredovisning-form-step1.component';
import { SlutredovisningStep2FormData } from '../slutredovisning-form-step2/slutredovisning-form-step2.component';
@@ -23,7 +23,7 @@ export function formsToSlutredovisningFormData(
return;
}
let mainOccupation: SlutredovisningRequestMainOccupationDetails;
let mainOccupation: SlutredovisningFormDataMainOccupationDetails;
if (step0FormData.mainOccupation === MainOccupation.Other) {
mainOccupation = {
type: MainOccupation.Other,
@@ -73,6 +73,10 @@ export function formsToSlutredovisningFormData(
};
}
if (step0FormData.mainOccupation === MainOccupation.ByteTillNyLeverantorIRustaOchMatcha) {
mainOccupation = { type: MainOccupation.ByteTillNyLeverantorIRustaOchMatcha };
}
return {
genomforandereferens: genomforandereferens,
mainOccupation: mainOccupation,

View File

@@ -51,12 +51,16 @@ export interface SlutredovisningRequestMainOccupationStillUnemployed {
type: MainOccupation.StillUnemployed;
stillUnemployed: SlutredovisningRequestMainOccupationStillUnemployedDetails;
}
export interface SlutredovisningRequestMainOccupationChangeVendor {
type: MainOccupation.ByteTillNyLeverantorIRustaOchMatcha;
}
export type SlutredovisningRequestMainOccupationDetails =
| SlutredovisningRequestMainOccupationWork
| SlutredovisningRequestMainOccupationEducation
| SlutredovisningRequestMainOccupationOther
| SlutredovisningRequestMainOccupationStillUnemployed;
| SlutredovisningRequestMainOccupationStillUnemployed
| SlutredovisningRequestMainOccupationChangeVendor;
export interface SlutredovisningRequest {
genomforandereferens: number;

View File

@@ -53,11 +53,15 @@ export interface SlutredovisningResponseMainOccupationStillUnemployed {
type: MainOccupation.StillUnemployed;
stillUnemployed: SlutredovisningResponseMainOccupationStillUnemployedDetails;
}
export interface SlutredovisningResponseMainOccupationChangeVendor {
type: MainOccupation.ByteTillNyLeverantorIRustaOchMatcha;
}
export type SlutredovisningResponseMainOccupationDetails =
| SlutredovisningResponseMainOccupationWork
| SlutredovisningResponseMainOccupationEducation
| SlutredovisningResponseMainOccupationOther
| SlutredovisningResponseMainOccupationChangeVendor
| SlutredovisningResponseMainOccupationStillUnemployed;
export interface SlutredovisningResponse {