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
39e0e52b
Commit
39e0e52b
authored
Nov 01, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed minor bugs and began work on edit mode
parent
b2e1a1b8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
237 additions
and
159 deletions
+237
-159
View.Main.pas
kgOrdersClient/View.Main.pas
+13
-3
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+46
-105
View.OrderEntryCorrugated.html
kgOrdersClient/View.OrderEntryCorrugated.html
+15
-23
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+53
-22
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+45
-0
View.Orders.html
kgOrdersClient/View.Orders.html
+8
-0
View.Orders.pas
kgOrdersClient/View.Orders.pas
+56
-5
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.Main.pas
View file @
39e0e52b
...
...
@@ -46,7 +46,8 @@ type
procedure
ShowForm
(
AFormClass
:
TWebFormClass
);
procedure
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
);
procedure
ViewOrderEntry
(
orderInfo
:
string
);
procedure
ViewOrderEntry
(
orderInfo
,
mode
:
string
);
procedure
ViewOrders
(
info
:
string
);
procedure
ShowUserForm
(
Info
:
string
);
end
;
...
...
@@ -171,11 +172,20 @@ begin
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
);
end
;
procedure
TFViewMain
.
ViewOrder
Entry
(
orderI
nfo
:
string
);
procedure
TFViewMain
.
ViewOrder
s
(
i
nfo
:
string
);
begin
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
FChildForm
:=
TFOrderEntry
.
CreateForm
(
WebPanel1
.
ElementID
,
orderInfo
);
console
.
log
(
info
);
FChildForm
:=
TFViewOrders
.
CreateForm
(
WebPanel1
.
ElementID
,
info
);
end
;
procedure
TFViewMain
.
ViewOrderEntry
(
orderInfo
,
mode
:
string
);
begin
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
FChildForm
:=
TFOrderEntry
.
CreateForm
(
WebPanel1
.
ElementID
,
orderInfo
,
mode
);
end
;
procedure
TFViewMain
.
ShowUserForm
(
Info
:
string
);
...
...
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
39e0e52b
...
...
@@ -379,34 +379,9 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
end
object edtArtLocation: TWebDBEdit
Left = 26
Top = 628
Width = 121
Height = 22
ChildOrder = 79
ElementID = 'edtartlocation'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_art_location'
DataSource = WebDataSource1
end
object edtDimensionalLayout: TWebDBEdit
Left = 316
Top = 314
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtdimensionallayout'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_dimension'
DataSource = WebDataSource1
end
object edtEmail: TWebDBEdit
Left = 316
Top = 3
68
Top = 3
76
Width = 121
Height = 22
AutoSize = True
...
...
@@ -417,22 +392,9 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_e_mail'
DataSource = WebDataSource1
end
object edtFTP: TWebDBEdit
Left = 316
Top = 390
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtftp'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ftp'
DataSource = WebDataSource1
end
object edtOther: TWebDBEdit
Left = 316
Top =
41
8
Top =
34
8
Width = 121
Height = 22
AutoSize = True
...
...
@@ -443,45 +405,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_other'
DataSource = WebDataSource1
end
object edtExistingCuttingDie: TWebDBEdit
Left = 316
Top = 446
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtexistingcuttingdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_existing_'
DataSource = WebDataSource1
end
object edtRefArtPrintCard: TWebDBEdit
Left = 316
Top = 474
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtrefartprintcard'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ref_art_p'
DataSource = WebDataSource1
end
object edtRefArtAPDF: TWebDBEdit
Left = 316
Top = 508
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtrefartapdf'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ref_art_a'
DataSource = WebDataSource1
end
object edtCADFile: TWebDBEdit
Left = 496
Top = 207
...
...
@@ -947,19 +870,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'layout_excalibur_die'
DataSource = WebDataSource1
end
object cbDiskorCD: TWebDBCheckBox
Left = 320
Top = 342
Width = 113
Height = 22
Caption = 'Disk or CD'
ChildOrder = 79
ElementID = 'cbdiskorcd'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_disk_or_cd'
DataSource = WebDataSource1
end
object cbSampleCarton: TWebDBCheckBox
Left = 316
Top = 286
...
...
@@ -999,19 +909,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_color_copy'
DataSource = WebDataSource1
end
object cbBWCopy: TWebDBCheckBox
Left = 316
Top = 207
Width = 113
Height = 22
Caption = 'B/W Copy'
ChildOrder = 79
ElementID = 'cbbwcopy'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_b_w_copy'
DataSource = WebDataSource1
end
object edtSpecialInstructions: TWebDBEdit
Left = 852
Top = 185
...
...
@@ -1037,6 +934,50 @@ object FOrderEntry: TFOrderEntry
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
end
object cbRefArtAPDF: TWebCheckBox
Left = 316
Top = 463
Width = 113
Height = 22
Caption = 'Ref Art A PDF?'
ChildOrder = 76
ElementID = 'edtrefartapdf'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbRefArtPrintCard: TWebCheckBox
Left = 316
Top = 435
Width = 113
Height = 22
Caption = 'Ref Art Print Card?'
ChildOrder = 76
ElementID = 'edtrefartprintcard'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbExistingCuttingDie: TWebCheckBox
Left = 316
Top = 407
Width = 113
Height = 22
Caption = 'Existing Cutting Die?'
ChildOrder = 76
ElementID = 'edtexistingcuttingdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbFTP: TWebCheckBox
Left = 320
Top = 318
Width = 113
Height = 22
Caption = 'FTP?'
ChildOrder = 76
ElementID = 'edtftp'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 244
...
...
kgOrdersClient/View.OrderEntryCorrugated.html
View file @
39e0e52b
...
...
@@ -92,52 +92,44 @@
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
B/W Copy:
</label>
<input
type=
"checkbox"
id=
"cbbwcopy"
>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Color Copy:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;"
>
Color Copy:
</label>
<input
type=
"checkbox"
id=
"cbcolorcopy"
>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Plates:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Plates:
</label>
<input
type=
"checkbox"
id=
"cbplates"
>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Simple Carton:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Simple Carton:
</label>
<input
type=
"checkbox"
id=
"cbsimpleCarton"
>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Dimensional Layout:
</label>
<input
id=
"edtdimensionallayout"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Disk or CD:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;"
>
Disk or CD:
</label>
<input
type=
"checkbox"
id=
"cbdiskorcd"
>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Email:
</label>
<input
id=
"edtemail"
class=
"form-control input-sm
"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Email:
</label>
<input
type=
"checkbox"
id=
"edtemail
"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
FTP:
</label>
<input
id=
"edtftp"
class=
"form-control input-sm
"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
FTP:
</label>
<input
type=
"checkbox"
id=
"edtftp
"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Other:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Other:
</label>
<input
class=
"form-control input-sm"
id=
"edtother"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Existing Cutting Die:
</label>
<input
class=
"form-control input-sm
"
id=
"edtexistingcuttingdie"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Existing Cutting Die:
</label>
<input
type=
"checkbox
"
id=
"edtexistingcuttingdie"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Ref Art Print Card:
</label>
<input
class=
"form-control input-sm
"
id=
"edtrefartprintcard"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Ref Art Print Card:
</label>
<input
type=
"checkbox
"
id=
"edtrefartprintcard"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Ref Art A PDF:
</label>
<input
id=
"edtrefartapdf"
class=
"form-control input-sm
"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Ref Art A PDF:
</label>
<input
type=
"checkbox"
id=
"edtrefartapdf
"
width=
'50%'
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Layout
</h4>
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
39e0e52b
...
...
@@ -42,14 +42,8 @@ type
edtPONumber
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
edtArtLocation
:
TWebDBEdit
;
edtDimensionalLayout
:
TWebDBEdit
;
edtEmail
:
TWebDBEdit
;
edtFTP
:
TWebDBEdit
;
edtOther
:
TWebDBEdit
;
edtExistingCuttingDie
:
TWebDBEdit
;
edtRefArtPrintCard
:
TWebDBEdit
;
edtRefArtAPDF
:
TWebDBEdit
;
edtCADFile
:
TWebDBEdit
;
edtAroundNo
:
TWebDBEdit
;
edtAcrossNo
:
TWebDBEdit
;
...
...
@@ -86,11 +80,9 @@ type
cbStickyBak
:
TWebDBCheckBox
;
WebDBCheckBox9
:
TWebDBCheckBox
;
cbExcaliburDie
:
TWebDBCheckBox
;
cbDiskorCD
:
TWebDBCheckBox
;
cbSampleCarton
:
TWebDBCheckBox
;
cbPlate
:
TWebDBCheckBox
;
cbColorCopy
:
TWebDBCheckBox
;
cbBWCopy
:
TWebDBCheckBox
;
XDataWebClient1
:
TXDataWebClient
;
edtSpecialInstructions
:
TWebDBEdit
;
tmrScrollTop
:
TWebTimer
;
...
...
@@ -186,6 +178,10 @@ type
XDataWebDataSet1staff_fields_art_due
:
TStringField
;
XDataWebDataSet1staff_fields_plate_due
:
TStringField
;
XDataWebDataSet1staff_fields_mount_due
:
TStringField
;
cbRefArtAPDF
:
TWebCheckBox
;
cbRefArtPrintCard
:
TWebCheckBox
;
cbExistingCuttingDie
:
TWebCheckBox
;
cbFTP
:
TWebCheckBox
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
...
...
@@ -201,9 +197,10 @@ type
FCurrentReportType
:
string
;
FSelectProc
:
TSelectProc
;
orderID
:
string
;
mode
:
string
;
//FJSONProc1: TJSONProc1;
public
class
function
CreateForm
(
AElementID
,
orderInfo
:
string
):
TWebForm
;
class
function
CreateForm
(
AElementID
,
orderInfo
,
mode
:
string
):
TWebForm
;
end
;
var
...
...
@@ -214,7 +211,7 @@ implementation
{$R *.dfm}
uses
View
.
Home
;
View
.
Home
,
View
.
Main
;
procedure
TFOrderEntry
.
btnConfirmClick
(
Sender
:
TObject
);
var
...
...
@@ -239,7 +236,6 @@ begin
begin
colorJSON
:=
TJSONObject
.
Create
;
itemList
:=
colorCollection
[
I
].
childNodes
;
//console.log(itemList.length);
for
J
:=
0
to
itemList
.
length
-
2
do
begin
header
:=
TJSHTMLElement
(
itemList
[
J
]).
children
[
0
].
innerText
.
Replace
(
':'
,
''
).
Trim
();
...
...
@@ -258,6 +254,22 @@ begin
XDataWebDataSet1staff_fields_mount_due
.
Value
:=
DateTimeToStr
(
dtpMountDue
.
Date
);
XDataWebDataSet1staff_fields_plate_due
.
Value
:=
DateTimeToStr
(
dtpPlateDue
.
Date
);
XDataWebDataSet1ORDER_DATE
.
Value
:=
dtpOrderDate
.
Date
;
if
cbFTP
.
Checked
then
XDataWebDataSet1supplied_by_customer_ftp
.
AsString
:=
'T'
else
XDataWebDataSet1supplied_by_customer_ftp
.
AsString
:=
''
;
if
cbExistingCuttingDie
.
Checked
then
XDataWebDataSet1supplied_by_customer_existing_
.
AsString
:=
'T'
else
XDataWebDataSet1supplied_by_customer_existing_
.
AsString
:=
''
;
if
cbRefArtPrintCard
.
Checked
then
XDataWebDataSet1supplied_by_customer_ref_art_p
.
AsString
:=
'T'
else
XDataWebDataSet1supplied_by_customer_ref_art_p
.
AsString
:=
''
;
if
cbRefArtAPDF
.
Checked
then
XDataWebDataSet1supplied_by_customer_ref_art_a
.
AsString
:=
'T'
else
XDataWebDataSet1supplied_by_customer_ref_art_a
.
AsString
:=
''
;
XDataWebDataSet1
.
Post
;
XDataWebDataSet1
.
First
;
while
not
XDataWebDataSet1
.
Eof
do
...
...
@@ -265,19 +277,19 @@ begin
for
Field
in
XDataWebDataSet1
.
Fields
do
begin
if
Field
is
TStringField
then
begin
if
Field
.
AsString
=
''
then
orderJSON
.
AddPair
(
Field
.
FieldName
,
''
)
else
orderJSON
.
AddPair
(
Field
.
FieldName
,
Field
.
AsString
);
// Add all other fields
end
begin
if
Field
.
AsString
=
''
then
orderJSON
.
AddPair
(
Field
.
FieldName
,
''
)
else
orderJSON
.
AddPair
(
Field
.
FieldName
,
Field
.
AsString
);
// Add all other fields
end
end
;
XDataWebDataSet1
.
Next
;
end
;
orderJSON
.
AddPair
(
'COMPANY_ID'
,
'749'
);
orderJSON
.
AddPair
(
'USER_ID'
,
'1011'
);
AddCorrugatedOrder
(
orderJSON
);
FViewMain
.
ViewOrders
(
'Success'
);
end
;
procedure
TFOrderEntry
.
AddCorrugatedOrder
(
orderJSON
:
TJSONObject
);
...
...
@@ -286,11 +298,13 @@ Response: TXDataClientResponse;
begin
Response
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddCorrugatedOrder'
,
[
orderJSON
.
ToString
]));
console
.
log
(
Response
);
end
;
class
function
TFOrderEntry
.
CreateForm
(
AElementID
,
orderInfo
:
string
):
TWebForm
;
class
function
TFOrderEntry
.
CreateForm
(
AElementID
,
orderInfo
,
mode
:
string
):
TWebForm
;
var
localMode
:
string
;
begin
localMode
:=
mode
;
Application
.
CreateForm
(
TFOrderEntry
,
AElementID
,
Result
,
procedure
(
AForm
:
TObject
)
begin
...
...
@@ -298,6 +312,8 @@ begin
begin
HideNotification
;
TFOrderEntry
(
AForm
).
orderID
:=
orderInfo
;
TFOrderEntry
(
AForm
).
mode
:=
localMode
;
console
.
log
(
TFOrderEntry
(
AForm
).
mode
);
end
;
end
);
...
...
@@ -431,8 +447,23 @@ begin
dtpApprovedDate
.
Date
:=
StrToDateTime
(
XDataWebDataSet1proofing_approved_date
.
AsString
)
else
dtpApprovedDate
.
Date
:=
0
;
console
.
log
(
dtpApprovedDate
.
Date
);
console
.
log
(
DateTimeToStr
(
dtpApprovedDate
.
Date
));
if
XDataWebDataSet1supplied_by_customer_ftp
.
AsString
=
'T'
then
cbFTP
.
Checked
:=
true
else
cbFTP
.
Checked
:=
false
;
if
XDataWebDataSet1supplied_by_customer_existing_
.
AsString
=
'T'
then
cbExistingCuttingDie
.
Checked
:=
true
else
cbExistingCuttingDie
.
Checked
:=
false
;
if
XDataWebDataSet1supplied_by_customer_ref_art_a
.
AsString
=
'T'
then
cbRefArtAPDF
.
Checked
:=
true
else
cbRefArtAPDF
.
Checked
:=
false
;
if
XDataWebDataSet1supplied_by_customer_ref_art_p
.
AsString
=
'T'
then
cbRefArtPrintCard
.
Checked
:=
true
else
cbRefArtPrintCard
.
Checked
:=
false
;
end
;
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
...
...
kgOrdersClient/View.Orders.dfm
View file @
39e0e52b
...
...
@@ -10,6 +10,7 @@ object FViewOrders: TFViewOrders
Font.Style = []
ParentFont = False
OnCreate = WebFormCreate
OnShow = WebFormShow
object lblEntries: TWebLabel
Left = 0
Top = 336
...
...
@@ -169,6 +170,50 @@ object FViewOrders: TFViewOrders
Role = ''
Text = ''
end
object pnlMessage: TWebPanel
Left = 266
Top = 61
Width = 121
Height = 33
ElementClassName = 'card'
ElementID = 'pnl_message'
ChildOrder = 5
ElementBodyClassName = 'card-body'
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 8
object lblMessage: TWebLabel
Left = 28
Top = 9
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'pnl_message'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 426
...
...
kgOrdersClient/View.Orders.html
View file @
39e0e52b
...
...
@@ -4,6 +4,14 @@
<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=
"mb-3"
id=
"filter_info"
style=
"display: none;"
>
<h4
class=
"custom-h4 mt-3"
>
Filters
</h4>
<hr
class=
"custom-hr"
>
...
...
kgOrdersClient/View.Orders.pas
View file @
39e0e52b
...
...
@@ -48,18 +48,25 @@ type
XDataWebDataSet1plateDue
:
TStringField
;
XDataWebDataSet1plateDone
:
TStringField
;
XDataWebDataSet1orderType
:
TStringField
;
pnlMessage
:
TWebPanel
;
lblMessage
:
TWebLabel
;
btnCloseNotification
:
TWebButton
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnaddOrderClick
(
Sender
:
TObject
);
procedure
btnFiltersClick
(
Sender
:
TObject
);
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
WebFormShow
(
Sender
:
TObject
);
private
FChildForm
:
TWebForm
;
procedure
AddRowToTable
(
temp
:
string
);
procedure
ClearTable
();
procedure
GeneratePagination
(
TotalPages
:
Integer
);
function
GenerateSearchOptions
():
string
;
procedure
orderEntry
(
orderInfo
:
string
);
procedure
orderEntry
(
orderInfo
,
mode
:
string
);
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
[
async
]
procedure
Search
(
searchOptions
:
string
);
[
async
]
procedure
GetOrders
(
searchOptions
:
string
);
[
async
]
procedure
getUser
();
...
...
@@ -72,7 +79,9 @@ type
OrderBy
:
string
;
Caller
:
string
;
filters
:
boolean
;
info
:
string
;
public
class
function
CreateForm
(
AElementID
,
Info
:
string
):
TWebForm
;
end
;
...
...
@@ -105,6 +114,12 @@ begin
getOrders
(
GenerateSearchOptions
());
end
;
procedure
TFViewOrders
.
WebFormShow
(
Sender
:
TObject
);
begin
console
.
log
(
info
);
ShowNotification
(
info
);
end
;
procedure
TFViewOrders
.
getUser
();
var
xdcResponse
:
TXDataClientResponse
;
...
...
@@ -118,6 +133,22 @@ begin
user
:=
TJSObject
(
data
[
0
]);
end
;
class
function
TFViewOrders
.
CreateForm
(
AElementID
,
Info
:
string
):
TWebForm
;
var
localInfo
:
string
;
begin
localInfo
:=
info
;
Application
.
CreateForm
(
TFViewOrders
,
AElementID
,
Result
,
procedure
(
AForm
:
TObject
)
begin
with
TFViewOrders
(
AForm
)
do
begin
TFViewOrders
(
AForm
).
info
:=
LocalInfo
;
end
;
end
);
end
;
procedure
TFViewOrders
.
AddRowToTable
(
temp
:
string
);
// Adds rows to the table
// PhoneNumber: phone number of the location
...
...
@@ -138,7 +169,7 @@ begin
NewRow
.
Attrs
[
'orderType'
]
:=
XDataWebDataSet1orderType
.
Value
;
NewRow
.
addEventListener
(
'click'
,
procedure
begin
orderEntry
(
NewRow
.
Attrs
[
'id'
]);
orderEntry
(
NewRow
.
Attrs
[
'id'
]
,
'EDIT'
);
end
);
// Order ID Cell
NewRow
.
Attrs
[
'id'
]
:=
XDataWebDataSet1ID
.
Value
;
...
...
@@ -569,12 +600,12 @@ end;
procedure
TFViewOrders
.
btnaddOrderClick
(
Sender
:
TObject
);
begin
orderEntry
(
''
);
orderEntry
(
''
,
'ADD'
);
end
;
procedure
TFViewOrders
.
orderEntry
(
orderInfo
:
string
);
procedure
TFViewOrders
.
orderEntry
(
orderInfo
,
mode
:
string
);
begin
FViewMain
.
ViewOrderEntry
(
orderInfo
);
FViewMain
.
ViewOrderEntry
(
orderInfo
,
mode
);
end
;
procedure
TFViewOrders
.
btnApplyClick
(
Sender
:
TObject
);
...
...
@@ -594,6 +625,11 @@ begin
GetOrders
(
searchOptions
);
end
;
procedure
TFViewOrders
.
btnCloseNotificationClick
(
Sender
:
TObject
);
begin
HideNotification
();
end
;
procedure
TFViewOrders
.
btnFiltersClick
(
Sender
:
TObject
);
var
filterSection
:
TJSHTMLElement
;
...
...
@@ -680,5 +716,20 @@ begin
Result
:=
searchOptions
;
end
;
procedure
TFViewOrders
.
HideNotification
;
begin
pnlMessage
.
ElementHandle
.
hidden
:=
True
;
end
;
procedure
TFViewOrders
.
ShowNotification
(
Notification
:
string
);
begin
if
Notification
<>
''
then
begin
console
.
log
(
'hit'
);
lblMessage
.
Caption
:=
Notification
;
pnlMessage
.
ElementHandle
.
hidden
:=
False
;
end
;
end
;
end
.
kgOrdersServer/kgOrdersServer.ini
View file @
39e0e52b
[Options]
LogFileNum
=
19
6
LogFileNum
=
19
8
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