generated from Tailormap/tailormap-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes validation, allow to modify geometry
- Loading branch information
1 parent
fc40c95
commit ba85f67
Showing
11 changed files
with
446 additions
and
268 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
projects/planmonitor-wonen/src/lib/helpers/plan-validation.helper.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,34 @@ | ||
import { PlanregistratieModel } from '../models'; | ||
|
||
export class PlanValidationHelper { | ||
|
||
public static validatePlan(planRegistratie: PlanregistratieModel) { | ||
if ( | ||
PlanValidationHelper.hasInvalidValue(planRegistratie.Vertrouwelijkheid) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Opdrachtgever_Type) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Jaar_Start_Project) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Oplevering_Eerste) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Oplevering_Laatste) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Plantype) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Status_Project) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Status_Planologisch) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Knelpunten_Meerkeuze) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Regionale_Planlijst) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Toelichting_Knelpunten) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Flexwoningen) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Levensloopbestendig_Ja) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Levensloopbestendig_Nee) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Beoogd_Woonmilieu_ABF5) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Beoogd_Woonmilieu_ABF13) | ||
|| PlanValidationHelper.hasInvalidValue(planRegistratie.Aantal_Studentenwoningen) | ||
) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
private static hasInvalidValue(value: number | string | null | undefined) { | ||
return typeof value === "undefined" || value === null; | ||
} | ||
|
||
} |
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
26 changes: 26 additions & 0 deletions
26
projects/planmonitor-wonen/src/lib/models/categorie-table-row.model.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,26 @@ | ||
import { PlancategorieModel } from './index'; | ||
|
||
export interface CategorieTableRowModel { | ||
id: string; | ||
cls: string; | ||
groep: keyof PlancategorieModel; | ||
value: string; | ||
label: string; | ||
groeplabel: string; | ||
totalen: number; | ||
total_check: number; | ||
gerealiseerd: number; | ||
restcapaciteit: number; | ||
year_2024: number | string; | ||
year_2025: number | string; | ||
year_2026: number | string; | ||
year_2027: number | string; | ||
year_2028: number | string; | ||
year_2029: number | string; | ||
year_2030: number | string; | ||
year_2031: number | string; | ||
year_2032: number | string; | ||
year_2033: number | string; | ||
years_check: number; | ||
valid: boolean; | ||
} |
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
Oops, something went wrong.