-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/refaktorering ettersending #1479
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lag gjerne versjonert tjeneste som fyllut-ettersending kan bruke (eller sørg for bakoverkompatibilitet på en annen måte)
9bde040
to
28665b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Husk å opprette en trello-oppgave for å fjerne bakoverkompatibel kode når alle skjemaer er oppdatert med nytt format
@@ -341,7 +341,7 @@ describe('Migration scripts', () => { | |||
...originalForm.properties, | |||
skjemanummer: 'Form1', | |||
submissionTypes: ['DIGITAL'], | |||
ettersending: undefined, | |||
subsequentSubmissionTypes: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default verdi er ['PAPER', 'DIGITAL']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🪴 🐐
@@ -11,15 +11,18 @@ const createHeaders = (accessToken?: string, revisionId?: number) => { | |||
}; | |||
}; | |||
|
|||
export const removeInnsendingFromForm = (form: Form): Form => { | |||
const formProperties = (({ innsending, ...rest }) => rest)(form.properties); | |||
export const removeInnsendingTypeFromForm = (form: Form): Form => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vurder å legge til kommentar her for å forklare at denne funksjonen er her for å støtte bakoverkompatibilitet og kan fjernes når alle skjemadefinisjoner er oppdatert.
@@ -3375,6 +3375,7 @@ | |||
"skjemanummer": "TST-123456", | |||
"tema": "DAG", | |||
"submissionTypes": ["PAPER", "DIGITAL"], | |||
"subsequentSubmissionTypes": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"subsequentSubmissionTypes": [], | |
"subsequentSubmissionTypes": ["PAPER", "DIGITAL"], |
@@ -3508,6 +3508,7 @@ | |||
"skjemanummer": "TST-123456", | |||
"tema": "DAG", | |||
"submissionTypes": ["PAPER", "DIGITAL"], | |||
"subsequentSubmissionTypes": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"subsequentSubmissionTypes": [], | |
"subsequentSubmissionTypes": ["PAPER", "DIGITAL"], |
@@ -50,8 +50,9 @@ const mapLimitedForm = (form: NavFormType, translate: TranslateFunction) => { | |||
properties: { | |||
skjemanummer: form.properties.skjemanummer, | |||
tema: form.properties.tema, | |||
innsending: form.properties.innsending, | |||
submissionTypes: form.properties.submissionTypes, | |||
ettersending: form.properties.ettersending, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skal innsending ligge her?
innsending og ettersending bør fjernes når fyllut-ettersending er oppdatert
@@ -10,7 +10,7 @@ const mapForm = (form): FormsResponseForm => ({ | |||
properties: { | |||
skjemanummer: form.skjemanummer ?? form.properties.skjemanummer, | |||
submissionTypes: form.properties.submissionTypes, | |||
ettersending: form.properties.ettersending, | |||
subsequentSubmissionTypes: form.properties.subsequentSubmissionTypes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bør denne ha ettersending i tillegg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌮 🌮 🌮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌮 🌮 🌮
submissionTypes: | ||
form.properties.submissionTypes ?? mapInnsendingTypeToSubmissionTypes(form.properties.innsending), | ||
subsequentSubmissionTypes: | ||
form.properties.subsequentSubmissionTypes ?? mapInnsendingTypeToSubmissionTypes(form.properties.ettersending), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legg til en sjekk før vi kjører mapInnsendingTypeToSubmission
. Hvis form.properties.ettersending er undefined, setter vi ['PAPER', 'DIGITAL'], ellers gjør vi mapping.
da9e5d3
to
648dd28
Compare
648dd28
to
feb6b4e
Compare
feb6b4e
to
27af1d4
Compare
No description provided.