lot name pattern
parent
3e42fa5e78
commit
6877b3c630
|
|
@ -1,6 +1,7 @@
|
|||
import { config as cemeteryConfig } from "./config.cemetery.ontario.js";
|
||||
export const config = Object.assign({}, cemeteryConfig);
|
||||
config.settings.lot = {
|
||||
lotNamePattern: /^[A-Z]{2}(-\d*[A-Z]?){3,5}$/,
|
||||
lotNameSortNameFunction: (lotName) => {
|
||||
const numericPadding = "00000";
|
||||
const lotNameSplit = lotName.toUpperCase().split("-");
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
export const config = Object.assign({}, cemeteryConfig);
|
||||
|
||||
config.settings.lot = {
|
||||
lotNamePattern: /^[A-Z]{2}(-\d*[A-Z]?){3,5}$/,
|
||||
lotNameSortNameFunction: (lotName) => {
|
||||
|
||||
const numericPadding = "00000";
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export declare function getProperty(propertyName: "aliases.occupants"): string;
|
|||
export declare function getProperty(propertyName: "aliases.externalReceiptNumber"): string;
|
||||
export declare function getProperty(propertyName: "settings.map.mapCityDefault"): string;
|
||||
export declare function getProperty(propertyName: "settings.map.mapProvinceDefault"): string;
|
||||
export declare function getProperty(propertyName: "settings.lot.lotNamePattern"): RegExp;
|
||||
export declare function getProperty(propertyName: "settings.lot.lotNameSortNameFunction"): (lotName: string) => string;
|
||||
export declare function getProperty(propertyName: "settings.lotOccupancy.occupancyEndDateIsRequired"): boolean;
|
||||
export declare function getProperty(propertyName: "settings.lotOccupancy.occupantCityDefault"): string;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export function getProperty(propertyName: "aliases.externalReceiptNumber"): stri
|
|||
export function getProperty(propertyName: "settings.map.mapCityDefault"): string;
|
||||
export function getProperty(propertyName: "settings.map.mapProvinceDefault"): string;
|
||||
|
||||
export function getProperty(propertyName: "settings.lot.lotNamePattern"): RegExp;
|
||||
export function getProperty(propertyName: "settings.lot.lotNameSortNameFunction"): (lotName: string) => string;
|
||||
|
||||
export function getProperty(propertyName: "settings.lotOccupancy.occupancyEndDateIsRequired"): boolean;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export interface Config {
|
|||
mapProvinceDefault?: string;
|
||||
};
|
||||
lot?: {
|
||||
lotNamePattern?: RegExp;
|
||||
lotNameSortNameFunction?: (lotName: string) => string;
|
||||
};
|
||||
lotOccupancy?: {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export interface Config {
|
|||
mapProvinceDefault ? : string;
|
||||
};
|
||||
lot ? : {
|
||||
lotNamePattern ? : RegExp;
|
||||
lotNameSortNameFunction ? : (lotName: string) => string;
|
||||
};
|
||||
lotOccupancy ? : {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@
|
|||
</label>
|
||||
<div class="control">
|
||||
<input class="input" id="lot--lotName" name="lotName" value="<%= lot.lotName %>" maxlength="100" required />
|
||||
<input class="input" id="lot--lotName" name="lotName" value="<%= lot.lotName %>"
|
||||
<% if (configFunctions.getProperty("settings.lot.lotNamePattern")) { %>
|
||||
pattern="<%= configFunctions.getProperty("settings.lot.lotNamePattern").source %>"
|
||||
<% } %>
|
||||
maxlength="100"
|
||||
required />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue