Skip to content

Commit

Permalink
Add geocoding errors to task
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed May 2, 2024
1 parent ee53486 commit 5ef71bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export class SourcingDataImportService {
if (errors.length) {
throw new GeoCodingError(
'Import failed. There are GeoCoding errors present in the file',
errors,
);
}
const warnings: string[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class ExcelValidatorService {
}

private setLineNumber(index: number, sheetName: SheetName): number {
return sheetName === 'sourcingData' ? index + 5 : index + 1;
return sheetName === 'sourcingData' ? index + 5 : index + 2;
}

private getProgressTracker(sheet: Sheet): ValidationProgressTracker {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ export class SourcingDataSheetValidator {
@IsNotEmpty({
message: 'location type input is required',
})
@IsEnum(
Object.values(LOCATION_TYPES).map((s: string) => s.replace(/-/g, ' ')),
{
message: `Available columns for new location type: ${Object.values(
LOCATION_TYPES,
).join(', ')}`,
},
)
@IsEnum(Object.values(LOCATION_TYPES), {
message: `Available columns for new location type: ${Object.values(
LOCATION_TYPES,
).join(', ')}`,
})
'location_type': LOCATION_TYPES;

@IsNotEmpty({
Expand Down

0 comments on commit 5ef71bb

Please sign in to comment.