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
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
231 additions
and
153 deletions
+231
-153
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
+47
-16
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
...
@@ -46,7 +46,8 @@ type
procedure
ShowForm
(
AFormClass
:
TWebFormClass
);
procedure
ShowForm
(
AFormClass
:
TWebFormClass
);
procedure
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
procedure
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
);
Access
,
Rights
,
Perspective
,
QB
:
string
);
procedure
ViewOrderEntry
(
orderInfo
:
string
);
procedure
ViewOrderEntry
(
orderInfo
,
mode
:
string
);
procedure
ViewOrders
(
info
:
string
);
procedure
ShowUserForm
(
Info
:
string
);
procedure
ShowUserForm
(
Info
:
string
);
end
;
end
;
...
@@ -171,11 +172,20 @@ begin
...
@@ -171,11 +172,20 @@ begin
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
);
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
);
end
;
end
;
procedure
TFViewMain
.
ViewOrder
Entry
(
orderI
nfo
:
string
);
procedure
TFViewMain
.
ViewOrder
s
(
i
nfo
:
string
);
begin
begin
if
Assigned
(
FChildForm
)
then
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
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
;
end
;
procedure
TFViewMain
.
ShowUserForm
(
Info
:
string
);
procedure
TFViewMain
.
ShowUserForm
(
Info
:
string
);
...
...
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
39e0e52b
...
@@ -379,34 +379,9 @@ object FOrderEntry: TFOrderEntry
...
@@ -379,34 +379,9 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_quickbooks_item'
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
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
object edtEmail: TWebDBEdit
Left = 316
Left = 316
Top = 3
68
Top = 3
76
Width = 121
Width = 121
Height = 22
Height = 22
AutoSize = True
AutoSize = True
...
@@ -417,22 +392,9 @@ object FOrderEntry: TFOrderEntry
...
@@ -417,22 +392,9 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_e_mail'
DataField = 'supplied_by_customer_e_mail'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
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
object edtOther: TWebDBEdit
Left = 316
Left = 316
Top =
41
8
Top =
34
8
Width = 121
Width = 121
Height = 22
Height = 22
AutoSize = True
AutoSize = True
...
@@ -443,45 +405,6 @@ object FOrderEntry: TFOrderEntry
...
@@ -443,45 +405,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_other'
DataField = 'supplied_by_customer_other'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
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
object edtCADFile: TWebDBEdit
Left = 496
Left = 496
Top = 207
Top = 207
...
@@ -947,19 +870,6 @@ object FOrderEntry: TFOrderEntry
...
@@ -947,19 +870,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'layout_excalibur_die'
DataField = 'layout_excalibur_die'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
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
object cbSampleCarton: TWebDBCheckBox
Left = 316
Left = 316
Top = 286
Top = 286
...
@@ -999,19 +909,6 @@ object FOrderEntry: TFOrderEntry
...
@@ -999,19 +909,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'supplied_by_customer_color_copy'
DataField = 'supplied_by_customer_color_copy'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
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
object edtSpecialInstructions: TWebDBEdit
Left = 852
Left = 852
Top = 185
Top = 185
...
@@ -1037,6 +934,50 @@ object FOrderEntry: TFOrderEntry
...
@@ -1037,6 +934,50 @@ object FOrderEntry: TFOrderEntry
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
OnClick = btnConfirmClick
end
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
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 244
Left = 244
...
...
kgOrdersClient/View.OrderEntryCorrugated.html
View file @
39e0e52b
...
@@ -92,52 +92,44 @@
...
@@ -92,52 +92,44 @@
<hr
class=
"custom-hr"
>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
B/W Copy:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;"
>
Color 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>
<input
type=
"checkbox"
id=
"cbcolorcopy"
>
<input
type=
"checkbox"
id=
"cbcolorcopy"
>
</div>
</div>
<div
class=
"col-auto"
>
<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"
>
<input
type=
"checkbox"
id=
"cbplates"
>
</div>
</div>
<div
class=
"col-auto"
>
<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"
>
<input
type=
"checkbox"
id=
"cbsimpleCarton"
>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Dimensional Layout:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;"
>
Disk or CD:
</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>
<input
type=
"checkbox"
id=
"cbdiskorcd"
>
<input
type=
"checkbox"
id=
"cbdiskorcd"
>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Email:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Email:
</label>
<input
id=
"edtemail"
class=
"form-control input-sm
"
width=
'50%'
/>
<input
type=
"checkbox"
id=
"edtemail
"
width=
'50%'
/>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
FTP:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
FTP:
</label>
<input
id=
"edtftp"
class=
"form-control input-sm
"
width=
'50%'
/>
<input
type=
"checkbox"
id=
"edtftp
"
width=
'50%'
/>
</div>
</div>
<div
class=
"col-auto"
>
<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%'
/>
<input
class=
"form-control input-sm"
id=
"edtother"
width=
'50%'
/>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Existing Cutting Die:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Existing Cutting Die:
</label>
<input
class=
"form-control input-sm
"
id=
"edtexistingcuttingdie"
width=
'50%'
/>
<input
type=
"checkbox
"
id=
"edtexistingcuttingdie"
width=
'50%'
/>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Ref Art Print Card:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Ref Art Print Card:
</label>
<input
class=
"form-control input-sm
"
id=
"edtrefartprintcard"
width=
'50%'
/>
<input
type=
"checkbox
"
id=
"edtrefartprintcard"
width=
'50%'
/>
</div>
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2
"
>
Ref Art A PDF:
</label>
<label
class=
'pe-2'
style=
"font-weight: 700; font-size: 15px;
"
>
Ref Art A PDF:
</label>
<input
id=
"edtrefartapdf"
class=
"form-control input-sm
"
width=
'50%'
/>
<input
type=
"checkbox"
id=
"edtrefartapdf
"
width=
'50%'
/>
</div>
</div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Layout
</h4>
<h4
class=
"custom-h4 mt-3"
>
Layout
</h4>
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
39e0e52b
...
@@ -42,14 +42,8 @@ type
...
@@ -42,14 +42,8 @@ type
edtPONumber
:
TWebDBEdit
;
edtPONumber
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
edtArtLocation
:
TWebDBEdit
;
edtDimensionalLayout
:
TWebDBEdit
;
edtEmail
:
TWebDBEdit
;
edtEmail
:
TWebDBEdit
;
edtFTP
:
TWebDBEdit
;
edtOther
:
TWebDBEdit
;
edtOther
:
TWebDBEdit
;
edtExistingCuttingDie
:
TWebDBEdit
;
edtRefArtPrintCard
:
TWebDBEdit
;
edtRefArtAPDF
:
TWebDBEdit
;
edtCADFile
:
TWebDBEdit
;
edtCADFile
:
TWebDBEdit
;
edtAroundNo
:
TWebDBEdit
;
edtAroundNo
:
TWebDBEdit
;
edtAcrossNo
:
TWebDBEdit
;
edtAcrossNo
:
TWebDBEdit
;
...
@@ -86,11 +80,9 @@ type
...
@@ -86,11 +80,9 @@ type
cbStickyBak
:
TWebDBCheckBox
;
cbStickyBak
:
TWebDBCheckBox
;
WebDBCheckBox9
:
TWebDBCheckBox
;
WebDBCheckBox9
:
TWebDBCheckBox
;
cbExcaliburDie
:
TWebDBCheckBox
;
cbExcaliburDie
:
TWebDBCheckBox
;
cbDiskorCD
:
TWebDBCheckBox
;
cbSampleCarton
:
TWebDBCheckBox
;
cbSampleCarton
:
TWebDBCheckBox
;
cbPlate
:
TWebDBCheckBox
;
cbPlate
:
TWebDBCheckBox
;
cbColorCopy
:
TWebDBCheckBox
;
cbColorCopy
:
TWebDBCheckBox
;
cbBWCopy
:
TWebDBCheckBox
;
XDataWebClient1
:
TXDataWebClient
;
XDataWebClient1
:
TXDataWebClient
;
edtSpecialInstructions
:
TWebDBEdit
;
edtSpecialInstructions
:
TWebDBEdit
;
tmrScrollTop
:
TWebTimer
;
tmrScrollTop
:
TWebTimer
;
...
@@ -186,6 +178,10 @@ type
...
@@ -186,6 +178,10 @@ type
XDataWebDataSet1staff_fields_art_due
:
TStringField
;
XDataWebDataSet1staff_fields_art_due
:
TStringField
;
XDataWebDataSet1staff_fields_plate_due
:
TStringField
;
XDataWebDataSet1staff_fields_plate_due
:
TStringField
;
XDataWebDataSet1staff_fields_mount_due
:
TStringField
;
XDataWebDataSet1staff_fields_mount_due
:
TStringField
;
cbRefArtAPDF
:
TWebCheckBox
;
cbRefArtPrintCard
:
TWebCheckBox
;
cbExistingCuttingDie
:
TWebCheckBox
;
cbFTP
:
TWebCheckBox
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
procedure
ShowNotification
(
Notification
:
string
);
...
@@ -201,9 +197,10 @@ type
...
@@ -201,9 +197,10 @@ type
FCurrentReportType
:
string
;
FCurrentReportType
:
string
;
FSelectProc
:
TSelectProc
;
FSelectProc
:
TSelectProc
;
orderID
:
string
;
orderID
:
string
;
mode
:
string
;
//FJSONProc1: TJSONProc1;
//FJSONProc1: TJSONProc1;
public
public
class
function
CreateForm
(
AElementID
,
orderInfo
:
string
):
TWebForm
;
class
function
CreateForm
(
AElementID
,
orderInfo
,
mode
:
string
):
TWebForm
;
end
;
end
;
var
var
...
@@ -214,7 +211,7 @@ implementation
...
@@ -214,7 +211,7 @@ implementation
{$R *.dfm}
{$R *.dfm}
uses
uses
View
.
Home
;
View
.
Home
,
View
.
Main
;
procedure
TFOrderEntry
.
btnConfirmClick
(
Sender
:
TObject
);
procedure
TFOrderEntry
.
btnConfirmClick
(
Sender
:
TObject
);
var
var
...
@@ -239,7 +236,6 @@ begin
...
@@ -239,7 +236,6 @@ begin
begin
begin
colorJSON
:=
TJSONObject
.
Create
;
colorJSON
:=
TJSONObject
.
Create
;
itemList
:=
colorCollection
[
I
].
childNodes
;
itemList
:=
colorCollection
[
I
].
childNodes
;
//console.log(itemList.length);
for
J
:=
0
to
itemList
.
length
-
2
do
for
J
:=
0
to
itemList
.
length
-
2
do
begin
begin
header
:=
TJSHTMLElement
(
itemList
[
J
]).
children
[
0
].
innerText
.
Replace
(
':'
,
''
).
Trim
();
header
:=
TJSHTMLElement
(
itemList
[
J
]).
children
[
0
].
innerText
.
Replace
(
':'
,
''
).
Trim
();
...
@@ -258,6 +254,22 @@ begin
...
@@ -258,6 +254,22 @@ begin
XDataWebDataSet1staff_fields_mount_due
.
Value
:=
DateTimeToStr
(
dtpMountDue
.
Date
);
XDataWebDataSet1staff_fields_mount_due
.
Value
:=
DateTimeToStr
(
dtpMountDue
.
Date
);
XDataWebDataSet1staff_fields_plate_due
.
Value
:=
DateTimeToStr
(
dtpPlateDue
.
Date
);
XDataWebDataSet1staff_fields_plate_due
.
Value
:=
DateTimeToStr
(
dtpPlateDue
.
Date
);
XDataWebDataSet1ORDER_DATE
.
Value
:=
dtpOrderDate
.
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
.
Post
;
XDataWebDataSet1
.
First
;
XDataWebDataSet1
.
First
;
while
not
XDataWebDataSet1
.
Eof
do
while
not
XDataWebDataSet1
.
Eof
do
...
@@ -277,7 +289,7 @@ begin
...
@@ -277,7 +289,7 @@ begin
orderJSON
.
AddPair
(
'COMPANY_ID'
,
'749'
);
orderJSON
.
AddPair
(
'COMPANY_ID'
,
'749'
);
orderJSON
.
AddPair
(
'USER_ID'
,
'1011'
);
orderJSON
.
AddPair
(
'USER_ID'
,
'1011'
);
AddCorrugatedOrder
(
orderJSON
);
AddCorrugatedOrder
(
orderJSON
);
FViewMain
.
ViewOrders
(
'Success'
);
end
;
end
;
procedure
TFOrderEntry
.
AddCorrugatedOrder
(
orderJSON
:
TJSONObject
);
procedure
TFOrderEntry
.
AddCorrugatedOrder
(
orderJSON
:
TJSONObject
);
...
@@ -286,11 +298,13 @@ Response: TXDataClientResponse;
...
@@ -286,11 +298,13 @@ Response: TXDataClientResponse;
begin
begin
Response
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddCorrugatedOrder'
,
Response
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddCorrugatedOrder'
,
[
orderJSON
.
ToString
]));
[
orderJSON
.
ToString
]));
console
.
log
(
Response
);
end
;
end
;
class
function
TFOrderEntry
.
CreateForm
(
AElementID
,
orderInfo
:
string
):
TWebForm
;
class
function
TFOrderEntry
.
CreateForm
(
AElementID
,
orderInfo
,
mode
:
string
):
TWebForm
;
var
localMode
:
string
;
begin
begin
localMode
:=
mode
;
Application
.
CreateForm
(
TFOrderEntry
,
AElementID
,
Result
,
Application
.
CreateForm
(
TFOrderEntry
,
AElementID
,
Result
,
procedure
(
AForm
:
TObject
)
procedure
(
AForm
:
TObject
)
begin
begin
...
@@ -298,6 +312,8 @@ begin
...
@@ -298,6 +312,8 @@ begin
begin
begin
HideNotification
;
HideNotification
;
TFOrderEntry
(
AForm
).
orderID
:=
orderInfo
;
TFOrderEntry
(
AForm
).
orderID
:=
orderInfo
;
TFOrderEntry
(
AForm
).
mode
:=
localMode
;
console
.
log
(
TFOrderEntry
(
AForm
).
mode
);
end
;
end
;
end
end
);
);
...
@@ -431,8 +447,23 @@ begin
...
@@ -431,8 +447,23 @@ begin
dtpApprovedDate
.
Date
:=
StrToDateTime
(
XDataWebDataSet1proofing_approved_date
.
AsString
)
dtpApprovedDate
.
Date
:=
StrToDateTime
(
XDataWebDataSet1proofing_approved_date
.
AsString
)
else
else
dtpApprovedDate
.
Date
:=
0
;
dtpApprovedDate
.
Date
:=
0
;
console
.
log
(
dtpApprovedDate
.
Date
);
if
XDataWebDataSet1supplied_by_customer_ftp
.
AsString
=
'T'
then
console
.
log
(
DateTimeToStr
(
dtpApprovedDate
.
Date
));
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
;
end
;
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
...
...
kgOrdersClient/View.Orders.dfm
View file @
39e0e52b
...
@@ -10,6 +10,7 @@ object FViewOrders: TFViewOrders
...
@@ -10,6 +10,7 @@ object FViewOrders: TFViewOrders
Font.Style = []
Font.Style = []
ParentFont = False
ParentFont = False
OnCreate = WebFormCreate
OnCreate = WebFormCreate
OnShow = WebFormShow
object lblEntries: TWebLabel
object lblEntries: TWebLabel
Left = 0
Left = 0
Top = 336
Top = 336
...
@@ -169,6 +170,50 @@ object FViewOrders: TFViewOrders
...
@@ -169,6 +170,50 @@ object FViewOrders: TFViewOrders
Role = ''
Role = ''
Text = ''
Text = ''
end
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
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 426
Left = 426
...
...
kgOrdersClient/View.Orders.html
View file @
39e0e52b
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
<div
class=
"container mt-4"
>
<div
class=
"container mt-4"
>
<div
class=
"row justify-content-center"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12 col-md-8"
>
<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;"
>
<div
class=
"mb-3"
id=
"filter_info"
style=
"display: none;"
>
<h4
class=
"custom-h4 mt-3"
>
Filters
</h4>
<h4
class=
"custom-h4 mt-3"
>
Filters
</h4>
<hr
class=
"custom-hr"
>
<hr
class=
"custom-hr"
>
...
...
kgOrdersClient/View.Orders.pas
View file @
39e0e52b
...
@@ -48,18 +48,25 @@ type
...
@@ -48,18 +48,25 @@ type
XDataWebDataSet1plateDue
:
TStringField
;
XDataWebDataSet1plateDue
:
TStringField
;
XDataWebDataSet1plateDone
:
TStringField
;
XDataWebDataSet1plateDone
:
TStringField
;
XDataWebDataSet1orderType
:
TStringField
;
XDataWebDataSet1orderType
:
TStringField
;
pnlMessage
:
TWebPanel
;
lblMessage
:
TWebLabel
;
btnCloseNotification
:
TWebButton
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
procedure
btnaddOrderClick
(
Sender
:
TObject
);
procedure
btnaddOrderClick
(
Sender
:
TObject
);
procedure
btnFiltersClick
(
Sender
:
TObject
);
procedure
btnFiltersClick
(
Sender
:
TObject
);
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
WebFormShow
(
Sender
:
TObject
);
private
private
FChildForm
:
TWebForm
;
FChildForm
:
TWebForm
;
procedure
AddRowToTable
(
temp
:
string
);
procedure
AddRowToTable
(
temp
:
string
);
procedure
ClearTable
();
procedure
ClearTable
();
procedure
GeneratePagination
(
TotalPages
:
Integer
);
procedure
GeneratePagination
(
TotalPages
:
Integer
);
function
GenerateSearchOptions
():
string
;
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
Search
(
searchOptions
:
string
);
[
async
]
procedure
GetOrders
(
searchOptions
:
string
);
[
async
]
procedure
GetOrders
(
searchOptions
:
string
);
[
async
]
procedure
getUser
();
[
async
]
procedure
getUser
();
...
@@ -72,7 +79,9 @@ type
...
@@ -72,7 +79,9 @@ type
OrderBy
:
string
;
OrderBy
:
string
;
Caller
:
string
;
Caller
:
string
;
filters
:
boolean
;
filters
:
boolean
;
info
:
string
;
public
public
class
function
CreateForm
(
AElementID
,
Info
:
string
):
TWebForm
;
end
;
end
;
...
@@ -105,6 +114,12 @@ begin
...
@@ -105,6 +114,12 @@ begin
getOrders
(
GenerateSearchOptions
());
getOrders
(
GenerateSearchOptions
());
end
;
end
;
procedure
TFViewOrders
.
WebFormShow
(
Sender
:
TObject
);
begin
console
.
log
(
info
);
ShowNotification
(
info
);
end
;
procedure
TFViewOrders
.
getUser
();
procedure
TFViewOrders
.
getUser
();
var
var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
...
@@ -118,6 +133,22 @@ begin
...
@@ -118,6 +133,22 @@ begin
user
:=
TJSObject
(
data
[
0
]);
user
:=
TJSObject
(
data
[
0
]);
end
;
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
);
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
...
@@ -138,7 +169,7 @@ begin
...
@@ -138,7 +169,7 @@ begin
NewRow
.
Attrs
[
'orderType'
]
:=
XDataWebDataSet1orderType
.
Value
;
NewRow
.
Attrs
[
'orderType'
]
:=
XDataWebDataSet1orderType
.
Value
;
NewRow
.
addEventListener
(
'click'
,
procedure
NewRow
.
addEventListener
(
'click'
,
procedure
begin
begin
orderEntry
(
NewRow
.
Attrs
[
'id'
]);
orderEntry
(
NewRow
.
Attrs
[
'id'
]
,
'EDIT'
);
end
);
end
);
// Order ID Cell
// Order ID Cell
NewRow
.
Attrs
[
'id'
]
:=
XDataWebDataSet1ID
.
Value
;
NewRow
.
Attrs
[
'id'
]
:=
XDataWebDataSet1ID
.
Value
;
...
@@ -569,12 +600,12 @@ end;
...
@@ -569,12 +600,12 @@ end;
procedure
TFViewOrders
.
btnaddOrderClick
(
Sender
:
TObject
);
procedure
TFViewOrders
.
btnaddOrderClick
(
Sender
:
TObject
);
begin
begin
orderEntry
(
''
);
orderEntry
(
''
,
'ADD'
);
end
;
end
;
procedure
TFViewOrders
.
orderEntry
(
orderInfo
:
string
);
procedure
TFViewOrders
.
orderEntry
(
orderInfo
,
mode
:
string
);
begin
begin
FViewMain
.
ViewOrderEntry
(
orderInfo
);
FViewMain
.
ViewOrderEntry
(
orderInfo
,
mode
);
end
;
end
;
procedure
TFViewOrders
.
btnApplyClick
(
Sender
:
TObject
);
procedure
TFViewOrders
.
btnApplyClick
(
Sender
:
TObject
);
...
@@ -594,6 +625,11 @@ begin
...
@@ -594,6 +625,11 @@ begin
GetOrders
(
searchOptions
);
GetOrders
(
searchOptions
);
end
;
end
;
procedure
TFViewOrders
.
btnCloseNotificationClick
(
Sender
:
TObject
);
begin
HideNotification
();
end
;
procedure
TFViewOrders
.
btnFiltersClick
(
Sender
:
TObject
);
procedure
TFViewOrders
.
btnFiltersClick
(
Sender
:
TObject
);
var
var
filterSection
:
TJSHTMLElement
;
filterSection
:
TJSHTMLElement
;
...
@@ -680,5 +716,20 @@ begin
...
@@ -680,5 +716,20 @@ begin
Result
:=
searchOptions
;
Result
:=
searchOptions
;
end
;
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
.
end
.
kgOrdersServer/kgOrdersServer.ini
View file @
39e0e52b
[Options]
[Options]
LogFileNum
=
19
6
LogFileNum
=
19
8
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