Commit 1e7d3289 by Mac Stephens

resized table panel in View.Orders.html, removed some unnecessary containers to…

resized table panel in View.Orders.html, removed some unnecessary containers to align pagination correctly
parent 90263cad
<div class="container h-100 d-flex flex-column mt-0" style="max-width: 85%;"> <div class="container h-100 d-flex flex-column mt-0" style="max-width: 95%;">
<!-- Alert Section --> <!-- Alert Section -->
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<button id="btnsetstatus" class="btn btn-secondary mt-3">Set Status</button> <button id="btnsetstatus" class="btn btn-secondary mt-3">Set Status</button>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<button id="btngeneratepdf" class="btn btn-secondary mt-3" type="button">Generate PDF</button> <button id="btngeneratepdf" class="btn btn-secondary mt-3" type="button">Generate PDF</button>
<div class="invalid-feedback"> <div class="invalid-feedback">
No order selected. Please select an order to generate a PDF. No order selected. Please select an order to generate a PDF.
</div> </div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<button id="btnfilters" class="btn btn-secondary mt-3">Filters</button> <button id="btnfilters" class="btn btn-secondary mt-3">Filters</button>
...@@ -56,43 +56,33 @@ ...@@ -56,43 +56,33 @@
</div> </div>
</div> </div>
<!-- Entries Label Section --> <!-- Entries Label Section -->
<div class="container mt-2"> <div class="d-flex justify-content-between w-100 mt-2">
<div class="row"> <label id="lblentries"></label>
<div class="col">
<label id="lblentries"></label>
</div>
</div>
</div> </div>
<!-- Table Section --> <!-- Table Section -->
<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 - 380px); border-bottom: none; padding-bottom: 0;"> style="max-height: calc(100vh - 380px); border-bottom: none; padding-bottom: 0;">
<table id="tblPhoneGrid" class="table table-striped table-bordered"> <table id="tblPhoneGrid" class="table table-striped table-bordered">
<thead class="sticky-top bg-light"> <thead class="sticky-top bg-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>
</thead> </thead>
<tbody id="orderTableBody" class="align-middle"> <tbody id="orderTableBody" class="align-middle">
<!-- Table rows are dynamically generated --> <!-- Table rows are dynamically generated -->
</tbody> </tbody>
</table> </table>
</div> </div>
<!-- Pagination Section --> <!-- Pagination Section -->
<div class="container mt-4"> <div class="d-flex justify-content-center w-100 mt-4">
<div class="row justify-content-center"> <nav aria-label="Page navigation">
<nav aria-label="Page navigation"> <ul id="pagination" class="pagination">
<ul id="pagination" class="pagination"> <!-- Pagination items added dynamically -->
<!-- Pagination items added dynamically --> </ul>
</ul> </nav>
</nav>
</div>
</div> </div>
</div> </div>
......
...@@ -11,7 +11,7 @@ interface ...@@ -11,7 +11,7 @@ interface
uses uses
XData.Server.Module, XData.Server.Module,
XData.Service.Common, XData.Service.Common,
KGOrders.Database, Data.DB, rOrders, frxClass, frxExportPDF, KGOrders.Database, Data.DB, frxClass, frxExportPDF,
Lookup.Service, System.Hash, System.Classes, System.JSON; Lookup.Service, System.Hash, System.Classes, System.JSON;
......
object rptOrders: TrptOrders
Left = 0
Top = 0
Caption = 'rptOrders'
ClientHeight = 441
ClientWidth = 624
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
TextHeight = 15
object frxReport1: TfrxReport
Version = '2024.2.1'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick, pbCopy, pbSelection]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 45639.622835810190000000
ReportOptions.LastChange = 45639.622835810190000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'begin'
''
'end.')
Left = 278
Top = 186
Datasets = <>
Variables = <>
Style = <>
end
object frxPDFExport1: TfrxPDFExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
EmbedFontsIfProtected = False
InteractiveFormsFontSubset = 'A-Z,a-z,0-9,#43-#47 '
OpenAfterExport = False
PrintOptimized = False
Outline = False
Background = False
HTMLTags = True
Quality = 95
Author = 'FastReport'
Subject = 'FastReport PDF export'
Creator = 'FastReport'
ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
HideToolbar = False
HideMenubar = False
HideWindowUI = False
FitWindow = False
CenterWindow = False
PrintScaling = False
PdfA = False
PDFStandard = psNone
PDFVersion = pv17
Left = 282
Top = 106
end
end
unit rOrders;
interface
uses
System.SysUtils, System.Classes, frxClass, frxDBSet,
frxExportBaseDialog, frxExportPDF, frCoreClasses, Uni, Data.DB,
XData.Service.Common, Aurelius.Mapping.Attributes, System.JSON, System.Generics.Collections;
type
TrptOrders = class(TDataModule)
// frxReport: TfrxReport;
// frxPDFExport: TfrxPDFExport;
// frxDBDataset: TfrxDBDataset;
// DataSource: TDataSource;
// UniQuery: TUniQuery;
frxReport1: TfrxReport;
frxPDFExport1: TfrxPDFExport;
private
{ Private declarations }
public
{ Public declarations }
procedure PrepareReport(OrderID: string);
end;
var
rptOrders: TrptOrders;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
{ TrptOrders }
procedure TrptOrders.PrepareReport(OrderID: string);
var
SQL: string;
begin
// try
// // 1. **Prepare the Query**
// SQL := 'SELECT * FROM orders WHERE ORDER_ID = :OrderID';
// UniQuery.Close;
// UniQuery.SQL.Text := SQL;
// UniQuery.ParamByName('OrderID').AsString := OrderID;
// UniQuery.Open;
//
// // 2. **Connect the Query to the Report**
// frxDBDataset.DataSet := UniQuery;
//
// // 3. **Set Report Variables (if needed)**
// frxReport.Variables['OrderID'] := QuotedStr(OrderID);
//
// // 4. **Prepare the Report**
// frxReport.PrepareReport(True);
// except
// on E: Exception do
// raise Exception.Create('Error preparing the report: ' + E.Message);
// end;
end;
end.
...@@ -20,8 +20,7 @@ uses ...@@ -20,8 +20,7 @@ uses
Auth.ServiceImpl in 'Source\Auth.ServiceImpl.pas', Auth.ServiceImpl in 'Source\Auth.ServiceImpl.pas',
Lookup.ServiceImpl in 'Source\Lookup.ServiceImpl.pas', Lookup.ServiceImpl in 'Source\Lookup.ServiceImpl.pas',
App.Server.Module in 'Source\App.Server.Module.pas' {AppServerModule: TDataModule}, App.Server.Module in 'Source\App.Server.Module.pas' {AppServerModule: TDataModule},
Data in 'Source\Data.pas' {FData}, Data in 'Source\Data.pas' {FData};
rOrders in 'Source\rOrders.pas' {rptOrders};
type type
TMemoLogAppender = class( TInterfacedObject, ILogAppender ) TMemoLogAppender = class( TInterfacedObject, ILogAppender )
......
...@@ -164,10 +164,6 @@ ...@@ -164,10 +164,6 @@
<Form>FData</Form> <Form>FData</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
</DCCReference> </DCCReference>
<DCCReference Include="Source\rOrders.pas">
<Form>rptOrders</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Base"> <BuildConfiguration Include="Base">
<Key>Base</Key> <Key>Base</Key>
</BuildConfiguration> </BuildConfiguration>
......
[Settings] [Settings]
MemoLogLevel=5 MemoLogLevel=5
FileLogLevel=5 FileLogLevel=5
LogFileNum=26 LogFileNum=28
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
......
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