Commit cc6a6599 by Mac Stephens

Align BFD styling and map controls with Lems, remove dispatch district,…

Align BFD styling and map controls with Lems, remove dispatch district, standardize incident labels and map number formatting, and rename the Lems auth connection.
parent c9d0ac73
...@@ -13,7 +13,7 @@ object FViewComplaintArchive: TFViewComplaintArchive ...@@ -13,7 +13,7 @@ object FViewComplaintArchive: TFViewComplaintArchive
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<div id="cdetails_summary_arc" class="collapse show"> <div id="cdetails_summary_arc" class="collapse show">
<div class="card border-0 shadow-sm mb-2"> <div class="card border-0 shadow-sm mb-2">
<div class="card-body py-2"> <div class="card-body py-2">
<table class="table table-sm mb-0 w-100"> <table class="table table-sm mb-0 w-100 small">
<tbody> <tbody>
<tr> <tr>
<th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Response:</th> <th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Response:</th>
......
...@@ -120,7 +120,7 @@ object FViewComplaintDetails: TFViewComplaintDetails ...@@ -120,7 +120,7 @@ object FViewComplaintDetails: TFViewComplaintDetails
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
...@@ -169,7 +169,7 @@ object FViewComplaintDetails: TFViewComplaintDetails ...@@ -169,7 +169,7 @@ object FViewComplaintDetails: TFViewComplaintDetails
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
...@@ -223,7 +223,7 @@ object FViewComplaintDetails: TFViewComplaintDetails ...@@ -223,7 +223,7 @@ object FViewComplaintDetails: TFViewComplaintDetails
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
...@@ -282,7 +282,7 @@ object FViewComplaintDetails: TFViewComplaintDetails ...@@ -282,7 +282,7 @@ object FViewComplaintDetails: TFViewComplaintDetails
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
...@@ -352,10 +352,11 @@ object FViewComplaintDetails: TFViewComplaintDetails ...@@ -352,10 +352,11 @@ object FViewComplaintDetails: TFViewComplaintDetails
Style = lsListGroup Style = lsListGroup
DataSource = wdsWarnings DataSource = wdsWarnings
ItemTemplate = ItemTemplate =
'<div class="card mb-2"> <div class="card-body py-2"> <div cl' + '<div class="card mb-2 small"> <div class="card-body py-2"> <' +
'div cl' +
'ass="d-flex justify-content-between gap-2"> <div class="fw-' + 'ass="d-flex justify-content-between gap-2"> <div class="fw-' +
'semibold">(%CodeDesc%)</div> <div class="text-muted small t' + 'semibold">(%CodeDesc%)</div> <div class="text-muted text-en' +
'ext-end">(%ADDRESS%)</div> </div> <div class="small mt-1">' + 'd">(%ADDRESS%)</div> </div> <div class="mt-1">' +
'(%NOTES%)</div> </div></div>' '(%NOTES%)</div> </div></div>'
ListSource = wdsWarnings ListSource = wdsWarnings
end end
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<div class="card-body py-2"> <div class="card-body py-2">
<table class="table table-sm mb-0 w-100"> <table class="table table-sm mb-0 w-100 small">
<tbody> <tbody>
<tr> <tr>
<th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Response:</th> <th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Response:</th>
...@@ -89,18 +89,18 @@ ...@@ -89,18 +89,18 @@
<!-- Buttons --> <!-- Buttons -->
<div class="pb-2"> <div class="pb-2">
<div class="complaint-detail-tabs d-flex flex-wrap gap-2 justify-content-center"> <div class="complaint-detail-tabs d-flex flex-wrap gap-2 justify-content-center">
<button type="button" class="btn btn-success btn-sm px-2 active" id="btn_remarks" aria-pressed="true">Remarks</button> <button type="button" class="btn btn-success btn-sm px-3 active" id="btn_remarks" aria-pressed="true">Remarks</button>
<button type="button" class="btn btn-success btn-sm px-2" id="btn_history">History</button> <button type="button" class="btn btn-success btn-sm px-3" id="btn_history">History</button>
<button type="button" class="btn btn-success btn-sm px-2" id="btn_warnings">Warnings</button> <button type="button" class="btn btn-success btn-sm px-3" id="btn_warnings">Warnings</button>
<button type="button" class="btn btn-success btn-sm px-2" id="btn_contacts">Contacts</button> <button type="button" class="btn btn-success btn-sm px-3" id="btn_contacts">Contacts</button>
</div> </div>
<!-- Remarks toggle filters (only visible on Remarks tab) --> <!-- Remarks toggle filters (only visible on Remarks tab) -->
<div class="d-flex flex-wrap gap-2 justify-content-center mt-2" id="row_remarks_toggles"> <div class="d-flex flex-wrap gap-2 justify-content-center mt-2" id="row_remarks_toggles">
<button type="button" class="btn btn-success btn-sm px-2 active" id="btn_cmp" aria-pressed="true">CMP</button> <button type="button" class="btn btn-success btn-sm px-3 active" id="btn_cmp" aria-pressed="true">CMP</button>
<button type="button" class="btn btn-success btn-sm px-2 active" id="btn_e911" aria-pressed="true">E-911</button> <button type="button" class="btn btn-success btn-sm px-3 active" id="btn_e911" aria-pressed="true">E-911</button>
<button type="button" class="btn btn-success btn-sm px-2 active" id="btn_rem" aria-pressed="true">REM</button> <button type="button" class="btn btn-success btn-sm px-3 active" id="btn_rem" aria-pressed="true">REM</button>
<button type="button" class="btn btn-success btn-sm px-2 active" id="btn_unt" aria-pressed="true">UNT</button> <button type="button" class="btn btn-success btn-sm px-3 active" id="btn_unt" aria-pressed="true">UNT</button>
</div> </div>
<!-- History action row (only visible on History tab) --> <!-- History action row (only visible on History tab) -->
......
...@@ -42,9 +42,7 @@ object FViewComplaints: TFViewComplaints ...@@ -42,9 +42,7 @@ object FViewComplaints: TFViewComplaints
Style = lsListGroup Style = lsListGroup
DataSource = wdsComplaints DataSource = wdsComplaints
ItemTemplate = ItemTemplate =
'<div class="list-section-header small fw-semibold bg-secondary t' + '<div class="card border shadow-sm"><div class="card-body py-2' +
'ext-white rounded-1 px-2 mb-1">District: (%DispatchDistrict%)</d' +
'iv><div class="card border shadow-sm"><div class="card-body py-2' +
' px-3 d-flex gap-2"><div class="flex-grow-1"><div class="fw-bold' + ' px-3 d-flex gap-2"><div class="flex-grow-1"><div class="fw-bold' +
' text-uppercase small">Incident: (%Complaint%)</div><div class="' + ' text-uppercase small">Incident: (%Complaint%)</div><div class="' +
'small">Response: (%Priority%) &middot; (%DispatchCodeDesc%)</div' + 'small">Response: (%Priority%) &middot; (%DispatchCodeDesc%)</div' +
...@@ -98,10 +96,6 @@ object FViewComplaints: TFViewComplaints ...@@ -98,10 +96,6 @@ object FViewComplaints: TFViewComplaints
FieldName = 'Status' FieldName = 'Status'
Size = 160 Size = 160
end end
object xdwdsComplaintsDispatchDistrict: TStringField
FieldName = 'DispatchDistrict'
Size = 40
end
object xdwdsComplaintsDateReported: TStringField object xdwdsComplaintsDateReported: TStringField
FieldName = 'DateReported' FieldName = 'DateReported'
Size = 40 Size = 40
......
...@@ -21,7 +21,6 @@ type ...@@ -21,7 +21,6 @@ type
xdwdsComplaintsDispatchCodeDesc: TStringField; xdwdsComplaintsDispatchCodeDesc: TStringField;
xdwdsComplaintsAddress: TStringField; xdwdsComplaintsAddress: TStringField;
xdwdsComplaintsStatus: TStringField; xdwdsComplaintsStatus: TStringField;
xdwdsComplaintsDispatchDistrict: TStringField;
xdwdsComplaintsDateReported: TStringField; xdwdsComplaintsDateReported: TStringField;
lblEntries: TWebLabel; lblEntries: TWebLabel;
wdsComplaints: TWebDataSource; wdsComplaints: TWebDataSource;
......
<div class="d-flex flex-column vh-100 emimobile-main"> <div class="d-flex flex-column vh-100">
<!-- Top Nav --> <!-- Top Nav -->
<nav id="top_nav" class="navbar navbar-light bg-primary border-light text-light py-2 flex-shrink-0" style="z-index:1020;"> <nav id="top_nav" class="navbar navbar-light bg-primary border-light text-light py-2 flex-shrink-0" style="z-index:1020;">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<i class="far fa-map me-1"></i>Map <i class="far fa-map me-1"></i>Map
</button> </button>
<button id="view.main.btncomplaints" type="button" class="btn btn-primary position-relative"> <button id="view.main.btncomplaints" type="button" class="btn btn-primary position-relative">
<i class="fa fa-exclamation-circle me-1"></i>Complaints <i class="fa fa-exclamation-circle me-1"></i>Incidents
<span id="view.main.badgecomplaints" <span id="view.main.badgecomplaints"
class="position-absolute top-0 start-100 translate-middle mt-1 badge rounded-pill bg-danger">0</span> class="position-absolute top-0 start-100 translate-middle mt-1 badge rounded-pill bg-danger">0</span>
</button> </button>
......
...@@ -52,16 +52,17 @@ ...@@ -52,16 +52,17 @@
<i class="fa fa-crosshairs"></i> <i class="fa fa-crosshairs"></i>
</button> </button>
<!-- Filters (top-right) --> <!-- Section: Filters (bottom-right, above recenter) -->
<button id="btn_map_filters" <button id="btn_map_filters"
type="button" type="button"
class="btn btn-primary position-absolute top-0 end-0 m-2 shadow" class="btn btn-primary position-absolute end-0 me-2 shadow"
style="z-index:1000;" style="z-index:1000; bottom:4.5rem;"
data-bs-toggle="offcanvas" data-bs-toggle="offcanvas"
data-bs-target="#map_filters_offcanvas" data-bs-target="#map_filters_offcanvas"
aria-controls="map_filters_offcanvas"> aria-controls="map_filters_offcanvas"
<i class="fa fa-sliders-h"></i> aria-label="Map filters"
<span class="d-none d-sm-inline">Filters</span> title="Map filters">
<i class="fa fa-sliders-h" aria-hidden="true"></i>
</button> </button>
</div> </div>
</div> </div>
......
...@@ -656,8 +656,6 @@ begin ...@@ -656,8 +656,6 @@ begin
end; end;
procedure TFViewMap.btnFindLocationClick(Sender: TObject); procedure TFViewMap.btnFindLocationClick(Sender: TObject);
var
coord: TTMSFNCMapsCoordinateRec;
begin begin
tmrLocate.Enabled := False; tmrLocate.Enabled := False;
FDoFocusZoom := False; FDoFocusZoom := False;
...@@ -665,18 +663,10 @@ begin ...@@ -665,18 +663,10 @@ begin
FPendingUnitId := ''; FPendingUnitId := '';
FPendingComplaintId := ''; FPendingComplaintId := '';
if userLocationMarker = nil then if lfMap.Polygons.Count = 0 then
Exit; Exit;
coord := CreateCoordinate(userLocationMarker.Latitude, userLocationMarker.Longitude); lfMap.ZoomToBounds(lfMap.Polygons.ToCoordinateArray);
lfMap.SetCenterCoordinate(coord);
FPendingFocusCoord := coord;
FPendingFocusZoom := 17;
FDoFocusZoom := True;
tmrLocate.Interval := 250;
tmrLocate.Enabled := True;
end; end;
......
...@@ -15,7 +15,7 @@ object FViewUnitDetails: TFViewUnitDetails ...@@ -15,7 +15,7 @@ object FViewUnitDetails: TFViewUnitDetails
ElementHeaderClassName = 'table-light' ElementHeaderClassName = 'table-light'
ElementTableClassName = ElementTableClassName =
'table table-sm table-striped table-hover table-bordered mb-0 ali' + 'table table-sm table-striped table-hover table-bordered mb-0 ali' +
'gn-middle' 'gn-middle small'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light' Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control' Footer.DropDownElementClassName = 'form-control'
...@@ -44,7 +44,7 @@ object FViewUnitDetails: TFViewUnitDetails ...@@ -44,7 +44,7 @@ object FViewUnitDetails: TFViewUnitDetails
item item
ElementClassName = 'text-nowrap' ElementClassName = 'text-nowrap'
DataField = 'Complaint' DataField = 'Complaint'
Title = 'Complaint' Title = 'Incident'
end end
item item
DataField = 'Log' DataField = 'Log'
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="card border-0 shadow-sm mb-2"> <div class="card border-0 shadow-sm mb-2">
<div class="card-body py-2"> <div class="card-body py-2">
<table class="table table-sm mb-0 w-100"> <table class="table table-sm mb-0 w-100 small">
<tbody> <tbody>
<tr> <tr>
<th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Unit:</th> <th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Unit:</th>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<td class="w-100 text-danger" id="lbl_unavailable_reason"></td> <td class="w-100 text-danger" id="lbl_unavailable_reason"></td>
</tr> </tr>
<tr id="row_complaint"> <tr id="row_complaint">
<th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Current Complaint:</th> <th scope="row" class="fw-semibold text-nowrap pe-2 w-auto">Current Incident:</th>
<td class="w-100" id="lbl_complaint"></td> <td class="w-100" id="lbl_complaint"></td>
</tr> </tr>
<tr id="row_call_type"> <tr id="row_call_type">
......
...@@ -49,8 +49,8 @@ object FViewUnits: TFViewUnits ...@@ -49,8 +49,8 @@ object FViewUnits: TFViewUnits
'rentStation%)</div> <div class="small (%MovingToClass%)">Mo' + 'rentStation%)</div> <div class="small (%MovingToClass%)">Mo' +
'ving To: (%MovingToStation%)</div> <div class="small">Manpo' + 'ving To: (%MovingToStation%)</div> <div class="small">Manpo' +
'wer: (%Manpower%)<span class="(%UndermannedClass%)"> - Undermann' + 'wer: (%Manpower%)<span class="(%UndermannedClass%)"> - Undermann' +
'ed</span></div> <div class="small (%ComplaintClass%)">Compl' + 'ed</span></div> <div class="small (%ComplaintClass%)">Inci' +
'aint: (%Complaint%)</div> <div class="small (%CallTypeClass' + 'dent: (%Complaint%)</div> <div class="small (%CallTypeClass' +
'%)">Call: (%CallType%)</div> <hr class="unit-divider my-1" ' + '%)">Call: (%CallType%)</div> <hr class="unit-divider my-1" ' +
'style="width: 80px; margin-left: 0" /> <div class="small te' + 'style="width: 80px; margin-left: 0" /> <div class="small te' +
'xt-danger (%UnavailableReasonClass%)">Unavailable: (%Unavailable' + 'xt-danger (%UnavailableReasonClass%)">Unavailable: (%Unavailable' +
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1, viewport-fit=cover" name="viewport"/> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<noscript>Your browser does not support JavaScript!</noscript> <noscript>Your browser does not support JavaScript!</noscript>
<link href="data:;base64,=" rel="icon"/> <link href="data:;base64,=" rel="icon"/>
<title>emiMobile</title> <title>emiMobile</title>
...@@ -29,6 +29,24 @@ ...@@ -29,6 +29,24 @@
</head> </head>
<body> <body>
<script type="text/javascript">rtl.run();</script> <script type="text/javascript">rtl.run();</script>
<script>
function setIOSDivHeight() {
const targetDiv = document.querySelector('body');
if (targetDiv) {
const height = window.innerHeight;
targetDiv.style.maxHeight = (height - 100) + 'px';
}
}
// Note: Match Lems height updates when the iOS browser address bar changes.
const isIOSUA = /iPad|iPhone|iPod/.test(navigator.userAgent);
if (isIOSUA) {
window.addEventListener('load', setIOSDivHeight);
window.addEventListener('resize', setIOSDivHeight);
window.addEventListener('scroll', setIOSDivHeight);
}
</script>
</body> </body>
</html> </html>
......
...@@ -187,13 +187,23 @@ html, body { ...@@ -187,13 +187,23 @@ html, body {
} }
/* Note: Keep navigation inside the visible mobile viewport and device safe areas. */ /* Note: Match Lems mobile height and safe-area handling. */
@supports (height: 100dvh) {
.emimobile-main { height: 100dvh !important; }
}
@supports (padding-top: env(safe-area-inset-top)) { @supports (padding-top: env(safe-area-inset-top)) {
#top_nav { padding-top: calc(0.5rem + env(safe-area-inset-top)) !important; } #top_nav {
#bottom_nav { padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important; } padding-top: calc(0.5rem + env(safe-area-inset-top));
}
#bottom_nav {
padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
}
@supports (-webkit-touch-callout: none) {
span.card {
border: none;
}
.vh-100 {
height: 93vh !important;
}
} }
.complaint-detail-tabs .btn-success { .complaint-detail-tabs .btn-success {
......
...@@ -584,7 +584,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -584,7 +584,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
' ca.APARTMENT,' ' ca.APARTMENT,'
' ca.CITY,' ' ca.CITY,'
' ca.BUSINESS,' ' ca.BUSINESS,'
' cd.CODE_DESC AS DISPATCHDISTRICT,'
' ca.DISPATCHSECTOR,' ' ca.DISPATCHSECTOR,'
' ca.ADDRESSDISTRICT,' ' ca.ADDRESSDISTRICT,'
' ca.ADDRESSSECTOR,' ' ca.ADDRESSSECTOR,'
...@@ -600,8 +599,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -600,8 +599,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
' ct.DATEARRIVED,' ' ct.DATEARRIVED,'
' ct.DATECLEARED,' ' ct.DATECLEARED,'
' cp.COLOR AS PRIORITY_COLOR,' ' cp.COLOR AS PRIORITY_COLOR,'
' cd.CODE_DESC AS DISTRICT_DESC,'
' sec.CODE_DESC AS SECTOR_DESC,'
' ca.STATUS,' ' ca.STATUS,'
' cst.CODE_DESC AS STATUS_DESC,' ' cst.CODE_DESC AS STATUS_DESC,'
' cst.COLOR AS STATUS_COLOR,' ' cst.COLOR AS STATUS_COLOR,'
...@@ -616,10 +613,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -616,10 +613,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
'LEFT JOIN CD_DISPATCHCODES cdc ON cdc.CODE = ca.DISPATCHCODE' 'LEFT JOIN CD_DISPATCHCODES cdc ON cdc.CODE = ca.DISPATCHCODE'
'LEFT JOIN CD_CALLSOURCES ccs ON ccs.CODE = ca.SOURCE' 'LEFT JOIN CD_CALLSOURCES ccs ON ccs.CODE = ca.SOURCE'
'LEFT JOIN CD_CALLPRIORITIES cp ON cp.CODE = ca.PRIORITY' 'LEFT JOIN CD_CALLPRIORITIES cp ON cp.CODE = ca.PRIORITY'
'LEFT JOIN CD_DISTRICT cd ON cd.AGENCYCODE = ca.DISPATCHDISTRICT'
'LEFT JOIN CD_SECTOR sec ON sec.AGENCYCODE = ca.DISPATCHSECTOR AN' +
'D sec.CODE_TYPE = cd.AGENCYCODE'
'LEFT JOIN CD_COMPLAINTSTATUS cst ON cst.CODE = ca.STATUS' 'LEFT JOIN CD_COMPLAINTSTATUS cst ON cst.CODE = ca.STATUS'
'WHERE ca.AGENCY = '#39'BFD'#39 'WHERE ca.AGENCY = '#39'BFD'#39
' AND ca.COMPLAINT IS NOT NULL' ' AND ca.COMPLAINT IS NOT NULL'
...@@ -679,11 +672,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -679,11 +672,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
FieldName = 'business' FieldName = 'business'
Size = 35 Size = 35
end end
object uqComplaintListdispatchdistrict: TStringField
FieldName = 'dispatchdistrict'
ReadOnly = True
Size = 120
end
object uqComplaintListdispatchsector: TStringField object uqComplaintListdispatchsector: TStringField
FieldName = 'dispatchsector' FieldName = 'dispatchsector'
Size = 6 Size = 6
...@@ -739,16 +727,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -739,16 +727,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
FieldName = 'priority_color' FieldName = 'priority_color'
ReadOnly = True ReadOnly = True
end end
object uqComplaintListdistrict_desc: TStringField
FieldName = 'district_desc'
ReadOnly = True
Size = 120
end
object uqComplaintListsector_desc: TStringField
FieldName = 'sector_desc'
ReadOnly = True
Size = 120
end
object uqComplaintListcomplaintNumber: TStringField object uqComplaintListcomplaintNumber: TStringField
FieldKind = fkCalculated FieldKind = fkCalculated
FieldName = 'complaintNumber' FieldName = 'complaintNumber'
...@@ -1056,7 +1034,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -1056,7 +1034,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
'SELECT' 'SELECT'
' q.COMPLAINTID,' ' q.COMPLAINTID,'
' q.COMPLAINT,' ' q.COMPLAINT,'
' q.DISPATCHDISTRICT,'
' q.AGENCY,' ' q.AGENCY,'
' q.AGENCY_NAME,' ' q.AGENCY_NAME,'
' q.PRIORITY,' ' q.PRIORITY,'
...@@ -1075,7 +1052,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -1075,7 +1052,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
' SELECT' ' SELECT'
' ca.COMPLAINTID,' ' ca.COMPLAINTID,'
' ca.COMPLAINT,' ' ca.COMPLAINT,'
' cd.CODE_DESC AS DISPATCHDISTRICT,'
' ca.AGENCY,' ' ca.AGENCY,'
' ag.AGENCYNAME AS AGENCY_NAME,' ' ag.AGENCYNAME AS AGENCY_NAME,'
' ca.PRIORITY,' ' ca.PRIORITY,'
...@@ -1103,8 +1079,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -1103,8 +1079,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
' ON ct.COMPLAINTID = ca.COMPLAINTID' ' ON ct.COMPLAINTID = ca.COMPLAINTID'
' LEFT JOIN CD_DISPATCHCODES cdc' ' LEFT JOIN CD_DISPATCHCODES cdc'
' ON cdc.CODE = ca.DISPATCHCODE' ' ON cdc.CODE = ca.DISPATCHCODE'
' LEFT JOIN CD_DISTRICT cd'
' ON cd.AGENCYCODE = ca.DISPATCHDISTRICT'
' LEFT JOIN AGENCY ag' ' LEFT JOIN AGENCY ag'
' ON ag.AGENCYID = ca.AGENCY' ' ON ag.AGENCYID = ca.AGENCY'
' LEFT JOIN CD_COMPLAINTSTATUS cst' ' LEFT JOIN CD_COMPLAINTSTATUS cst'
...@@ -1122,11 +1096,6 @@ object BFDAPIDataModule: TBFDAPIDataModule ...@@ -1122,11 +1096,6 @@ object BFDAPIDataModule: TBFDAPIDataModule
FieldName = 'complaintid' FieldName = 'complaintid'
Required = True Required = True
end end
object uqMapComplaintsdispatchdistrict: TStringField
FieldName = 'dispatchdistrict'
ReadOnly = True
Size = 120
end
object uqMapComplaintspriority: TStringField object uqMapComplaintspriority: TStringField
FieldName = 'priority' FieldName = 'priority'
Size = 6 Size = 6
......
...@@ -40,7 +40,6 @@ type ...@@ -40,7 +40,6 @@ type
uqComplaintListapartment: TStringField; uqComplaintListapartment: TStringField;
uqComplaintListcity: TStringField; uqComplaintListcity: TStringField;
uqComplaintListbusiness: TStringField; uqComplaintListbusiness: TStringField;
uqComplaintListdispatchdistrict: TStringField;
uqComplaintListdispatchsector: TStringField; uqComplaintListdispatchsector: TStringField;
uqComplaintListaddressdistrict: TStringField; uqComplaintListaddressdistrict: TStringField;
uqComplaintListaddresssector: TStringField; uqComplaintListaddresssector: TStringField;
...@@ -56,8 +55,6 @@ type ...@@ -56,8 +55,6 @@ type
uqComplaintListdatearrived: TDateTimeField; uqComplaintListdatearrived: TDateTimeField;
uqComplaintListdatecleared: TDateTimeField; uqComplaintListdatecleared: TDateTimeField;
uqComplaintListpriority_color: TFloatField; uqComplaintListpriority_color: TFloatField;
uqComplaintListdistrict_desc: TStringField;
uqComplaintListsector_desc: TStringField;
uqComplaintListcomplaintNumber: TStringField; uqComplaintListcomplaintNumber: TStringField;
uqComplaintDetailscomplaintid: TFloatField; uqComplaintDetailscomplaintid: TFloatField;
uqComplaintDetailscfsid: TFloatField; uqComplaintDetailscfsid: TFloatField;
...@@ -134,7 +131,6 @@ type ...@@ -134,7 +131,6 @@ type
uqMapComplaintUnitsListdatecleared: TDateTimeField; uqMapComplaintUnitsListdatecleared: TDateTimeField;
uqMapComplaintUnitsListlocation: TStringField; uqMapComplaintUnitsListlocation: TStringField;
uqMapComplaintscomplaintid: TFloatField; uqMapComplaintscomplaintid: TFloatField;
uqMapComplaintsdispatchdistrict: TStringField;
uqMapComplaintspriority: TStringField; uqMapComplaintspriority: TStringField;
uqMapComplaintsbusiness: TStringField; uqMapComplaintsbusiness: TStringField;
uqMapComplaintsdispatchcodecategory: TStringField; uqMapComplaintsdispatchcodecategory: TStringField;
...@@ -269,7 +265,7 @@ type ...@@ -269,7 +265,7 @@ type
public public
procedure ConfigureQueryTimeouts; override; procedure ConfigureQueryTimeouts; override;
function GetBadgeCounts: TJSONObject; override; function GetBadgeCounts: TJSONObject; override;
function GetComplaintMap(FormatComplaintNumber: Boolean = True): TJSONObject; override; function GetComplaintMap: TJSONObject; override;
function GetUnitMap: TJSONObject; override; function GetUnitMap: TJSONObject; override;
function GetComplaintList: TJSONObject; override; function GetComplaintList: TJSONObject; override;
function GetUnitList: TJSONObject; override; function GetUnitList: TJSONObject; override;
...@@ -518,7 +514,7 @@ begin ...@@ -518,7 +514,7 @@ begin
end; end;
// Note: BFD retains raw complaint numbers for both HTTP and WebSocket maps. // Note: BFD retains raw complaint numbers for both HTTP and WebSocket maps.
function TBFDAPIDataModule.GetComplaintMap(FormatComplaintNumber: Boolean): TJSONObject; function TBFDAPIDataModule.GetComplaintMap: TJSONObject;
var var
data: TJSONArray; data: TJSONArray;
emitted: Integer; emitted: Integer;
...@@ -624,8 +620,10 @@ begin ...@@ -624,8 +620,10 @@ begin
end; end;
item.AddPair('ComplaintId', complaintId); item.AddPair('ComplaintId', complaintId);
item.AddPair('Complaint', uqMapComplaintsCOMPLAINT.AsString); var complaintNumber := Trim(uqMapComplaintsCOMPLAINT.AsString);
item.AddPair('DispatchDistrict', uqMapComplaintsDISPATCHDISTRICT.AsString); if Length(complaintNumber) > 2 then
complaintNumber := Copy(complaintNumber, 1, 2) + '-' + Copy(complaintNumber, 3, MaxInt);
item.AddPair('Complaint', complaintNumber);
item.AddPair('Agency', uqMapComplaintsAGENCY.AsString); item.AddPair('Agency', uqMapComplaintsAGENCY.AsString);
item.AddPair('AgencyName', uqMapComplaintsAGENCY_NAME.AsString); item.AddPair('AgencyName', uqMapComplaintsAGENCY_NAME.AsString);
item.AddPair('DispatchCodeDesc', uqMapComplaintsDISPATCH_CODE_DESC.AsString); item.AddPair('DispatchCodeDesc', uqMapComplaintsDISPATCH_CODE_DESC.AsString);
...@@ -668,7 +666,7 @@ begin ...@@ -668,7 +666,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintMap error: ' + E.ClassName + ': ' + E.Message); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintMap error: ' + E.ClassName + ': ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint map'); raise EXDataHttpException.Create(500, 'Failed to load incident map');
end; end;
end; end;
finally finally
...@@ -888,7 +886,6 @@ begin ...@@ -888,7 +886,6 @@ begin
item.AddPair('Contacts', uqComplaintListCONTACTS.AsString); item.AddPair('Contacts', uqComplaintListCONTACTS.AsString);
item.AddPair('History', uqComplaintListHISTORY.AsString); item.AddPair('History', uqComplaintListHISTORY.AsString);
item.AddPair('DispatchDistrict', uqComplaintListDISPATCHDISTRICT.AsString);
item.AddPair('DateReported', uqComplaintListDATEREPORTED.AsString); item.AddPair('DateReported', uqComplaintListDATEREPORTED.AsString);
Next; Next;
...@@ -902,7 +899,7 @@ begin ...@@ -902,7 +899,7 @@ begin
Result.AddPair('returned', TJSONNumber.Create(data.Count)); Result.AddPair('returned', TJSONNumber.Create(data.Count));
except except
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintList End (error)'); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintList End (error)');
raise EXDataHttpException.Create(500, 'Failed to load complaints list'); raise EXDataHttpException.Create(500, 'Failed to load incidents list');
end; end;
Logger.Log(3, '---TBFDAPIDataModule.GetComplaintList End'); Logger.Log(3, '---TBFDAPIDataModule.GetComplaintList End');
...@@ -1079,10 +1076,10 @@ begin ...@@ -1079,10 +1076,10 @@ begin
Open; Open;
try try
if Eof then if Eof then
raise EXDataHttpException.Create(404, 'Complaint not found'); raise EXDataHttpException.Create(404, 'Incident not found');
if not Locate('STATUS', 0, []) then if not Locate('STATUS', 0, []) then
raise EXDataHttpException.Create(404, 'Complaint not found'); raise EXDataHttpException.Create(404, 'Incident not found');
status := ComplaintDisplayStatus( status := ComplaintDisplayStatus(
uqComplaintDetailsCOMPLAINT_STATUS.AsString, uqComplaintDetailsCOMPLAINT_STATUS.AsString,
...@@ -1220,7 +1217,7 @@ begin ...@@ -1220,7 +1217,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '---TBFDAPIDataModule.GetComplaintDetails error: ' + E.Message); Logger.Log(3, '---TBFDAPIDataModule.GetComplaintDetails error: ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint details'); raise EXDataHttpException.Create(500, 'Failed to load incident details');
end; end;
end; end;
...@@ -1249,10 +1246,10 @@ begin ...@@ -1249,10 +1246,10 @@ begin
Open; Open;
try try
if Eof then if Eof then
raise EXDataHttpException.Create(404, 'Complaint not found'); raise EXDataHttpException.Create(404, 'Incident not found');
if not Locate('STATUS', 1, []) then if not Locate('STATUS', 1, []) then
raise EXDataHttpException.Create(404, 'Complaint archive not found'); raise EXDataHttpException.Create(404, 'Incident archive not found');
status := ComplaintDisplayStatus( status := ComplaintDisplayStatus(
uqComplaintDetailsCOMPLAINT_STATUS.AsString, uqComplaintDetailsCOMPLAINT_STATUS.AsString,
...@@ -1375,7 +1372,7 @@ begin ...@@ -1375,7 +1372,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '---TBFDAPIDataModule.GetComplaintArchiveDetails error: ' + E.Message); Logger.Log(3, '---TBFDAPIDataModule.GetComplaintArchiveDetails error: ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint archive details'); raise EXDataHttpException.Create(500, 'Failed to load incident archive details');
end; end;
end; end;
...@@ -1445,7 +1442,7 @@ begin ...@@ -1445,7 +1442,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintMemos error: ' + E.ClassName + ': ' + E.Message); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintMemos error: ' + E.ClassName + ': ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint memos'); raise EXDataHttpException.Create(500, 'Failed to load incident memos');
end; end;
end; end;
...@@ -1528,7 +1525,7 @@ begin ...@@ -1528,7 +1525,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintHistory error: ' + E.ClassName + ': ' + E.Message); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintHistory error: ' + E.ClassName + ': ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint history'); raise EXDataHttpException.Create(500, 'Failed to load incident history');
end; end;
end; end;
except except
...@@ -1593,7 +1590,7 @@ begin ...@@ -1593,7 +1590,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintContacts error: ' + E.ClassName + ': ' + E.Message); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintContacts error: ' + E.ClassName + ': ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint contacts'); raise EXDataHttpException.Create(500, 'Failed to load incident contacts');
end; end;
end; end;
except except
...@@ -1681,7 +1678,7 @@ begin ...@@ -1681,7 +1678,7 @@ begin
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '---TBFDAPIDataModule.GetComplaintWarnings error: ' + E.ClassName + ': ' + E.Message); Logger.Log(2, '---TBFDAPIDataModule.GetComplaintWarnings error: ' + E.ClassName + ': ' + E.Message);
raise EXDataHttpException.Create(500, 'Failed to load complaint warnings'); raise EXDataHttpException.Create(500, 'Failed to load incident warnings');
end; end;
end; end;
except except
......
...@@ -14,7 +14,7 @@ type ...@@ -14,7 +14,7 @@ type
function StartUpdateListener: Boolean; virtual; abstract; function StartUpdateListener: Boolean; virtual; abstract;
function ConsumeCADUpdate: Boolean; virtual; abstract; function ConsumeCADUpdate: Boolean; virtual; abstract;
function GetBadgeCounts: TJSONObject; virtual; abstract; function GetBadgeCounts: TJSONObject; virtual; abstract;
function GetComplaintMap(FormatComplaintNumber: Boolean = True): TJSONObject; virtual; abstract; function GetComplaintMap: TJSONObject; virtual; abstract;
function GetUnitMap: TJSONObject; virtual; abstract; function GetUnitMap: TJSONObject; virtual; abstract;
function GetComplaintList: TJSONObject; virtual; abstract; function GetComplaintList: TJSONObject; virtual; abstract;
function GetUnitList: TJSONObject; virtual; abstract; function GetUnitList: TJSONObject; virtual; abstract;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
## Ownership and use ## Ownership and use
- Authentication creates a store through `Agency.Selection.CreateDeviceStore(authDB.ucLemsOCSO)` and borrows its existing connection. Free the store before the authentication module. - Authentication creates a store through `Agency.Selection.CreateDeviceStore(authDB.ucLems)` and borrows its existing connection. Free the store before the authentication module.
- API device operations and WebSocket activity checks create a store with `CreateDeviceStore`, which owns a separately configured connection. Free the store when that operation completes. - API device operations and WebSocket activity checks create a store with `CreateDeviceStore`, which owns a separately configured connection. Free the store when that operation completes.
- Read operations return store-owned `TDataSet` results. Callers read/close those results; do not free them or retain them beyond the store's lifetime. Repeating the same operation reuses its query. - Read operations return store-owned `TDataSet` results. Callers read/close those results; do not free them or retain them beyond the store's lifetime. Repeating the same operation reuses its query.
- Write operations return affected-row counts. Services retain their existing zero-row/not-found handling. - Write operations return affected-row counts. Services retain their existing zero-row/not-found handling.
......
...@@ -214,7 +214,7 @@ var ...@@ -214,7 +214,7 @@ var
obj: TJSONObject; obj: TJSONObject;
begin begin
AComplaintCount := 0; AComplaintCount := 0;
obj := FData.GetComplaintMap(False); obj := FData.GetComplaintMap;
try try
AComplaintCount := obj.GetValue<Integer>('count'); AComplaintCount := obj.GetValue<Integer>('count');
obj.AddPair('RequestId', WS_MSG_COMPLAINT_MAP); obj.AddPair('RequestId', WS_MSG_COMPLAINT_MAP);
......
...@@ -221,7 +221,7 @@ type ...@@ -221,7 +221,7 @@ type
public public
procedure ConfigureQueryTimeouts; override; procedure ConfigureQueryTimeouts; override;
function GetBadgeCounts: TJSONObject; override; function GetBadgeCounts: TJSONObject; override;
function GetComplaintMap(FormatComplaintNumber: Boolean = True): TJSONObject; override; function GetComplaintMap: TJSONObject; override;
function GetUnitMap: TJSONObject; override; function GetUnitMap: TJSONObject; override;
function GetComplaintList: TJSONObject; override; function GetComplaintList: TJSONObject; override;
function GetUnitList: TJSONObject; override; function GetUnitList: TJSONObject; override;
...@@ -497,7 +497,7 @@ begin ...@@ -497,7 +497,7 @@ begin
end; end;
end; end;
function TWCAPIDataModule.GetComplaintMap(FormatComplaintNumber: Boolean): TJSONObject; function TWCAPIDataModule.GetComplaintMap: TJSONObject;
var var
data: TJSONArray; data: TJSONArray;
emitted: Integer; emitted: Integer;
...@@ -588,14 +588,9 @@ begin ...@@ -588,14 +588,9 @@ begin
item.AddPair('ComplaintId', uqMapComplaintsCOMPLAINTID.AsString); item.AddPair('ComplaintId', uqMapComplaintsCOMPLAINTID.AsString);
complaintNumber := uqMapComplaintsCOMPLAINT.AsString; complaintNumber := Trim(uqMapComplaintsCOMPLAINT.AsString);
// Note: Preserve the existing HTTP formatting and raw WebSocket value.
if FormatComplaintNumber then
begin
complaintNumber := Trim(complaintNumber);
if Length(complaintNumber) > 2 then if Length(complaintNumber) > 2 then
complaintNumber := Copy(complaintNumber, 1, 2) + '-' + Copy(complaintNumber, 3, MaxInt); complaintNumber := Copy(complaintNumber, 1, 2) + '-' + Copy(complaintNumber, 3, MaxInt);
end;
item.AddPair('Complaint', complaintNumber); item.AddPair('Complaint', complaintNumber);
item.AddPair('DispatchDistrict', uqMapComplaintsDISPATCHDISTRICT.AsString); item.AddPair('DispatchDistrict', uqMapComplaintsDISPATCHDISTRICT.AsString);
......
...@@ -8,7 +8,7 @@ object WCAuthDatabase: TWCAuthDatabase ...@@ -8,7 +8,7 @@ object WCAuthDatabase: TWCAuthDatabase
Left = 237 Left = 237
Top = 53 Top = 53
end end
object ucLemsOCSO: TUniConnection object ucLems: TUniConnection
ProviderName = 'PostgreSQL' ProviderName = 'PostgreSQL'
Database = 'lems_ocso' Database = 'lems_ocso'
Username = 'postgres' Username = 'postgres'
...@@ -19,7 +19,7 @@ object WCAuthDatabase: TWCAuthDatabase ...@@ -19,7 +19,7 @@ object WCAuthDatabase: TWCAuthDatabase
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF' EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
end end
object uqAuth: TUniQuery object uqAuth: TUniQuery
Connection = ucLemsOCSO Connection = ucLems
SQL.Strings = ( SQL.Strings = (
'select u.* from lems.users u ' 'select u.* from lems.users u '
'where upper(user_name) = :USER_NAME ' 'where upper(user_name) = :USER_NAME '
...@@ -32,7 +32,7 @@ object WCAuthDatabase: TWCAuthDatabase ...@@ -32,7 +32,7 @@ object WCAuthDatabase: TWCAuthDatabase
Top = 148 Top = 148
end end
object uqAgencies: TUniQuery object uqAgencies: TUniQuery
Connection = ucLemsOCSO Connection = ucLems
SQL.Strings = ( SQL.Strings = (
'select agencyid as agency ' 'select agencyid as agency '
'from lems.agency ' 'from lems.agency '
...@@ -42,7 +42,7 @@ object WCAuthDatabase: TWCAuthDatabase ...@@ -42,7 +42,7 @@ object WCAuthDatabase: TWCAuthDatabase
Top = 200 Top = 200
end end
object uqAgencyConfig: TUniQuery object uqAgencyConfig: TUniQuery
Connection = ucLemsOCSO Connection = ucLems
SQL.Strings = ( SQL.Strings = (
'select agencyid, agencyname ' 'select agencyid, agencyname '
'from lems.agency ' 'from lems.agency '
......
...@@ -9,7 +9,7 @@ uses ...@@ -9,7 +9,7 @@ uses
type type
TWCAuthDatabase = class(TAgencyAuth) TWCAuthDatabase = class(TAgencyAuth)
uqMisc: TUniQuery; uqMisc: TUniQuery;
ucLemsOCSO: TUniConnection; ucLems: TUniConnection;
uqAuth: TUniQuery; uqAuth: TUniQuery;
uqAgencies: TUniQuery; uqAgencies: TUniQuery;
uqAgencyConfig: TUniQuery; uqAgencyConfig: TUniQuery;
...@@ -49,7 +49,7 @@ uses ...@@ -49,7 +49,7 @@ uses
function TWCAuthDatabase.GetConnection: TUniConnection; function TWCAuthDatabase.GetConnection: TUniConnection;
begin begin
Result := ucLemsOCSO; Result := ucLems;
end; end;
function TWCAuthDatabase.GetUserData: TDataSet; function TWCAuthDatabase.GetUserData: TDataSet;
...@@ -89,13 +89,13 @@ end; ...@@ -89,13 +89,13 @@ end;
procedure TWCAuthDatabase.DataModuleCreate(Sender: TObject); procedure TWCAuthDatabase.DataModuleCreate(Sender: TObject);
begin begin
IniEntries.ConfigureConnection(ucLemsOCSO); IniEntries.ConfigureConnection(ucLems);
try try
Logger.Log(2, ''); Logger.Log(2, '');
Logger.Log(2, 'Connecting to PostgreSQL auth database...'); Logger.Log(2, 'Connecting to PostgreSQL auth database...');
if not ucLemsOCSO.Connected then if not ucLems.Connected then
ucLemsOCSO.Connect; ucLems.Connect;
except except
on E: Exception do on E: Exception do
Logger.Log(2, Format('Failed to connect to auth database: %s', [E.Message])); Logger.Log(2, Format('Failed to connect to auth database: %s', [E.Message]));
...@@ -105,8 +105,8 @@ end; ...@@ -105,8 +105,8 @@ end;
procedure TWCAuthDatabase.DataModuleDestroy(Sender: TObject); procedure TWCAuthDatabase.DataModuleDestroy(Sender: TObject);
begin begin
if ucLemsOCSO.Connected then if ucLems.Connected then
ucLemsOCSO.Disconnect; ucLems.Disconnect;
end; end;
procedure TWCAuthDatabase.SetLoginAuditEntry( userStr: string ); procedure TWCAuthDatabase.SetLoginAuditEntry( userStr: string );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment