diff --git a/public-typescript/main.js b/public-typescript/main.js index ee73a2ff..8779979f 100644 --- a/public-typescript/main.js +++ b/public-typescript/main.js @@ -105,7 +105,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); }); // Disable html scrolling when calendar is open cal.on('show', () => { - document.querySelector('html').classList.add('is-clipped'); + var _a; + (_a = document.querySelector('html')) === null || _a === void 0 ? void 0 : _a.classList.add('is-clipped'); }); // Reenable scrolling, if a modal window is not open cal.on('hide', () => { diff --git a/public-typescript/main.ts b/public-typescript/main.ts index 34d33a22..875dd9e5 100644 --- a/public-typescript/main.ts +++ b/public-typescript/main.ts @@ -173,7 +173,7 @@ declare const exports: Record & { // Disable html scrolling when calendar is open cal.on('show', () => { - document.querySelector('html')!.classList.add('is-clipped') + document.querySelector('html')?.classList.add('is-clipped') }) // Reenable scrolling, if a modal window is not open @@ -184,7 +184,7 @@ declare const exports: Record & { // Get the datepicker container element const datepickerElement = containerElement.querySelector( `#${cal._id as string}` - )! + ) as HTMLElement // Override the previous and next month button styles const datePickerNavButtonElements = datepickerElement.querySelectorAll( diff --git a/public/javascripts/main.min.js b/public/javascripts/main.min.js index 5cc2ab6f..0ce5bcb0 100644 --- a/public/javascripts/main.min.js +++ b/public/javascripts/main.min.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{var e,t,s,a;let o=!1;function n(){return o}function i(e){const t=e.currentTarget.closest(".field").querySelector("input, select");if(t.classList.remove("is-readonly"),"INPUT"===t.tagName)t.readOnly=!1,t.disabled=!1;else{const e=t.querySelectorAll("option");for(const t of e)t.disabled=!1}t.focus()}const c={type:"date",dateFormat:"yyyy-MM-dd",showFooter:!1,color:"info",displayMode:"dialog"};const r=Object.freeze({Map:cityssm.escapeHTML(exports.aliases.map),map:cityssm.escapeHTML(exports.aliases.map.toLowerCase()),Maps:cityssm.escapeHTML(exports.aliases.maps),maps:cityssm.escapeHTML(exports.aliases.maps.toLowerCase()),Lot:cityssm.escapeHTML(exports.aliases.lot),lot:cityssm.escapeHTML(exports.aliases.lot.toLowerCase()),Lots:cityssm.escapeHTML(exports.aliases.lots),lots:cityssm.escapeHTML(exports.aliases.lots.toLowerCase()),Occupancy:cityssm.escapeHTML(exports.aliases.occupancy),occupancy:cityssm.escapeHTML(exports.aliases.occupancy.toLowerCase()),Occupancies:cityssm.escapeHTML(exports.aliases.occupancies),occupancies:cityssm.escapeHTML(exports.aliases.occupancies.toLowerCase()),Occupant:cityssm.escapeHTML(exports.aliases.occupant),occupant:cityssm.escapeHTML(exports.aliases.occupant.toLowerCase()),Occupants:cityssm.escapeHTML(exports.aliases.occupants),occupants:cityssm.escapeHTML(exports.aliases.occupants.toLowerCase()),ExternalReceiptNumber:cityssm.escapeHTML(exports.aliases.externalReceiptNumber),externalReceiptNumber:cityssm.escapeHTML(exports.aliases.externalReceiptNumber.toLowerCase()),OccupancyStartDate:cityssm.escapeHTML(exports.aliases.occupancyStartDate),occupancyStartDate:cityssm.escapeHTML(exports.aliases.occupancyStartDate.toLowerCase()),WorkOrderOpenDate:cityssm.escapeHTML(exports.aliases.workOrderOpenDate),workOrderOpenDate:cityssm.escapeHTML(exports.aliases.workOrderOpenDate.toLowerCase()),WorkOrderCloseDate:cityssm.escapeHTML(exports.aliases.workOrderCloseDate),workOrderCloseDate:cityssm.escapeHTML(exports.aliases.workOrderCloseDate.toLowerCase())}),l=["red","green","orange","blue","pink","yellow","purple"],p=["bright","light","dark"];const u=null!==(t=null===(e=document.querySelector("main"))||void 0===e?void 0:e.dataset.urlPrefix)&&void 0!==t?t:"";function d(e,t,s,a){return u+"/"+e+(t?"/"+t.toString():"")+(t&&s?"/edit":"")+(a?"/?t="+Date.now().toString():"")}const y=exports.dynamicsGPIntegrationIsEnabled,m={urlPrefix:u,apiKey:null!==(a=null===(s=document.querySelector("main"))||void 0===s?void 0:s.dataset.apiKey)&&void 0!==a?a:"",dynamicsGPIntegrationIsEnabled:y,highlightMap:function(e,t,s){let a,o=t;for(;null===(a=e.querySelector("#"+o))&&o.includes("-");)o=o.slice(0,Math.max(0,o.lastIndexOf("-")));if(null!==a){a.style.fill="",a.classList.add("highlight","is-"+s);const e=a.querySelectorAll("path");for(const t of e)t.style.fill=""}},initializeUnlockFieldButtons:function(e){const t=e.querySelectorAll(".is-unlock-field-button");for(const e of t)e.addEventListener("click",i)},initializeDatePickers:function(e){var t,s,a;const o=e.querySelectorAll("input[type='date']");for(const n of o){const o=Object.assign({},c);n.required&&(o.showClearButton=!1),""!==n.min&&(o.minDate=cityssm.dateStringToDate(n.min)),""!==n.max&&(o.maxDate=cityssm.dateStringToDate(n.max));const i=exports.bulmaCalendar.attach(n,o)[0];i.on("save",()=>{n.value=i.value(),n.dispatchEvent(new Event("change"))}),i.on("show",()=>{document.querySelector("html").classList.add("is-clipped")}),i.on("hide",()=>{bulmaJS.toggleHtmlClipped()});const r=e.querySelector(`#${i._id}`),l=r.querySelectorAll(".datepicker-nav button.is-text");for(const e of l)e.classList.add(`is-${null!==(t=c.color)&&void 0!==t?t:""}`),e.classList.remove("is-text");const p=r.querySelector(".datetimepicker-clear-button");null!==p&&(n.required?p.remove():(p.dataset.tooltip="Clear",p.setAttribute("aria-label","Clear"),p.innerHTML=''));const u=document.querySelector("label[for='"+n.id+"']");null!==u&&(null===(s=r.querySelector(".datetimepicker-dummy-input"))||void 0===s||s.setAttribute("aria-label",null!==(a=u.textContent)&&void 0!==a?a:""))}},populateAliases:function(e){const t=e.querySelectorAll(".alias");for(const e of t)switch(e.dataset.alias){case"Map":e.textContent=exports.aliases.map;break;case"Lot":e.textContent=exports.aliases.lot;break;case"lot":e.textContent=exports.aliases.lot.toLowerCase();break;case"Occupancy":e.textContent=exports.aliases.occupancy;break;case"occupancy":e.textContent=exports.aliases.occupancy.toLowerCase();break;case"Occupant":e.textContent=exports.aliases.occupant;break;case"occupant":e.textContent=exports.aliases.occupant.toLowerCase();break;case"ExternalReceiptNumber":e.textContent=exports.aliases.externalReceiptNumber}},escapedAliases:r,getRandomColor:function(e){let t=e;return t.length<2&&(t+="a1"),exports.randomColor({seed:t+t,hue:l[t.codePointAt(t.length-1)%l.length],luminosity:p[t.codePointAt(t.length-2)%p.length]})},setUnsavedChanges:function(){n()||(o=!0,cityssm.enableNavBlocker())},clearUnsavedChanges:function(){o=!1,cityssm.disableNavBlocker()},hasUnsavedChanges:n,getMoveUpDownButtonFieldHTML:function(e,t,s=!0){return`
\n
\n \n \n \n
\n
\n \n \n \n
\n
`},getLoadingParagraphHTML:function(e="Loading..."){return`

\n
\n ${cityssm.escapeHTML(e)}\n

`},getSearchResultsPagerHTML:function(e,t,s){return'
Displaying '+(t+1).toString()+" to "+Math.min(s,e+t).toString()+" of "+s.toString()+'
'+(t>0?'
\n \n
':"")+(e+t\n \n
':"")+"
"},getMapURL:function(e="",t=!1,s=!1){return d("maps",e,t,s)},getLotURL:function(e="",t=!1,s=!1){return d("lots",e,t,s)},getLotOccupancyURL:function(e="",t=!1,s=!1){return d("lotOccupancies",e,t,s)},getWorkOrderURL:function(e="",t=!1,s=!1){return d("workOrders",e,t,s)}};exports.los=m})(); \ No newline at end of file +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{var e,t,s,a;let o=!1;function n(){return o}function i(e){const t=e.currentTarget.closest(".field").querySelector("input, select");if(t.classList.remove("is-readonly"),"INPUT"===t.tagName)t.readOnly=!1,t.disabled=!1;else{const e=t.querySelectorAll("option");for(const t of e)t.disabled=!1}t.focus()}const c={type:"date",dateFormat:"yyyy-MM-dd",showFooter:!1,color:"info",displayMode:"dialog"};const r=Object.freeze({Map:cityssm.escapeHTML(exports.aliases.map),map:cityssm.escapeHTML(exports.aliases.map.toLowerCase()),Maps:cityssm.escapeHTML(exports.aliases.maps),maps:cityssm.escapeHTML(exports.aliases.maps.toLowerCase()),Lot:cityssm.escapeHTML(exports.aliases.lot),lot:cityssm.escapeHTML(exports.aliases.lot.toLowerCase()),Lots:cityssm.escapeHTML(exports.aliases.lots),lots:cityssm.escapeHTML(exports.aliases.lots.toLowerCase()),Occupancy:cityssm.escapeHTML(exports.aliases.occupancy),occupancy:cityssm.escapeHTML(exports.aliases.occupancy.toLowerCase()),Occupancies:cityssm.escapeHTML(exports.aliases.occupancies),occupancies:cityssm.escapeHTML(exports.aliases.occupancies.toLowerCase()),Occupant:cityssm.escapeHTML(exports.aliases.occupant),occupant:cityssm.escapeHTML(exports.aliases.occupant.toLowerCase()),Occupants:cityssm.escapeHTML(exports.aliases.occupants),occupants:cityssm.escapeHTML(exports.aliases.occupants.toLowerCase()),ExternalReceiptNumber:cityssm.escapeHTML(exports.aliases.externalReceiptNumber),externalReceiptNumber:cityssm.escapeHTML(exports.aliases.externalReceiptNumber.toLowerCase()),OccupancyStartDate:cityssm.escapeHTML(exports.aliases.occupancyStartDate),occupancyStartDate:cityssm.escapeHTML(exports.aliases.occupancyStartDate.toLowerCase()),WorkOrderOpenDate:cityssm.escapeHTML(exports.aliases.workOrderOpenDate),workOrderOpenDate:cityssm.escapeHTML(exports.aliases.workOrderOpenDate.toLowerCase()),WorkOrderCloseDate:cityssm.escapeHTML(exports.aliases.workOrderCloseDate),workOrderCloseDate:cityssm.escapeHTML(exports.aliases.workOrderCloseDate.toLowerCase())}),l=["red","green","orange","blue","pink","yellow","purple"],p=["bright","light","dark"];const u=null!==(t=null===(e=document.querySelector("main"))||void 0===e?void 0:e.dataset.urlPrefix)&&void 0!==t?t:"";function d(e,t,s,a){return u+"/"+e+(t?"/"+t.toString():"")+(t&&s?"/edit":"")+(a?"/?t="+Date.now().toString():"")}const y=exports.dynamicsGPIntegrationIsEnabled,m={urlPrefix:u,apiKey:null!==(a=null===(s=document.querySelector("main"))||void 0===s?void 0:s.dataset.apiKey)&&void 0!==a?a:"",dynamicsGPIntegrationIsEnabled:y,highlightMap:function(e,t,s){let a,o=t;for(;null===(a=e.querySelector("#"+o))&&o.includes("-");)o=o.slice(0,Math.max(0,o.lastIndexOf("-")));if(null!==a){a.style.fill="",a.classList.add("highlight","is-"+s);const e=a.querySelectorAll("path");for(const t of e)t.style.fill=""}},initializeUnlockFieldButtons:function(e){const t=e.querySelectorAll(".is-unlock-field-button");for(const e of t)e.addEventListener("click",i)},initializeDatePickers:function(e){var t,s,a;const o=e.querySelectorAll("input[type='date']");for(const n of o){const o=Object.assign({},c);n.required&&(o.showClearButton=!1),""!==n.min&&(o.minDate=cityssm.dateStringToDate(n.min)),""!==n.max&&(o.maxDate=cityssm.dateStringToDate(n.max));const i=exports.bulmaCalendar.attach(n,o)[0];i.on("save",()=>{n.value=i.value(),n.dispatchEvent(new Event("change"))}),i.on("show",()=>{var e;null===(e=document.querySelector("html"))||void 0===e||e.classList.add("is-clipped")}),i.on("hide",()=>{bulmaJS.toggleHtmlClipped()});const r=e.querySelector(`#${i._id}`),l=r.querySelectorAll(".datepicker-nav button.is-text");for(const e of l)e.classList.add(`is-${null!==(t=c.color)&&void 0!==t?t:""}`),e.classList.remove("is-text");const p=r.querySelector(".datetimepicker-clear-button");null!==p&&(n.required?p.remove():(p.dataset.tooltip="Clear",p.setAttribute("aria-label","Clear"),p.innerHTML=''));const u=document.querySelector("label[for='"+n.id+"']");null!==u&&(null===(s=r.querySelector(".datetimepicker-dummy-input"))||void 0===s||s.setAttribute("aria-label",null!==(a=u.textContent)&&void 0!==a?a:""))}},populateAliases:function(e){const t=e.querySelectorAll(".alias");for(const e of t)switch(e.dataset.alias){case"Map":e.textContent=exports.aliases.map;break;case"Lot":e.textContent=exports.aliases.lot;break;case"lot":e.textContent=exports.aliases.lot.toLowerCase();break;case"Occupancy":e.textContent=exports.aliases.occupancy;break;case"occupancy":e.textContent=exports.aliases.occupancy.toLowerCase();break;case"Occupant":e.textContent=exports.aliases.occupant;break;case"occupant":e.textContent=exports.aliases.occupant.toLowerCase();break;case"ExternalReceiptNumber":e.textContent=exports.aliases.externalReceiptNumber}},escapedAliases:r,getRandomColor:function(e){let t=e;return t.length<2&&(t+="a1"),exports.randomColor({seed:t+t,hue:l[t.codePointAt(t.length-1)%l.length],luminosity:p[t.codePointAt(t.length-2)%p.length]})},setUnsavedChanges:function(){n()||(o=!0,cityssm.enableNavBlocker())},clearUnsavedChanges:function(){o=!1,cityssm.disableNavBlocker()},hasUnsavedChanges:n,getMoveUpDownButtonFieldHTML:function(e,t,s=!0){return`
\n
\n \n \n \n
\n
\n \n \n \n
\n
`},getLoadingParagraphHTML:function(e="Loading..."){return`

\n
\n ${cityssm.escapeHTML(e)}\n

`},getSearchResultsPagerHTML:function(e,t,s){return'
Displaying '+(t+1).toString()+" to "+Math.min(s,e+t).toString()+" of "+s.toString()+'
'+(t>0?'
\n \n
':"")+(e+t\n \n
':"")+"
"},getMapURL:function(e="",t=!1,s=!1){return d("maps",e,t,s)},getLotURL:function(e="",t=!1,s=!1){return d("lots",e,t,s)},getLotOccupancyURL:function(e="",t=!1,s=!1){return d("lotOccupancies",e,t,s)},getWorkOrderURL:function(e="",t=!1,s=!1){return d("workOrders",e,t,s)}};exports.los=m})(); \ No newline at end of file diff --git a/views/print/pdf/ssm.cemetery.contract.ejs b/views/print/pdf/ssm.cemetery.contract.ejs index c10bdcaa..7689487e 100644 --- a/views/print/pdf/ssm.cemetery.contract.ejs +++ b/views/print/pdf/ssm.cemetery.contract.ejs @@ -105,78 +105,78 @@ -
-

Purchaser

- - - + + - + + + + + + + + + +
+

Purchaser

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name: + <%= purchaser ? purchaser.occupantName + ' ' + purchaser.occupantFamilyName : "" %> +
Address:<%= purchaser ? purchaser.occupantAddress1 : "" %> 
<%= purchaser ? purchaser.occupantAddress2 : "" %> 
City:<%= purchaser ? purchaser.occupantCity : "" %> 
Province:<%= purchaser ? purchaser.occupantProvince : "" %> 
Postal Code:<%= purchaser ? purchaser.occupantPostalCode : "" %> 
Telephone:<%= purchaser ? purchaser.occupantPhoneNumber : "" %> 
E-mail:<%= purchaser ? purchaser.occupantEmailAddress : "" %> 
+
+

Recipient

+ + + - + - - - - + + + + - - + + - - - - - + + + + + - - + + - - - -
Name: - <%= purchaser ? purchaser.occupantName + ' ' + purchaser.occupantFamilyName : "" %> + <%= recipient ? recipient.occupantName + ' ' + recipient.occupantFamilyName : "" %>
Address:<%= purchaser ? purchaser.occupantAddress1 : "" %> 
<%= purchaser ? purchaser.occupantAddress2 : "" %> 
<%= recipient ? recipient.occupantAddress1 : "" %> 
<%= recipient ? recipient.occupantAddress2 : "" %> 
City:<%= purchaser ? purchaser.occupantCity : "" %> 
<%= recipient ? recipient.occupantCity : "" %> 
Province:<%= purchaser ? purchaser.occupantProvince : "" %> 
Postal Code:<%= purchaser ? purchaser.occupantPostalCode : "" %> 
<%= recipient ? recipient.occupantProvince : "" %> 
Postal Code:<%= recipient ? recipient.occupantPostalCode : "" %> 
Telephone:<%= purchaser ? purchaser.occupantPhoneNumber : "" %> 
<%= recipient ? recipient.occupantPhoneNumber : "" %> 
E-mail:<%= purchaser ? purchaser.occupantEmailAddress : "" %> 
-
-

Recipient

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name: - <%= recipient ? recipient.occupantName + ' ' + recipient.occupantFamilyName : "" %> -
Address:<%= recipient ? recipient.occupantAddress1 : "" %> 
<%= recipient ? recipient.occupantAddress2 : "" %> 
City:<%= recipient ? recipient.occupantCity : "" %> 
Province:<%= recipient ? recipient.occupantProvince : "" %> 
Postal Code:<%= recipient ? recipient.occupantPostalCode : "" %> 
Telephone:<%= recipient ? recipient.occupantPhoneNumber : "" %> 
E-mail:<%= recipient ? recipient.occupantEmailAddress : "" %> 
Date of birth: 
Place of birth: 
-
<%= recipient ? recipient.occupantEmailAddress : "" %> 
Date of birth: 
Place of birth: 
+
@@ -202,95 +202,95 @@ and their respective heirs, executors, administrators, successors, and assigns.

- - +
-

Details

- + + - + - + <% + feeAmountTotal += fee.feeAmount * fee.quantity; + taxAmountTotal += fee.taxAmount * fee.quantity; + %> + <% } %> + + + + + + + + + + + + + + +
+

Details

+ + + + + + + + + + <% + for (const field of lotOccupancy.lotOccupancyFields) { + if (field.lotOccupancyFieldValue) { + %> - - + + - - - - - <% - for (const field of lotOccupancy.lotOccupancyFields) { - if (field.lotOccupancyFieldValue) { - %> - - - - - <% - } - } - %> -
<%= configFunctions.getConfigProperty("aliases.map") %><%= lotOccupancy.mapName ?? '(No ' + configFunctions.getConfigProperty("aliases.map") + ')' %>
<%= configFunctions.getConfigProperty("aliases.lot") %><%= lotOccupancy.lotName ?? '(No ' + configFunctions.getConfigProperty("aliases.lot") + ')' %>
<%= configFunctions.getConfigProperty("aliases.map") %><%= lotOccupancy.mapName ?? '(No ' + configFunctions.getConfigProperty("aliases.map") + ')' %><%= field.occupancyTypeField %><%= field.lotOccupancyFieldValue %>
<%= configFunctions.getConfigProperty("aliases.lot") %><%= lotOccupancy.lotName ?? '(No ' + configFunctions.getConfigProperty("aliases.lot") + ')' %>
<%= field.occupancyTypeField %><%= field.lotOccupancyFieldValue %>
-
-

Interment Rights and Services

- - - <% - let currentFeeCategory = ""; - let feeAmountTotal = 0; - let taxAmountTotal = 0; - %> - <% for (const fee of lotOccupancy.lotOccupancyFees) { %> - <% if (currentFeeCategory !== fee.feeCategory) { %> - - - - <% currentFeeCategory = fee.feeCategory; %> - <% } %> - - - <% if (fee.quantity !== 1) { %> - - <% } %> - - - <% - feeAmountTotal += fee.feeAmount * fee.quantity; - taxAmountTotal += fee.taxAmount * fee.quantity; - %> + <% + } + } + %> +
- <%= fee.feeCategory %> -
colspan="2"<% } %>> - <%= fee.feeName %> - - $<%= fee.feeAmount.toFixed(2) %> - × - <%= fee.quantity %> - - $<%= fee.feeAmount.toFixed(2) %> -
+
+

Interment Rights and Services

+ + + <% + let currentFeeCategory = ""; + let feeAmountTotal = 0; + let taxAmountTotal = 0; + %> + <% for (const fee of lotOccupancy.lotOccupancyFees) { %> + <% if (currentFeeCategory !== fee.feeCategory) { %> + + + + <% currentFeeCategory = fee.feeCategory; %> <% } %> - - - - + <% if (fee.quantity !== 1) { %> + + <% } %> - - - - - - - -
+ <%= fee.feeCategory %> +
Sub Total - $<%= feeAmountTotal.toFixed(2) %> + colspan="2"<% } %>> + <%= fee.feeName %>
HST + $<%= fee.feeAmount.toFixed(2) %> + × + <%= fee.quantity %> + - $<%= taxAmountTotal.toFixed(2) %> -
Total Sale - $<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %> -
Balance Owing - $<%= (feeAmountTotal + taxAmountTotal - lotOccupancyFunctions.getTransactionTotal(lotOccupancy)).toFixed(2) %> + $<%= fee.feeAmount.toFixed(2) %>
-
Sub Total + $<%= feeAmountTotal.toFixed(2) %> +
HST + $<%= taxAmountTotal.toFixed(2) %> +
Total Sale + $<%= (feeAmountTotal + taxAmountTotal).toFixed(2) %> +
Balance Owing + $<%= (feeAmountTotal + taxAmountTotal - lotOccupancyFunctions.getTransactionTotal(lotOccupancy)).toFixed(2) %> +
+
@@ -329,28 +329,28 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
Flat marker measuring less than 1,116.3 sq.m. (173 sq.in.)$0.00
Flat marker measuring over 1,116.3 sq.m. (173 sq.in.)$50.00
- Upright monument measuring more than 1.22 m. (4 ft.) or less in height or length, - including the base - $100.00
- Upright monument measuring more than 1.22m. (4 ft.) either in height or length, - including the base - $200.00
Flat marker measuring less than 1,116.3 sq.m. (173 sq.in.)$0.00
Flat marker measuring over 1,116.3 sq.m. (173 sq.in.)$50.00
+ Upright monument measuring more than 1.22 m. (4 ft.) or less in height or length, + including the base + $100.00
+ Upright monument measuring more than 1.22m. (4 ft.) either in height or length, + including the base + $200.00

Contract Terms and Conditions