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
af90a3ab
Commit
af90a3ab
authored
Dec 06, 2024
by
Elias Sarraf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup a bit. rename View.OrderList View.AddOrder
parent
7f19b291
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
138 additions
and
223 deletions
+138
-223
View.AddOrder.dfm
kgOrdersClient/View.AddOrder.dfm
+58
-46
View.AddOrder.html
kgOrdersClient/View.AddOrder.html
+27
-0
View.AddOrder.pas
kgOrdersClient/View.AddOrder.pas
+38
-29
View.OrderList.html
kgOrdersClient/View.OrderList.html
+0
-63
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+0
-14
View.Orders.html
kgOrdersClient/View.Orders.html
+0
-15
View.Orders.pas
kgOrdersClient/View.Orders.pas
+8
-17
webKGOrders.dpr
kgOrdersClient/webKGOrders.dpr
+1
-1
webKGOrders.dproj
kgOrdersClient/webKGOrders.dproj
+2
-2
Auth.Database.dfm
kgOrdersServer/Source/Auth.Database.dfm
+1
-3
Auth.Database.pas
kgOrdersServer/Source/Auth.Database.pas
+0
-21
Database.dfm
kgOrdersServer/Source/Database.dfm
+0
-2
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+3
-10
No files found.
kgOrdersClient/View.
OrderList
.dfm
→
kgOrdersClient/View.
AddOrder
.dfm
View file @
af90a3ab
object F
OrderList: TFOrderList
object F
AddOrder: TFAddOrder
Width = 1016
Width = 1016
Height = 6
83
Height = 6
37
Font.Charset = ANSI_CHARSET
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Color = clBlack
Font.Height = -11
Font.Height = -11
Font.Name = 'Arial'
Font.Name = 'Arial'
Font.Style = []
Font.Style = []
ParentFont = False
ParentFont = False
OnShow = WebFormShow
object lblEntries: TWebLabel
object lblEntries: TWebLabel
Left = 0
Left = 0
Top = 336
Top = 336
...
@@ -31,9 +32,33 @@ object FOrderList: TFOrderList
...
@@ -31,9 +32,33 @@ object FOrderList: TFOrderList
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
end
object WebLabel1: TWebLabel
Left = 447
Top = 169
Width = 53
Height = 14
Caption = 'Selected Id'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object WebLabel2: TWebLabel
Left = 278
Top = 169
Width = 95
Height = 14
Caption = 'Enter Customer Info'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object pnlMessage: TWebPanel
object pnlMessage: TWebPanel
Left =
370
Left =
212
Top =
558
Top =
41
Width = 121
Width = 121
Height = 33
Height = 33
ElementClassName = 'card'
ElementClassName = 'card'
...
@@ -75,84 +100,69 @@ object FOrderList: TFOrderList
...
@@ -75,84 +100,69 @@ object FOrderList: TFOrderList
end
end
end
end
object cbCorrugatedPlate: TWebCheckBox
object cbCorrugatedPlate: TWebCheckBox
Left =
19
0
Left =
43
0
Top =
26
Top =
123
Width = 113
Width = 113
Height = 22
Height = 22
Caption = 'Corrugated Plate'
Caption = 'Corrugated Plate'
Checked = True
Checked = True
ChildOrder = 5
ChildOrder = 5
ElementID = 'cb_corrugatedplate'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
State = cbChecked
State = cbChecked
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbCorrugatedPlateClick
end
end
object cbWebPlate: TWebCheckBox
object cbWebPlate: TWebCheckBox
Left =
324
Left =
562
Top =
26
Top =
123
Width = 113
Width = 113
Height = 22
Height = 22
Caption = 'Web Plate'
Caption = 'Web Plate'
ChildOrder = 5
ChildOrder = 5
ElementID = 'cb_webplate'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnConfirm: TWebButton
Left = 674
Top = 51
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 9
ElementID = 'btn_confirm'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbWebPlateClick
end
end
object edt
CompanyName
: TWebEdit
object edt
ID
: TWebEdit
Left =
170
Left =
447
Top =
66
Top =
183
Width = 121
Width = 121
Height = 22
Height = 22
ChildOrder = 8
ChildOrder = 8
ElementID = 'edt_companyname'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
Text = 'edtCompanyName'
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = edtCompanyNameChange
end
end
object edtID: TWebEdit
object btnConfirm: TWebButton
Left = 334
Left = 574
Top = 66
Top = 180
Width = 121
Width = 96
Height = 22
Height = 25
Caption = 'Confirm'
ChildOrder = 9
ChildOrder = 9
ElementID = 'edt_id'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
Text = 'edtID'
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
OnClick = btnConfirmClick
end
end
object btn
Filter
: TWebButton
object btn
Cancel
: TWebButton
Left =
564
Left =
682
Top = 1
95
Top = 1
80
Width = 96
Width = 96
Height = 25
Height = 25
Caption = '
Filter
'
Caption = '
Cancel
'
ChildOrder = 9
ChildOrder = 9
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btn
Filter
Click
OnClick = btn
Cancel
Click
end
end
object TMSFNCGrid1: TTMSFNCGrid
object TMSFNCGrid1: TTMSFNCGrid
Left =
228
Left =
132
Top =
308
Top =
227
Width =
588
Width =
803
Height = 353
Height = 353
AdaptToStyle = True
AdaptToStyle = True
ParentDoubleBuffered = False
ParentDoubleBuffered = False
DoubleBuffered = True
DoubleBuffered = True
TabOrder =
7
TabOrder =
6
DefaultRowHeight = 40.000000000000000000
DefaultRowHeight = 40.000000000000000000
FixedColumns = 0
FixedColumns = 0
ColumnCount = 0
ColumnCount = 0
...
@@ -170,6 +180,7 @@ object FOrderList: TFOrderList
...
@@ -170,6 +180,7 @@ object FOrderList: TFOrderList
Options.Mouse.RowSizeMargin = 6
Options.Mouse.RowSizeMargin = 6
Options.Mouse.FixedColumnSizing = True
Options.Mouse.FixedColumnSizing = True
Options.Mouse.FixedRowSizing = True
Options.Mouse.FixedRowSizing = True
OnSelectedCell = TMSFNCGrid1SelectedCell
Columns = <
Columns = <
item
item
BorderWidth = 1
BorderWidth = 1
...
@@ -328,9 +339,9 @@ object FOrderList: TFOrderList
...
@@ -328,9 +339,9 @@ object FOrderList: TFOrderList
DesignTimeSampleData = True
DesignTimeSampleData = True
end
end
object edtSearch: TWebEdit
object edtSearch: TWebEdit
Left =
437
Left =
278
Top = 1
98
Top = 1
83
Width = 1
21
Width = 1
46
Height = 22
Height = 22
ChildOrder = 8
ChildOrder = 8
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
...
@@ -343,6 +354,7 @@ object FOrderList: TFOrderList
...
@@ -343,6 +354,7 @@ object FOrderList: TFOrderList
Top = 434
Top = 434
end
end
object xdwdsCustomers: TXDataWebDataSet
object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 84
Left = 84
Top = 490
Top = 490
object xdwdsCustomersID: TIntegerField
object xdwdsCustomersID: TIntegerField
...
...
kgOrdersClient/View.AddOrder.html
0 → 100644
View file @
af90a3ab
<div
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"container mt-4"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12 col-md-8"
>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<div
id=
"pnl_message"
class=
"alert alert-danger"
>
<button
id=
"view.login.message.button"
type=
"button"
class=
"btn-close"
aria-label=
"Close"
></button>
<span
id=
"view.login.message.label"
></span>
</div>
</div>
</div>
<div
class=
"row"
>
<label
id=
"lblentries"
></label>
</div>
<label
id=
"lblentries2"
></label>
<nav
aria-label=
"Page navigation"
>
<ul
class=
"pagination justify-content-center"
id=
"pagination"
>
<!-- Pagination items will be added dynamically via Delphi code -->
</ul>
</nav>
</div>
</div>
</div>
</div>
kgOrdersClient/View.
OrderList
.pas
→
kgOrdersClient/View.
AddOrder
.pas
View file @
af90a3ab
unit
View
.
OrderList
;
unit
View
.
AddOrder
;
interface
interface
...
@@ -13,16 +13,15 @@ uses
...
@@ -13,16 +13,15 @@ uses
Vcl
.
Controls
,
ConnectionModule
;
Vcl
.
Controls
,
ConnectionModule
;
type
type
TF
OrderList
=
class
(
TWebForm
)
TF
AddOrder
=
class
(
TWebForm
)
lblEntries
:
TWebLabel
;
lblEntries
:
TWebLabel
;
lblEntries2
:
TWebLabel
;
lblEntries2
:
TWebLabel
;
edtSearch
:
TWebEdit
;
edtSearch
:
TWebEdit
;
edtCompanyName
:
TWebEdit
;
edtID
:
TWebEdit
;
edtID
:
TWebEdit
;
pnlMessage
:
TWebPanel
;
pnlMessage
:
TWebPanel
;
lblMessage
:
TWebLabel
;
lblMessage
:
TWebLabel
;
btnCloseNotification
:
TWebButton
;
btnCloseNotification
:
TWebButton
;
btn
Filter
:
TWebButton
;
btn
Cancel
:
TWebButton
;
XDataWebClient1
:
TXDataWebClient
;
XDataWebClient1
:
TXDataWebClient
;
wdsCustomers
:
TWebDataSource
;
wdsCustomers
:
TWebDataSource
;
xdwdsCustomers
:
TXDataWebDataSet
;
xdwdsCustomers
:
TXDataWebDataSet
;
...
@@ -34,12 +33,15 @@ type
...
@@ -34,12 +33,15 @@ type
btnConfirm
:
TWebButton
;
btnConfirm
:
TWebButton
;
cbCorrugatedPlate
:
TWebCheckBox
;
cbCorrugatedPlate
:
TWebCheckBox
;
cbWebPlate
:
TWebCheckBox
;
cbWebPlate
:
TWebCheckBox
;
WebLabel1
:
TWebLabel
;
WebLabel2
:
TWebLabel
;
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
btnFilterClick
(
Sender
:
TObject
);
procedure
cbCorrugatedPlateClick
(
Sender
:
TObject
);
procedure
cbCorrugatedPlateClick
(
Sender
:
TObject
);
procedure
cbWebPlateClick
(
Sender
:
TObject
);
procedure
cbWebPlateClick
(
Sender
:
TObject
);
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
edtSearchChange
(
Sender
:
TObject
);
procedure
edtSearchChange
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
TMSFNCGrid1SelectedCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
private
private
[
async
]
procedure
getCustomers
();
[
async
]
procedure
getCustomers
();
procedure
PopulateGridManually
;
procedure
PopulateGridManually
;
...
@@ -48,19 +50,19 @@ type
...
@@ -48,19 +50,19 @@ type
end
;
end
;
var
var
F
OrderList
:
TFOrderList
;
F
AddOrder
:
TFAddOrder
;
implementation
implementation
{$R *.dfm}
{$R *.dfm}
procedure
TF
OrderList
.
WebFormShow
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
WebFormShow
(
Sender
:
TObject
);
begin
begin
getCustomers
();
// Fetch and populate the grid with customer data
getCustomers
();
// Fetch and populate the grid with customer data
end
;
end
;
[
async
]
[
async
]
procedure
TF
OrderList
.
getCustomers
();
procedure
TF
AddOrder
.
getCustomers
();
var
var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
customerList
:
TJSObject
;
customerList
:
TJSObject
;
...
@@ -78,7 +80,7 @@ begin
...
@@ -78,7 +80,7 @@ begin
PopulateGridManually
;
PopulateGridManually
;
end
;
end
;
procedure
TF
OrderList
.
PopulateGridManually
;
procedure
TF
AddOrder
.
PopulateGridManually
;
var
var
RowIndex
:
Integer
;
RowIndex
:
Integer
;
begin
begin
...
@@ -90,10 +92,15 @@ begin
...
@@ -90,10 +92,15 @@ begin
TMSFNCGrid1
.
ColumnCount
:=
4
;
TMSFNCGrid1
.
ColumnCount
:=
4
;
TMSFNCGrid1
.
RowCount
:=
1
;
TMSFNCGrid1
.
RowCount
:=
1
;
TMSFNCGrid1
.
Cells
[
0
,
0
]
:=
'ID'
;
TMSFNCGrid1
.
Cells
[
0
,
0
]
:=
'ID'
;
TMSFNCGrid1
.
Cells
[
1
,
0
]
:=
'Name'
;
TMSFNCGrid1
.
Cells
[
1
,
0
]
:=
'
Short
Name'
;
TMSFNCGrid1
.
Cells
[
2
,
0
]
:=
'
Short
Name'
;
TMSFNCGrid1
.
Cells
[
2
,
0
]
:=
'Name'
;
TMSFNCGrid1
.
Cells
[
3
,
0
]
:=
'Address'
;
TMSFNCGrid1
.
Cells
[
3
,
0
]
:=
'Address'
;
TMSFNCGrid1
.
ColumnWidths
[
0
]
:=
40
;
TMSFNCGrid1
.
ColumnWidths
[
1
]
:=
80
;
TMSFNCGrid1
.
ColumnWidths
[
2
]
:=
250
;
TMSFNCGrid1
.
ColumnWidths
[
3
]
:=
400
;
// Populate the grid with data from the dataset
// Populate the grid with data from the dataset
xdwdsCustomers
.
First
;
xdwdsCustomers
.
First
;
RowIndex
:=
1
;
RowIndex
:=
1
;
...
@@ -103,22 +110,26 @@ begin
...
@@ -103,22 +110,26 @@ begin
TMSFNCGrid1
.
RowCount
:=
RowIndex
+
1
;
TMSFNCGrid1
.
RowCount
:=
RowIndex
+
1
;
TMSFNCGrid1
.
Cells
[
0
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'ID'
).
AsString
;
TMSFNCGrid1
.
Cells
[
0
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'ID'
).
AsString
;
TMSFNCGrid1
.
Cells
[
1
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'NAME'
).
AsString
;
TMSFNCGrid1
.
Cells
[
1
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'
SHORT_
NAME'
).
AsString
;
TMSFNCGrid1
.
Cells
[
2
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'
SHORT_
NAME'
).
AsString
;
TMSFNCGrid1
.
Cells
[
2
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'NAME'
).
AsString
;
TMSFNCGrid1
.
Cells
[
3
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'ADDRESS'
).
AsString
;
TMSFNCGrid1
.
Cells
[
3
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'ADDRESS'
).
AsString
;
Inc
(
RowIndex
);
Inc
(
RowIndex
);
xdwdsCustomers
.
Next
;
xdwdsCustomers
.
Next
;
end
;
end
;
// Auto-size columns
TMSFNCGrid1
.
AutoSizeColumns
;
finally
finally
TMSFNCGrid1
.
EndUpdate
;
TMSFNCGrid1
.
EndUpdate
;
end
;
end
;
end
;
end
;
procedure
TFOrderList
.
ApplyFilter
;
procedure
TFAddOrder
.
TMSFNCGrid1SelectedCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
begin
edtID
.
Text
:=
TMSFNCGrid1
.
Cells
[
0
,
ARow
];
end
;
procedure
TFAddOrder
.
ApplyFilter
;
var
var
fd
:
TTMSFNCGridFilterData
;
fd
:
TTMSFNCGridFilterData
;
i
:
Integer
;
i
:
Integer
;
...
@@ -126,14 +137,11 @@ var
...
@@ -126,14 +137,11 @@ var
begin
begin
SearchText
:=
Trim
(
edtSearch
.
Text
);
SearchText
:=
Trim
(
edtSearch
.
Text
);
// Remove any existing filters
TMSFNCGrid1
.
RemoveFilter
;
TMSFNCGrid1
.
RemoveFilter
;
TMSFNCGrid1
.
Filter
.
Clear
;
TMSFNCGrid1
.
Filter
.
Clear
;
//
Add a filter for each column
//
match on first 3 columns
for
i
:=
0
to
TMSFNCGrid1
.
ColumnCount
-
1
do
for
i
:=
0
to
2
do
begin
begin
fd
:=
TMSFNCGrid1
.
Filter
.
Add
;
fd
:=
TMSFNCGrid1
.
Filter
.
Add
;
fd
.
Column
:=
i
;
fd
.
Column
:=
i
;
...
@@ -152,27 +160,28 @@ begin
...
@@ -152,27 +160,28 @@ begin
end
;
end
;
procedure
TF
OrderList
.
btnFilter
Click
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
cbCorrugatedPlate
Click
(
Sender
:
TObject
);
begin
begin
ApplyFilter
;
cbWebPlate
.
Checked
:=
False
;
end
;
end
;
procedure
TF
OrderList
.
edtIDChange
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
cbWebPlateClick
(
Sender
:
TObject
);
begin
begin
cb
Web
Plate
.
Checked
:=
False
;
cb
Corrugated
Plate
.
Checked
:=
False
;
end
;
end
;
procedure
TF
OrderList
.
cbWebPlate
Click
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
btnConfirm
Click
(
Sender
:
TObject
);
begin
begin
cbCorrugatedPlate
.
Checked
:=
Fal
se
;
Clo
se
;
end
;
end
;
procedure
TF
OrderList
.
btnConfirm
Click
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
btnCancel
Click
(
Sender
:
TObject
);
begin
begin
edtID
.
Text
:=
''
;
Close
;
Close
;
end
;
end
;
procedure
TF
OrderList
.
edtSearchChange
(
Sender
:
TObject
);
procedure
TF
AddOrder
.
edtSearchChange
(
Sender
:
TObject
);
begin
begin
ApplyFilter
;
ApplyFilter
;
end
;
end
;
...
...
kgOrdersClient/View.OrderList.html
deleted
100644 → 0
View file @
7f19b291
<div
class=
"container pb-5 mt-5 orders-modal rounded-sm shadow border border-secondary bg-white"
>
<div
class=
"row sticky-top bg-white"
>
<div
class=
"col-auto"
>
<h4
class=
"custom-h4 mt-4"
>
Order List
</h4>
<p>
Review the list of orders below.
</p>
<hr
class=
"custom-hr"
>
</div>
</div>
<!-- Input Controls -->
<div
class=
"row mb-3"
>
<div
class=
"col-md-4"
>
<label
for=
"edt_companyname"
class=
"form-label"
>
Company Name
</label>
<input
type=
"text"
class=
"form-control"
id=
"edt_companyname"
placeholder=
"Enter company name"
>
</div>
<div
class=
"col-md-4"
>
<label
for=
"edt_id"
class=
"form-label"
>
Order ID
</label>
<input
type=
"text"
class=
"form-control"
id=
"edt_id"
placeholder=
"Enter order ID"
>
</div>
<div
class=
"col-md-2 d-flex align-items-center"
>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"cb_corrugatedplate"
>
<label
class=
"form-check-label"
for=
"cb_corrugatedplate"
>
Corrugated Plate
</label>
</div>
</div>
<div
class=
"col-md-2 d-flex align-items-center"
>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"cb_webplate"
>
<label
class=
"form-check-label"
for=
"cb_webplate"
>
Web Plate
</label>
</div>
</div>
</div>
<!-- Orders Table -->
<div
id=
"tbl_orders_container"
class=
"overflow-auto"
style=
"max-height: 400px;"
>
<table
id=
"tbl_orders"
class=
"table table-striped table-hover table-bordered"
>
<!-- TWebDBTableControl will render dynamically here -->
</table>
</div>
<!-- Pagination and Additional Labels -->
<div
class=
"row mt-3"
>
<label
id=
"lblentries"
class=
"col-auto"
></label>
<label
id=
"lblentries2"
class=
"col-auto"
></label>
</div>
<nav
aria-label=
"Page navigation"
>
<ul
class=
"pagination justify-content-center"
id=
"pagination"
>
<!-- Pagination items will be added dynamically via Delphi code -->
</ul>
</nav>
<!-- Confirm Button -->
<div
class=
"row mt-3"
>
<div
class=
"col-auto"
>
<button
type=
"button"
id=
"btn_confirm"
class=
"btn btn-primary"
>
Confirm
</button>
</div>
</div>
</div>
kgOrdersClient/View.Orders.dfm
View file @
af90a3ab
...
@@ -274,20 +274,6 @@ object FViewOrders: TFViewOrders
...
@@ -274,20 +274,6 @@ object FViewOrders: TFViewOrders
ListField = 'NAME'
ListField = 'NAME'
ListSource = wdsCustomers
ListSource = wdsCustomers
end
end
object pnlOrders: TWebPanel
Left = 38
Top = 132
Width = 461
Height = 181
ElementClassName = 'card'
ElementID = 'pnl_orders'
Caption = 'pnlOrders'
ChildOrder = 15
ElementBodyClassName = 'card-body'
ElementFont = efCSS
TabOrder = 13
Visible = False
end
object XDataWebClient1: TXDataWebClient
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 8
Left = 8
...
...
kgOrdersClient/View.Orders.html
View file @
af90a3ab
...
@@ -120,18 +120,3 @@
...
@@ -120,18 +120,3 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- pnl_orders Div -->
<div
id=
"pnl_orders"
style=
"display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1050;
padding: 20px;
border-radius: 10px;
width: 75%;
background-color: white;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);"
>
</div>
kgOrdersClient/View.Orders.pas
View file @
af90a3ab
...
@@ -63,7 +63,6 @@ type
...
@@ -63,7 +63,6 @@ type
xdwdsSave
:
TXDataWebDataSet
;
xdwdsSave
:
TXDataWebDataSet
;
wdsSave
:
TWebDataSource
;
wdsSave
:
TWebDataSource
;
xdwdsSaveCURR_ID
:
TIntegerField
;
xdwdsSaveCURR_ID
:
TIntegerField
;
pnlOrders
:
TWebPanel
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
...
@@ -107,7 +106,7 @@ var
...
@@ -107,7 +106,7 @@ var
implementation
implementation
uses
uses
XData
.
Model
.
Classes
,
View
.
Main
,
View
.
OrderList
;
XData
.
Model
.
Classes
,
View
.
Main
,
View
.
AddOrder
;
{$R *.dfm}
{$R *.dfm}
...
@@ -168,20 +167,16 @@ begin
...
@@ -168,20 +167,16 @@ begin
);
);
end
;
end
;
procedure
TFViewOrders
.
ShowOrderListForm
();
procedure
TFViewOrders
.
ShowOrderListForm
();
var
var
OrdersPanel
:
TJSHTMLElement
;
newform
:
TFAddOrder
;
begin
begin
// Get the panel element for orders
newform
:=
TFAddOrder
.
CreateNew
;
OrdersPanel
:=
TJSHTMLElement
(
document
.
getElementById
(
'pnl_orders'
));
// Hide the panel before loading the form
if
Assigned
(
OrdersPanel
)
then
OrdersPanel
.
style
.
setProperty
(
'display'
,
'none'
);
// Create the order list form, passing the ElementID
newform
.
Caption
:=
'Select Customer and Order Type'
;
TFOrderList
.
CreateForm
(
pnlOrders
.
ElementID
);
newForm
.
Popup
:=
True
;
newForm
.
Border
:=
fbDialog
;
console
.
log
(
newForm
.
GetElementHandle
);
// used to manage Back button handling to close subform
// used to manage Back button handling to close subform
window
.
location
.
hash
:=
'subform'
;
window
.
location
.
hash
:=
'subform'
;
...
@@ -189,16 +184,12 @@ begin
...
@@ -189,16 +184,12 @@ begin
newform
.
ShowModal
(
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
procedure
(
AValue
:
TModalResult
)
begin
begin
if
new
F
orm
.
edtID
.
Text
<>
''
then
if
new
f
orm
.
edtID
.
Text
<>
''
then
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
end
end
);
);
end
;
end
;
procedure
TFViewOrders
.
AddRowToTable
(
temp
:
string
);
procedure
TFViewOrders
.
AddRowToTable
(
temp
:
string
);
// Adds rows to the table
// Adds rows to the table
// PhoneNumber: phone number of the location
// PhoneNumber: phone number of the location
...
...
kgOrdersClient/webKGOrders.dpr
View file @
af90a3ab
...
@@ -18,7 +18,7 @@ uses
...
@@ -18,7 +18,7 @@ uses
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
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.
OrderList in 'View.OrderList.pas' {FOrderList
: TWebForm} {*.html};
View.
AddOrder in 'View.AddOrder.pas' {FAddOrder
: TWebForm} {*.html};
{$R *.res}
{$R *.res}
...
...
kgOrdersClient/webKGOrders.dproj
View file @
af90a3ab
...
@@ -171,8 +171,8 @@
...
@@ -171,8 +171,8 @@
<FormType>dfm</FormType>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
</DCCReference>
<DCCReference Include="View.
OrderList
.pas">
<DCCReference Include="View.
AddOrder
.pas">
<Form>F
OrderList
</Form>
<Form>F
AddOrder
</Form>
<FormType>dfm</FormType>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
</DCCReference>
...
...
kgOrdersServer/Source/Auth.Database.dfm
View file @
af90a3ab
...
@@ -19,11 +19,9 @@ object AuthDatabase: TAuthDatabase
...
@@ -19,11 +19,9 @@ object AuthDatabase: TAuthDatabase
object ucKG: TUniConnection
object ucKG: TUniConnection
ProviderName = 'MySQL'
ProviderName = 'MySQL'
Database = 'kg_order_entry'
Database = 'kg_order_entry'
SpecificOptions.Strings = (
'PostgreSQL.Schema=envoy')
Username = 'root'
Username = 'root'
LoginPrompt = False
LoginPrompt = False
Left = 6
9
Left = 6
7
Top = 131
Top = 131
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
end
end
...
...
kgOrdersServer/Source/Auth.Database.pas
View file @
af90a3ab
...
@@ -56,27 +56,6 @@ begin
...
@@ -56,27 +56,6 @@ begin
ucKG
.
Server
:=
iniStr
;
ucKG
.
Server
:=
iniStr
;
end
;
end
;
iniStr
:=
IniFile
.
ReadString
(
'Twilio'
,
'AccountSID'
,
''
);
if
iniStr
.
IsEmpty
then
Logger
.
Log
(
1
,
'iniFile: '
+
ChangeFileExt
(
Application
.
ExeName
,
'.ini'
)
+
' Twilio->AccountSID: Entry not found'
)
else
begin
Logger
.
Log
(
1
,
'iniFile: '
+
ChangeFileExt
(
Application
.
ExeName
,
'.ini'
)
+
' Twilio->AccountSID: '
+
iniStr
);
//accountSID := iniStr;
end
;
iniStr
:=
IniFile
.
ReadString
(
'Twilio'
,
'AuthHeader'
,
''
);
if
iniStr
.
IsEmpty
then
Logger
.
Log
(
1
,
'iniFile: '
+
ChangeFileExt
(
Application
.
ExeName
,
'.ini'
)
+
' Twilio->AuthHeader: Entry not found'
)
else
begin
Logger
.
Log
(
1
,
'iniFile: '
+
ChangeFileExt
(
Application
.
ExeName
,
'.ini'
)
+
' Twilio->AuthHeader: '
+
iniStr
);
//authHeader := iniStr;
end
;
Logger
.
Log
(
1
,
''
);
Logger
.
Log
(
1
,
''
);
finally
finally
IniFile
.
Free
;
IniFile
.
Free
;
...
...
kgOrdersServer/Source/Database.dfm
View file @
af90a3ab
...
@@ -5,8 +5,6 @@ object FDatabaseModule: TFDatabaseModule
...
@@ -5,8 +5,6 @@ object FDatabaseModule: TFDatabaseModule
object ucKG: TUniConnection
object ucKG: TUniConnection
ProviderName = 'MySQL'
ProviderName = 'MySQL'
Database = 'kg_order_entry'
Database = 'kg_order_entry'
SpecificOptions.Strings = (
'PostgreSQL.Schema=envoy')
Username = 'root'
Username = 'root'
LoginPrompt = False
LoginPrompt = False
Left = 75
Left = 75
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
af90a3ab
[Options]
[Options]
LogFileNum
=
22
LogFileNum
=
234
UpdateTimerLength
=
0
[Database]
[Database]
--Server
=
192.168.159.132
--Server
=
192.168.159.132
--Server
=
192.168.102.129
Server
=
192.168.198.129
Server
=
192.168.102.130
--Server
=
192.168.75.133
[Twilio]
AccountSID
=
AC37aeef9c36a2cccbaecbadafc172b2ff
AuthHeader
=
Basic QUMzN2FlZWY5YzM2YTJjY2NiYWVjYmFkYWZjMTcyYjJmZjo5NzM5OTAwYTgyZmRlNjVlMzI2ODFmZjVmMmI5ZGZjZgo=
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