-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New government forms migration (#1640)
* Bump form definition versions and set all Slovensko.sk forms to `newGovernmentXml` * Handle special case of tax form in ConvertService * Add JsonVersion to new Slovensko.sk XMLs * Bump also "Žiadosť o nájom bytu" pospVersion as it needs to be regenerated too to include JsonVersion --------- Co-authored-by: Marek Bodinger <marek.bodinger@gmail.com>
- Loading branch information
1 parent
129c99a
commit abd1bf1
Showing
8 changed files
with
92 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 31 additions & 15 deletions
46
forms-shared/tests/slovensko-sk/__snapshots__/slovenskoSkForm.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { FormDefinitionSlovenskoSkTax } from 'forms-shared/definitions/formDefinitionTypes' | ||
|
||
/** | ||
* Tax form is a special case, as the only usage of ConvertService in its case is when user imports/exports the XML via | ||
* user interface. Currently, the form that is sent to NASES has different posp* (than this new one). The tax form will | ||
* be migrated to the new posp* in the future. In order to provide users the possibility to import the form, the exported | ||
* XML will already contain the new posp* (after the migration this patch will be removed, but the forms will be importable). | ||
* | ||
* Before this patch, the generated XML had the old posp*, but contained the "importable" data shape, not the one that | ||
* is sent to NASES. | ||
*/ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const patchConvertServiceTaxFormDefinition = ( | ||
formDefinition: FormDefinitionSlovenskoSkTax, | ||
): FormDefinitionSlovenskoSkTax => ({ | ||
...formDefinition, | ||
pospID: '00603481.priznanieKDaniZNehnutelnosti', | ||
pospVersion: '1.0', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters