Commit 0bac9286 by Elias Sarraf

Merge remote-tracking branch 'origin/master' into cam2

parents 650efac4 6417f9f6
object FViewOrders: TFViewOrders object FViewOrders: TFViewOrders
Width = 676 Width = 676
Height = 480 Height = 480
Caption = 'edtorderid'
CSSLibrary = cssBootstrap CSSLibrary = cssBootstrap
ElementFont = efCSS ElementFont = efCSS
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
...@@ -154,7 +153,7 @@ object FViewOrders: TFViewOrders ...@@ -154,7 +153,7 @@ object FViewOrders: TFViewOrders
BorderColor = clSilver BorderColor = clSilver
ChildOrder = 11 ChildOrder = 11
ElementFont = efCSS ElementFont = efCSS
ElementHeaderClassName = 'thead-light' ElementHeaderClassName = 'thead-light sticky-top bg-light'
ElementPosition = epRelative ElementPosition = epRelative
ElementTableClassName = 'table table-striped table-hover table-bordered text-sm' ElementTableClassName = 'table table-striped table-hover table-bordered text-sm'
Footer.ButtonActiveElementClassName = 'btn btn-primary' Footer.ButtonActiveElementClassName = 'btn btn-primary'
...@@ -194,7 +193,6 @@ object FViewOrders: TFViewOrders ...@@ -194,7 +193,6 @@ object FViewOrders: TFViewOrders
Title = 'Order Type' Title = 'Order Type'
end end
item item
ElementClassName = 'text-nowrap'
DataField = 'orderDate' DataField = 'orderDate'
Title = 'Order Date' Title = 'Order Date'
end end
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<div id="order_table_section" class="overflow-auto mt-2" <div id="order_table_section" class="overflow-auto mt-2"
style="max-height: calc(100vh - 250px); padding-bottom: 0; width: 100%;"> style="max-height: calc(100vh - 250px); padding-bottom: 0; width: 100%;">
<table id="tblPhoneGrid" class="table table-striped table-bordered" style="width: 100%;"> <table id="tblPhoneGrid" class="table table-striped table-bordered" style="width: 100%;">
<thead class="sticky-top bg-light"> <thead class="sticky-top thead-light">
<tr style="font-size: 0.875rem;"> <tr style="font-size: 0.875rem;">
<!-- Table headers are dynamically generated --> <!-- Table headers are dynamically generated -->
</tr> </tr>
......
...@@ -132,27 +132,21 @@ var ...@@ -132,27 +132,21 @@ var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
searchOptions, pdfURL: string; searchOptions, pdfURL: string;
jsObject: TJSObject; jsObject: TJSObject;
ShowPDFForm: TFViewPDF;
procedure AfterCreate(AForm: TObject);
begin
ShowPDFForm.LoadPDF(pdfUrl);
ShowPDFForm.ShowModal;
end;
begin begin
searchOptions := GenerateSearchOptions; searchOptions := GenerateSearchOptions;
// Call the server method to generate the PDF // Call the server method to generate the PDF
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateReportPDF', [searchOptions])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateReportPDF', [searchOptions]));
jsObject := JS.TJSObject(xdcResponse.Result); jsObject := JS.TJSObject(xdcResponse.Result);
pdfUrl := JS.toString(jsObject.Properties['value']); pdfURL := JS.toString(jsObject.Properties['value']);
//ShowMessage('PDF Report Generated Successfully');
console.log(pdfURL); // Open the PDF in a new browser tab without needing a different form
//application.Navigate( pdfUrl, ntblank ); // This method is much faster too, even for large datasets
ShowPDFForm := TFViewPDF.CreateNew(@AfterCreate); window.open(pdfURL, '_blank');
end; end;
procedure TFViewOrders.WebFormCreate(Sender: TObject); procedure TFViewOrders.WebFormCreate(Sender: TObject);
// Initializes important values: // Initializes important values:
// PageNumber: What page number the user is on IE 1: 1-10, 2: 11-20 etc // PageNumber: What page number the user is on IE 1: 1-10, 2: 11-20 etc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<noscript>Your browser does not support JavaScript!</noscript> <noscript>Your browser does not support JavaScript!</noscript>
<link rel="icon" href="data:;base64,="> <link rel="icon" href="data:;base64,=">
<title>TMS Web Project</title> <title>Web KG Orders</title>
<link href="css/app.css" rel="stylesheet" type="text/css"> <link href="css/app.css" rel="stylesheet" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.3.1/css/flag-icon.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.3.1/css/flag-icon.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
......
...@@ -19,8 +19,7 @@ uses ...@@ -19,8 +19,7 @@ uses
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html}, View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html}, View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html},
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html}, View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html},
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html}, View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html};
View.PDF in 'View.PDF.pas' {FViewPDF: TWebForm} {*.html};
{$R *.res} {$R *.res}
......
...@@ -180,11 +180,6 @@ ...@@ -180,11 +180,6 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.PDF.pas">
<Form>FViewPDF</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/> <None Include="index.html"/>
<None Include="css\app.css"/> <None Include="css\app.css"/>
<None Include="config\config.json"/> <None Include="config\config.json"/>
......
...@@ -63,6 +63,7 @@ begin ...@@ -63,6 +63,7 @@ begin
Logger.Log( 1, '-- serverConfig.adminPassword: ' + serverConfig.adminPassword ); Logger.Log( 1, '-- serverConfig.adminPassword: ' + serverConfig.adminPassword );
Logger.Log( 1, '-- serverConfig.jwtTokenSecret: ' + serverConfig.jwtTokenSecret ); Logger.Log( 1, '-- serverConfig.jwtTokenSecret: ' + serverConfig.jwtTokenSecret );
Logger.Log( 1, '-- serverConfig.webAppFolder: ' + serverConfig.webAppFolder ); Logger.Log( 1, '-- serverConfig.webAppFolder: ' + serverConfig.webAppFolder );
Logger.Log( 1, '-- serverConfig.reportsFolder: ' + serverConfig.reportsFolder );
Logger.Log( 1, '--LoadServerConfig - end' ); Logger.Log( 1, '--LoadServerConfig - end' );
end; end;
......
program kgOrdersServer; program kgOrdersServer;
uses uses
FastMM4,
System.SyncObjs, System.SyncObjs,
System.SysUtils, System.SysUtils,
Vcl.StdCtrls, Vcl.StdCtrls,
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.</DCC_ExeOutput> <DCC_ExeOutput>.</DCC_ExeOutput>
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''"> <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode> <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=5 FileLogLevel=5
LogFileNum=55 LogFileNum=63
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
Server=192.168.159.132 --Server=192.168.159.132
--Server=192.168.100.130 Server=192.168.102.130
--Server=192.168.75.133 --Server=192.168.75.133
--Database= --Database=
--Username= --Username=
--Password=emsys!012 --Password=emsys!012
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