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
5680ee7c
Commit
5680ee7c
authored
Dec 18, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Orders Page cleaned up
parent
37bffa08
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
5 deletions
+50
-5
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+19
-0
View.Orders.html
kgOrdersClient/View.Orders.html
+3
-0
View.Orders.pas
kgOrdersClient/View.Orders.pas
+26
-3
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+1
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.Orders.dfm
View file @
5680ee7c
...
@@ -330,6 +330,25 @@ object FViewOrders: TFViewOrders
...
@@ -330,6 +330,25 @@ object FViewOrders: TFViewOrders
end>
end>
DataSource = wdsOrders
DataSource = wdsOrders
end
end
object wcbPageSize: TWebComboBox
Left = 22
Top = 52
Width = 145
Height = 21
ElementClassName = 'custom-select'
ElementID = 'wcbpagesize'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = '500'
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'100'
'250'
'500'
'1000')
end
object XDataWebClient1: TXDataWebClient
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 28
Left = 28
...
...
kgOrdersClient/View.Orders.html
View file @
5680ee7c
...
@@ -38,6 +38,9 @@
...
@@ -38,6 +38,9 @@
<!-- Actions Row -->
<!-- Actions Row -->
<div
class=
"row mt-3 justify-content-center"
>
<div
class=
"row mt-3 justify-content-center"
>
<div
class=
"col-auto d-flex align-items-center"
>
<label
class=
"mt-3"
style=
"font-weight: 700;"
>
Show
<select
class=
"custom-select"
id=
"wcbpagesize"
style=
"font-size: 1.00rem;"
></select>
entries
</label>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<button
id=
"btnaddorder"
class=
"btn btn-secondary mt-3"
>
Add Order
</button>
<button
id=
"btnaddorder"
class=
"btn btn-secondary mt-3"
>
Add Order
</button>
</div>
</div>
...
...
kgOrdersClient/View.Orders.pas
View file @
5680ee7c
...
@@ -61,6 +61,7 @@ type
...
@@ -61,6 +61,7 @@ type
wdsSave
:
TWebDataSource
;
wdsSave
:
TWebDataSource
;
xdwdsSaveCURR_ID
:
TIntegerField
;
xdwdsSaveCURR_ID
:
TIntegerField
;
wdbtcOrders
:
TWebDBTableControl
;
wdbtcOrders
:
TWebDBTableControl
;
wcbPageSize
:
TWebComboBox
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
...
@@ -141,6 +142,7 @@ begin
...
@@ -141,6 +142,7 @@ begin
//today := TDateTime.Today;
//today := TDateTime.Today;
dtpStartDate
.
Date
:=
0
;
dtpStartDate
.
Date
:=
0
;
dtpEndDate
.
Date
:=
0
;
dtpEndDate
.
Date
:=
0
;
wcbPageSize
.
Text
:=
'500'
;
getOrders
(
GenerateSearchOptions
());
getOrders
(
GenerateSearchOptions
());
end
;
end
;
...
@@ -413,6 +415,8 @@ procedure TFViewOrders.GetOrders(searchOptions: string);
...
@@ -413,6 +415,8 @@ procedure TFViewOrders.GetOrders(searchOptions: string);
var
var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
orderList
:
TJSObject
;
orderList
:
TJSObject
;
orderListLength
:
integer
;
TotalPages
:
integer
;
begin
begin
if
PageNumber
>
0
then
if
PageNumber
>
0
then
begin
begin
...
@@ -431,9 +435,28 @@ begin
...
@@ -431,9 +435,28 @@ begin
endSpinner
();
endSpinner
();
end
;
end
;
lblEntries
.
Caption
:=
'Total entries: '
+
IntToStr
(
integer
(
orderList
[
'count'
]));
orderListLength
:=
integer
(
orderList
[
'count'
]);
TotalPages
:=
(
(
orderListLength
+
PageSize
-
1
)
div
PageSize
);
if
orderListLength
=
0
then
begin
lblEntries
.
Caption
:=
'No entries found'
;
end
else
if
(
PageNumber
*
PageSize
)
<
orderListLength
then
begin
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
PageNumber
*
PageSize
)
+
' of '
+
IntToStr
(
orderListLength
);
end
else
if
(
PageNumber
*
PageSize
)
>=
orderListLength
then
begin
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
orderListLength
)
+
' of '
+
IntToStr
(
orderListLength
);
end
;
// Optional: Continue using pagination if needed
// Optional: Continue using pagination if needed
GeneratePagination
(
(
integer
(
orderList
[
'count'
])
+
PageSize
-
1
)
div
PageSize
);
GeneratePagination
(
TotalPages
);
end
;
end
;
end
;
end
;
...
@@ -555,7 +578,7 @@ var
...
@@ -555,7 +578,7 @@ var
searchOptions
:
string
;
searchOptions
:
string
;
begin
begin
//PageNumber := 1;
//PageNumber := 1;
PageSize
:=
50
;
PageSize
:=
StrToInt
(
wcbPageSize
.
Text
)
;
OrderBy
:=
wcbSortBy
.
Text
;
OrderBy
:=
wcbSortBy
.
Text
;
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
5680ee7c
...
@@ -387,7 +387,7 @@ begin
...
@@ -387,7 +387,7 @@ begin
order
.
shipDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DONE'
).
AsString
;
order
.
shipDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DONE'
).
AsString
;
order
.
price
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PRICE'
).
AsString
;
order
.
price
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PRICE'
).
AsString
;
order
.
qbRefNum
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'QB_REF_NUM'
).
AsString
;
order
.
qbRefNum
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'QB_REF_NUM'
).
AsString
;
order
.
orderType
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
;
order
.
orderType
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
.
Replace
(
'_'
,
' '
)
;
if
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
=
'web_plate'
then
if
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
=
'web_plate'
then
begin
begin
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
5680ee7c
[Settings]
[Settings]
MemoLogLevel
=
4
MemoLogLevel
=
4
FileLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
48
LogFileNum
=
50
webClientVersion
=
1.0.0
webClientVersion
=
1.0.0
[Database]
[Database]
...
...
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