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
0b8080eb
Commit
0b8080eb
authored
Sep 27, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all minor bugs previously discussed are now fixed
parent
06a2b66b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
10 deletions
+104
-10
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+18
-0
View.Orders.html
kgOrdersClient/View.Orders.html
+9
-2
View.Orders.pas
kgOrdersClient/View.Orders.pas
+71
-6
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+2
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+3
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.Orders.dfm
View file @
0b8080eb
...
@@ -22,6 +22,18 @@ object FViewOrders: TFViewOrders
...
@@ -22,6 +22,18 @@ object FViewOrders: TFViewOrders
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
end
object lblEntries2: TWebLabel
Left = 8
Top = 358
Width = 49
Height = 13
Caption = 'lblEntries2'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbPageSize: TWebComboBox
object wcbPageSize: TWebComboBox
Left = -4
Left = -4
Top = 52
Top = 52
...
@@ -206,6 +218,12 @@ object FViewOrders: TFViewOrders
...
@@ -206,6 +218,12 @@ object FViewOrders: TFViewOrders
object XDataWebDataSet1colors: TStringField
object XDataWebDataSet1colors: TStringField
FieldName = 'colors'
FieldName = 'colors'
end
end
object XDataWebDataSet1plateDue: TStringField
FieldName = 'plateDue'
end
object XDataWebDataSet1plateDone: TStringField
FieldName = 'plateDone'
end
end
end
object WebDataSource1: TWebDataSource
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
DataSet = XDataWebDataSet1
...
...
kgOrdersClient/View.Orders.html
View file @
0b8080eb
...
@@ -21,10 +21,12 @@
...
@@ -21,10 +21,12 @@
<input
class=
"form-control input-sm"
id=
"dtpenddate"
type=
"date"
>
<input
class=
"form-control input-sm"
id=
"dtpenddate"
type=
"date"
>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
class=
"py-2"
style=
"font-weight: 700;"
>
Status Type:
</label>
<label
style=
"font-weight: 700;"
>
Status Type:
</label>
<div>
<select
class=
"custom-select"
id=
"wcbsortby"
style=
"font-size: 1.00rem;"
></select>
<select
class=
"custom-select"
id=
"wcbsortby"
style=
"font-size: 1.00rem;"
></select>
</div>
</div>
</div>
</div>
</div>
<div
class =
"row mt-2"
>
<div
class =
"row mt-2"
>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<button
class=
"mt2-2"
id=
"btnapply"
></button>
<button
class=
"mt2-2"
id=
"btnapply"
></button>
...
@@ -48,6 +50,9 @@
...
@@ -48,6 +50,9 @@
</div>
</div>
</form>
</form>
</div>
</div>
<div
class=
"row"
>
<label
id=
"lblentries"
></label>
</div>
<table
class=
"table table-responsive table-striped table-bordered"
id=
"tblPhoneGrid"
>
<table
class=
"table table-responsive table-striped table-bordered"
id=
"tblPhoneGrid"
>
<thead
class=
"thead-dark"
>
<thead
class=
"thead-dark"
>
<tr>
<tr>
...
@@ -59,6 +64,8 @@
...
@@ -59,6 +64,8 @@
<th
scope=
"col"
>
Proof Date
</th>
<th
scope=
"col"
>
Proof Date
</th>
<th
scope=
"col"
>
Art Due
</th>
<th
scope=
"col"
>
Art Due
</th>
<th
scope=
"col"
>
Art Done
</th>
<th
scope=
"col"
>
Art Done
</th>
<th
scope=
"col"
>
Plate Due
</th>
<th
scope=
"col"
>
Plate Done
</th>
<th
scope=
"col"
>
Mount Due
</th>
<th
scope=
"col"
>
Mount Due
</th>
<th
scope=
"col"
>
Mount Done
</th>
<th
scope=
"col"
>
Mount Done
</th>
<th
scope=
"col"
>
Ship Due
</th>
<th
scope=
"col"
>
Ship Due
</th>
...
@@ -72,7 +79,7 @@
...
@@ -72,7 +79,7 @@
<!-- Rows will be added dynamically via Delphi code -->
<!-- Rows will be added dynamically via Delphi code -->
</tbody>
</tbody>
</table>
</table>
<label
id=
"lblentries"
></label>
<label
id=
"lblentries
2
"
></label>
<nav
aria-label=
"Page navigation"
>
<nav
aria-label=
"Page navigation"
>
<ul
class=
"pagination justify-content-center"
id=
"pagination"
>
<ul
class=
"pagination justify-content-center"
id=
"pagination"
>
<!-- Pagination items will be added dynamically via Delphi code -->
<!-- Pagination items will be added dynamically via Delphi code -->
...
...
kgOrdersClient/View.Orders.pas
View file @
0b8080eb
...
@@ -43,6 +43,9 @@ type
...
@@ -43,6 +43,9 @@ type
btnFilters
:
TWebButton
;
btnFilters
:
TWebButton
;
dtpStartDate
:
TWebDateTimePicker
;
dtpStartDate
:
TWebDateTimePicker
;
dtpEndDate
:
TWebDateTimePicker
;
dtpEndDate
:
TWebDateTimePicker
;
lblEntries2
:
TWebLabel
;
XDataWebDataSet1plateDue
:
TStringField
;
XDataWebDataSet1plateDone
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
...
@@ -187,7 +190,7 @@ begin
...
@@ -187,7 +190,7 @@ begin
// Art Due Cell
// Art Due Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Art Due'
);
Cell
.
setAttribute
(
'data-label'
,
'Art Due'
);
if
XDataWebDataSet1artD
on
e
.
Value
=
''
then
if
XDataWebDataSet1artD
u
e
.
Value
=
''
then
Cell
.
innerText
:=
'None'
Cell
.
innerText
:=
'None'
else
else
Cell
.
innerText
:=
XDataWebDataSet1artDue
.
Value
;
Cell
.
innerText
:=
XDataWebDataSet1artDue
.
Value
;
...
@@ -202,6 +205,25 @@ begin
...
@@ -202,6 +205,25 @@ begin
Cell
.
innerText
:=
XDataWebDataSet1artDone
.
Value
;
Cell
.
innerText
:=
XDataWebDataSet1artDone
.
Value
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
// Plate Due Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Plate Due'
);
if
XDataWebDataSet1plateDue
.
Value
=
''
then
Cell
.
innerText
:=
'None'
else
Cell
.
innerText
:=
XDataWebDataSet1plateDue
.
Value
;
NewRow
.
appendChild
(
Cell
);
// Plate Done Cell
console
.
log
(
'plate done'
);
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Plate Done'
);
if
XDataWebDataSet1plateDone
.
Value
=
''
then
Cell
.
innerText
:=
'None'
else
Cell
.
innerText
:=
XDataWebDataSet1plateDone
.
Value
;
NewRow
.
appendChild
(
Cell
);
// Mount Due Cell
// Mount Due Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Mount Due'
);
Cell
.
setAttribute
(
'data-label'
,
'Mount Due'
);
...
@@ -266,7 +288,6 @@ begin
...
@@ -266,7 +288,6 @@ begin
colorObject
:=
TJSObject
(
TJSJSON
.
parse
(
XDataWebDataSet1colors
.
Value
));
colorObject
:=
TJSObject
(
TJSJSON
.
parse
(
XDataWebDataSet1colors
.
Value
));
colorList
:=
TJSArray
(
colorObject
[
'items'
]);
colorList
:=
TJSArray
(
colorObject
[
'items'
]);
colors
:=
colorList
.
flength
;
colors
:=
colorList
.
flength
;
console
.
log
(
colorList
);
Cell
.
innerText
:=
IntToStr
(
colors
);
Cell
.
innerText
:=
IntToStr
(
colors
);
end
;
end
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
...
@@ -308,6 +329,32 @@ begin
...
@@ -308,6 +329,32 @@ begin
// Page Numbers
// Page Numbers
if
TotalPages
<=
7
then
begin
for
I
:=
1
to
7
do
begin
PageItem
:=
TJSHTMLElement
(
document
.
createElement
(
'li'
));
PageItem
.
className
:=
'page-item'
;
if
I
=
PageNumber
then
PageItem
.
classList
.
add
(
'selected-number'
);
// Add the selected-number class
PageLink
:=
TJSHTMLElement
(
document
.
createElement
(
'a'
));
PageLink
.
className
:=
'page-link'
;
PageLink
.
innerText
:=
IntToStr
(
I
);
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
var
PageNum
:
Integer
;
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetOrders
(
GenerateSearchOptions
());
end
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
end
;
end
else
begin
if
PageNumber
<=
4
then
if
PageNumber
<=
4
then
// If page number is low enough no early elipsis needed
// If page number is low enough no early elipsis needed
Begin
Begin
...
@@ -421,6 +468,7 @@ begin
...
@@ -421,6 +468,7 @@ begin
end
;
end
;
PageItem
.
appendChild
(
PageLink
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
PaginationElement
.
appendChild
(
PageItem
);
end
;
// Next Button
// Next Button
PageItem
:=
TJSHTMLElement
(
document
.
createElement
(
'li'
));
PageItem
:=
TJSHTMLElement
(
document
.
createElement
(
'li'
));
...
@@ -464,17 +512,16 @@ begin
...
@@ -464,17 +512,16 @@ begin
asm
asm
startSpinner
();
startSpinner
();
end
;
end
;
console
.
log
(
PageNumber
);
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.GetOrders'
,
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.GetOrders'
,
[
searchOptions
]));
[
searchOptions
]));
orderList
:=
TJSObject
(
xdcResponse
.
Result
);
orderList
:=
TJSObject
(
xdcResponse
.
Result
);
data
:=
TJSArray
(
orderList
[
'data'
]);
data
:=
TJSArray
(
orderList
[
'data'
]);
callListLength
:=
integer
(
orderList
[
'count'
]);
callListLength
:=
integer
(
orderList
[
'count'
]);
ClearTable
();
ClearTable
();
console
.
log
(
orderList
[
'data'
]);
XDataWebDataSet1
.
Close
;
XDataWebDataSet1
.
Close
;
XDataWebDataSet1
.
SetJsonData
(
orderList
[
'data'
]);
XDataWebDataSet1
.
SetJsonData
(
orderList
[
'data'
]);
XDataWebDataSet1
.
Open
;
XDataWebDataSet1
.
Open
;
console
.
log
(
orderList
[
'data'
]);
asm
asm
setTimeout
(
endSpinner
,
2000
);
setTimeout
(
endSpinner
,
2000
);
end
;
end
;
...
@@ -485,17 +532,28 @@ begin
...
@@ -485,17 +532,28 @@ begin
XDataWebDataSet1
.
Next
;
XDataWebDataSet1
.
Next
;
end
;
end
;
TotalPages
:=
(
callListLength
+
PageSize
-
1
)
div
PageSize
;
TotalPages
:=
(
callListLength
+
PageSize
-
1
)
div
PageSize
;
if
(
PageNumber
*
PageSize
)
<
callListLength
then
if
callListLength
=
0
then
begin
lblEntries
.
Caption
:=
'No entries found'
;
lblEntries2
.
Caption
:=
'No entries found'
;
end
else
if
(
PageNumber
*
PageSize
)
<
callListLength
then
begin
begin
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
PageNumber
*
PageSize
)
+
' - '
+
IntToStr
(
PageNumber
*
PageSize
)
+
' of '
+
IntToStr
(
callListLength
);
' of '
+
IntToStr
(
callListLength
);
lblEntries2
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
PageNumber
*
PageSize
)
+
' of '
+
IntToStr
(
callListLength
);
end
end
else
else
if
(
PageNumber
*
PageSize
)
>=
callListLength
then
begin
begin
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
callListLength
)
+
' - '
+
IntToStr
(
callListLength
)
+
' of '
+
IntToStr
(
callListLength
);
' of '
+
IntToStr
(
callListLength
);
lblEntries2
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
callListLength
)
+
' of '
+
IntToStr
(
callListLength
);
end
;
end
;
GeneratePagination
(
TotalPages
);
GeneratePagination
(
TotalPages
);
end
;
end
;
...
@@ -604,6 +662,13 @@ begin
...
@@ -604,6 +662,13 @@ begin
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&orderby='
+
OrderBy
;
'&orderby='
+
OrderBy
;
if
btnFilters
.
Caption
=
'Hide Filters'
then
begin
searchOptions
:=
searchOptions
+
'&startDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpStartDate
.
Date
)
+
'&endDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpEndDate
.
Date
)
+
'&filterType='
+
wcbSortBy
.
Text
;
end
;
Result
:=
searchOptions
;
Result
:=
searchOptions
;
end
;
end
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
0b8080eb
...
@@ -65,6 +65,8 @@ type
...
@@ -65,6 +65,8 @@ type
proofDone
:
string
;
proofDone
:
string
;
artDue
:
string
;
artDue
:
string
;
artDone
:
string
;
artDone
:
string
;
plateDue
:
string
;
plateDone
:
string
;
mountDue
:
string
;
mountDue
:
string
;
mountDone
:
string
;
mountDone
:
string
;
shipDue
:
string
;
shipDue
:
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
0b8080eb
...
@@ -371,7 +371,7 @@ begin
...
@@ -371,7 +371,7 @@ begin
' AND '
+
quotedStr
(
startDate
)
+
' <= oss.STATUS_DATE AND '
+
' AND '
+
quotedStr
(
startDate
)
+
' <= oss.STATUS_DATE AND '
+
quotedStr
(
endDate
)
+
' >= oss.STATUS_DATE'
;
quotedStr
(
endDate
)
+
' >= oss.STATUS_DATE'
;
SQL
:=
SQL
+
'o.PRICE, qb.QB_REF_NUM '
+
whereSQL
+
' ORDER BY '
+
filterType
+
'_DUE DESC
'
;
SQL
:=
SQL
+
'o.PRICE, qb.QB_REF_NUM '
+
whereSQL
+
' ORDER BY '
+
filterType
+
'_DUE DESC
LIMIT '
+
limit
+
' OFFSET '
+
offset
;
end
end
else
else
begin
begin
...
@@ -399,6 +399,8 @@ begin
...
@@ -399,6 +399,8 @@ begin
order
.
proofDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PROOF_DONE'
).
AsString
;
order
.
proofDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PROOF_DONE'
).
AsString
;
order
.
artDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DUE'
).
AsString
;
order
.
artDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DUE'
).
AsString
;
order
.
artDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DONE'
).
AsString
;
order
.
artDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DONE'
).
AsString
;
order
.
plateDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PLATE_DUE'
).
AsString
;
order
.
plateDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PLATE_DONE'
).
AsString
;
order
.
mountDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DUE'
).
AsString
;
order
.
mountDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DUE'
).
AsString
;
order
.
mountDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DONE'
).
AsString
;
order
.
mountDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DONE'
).
AsString
;
order
.
shipDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DUE'
).
AsString
;
order
.
shipDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DUE'
).
AsString
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
0b8080eb
[Options]
[Options]
LogFileNum
=
1
29
LogFileNum
=
1
34
UpdateTimerLength
=
0
UpdateTimerLength
=
0
...
...
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