Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KGOrders
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cam Hayes
KGOrders
Commits
f25bbc63
Commit
f25bbc63
authored
Jun 24, 2025
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated pdf generation, tested changes, deployed v 0.9.6
parent
9546b45b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
24 deletions
+71
-24
ConnectionModule.pas
kgOrdersClient/ConnectionModule.pas
+1
-1
Utils.pas
kgOrdersClient/Utils.pas
+0
-3
View.Main.html
kgOrdersClient/View.Main.html
+0
-3
View.Orders.pas
kgOrdersClient/View.Orders.pas
+57
-6
webKGOrders.dproj
kgOrdersClient/webKGOrders.dproj
+5
-3
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+1
-1
kgOrdersServer.dproj
kgOrdersServer/kgOrdersServer.dproj
+2
-2
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+5
-5
No files found.
kgOrdersClient/ConnectionModule.pas
View file @
f25bbc63
...
...
@@ -19,7 +19,7 @@ type
FUnauthorizedAccessProc
:
TUnauthorizedAccessProc
;
public
const
clientVersion
=
'0.9.
5
'
;
const
clientVersion
=
'0.9.
6
'
;
procedure
InitApp
(
SuccessProc
:
TSuccessProc
;
UnauthorizedAccessProc
:
TUnauthorizedAccessProc
);
procedure
SetClientConfig
(
Callback
:
TVersionCheckCallback
);
...
...
kgOrdersClient/Utils.pas
View file @
f25bbc63
...
...
@@ -211,9 +211,6 @@ begin
end
;
procedure
ApplyReportTitle
(
CurrentReportType
:
string
);
var
CrimeTitleElement
:
TJSHTMLElement
;
...
...
kgOrdersClient/View.Main.html
View file @
f25bbc63
...
...
@@ -120,9 +120,6 @@
</div>
</div>
<div
class=
"position-fixed bottom-0 end-0 p-3"
style=
"z-index: 1100"
>
</div>
...
...
kgOrdersClient/View.Orders.pas
View file @
f25bbc63
...
...
@@ -72,6 +72,7 @@ type
[
async
]
procedure
GenerateReportPDFAsync
(
APdfTab
:
TJSWindow
);
private
FChildForm
:
TWebForm
;
FPendingPdfTab
:
TJSWindow
;
procedure
ClearTable
();
procedure
GeneratePagination
(
TotalPages
:
Integer
);
function
GenerateSearchOptions
():
string
;
...
...
@@ -81,6 +82,7 @@ type
procedure
ShowSetStatusForm
();
[
async
]
procedure
GetOrders
(
searchOptions
:
string
);
[
async
]
procedure
SetStatus
(
statusInfo
:
string
);
procedure
HandlePDFConfirmation
;
var
PageNumber
:
integer
;
PageSize
:
integer
;
...
...
@@ -139,19 +141,68 @@ end;
procedure
TFViewOrders
.
btnPDFClick
(
Sender
:
TObject
);
var
pdfTab
:
TJSWindow
;
// handle for the new tab
confirmBtn
:
TJSHTMLElement
;
begin
pdfTab
:=
window
.
open
(
''
,
'_blank'
);
if
xdwdsOrders
.
RecordCount
>=
100
then
begin
FPendingPdfTab
:=
nil
;
document
.
getElementById
(
'modal_body'
).
innerHTML
:=
'You are about to generate a PDF for over 100 orders. This may take some time. Continue?'
;
document
.
getElementById
(
'btn_confirm_cancel'
).
innerText
:=
'Cancel'
;
document
.
getElementById
(
'btn_confirm_delete'
).
innerText
:=
'Yes'
;
confirmBtn
:=
TJSHTMLElement
(
document
.
getElementById
(
'btn_confirm_delete'
));
confirmBtn
.
addEventListener
(
'click'
,
TJSEventHandler
(
procedure
(
Event
:
TJSEvent
)
begin
asm
bootstrap
.
Modal
.
getInstance
(
document
.
getElementById
(
'confirmation_modal'
)).
hide
();
end
;
HandlePDFConfirmation
;
end
)
);
asm
var
modal
=
document
.
getElementById
(
'confirmation_modal'
);
if
(
modal
&&
modal
.
parentNode
!==
document
.
body
)
{
document.body.appendChild(modal);
}
var
confirmationModal
=
new
bootstrap
.
Modal
(
modal
,
{ keyboard: false }
);
confirmationModal
.
show
();
end
;
end
else
begin
FPendingPdfTab
:=
window
.
open
(
''
,
'_blank'
);
if
Assigned
(
FPendingPdfTab
)
then
FPendingPdfTab
.
document
.
write
(
'<html><body style="font-family:Arial;padding:2rem;">Generating PDF</body></html>'
);
Utils
.
ShowSpinner
(
'spinner'
);
GenerateReportPDFAsync
(
FPendingPdfTab
);
end
;
end
;
if
Assigned
(
pdfTab
)
then
pdfTab
.
document
.
write
(
'<html><body style="font-family:Arial;padding:2rem;">'
+
'Generating PDF</body></html>'
);
procedure
TFViewOrders
.
HandlePDFConfirmation
;
begin
// Open tab only now
FPendingPdfTab
:=
window
.
open
(
''
,
'_blank'
);
if
Assigned
(
FPendingPdfTab
)
then
FPendingPdfTab
.
document
.
write
(
'<html><body style="font-family:Arial;padding:2rem;">Generating PDF</body></html>'
);
Utils
.
ShowSpinner
(
'spinner'
);
GenerateReportPDFAsync
(
pdfTab
);
// pass the handle along
GenerateReportPDFAsync
(
FPendingPdfTab
);
FPendingPdfTab
:=
nil
;
end
;
[
async
]
procedure
TFViewOrders
.
GenerateReportPDFAsync
(
APdfTab
:
TJSWindow
);
var
xdcResponse
:
TXDataClientResponse
;
...
...
kgOrdersClient/webKGOrders.dproj
View file @
f25bbc63
...
...
@@ -5,7 +5,7 @@
<FrameworkType>VCL</FrameworkType>
<MainSource>webKGOrders.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">
Debug
</Config>
<Config Condition="'$(Config)'==''">
Release
</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
...
...
@@ -111,11 +111,13 @@
<TMSWebDefines>RELEASE</TMSWebDefines>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Build>8</VerInfo_Build>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.8;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;LastCompiledTime=2018/08/22 16:25:56</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.6.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.6.0;Comments=;LastCompiledTime=2018/08/22 16:25:56</VerInfo_Keys>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
<VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>6</VerInfo_Release>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
f25bbc63
...
...
@@ -259,7 +259,7 @@ function TLookupService.GenerateOrderListPDF(searchOptions: string): string;
// file which does most of the work.
var
SQL
:
string
;
rptOrderList
:
TrptOrderList
;
// Local instance of rptOrders
rptOrderList
:
TrptOrderList
;
CompanyID
,
CompanyName
:
string
;
params
:
TStringList
;
begin
...
...
kgOrdersServer/kgOrdersServer.dproj
View file @
f25bbc63
...
...
@@ -116,8 +116,8 @@
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>
5
</VerInfo_Release>
<VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.
5.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.5
.0;Comments=</VerInfo_Keys>
<VerInfo_Release>
6
</VerInfo_Release>
<VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.
6.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.6
.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
f25bbc63
[Settings]
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.
5
LogFileNum
=
7
28
webClientVersion
=
0.9.
6
LogFileNum
=
7
42
[Database]
--Server
=
192.168.159.131
...
...
@@ -17,6 +17,6 @@ Password=emsys01
CompanyID
=
9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-
7-H0-1758919884sgbdvdaawcewm26l9f9k
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..
PLd51yew2irHDBrcsT_EpA.iOyzK2ssY_1bRGAyxZIrqJyl2wvT70A6JrZt-oaBITJUTUp9NLql9g06PxuhgKB8t-ajFDCXtqyZEbtLx0T9-XntK5IkGuXXW5KZcWLGYAUm-T7ZDwiAVS3nyQhGkUr_yMqcPkktvCizQZjA7WscP1hWMHWSc9dMW2qfZc-fZartku7ffZXWlaJK03__8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FgFkzAFA9awXu1wiS3r3yT0lpA2Nyp__HGT6k8xfCQQmfztDbVL_1cPAlpC8elZlj8qPsMmwSxtZDazg4MF-383d5aAr11dCME21II9DyLxNgO4vQpb54yXLNlmf_lKveFe0BQpbwyE848XSdDa3XgVOSQJ1_4m5qx_c8d2lZKfBb5WYcyWdUjcPpQmNyzg5edka09fL_TgnH.C7MivFE-BRKnXk-NvDruoQ
LastRefresh
=
6/
21/2025 12:14:19 A
M
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment