-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NRPT-295: Added ERA csv importer (#791)
* NRPT-295: Added ERA csv importer * fixed unit tests * cleanup * linting bug * linting bug * added record name, and required fields * swapped client name from fullName to firstName
- Loading branch information
Showing
25 changed files
with
933 additions
and
26 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
56 changes: 56 additions & 0 deletions
56
angular/projects/admin-nrpti/src/app/utils/constants/era-csv-constants.ts
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,56 @@ | ||
import { IRequiredFormat, IDateField } from './csv-constants'; | ||
|
||
/** | ||
* Expected headers for ALC Inspection csv. | ||
* | ||
* Note: sort order and letter case of headers is not important. | ||
*/ | ||
export const eraTicketsCsvRequiredHeaders = [ | ||
'CASE_CONTRAVENTION_ID', | ||
'ENFORCEMENT_ACTION_ID', | ||
'FC_CLIENT_NAME', | ||
'ACT_DESCRIPTION', | ||
'REG_DESCRIPTION', | ||
'SECTION', | ||
'SUB_SECTION', | ||
'PARAGRAPH', | ||
'ARTICLE_DESCRIPTION', | ||
'FINE_AMOUNT', | ||
'SERVICE_DATE', | ||
'REGION', | ||
'ORG_UNIT_NAME', | ||
'CLIENT_TYPE_CODE' | ||
]; | ||
|
||
/** | ||
* Required fields for ALC Inspection csv. | ||
* | ||
*/ | ||
export const eraTicketsCsvRequiredFields = [ | ||
'CASE_CONTRAVENTION_ID', | ||
'ENFORCEMENT_ACTION_ID', | ||
'FC_CLIENT_NAME', | ||
'ACT_DESCRIPTION', | ||
'SECTION', | ||
'ARTICLE_DESCRIPTION', | ||
'FINE_AMOUNT', | ||
'SERVICE_DATE', | ||
'ORG_UNIT_NAME', | ||
'CLIENT_TYPE_CODE' | ||
]; | ||
|
||
/** | ||
* Fields for ALC Inspection csv that have a required format. | ||
* | ||
* @type {IRequiredFormat[]} | ||
*/ | ||
export const eraTicketsCsvRequiredFormats: IRequiredFormat[] = [ | ||
{ field: 'SERVICE_DATE', type: 'date', format: 'MM/DD/YYYY' } | ||
]; | ||
|
||
/** | ||
* Fields for ALC Inspection csv that represent dates. | ||
* | ||
* @type {IDateField[]} | ||
*/ | ||
export const eraTicketsCsvDateFields: IDateField[] = [{ field: 'SERVICE_DATE', format: 'MM/DD/YYYY' }]; |
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
Oops, something went wrong.