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
a143692e
Commit
a143692e
authored
Jul 14, 2025
by
emsys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished Items page, and added pagination to customer page.
parent
4fa14ae7
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
464 additions
and
304 deletions
+464
-304
AddCustomer.dfm
kgOrdersClient/AddCustomer.dfm
+4
-4
AddCustomer.pas
kgOrdersClient/AddCustomer.pas
+3
-3
View.AddItem.pas
kgOrdersClient/View.AddItem.pas
+30
-10
View.Customers.dfm
kgOrdersClient/View.Customers.dfm
+4
-5
View.Customers.pas
kgOrdersClient/View.Customers.pas
+16
-24
View.EditUser.pas
kgOrdersClient/View.EditUser.pas
+1
-1
View.Items.dfm
kgOrdersClient/View.Items.dfm
+28
-10
View.Items.html
kgOrdersClient/View.Items.html
+28
-61
View.Items.pas
kgOrdersClient/View.Items.pas
+175
-62
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+3
-0
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+5
-4
View.OrderEntryCuttingDie.dfm
kgOrdersClient/View.OrderEntryCuttingDie.dfm
+0
-1
View.OrderEntryCuttingDie.pas
kgOrdersClient/View.OrderEntryCuttingDie.pas
+3
-3
View.OrderEntryWeb.dfm
kgOrdersClient/View.OrderEntryWeb.dfm
+3
-0
View.OrderEntryWeb.pas
kgOrdersClient/View.OrderEntryWeb.pas
+4
-3
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+2
-2
View.Orders.pas
kgOrdersClient/View.Orders.pas
+4
-5
View.SelectCustomer.pas
kgOrdersClient/View.SelectCustomer.pas
+1
-1
View.UserProfile.pas
kgOrdersClient/View.UserProfile.pas
+2
-2
View.Users.pas
kgOrdersClient/View.Users.pas
+1
-1
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+2
-1
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+139
-97
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+6
-4
No files found.
kgOrdersClient/AddCustomer.dfm
View file @
a143692e
...
@@ -4,9 +4,9 @@ object FViewAddCustomer: TFViewAddCustomer
...
@@ -4,9 +4,9 @@ object FViewAddCustomer: TFViewAddCustomer
CSSLibrary = cssBootstrap
CSSLibrary = cssBootstrap
ElementFont = efCSS
ElementFont = efCSS
object lblFormState: TWebLabel
object lblFormState: TWebLabel
Left = 1
8
Left = 1
9
Top =
16
Top =
578
Width =
3
Width =
79
Height = 15
Height = 15
ElementID = 'lbl_form_state'
ElementID = 'lbl_form_state'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
...
@@ -39,7 +39,7 @@ object FViewAddCustomer: TFViewAddCustomer
...
@@ -39,7 +39,7 @@ object FViewAddCustomer: TFViewAddCustomer
Text = ''
Text = ''
end
end
object edtShortName: TWebDBEdit
object edtShortName: TWebDBEdit
Left =
19
Left =
24
Top = 12
Top = 12
Width = 121
Width = 121
Height = 22
Height = 22
...
...
kgOrdersClient/AddCustomer.pas
View file @
a143692e
...
@@ -79,7 +79,7 @@ type
...
@@ -79,7 +79,7 @@ type
XDataWebDataSet1REP_USER_ID
:
TStringField
;
XDataWebDataSet1REP_USER_ID
:
TStringField
;
xdwdsUsersfull_name
:
TStringField
;
xdwdsUsersfull_name
:
TStringField
;
lblFormState
:
TWebLabel
;
lblFormState
:
TWebLabel
;
procedure
btnSaveClick
(
Sender
:
TObject
);
[
async
]
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
...
@@ -424,8 +424,8 @@ procedure TFViewAddCustomer.btnSaveClick(Sender: TObject);
...
@@ -424,8 +424,8 @@ procedure TFViewAddCustomer.btnSaveClick(Sender: TObject);
begin
begin
if
VerifyCustomer
()
then
if
VerifyCustomer
()
then
begin
begin
sendCustomerToServer
(
);
await
(
sendCustomerToServer
()
);
GetCustomer
(
);
await
(
GetCustomer
()
);
ViewMode
();
ViewMode
();
end
;
end
;
end
;
end
;
...
...
kgOrdersClient/View.AddItem.pas
View file @
a143692e
...
@@ -43,6 +43,8 @@ type
...
@@ -43,6 +43,8 @@ type
public
public
{ Public declarations }
{ Public declarations }
notification
:
string
;
notification
:
string
;
confirm
:
Boolean
;
QB_ID
,
name
,
description
,
status
:
string
;
end
;
end
;
var
var
...
@@ -80,7 +82,18 @@ begin
...
@@ -80,7 +82,18 @@ begin
else
if
xdwdsCustomers
.
FieldByName
(
'qb_items_id'
).
AsString
<>
''
then
else
if
xdwdsCustomers
.
FieldByName
(
'qb_items_id'
).
AsString
<>
''
then
edtNotification
.
Text
:=
'Item Already In Database'
edtNotification
.
Text
:=
'Item Already In Database'
else
else
SendItemToServer
();
begin
QB_ID
:=
xdwdsCustomers
.
FieldByName
(
'qb_items_qb_id'
).
AsString
;
name
:=
xdwdsCustomers
.
FieldByName
(
'qb_item_name'
).
AsString
;
description
:=
xdwdsCustomers
.
FieldByName
(
'item_desc'
).
AsString
;
if
xdwdsCustomers
.
FieldByName
(
'status'
).
AsBoolean
then
status
:=
'ACTIVE'
else
status
:=
'INACTIVE'
;
confirm
:=
true
;
Close
;
end
;
//SendItemToServer();
end
;
end
;
procedure
TfViewAddItem
.
getItems
;
procedure
TfViewAddItem
.
getItems
;
...
@@ -90,18 +103,25 @@ var
...
@@ -90,18 +103,25 @@ var
i
:
integer
;
i
:
integer
;
begin
begin
// Fetch data from XData service
// Fetch data from XData service
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
Utils
.
ShowSpinner
(
'spinner'
);
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
try
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
// Load data into TXDataWebDataset
// Load data into TXDataWebDataset
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
Open
;
xdwdsCustomers
.
Open
;
// Manually populate the grid
// Manually populate the grid
PopulateGridManually
;
PopulateGridManually
;
//Utils.HideSpinner('spinner');
//Utils.HideSpinner('spinner');
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
procedure
TFViewAddItem
.
PopulateGridManually
;
procedure
TFViewAddItem
.
PopulateGridManually
;
...
...
kgOrdersClient/View.Customers.dfm
View file @
a143692e
...
@@ -42,15 +42,14 @@ object FViewCustomers: TFViewCustomers
...
@@ -42,15 +42,14 @@ object FViewCustomers: TFViewCustomers
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
Text = '50
0
'
Text = '50'
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wcbPageSizeChange
OnChange = wcbPageSizeChange
ItemIndex = -1
ItemIndex = -1
Items.Strings = (
Items.Strings = (
'100'
'10'
'250'
'25'
'500'
'50')
'1000')
end
end
object pnlMessage: TWebPanel
object pnlMessage: TWebPanel
Left = 12
Left = 12
...
...
kgOrdersClient/View.Customers.pas
View file @
a143692e
...
@@ -83,16 +83,7 @@ begin
...
@@ -83,16 +83,7 @@ begin
newform
.
ShowModal
(
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
procedure
(
AValue
:
TModalResult
)
begin
begin
{if newform.confirm then
begin
if newform.cbCorrugatedPlate.Checked then
orderType := 'corrugated'
else if newform.cbWebPlate.Checked then
orderType := 'web'
else
orderType := 'cutting';
orderEntry('', newForm.DBID, 'ADD', orderType);
end; }
end
end
);
);
end
;
end
;
...
@@ -108,8 +99,8 @@ begin
...
@@ -108,8 +99,8 @@ begin
DMConnection
.
ApiConnection
.
Connected
:=
True
;
DMConnection
.
ApiConnection
.
Connected
:=
True
;
PageNumber
:=
1
;
PageNumber
:=
1
;
TotalPages
:=
1
;
// Initial total pages
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'50
0
'
;
wcbPageSize
.
Text
:=
'50'
;
PageSize
:=
50
0
;
PageSize
:=
50
;
HideNotification
();
HideNotification
();
getCustomers
(
GenerateSearchOptions
());
getCustomers
(
GenerateSearchOptions
());
end
;
end
;
...
@@ -135,21 +126,23 @@ begin
...
@@ -135,21 +126,23 @@ begin
xdwdsCustomers
.
Open
;
xdwdsCustomers
.
Open
;
customerListLength
:=
integer
(
customerList
[
'count'
]);
customerListLength
:=
integer
(
customerList
[
'count'
]);
TotalPages
:=
(
(
customerListLength
+
PageSize
-
1
)
div
PageSize
);
TotalPages
:=
(
customerListLength
+
PageSize
-
1
)
div
PageSize
;
generatePagination
(
TotalPages
);
if
customerListLength
=
0
then
if
customerListLength
=
0
then
lblEntries
.
Caption
:=
'No entries found'
begin
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
lblEntries
.
Caption
:=
'No entries found'
;
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
ShowToast
(
'No entries found'
,
'danger'
);
' - '
+
IntToStr
(
customerListLength
)
+
end
' of '
+
IntToStr
(
customerListLength
)
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
else
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
[(
PageNumber
-
1
)
*
PageSize
+
1
,
PageNumber
*
PageSize
,
customerListLength
])
' - '
+
IntToStr
(
customerListLength
)
+
else
' of '
+
IntToStr
(
customerListLength
);
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
[(
PageNumber
-
1
)
*
PageSize
+
1
,
customerListLength
,
customerListLength
]);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
...
@@ -180,7 +173,6 @@ begin
...
@@ -180,7 +173,6 @@ begin
getCustomers
(
GenerateSearchOptions
());
getCustomers
(
GenerateSearchOptions
());
end
;
end
;
procedure
TFViewCustomers
.
wdbtcCustomersDblClickCell
(
Sender
:
TObject
;
ACol
,
procedure
TFViewCustomers
.
wdbtcCustomersDblClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
ARow
:
Integer
);
begin
begin
...
...
kgOrdersClient/View.EditUser.pas
View file @
a143692e
...
@@ -107,7 +107,7 @@ begin
...
@@ -107,7 +107,7 @@ begin
Info
:=
string
(
responseString
[
'value'
]);
Info
:=
string
(
responseString
[
'value'
]);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not add user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
...
kgOrdersClient/View.Items.dfm
View file @
a143692e
...
@@ -21,6 +21,17 @@ object FViewItems: TFViewItems
...
@@ -21,6 +21,17 @@ object FViewItems: TFViewItems
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
end
object lblFormState: TWebLabel
Left = 380
Top = 422
Width = 3
Height = 13
ElementID = 'lbl_form_state'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbPageSize: TWebComboBox
object wcbPageSize: TWebComboBox
Left = 0
Left = 0
Top = 0
Top = 0
...
@@ -150,10 +161,11 @@ object FViewItems: TFViewItems
...
@@ -150,10 +161,11 @@ object FViewItems: TFViewItems
Header.ListItemElementClassName = 'page-item'
Header.ListItemElementClassName = 'page-item'
Header.ListLinkElementClassName = 'page-link'
Header.ListLinkElementClassName = 'page-link'
WordWrap = True
WordWrap = True
OnClickCell = wdbtcItemsClickCell
Columns = <
Columns = <
item
item
DataField = 'ID'
DataField = 'ID'
Title = '
KG Orders
ID'
Title = '
Item
ID'
end
end
item
item
DataField = 'name'
DataField = 'name'
...
@@ -166,6 +178,10 @@ object FViewItems: TFViewItems
...
@@ -166,6 +178,10 @@ object FViewItems: TFViewItems
item
item
DataField = 'status'
DataField = 'status'
Title = 'Status'
Title = 'Status'
end
item
DataField = 'QB_ID'
Title = 'QB ID'
end>
end>
DataSource = wdsItems
DataSource = wdsItems
end
end
...
@@ -175,7 +191,6 @@ object FViewItems: TFViewItems
...
@@ -175,7 +191,6 @@ object FViewItems: TFViewItems
Width = 121
Width = 121
Height = 22
Height = 22
ChildOrder = 8
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtname'
ElementID = 'edtname'
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
...
@@ -190,7 +205,6 @@ object FViewItems: TFViewItems
...
@@ -190,7 +205,6 @@ object FViewItems: TFViewItems
Width = 121
Width = 121
Height = 22
Height = 22
ChildOrder = 8
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtdescription'
ElementID = 'edtdescription'
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
...
@@ -199,13 +213,13 @@ object FViewItems: TFViewItems
...
@@ -199,13 +213,13 @@ object FViewItems: TFViewItems
DataField = 'description'
DataField = 'description'
DataSource = wdsItems
DataSource = wdsItems
end
end
object
cbStatus: TWeb
CheckBox
object
CBStatus: TWebDB
CheckBox
Left = 352
Left = 352
Top = 3
6
Top = 3
4
Width = 113
Width = 113
Height = 22
Height = 22
Caption = 'Active?'
Caption = 'Active?'
ChildOrder = 1
0
ChildOrder = 1
1
ElementClassName = 'custom-control custom-checkbox'
ElementClassName = 'custom-control custom-checkbox'
ElementButtonClassName = 'custom-control-input'
ElementButtonClassName = 'custom-control-input'
ElementLabelClassName = 'custom-control-label'
ElementLabelClassName = 'custom-control-label'
...
@@ -214,6 +228,10 @@ object FViewItems: TFViewItems
...
@@ -214,6 +228,10 @@ object FViewItems: TFViewItems
HeightStyle = ssAuto
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'status'
DataSource = wdsItems
ValueChecked = 'ACTIVE'
ValueUnChecked = 'INACTIVE'
end
end
object XDataWebClient1: TXDataWebClient
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
...
@@ -226,10 +244,6 @@ object FViewItems: TFViewItems
...
@@ -226,10 +244,6 @@ object FViewItems: TFViewItems
object xdwdsItemsstatus: TStringField
object xdwdsItemsstatus: TStringField
FieldName = 'status'
FieldName = 'status'
end
end
object xdwdsItemsqb_items_qb_id: TStringField
FieldName = 'qb_items_qb_id'
Size = 0
end
object xdwdsItemsID: TStringField
object xdwdsItemsID: TStringField
FieldName = 'ID'
FieldName = 'ID'
end
end
...
@@ -239,8 +253,12 @@ object FViewItems: TFViewItems
...
@@ -239,8 +253,12 @@ object FViewItems: TFViewItems
object xdwdsItemsdescription: TStringField
object xdwdsItemsdescription: TStringField
FieldName = 'description'
FieldName = 'description'
end
end
object xdwdsItemsQB_ID: TStringField
FieldName = 'QB_ID'
end
end
end
object wdsItems: TWebDataSource
object wdsItems: TWebDataSource
AutoEdit = False
DataSet = xdwdsItems
DataSet = xdwdsItems
Left = 268
Left = 268
Top = 300
Top = 300
...
...
kgOrdersClient/View.Items.html
View file @
a143692e
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top"
style=
"z-index: 100;"
>
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top border-light"
style=
"z-index: 100;"
>
<div
class=
"container-fluid ps-0"
>
<div
class=
"container-fluid d-flex align-items-center ps-0 pe-0"
>
<ul
class=
"navbar-nav me-auto ps-2"
>
<li
class=
"nav-item pe-2"
>
<!-- Left-aligned form state label -->
<button
id=
"btnadd"
class=
"btn btn-primary btn-sm"
>
Add
</button>
<div
class=
"me-auto ps-3"
>
</li>
<label
id=
"lbl_form_state"
class=
"form-label mb-0 fw-bold text-uppercase text-nowrap text-danger"
style=
"font-size: 16px;"
>
View Mode
</label>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnedit"
class=
"btn btn-primary btn-sm"
>
Edit
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btndelete"
class=
"btn btn-danger btn-sm"
>
Delete
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnconfirm"
class=
"btn btn-success btn-sm"
>
Save
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btncancel"
class=
"btn btn-danger btn-sm"
>
Cancel
</button>
</li>
</ul>
</div>
</div>
<!-- Right-aligned buttons -->
<ul
class=
"navbar-nav ms-auto pe-2 mb-0"
>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnadd"
class=
"btn btn-primary btn-sm"
>
Add
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnedit"
class=
"btn btn-primary btn-sm"
>
Edit
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btndelete"
class=
"btn btn-danger btn-sm"
>
Delete
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnconfirm"
class=
"btn btn-success btn-sm"
>
Save
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btncancel"
class=
"btn btn-danger btn-sm"
>
Cancel
</button>
</li>
</ul>
</div>
</nav>
</nav>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"col-12"
>
<div
class=
"container mt-4"
>
<div
class=
"container mt-4"
>
...
@@ -80,46 +89,4 @@
...
@@ -80,46 +89,4 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div
class=
"modal fade"
id=
"audioModal"
tabindex=
"-1"
aria-labelledby=
"audioModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"audioModalLabel"
>
Audio Player
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
onclick=
"stopAudio()"
></button>
</div>
<div
class=
"modal-body"
>
<audio
controls
id=
"audioPlayer"
>
<source
src=
""
type=
"audio/mp3"
id=
"audioSource"
>
Your browser does not support the audio element.
</audio>
</div>
</div>
</div>
</div>
</div>
<script>
document
.
getElementById
(
'tblPhoneGrid'
).
addEventListener
(
'click'
,
function
(
event
)
{
// Check if the clicked element is a table cell (td)
if
(
event
.
target
.
tagName
===
'TD'
)
{
const
row
=
event
.
target
.
parentNode
;
const
cells
=
row
.
getElementsByTagName
(
'td'
);
// Extract data from the row
const
id
=
cells
[
0
].
textContent
;
const
name
=
cells
[
1
].
textContent
;
const
description
=
cells
[
2
].
textContent
;
const
status
=
cells
[
3
].
textContent
.
trim
().
toLowerCase
();
// Populate form fields
document
.
getElementById
(
'edtname'
).
value
=
name
;
document
.
getElementById
(
'edtdescription'
).
value
=
description
;
// Set the checkbox based on the status
const
isActive
=
status
===
'active'
;
document
.
getElementById
(
'cbstatus'
).
checked
=
isActive
;
console
.
log
(
`Row clicked! ID:
${
id
}
, Name:
${
name
}
, Description:
${
description
}
, Status:
${
status
}
`
);
}
});
</script>
kgOrdersClient/View.Items.pas
View file @
a143692e
...
@@ -11,7 +11,7 @@ interface
...
@@ -11,7 +11,7 @@ interface
uses
uses
System
.
SysUtils
,
System
.
Classes
,
Web
,
WEBLib
.
Graphics
,
WEBLib
.
Forms
,
WEBLib
.
Dialogs
,
System
.
SysUtils
,
System
.
Classes
,
Web
,
WEBLib
.
Graphics
,
WEBLib
.
Forms
,
WEBLib
.
Dialogs
,
Vcl
.
Controls
,
Vcl
.
StdCtrls
,
WEBLib
.
StdCtrls
,
WEBLib
.
Controls
,
WEBLib
.
Grids
,
WebLib
.
Lists
,
Vcl
.
Controls
,
Vcl
.
StdCtrls
,
WEBLib
.
StdCtrls
,
WEBLib
.
Controls
,
WEBLib
.
Grids
,
WebLib
.
Lists
,
XData
.
Web
.
Client
,
WEBLib
.
ExtCtrls
,
DB
,
XData
.
Web
.
JsonDataset
,
XData
.
Web
.
Client
,
WEBLib
.
ExtCtrls
,
DB
,
XData
.
Web
.
JsonDataset
,
JS
,
WEBLib
.
JSON
,
XData
.
Web
.
Dataset
,
XData
.
Web
.
Connection
,
Vcl
.
Forms
,
DateUtils
,
WEBLib
.
DBCtrls
;
XData
.
Web
.
Dataset
,
XData
.
Web
.
Connection
,
Vcl
.
Forms
,
DateUtils
,
WEBLib
.
DBCtrls
;
type
type
...
@@ -28,19 +28,21 @@ type
...
@@ -28,19 +28,21 @@ type
wdbtcItems
:
TWebDBTableControl
;
wdbtcItems
:
TWebDBTableControl
;
wdsItems
:
TWebDataSource
;
wdsItems
:
TWebDataSource
;
xdwdsItemsstatus
:
TStringField
;
xdwdsItemsstatus
:
TStringField
;
xdwdsItemsqb_items_qb_id
:
TStringField
;
xdwdsItemsID
:
TStringField
;
xdwdsItemsID
:
TStringField
;
xdwdsItemsname
:
TStringField
;
xdwdsItemsname
:
TStringField
;
xdwdsItemsdescription
:
TStringField
;
xdwdsItemsdescription
:
TStringField
;
edtName
:
TWebDBEdit
;
edtName
:
TWebDBEdit
;
edtDescription
:
TWebDBEdit
;
edtDescription
:
TWebDBEdit
;
cbStatus
:
TWebCheckBox
;
CBStatus
:
TWebDBCheckBox
;
xdwdsItemsQB_ID
:
TStringField
;
lblFormState
:
TWebLabel
;
procedure
btnAddClick
(
Sender
:
TObject
);
procedure
btnAddClick
(
Sender
:
TObject
);
procedure
wcbPageSizeChange
(
Sender
:
TObject
);
procedure
wcbPageSizeChange
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnDeleteClick
(
Sender
:
TObject
);
procedure
btnDeleteClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
wdbtcItemsClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
private
private
FChildForm
:
TWebForm
;
FChildForm
:
TWebForm
;
procedure
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
procedure
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
...
@@ -49,8 +51,10 @@ type
...
@@ -49,8 +51,10 @@ type
function
GenerateSearchOptions
():
string
;
function
GenerateSearchOptions
():
string
;
procedure
ViewMode
();
procedure
ViewMode
();
procedure
EditMode
();
procedure
EditMode
();
procedure
DisablePagination
();
procedure
EnablePagination
();
[
async
]
procedure
GetItems
(
searchOptions
:
string
);
[
async
]
procedure
GetItems
(
searchOptions
:
string
);
[
async
]
procedure
AddItem
(
itemOptions
:
string
);
[
async
]
procedure
AddItem
();
[
async
]
procedure
InitializeForm
;
[
async
]
procedure
InitializeForm
;
var
var
PageNumber
:
integer
;
PageNumber
:
integer
;
...
@@ -61,6 +65,7 @@ type
...
@@ -61,6 +65,7 @@ type
OrderBy
:
string
;
OrderBy
:
string
;
Caller
:
string
;
Caller
:
string
;
notification
:
string
;
notification
:
string
;
mode
:
string
;
public
public
class
function
CreateForm
(
AElementID
:
string
):
TWebForm
;
class
function
CreateForm
(
AElementID
:
string
):
TWebForm
;
...
@@ -72,7 +77,7 @@ var
...
@@ -72,7 +77,7 @@ var
implementation
implementation
uses
uses
JS
,
XData
.
Model
.
Classes
,
XData
.
Model
.
Classes
,
ConnectionModule
,
Auth
.
Service
,
Utils
,
View
.
AddItem
,
View
.
Main
;
ConnectionModule
,
Auth
.
Service
,
Utils
,
View
.
AddItem
,
View
.
Main
;
{$R *.dfm}
{$R *.dfm}
...
@@ -101,37 +106,9 @@ begin
...
@@ -101,37 +106,9 @@ begin
TotalPages
:=
1
;
// Initial total pages
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'10'
;
wcbPageSize
.
Text
:=
'10'
;
await
(
getItems
(
GenerateSearchOptions
()));
await
(
getItems
(
GenerateSearchOptions
()));
ViewMode
();
end
;
end
;
procedure
TFViewItems
.
ViewMode
();
begin
btnAdd
.
Enabled
:=
true
;
btnDelete
.
Enabled
:=
true
;
btnSave
.
Enabled
:=
false
;
btnCancel
.
Enabled
:=
false
;
btnEdit
.
Enabled
:=
true
;
FViewMain
.
change
:=
false
;
edtName
.
Enabled
:=
false
;
edtDescription
.
enabled
:=
false
;
cbStatus
.
Checked
:=
false
;
end
;
procedure
TFViewItems
.
EditMode
();
begin
FViewMain
.
change
:=
true
;
btnAdd
.
Enabled
:=
false
;
btnDelete
.
Enabled
:=
false
;
btnSave
.
Enabled
:=
true
;
btnCancel
.
Enabled
:=
True
;
btnEdit
.
Enabled
:=
false
;
edtName
.
Enabled
:=
true
;
edtDescription
.
Enabled
:=
true
;
cbStatus
.
enabled
:=
true
;
end
;
procedure
TFViewItems
.
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
procedure
TFViewItems
.
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
// Adds one row to #tblPhoneGrid and lets Bootstrap 5.3 highlight the row
// Adds one row to #tblPhoneGrid and lets Bootstrap 5.3 highlight the row
// with its built-in `table-active` class when the user clicks it.
// with its built-in `table-active` class when the user clicks it.
...
@@ -196,8 +173,43 @@ begin
...
@@ -196,8 +173,43 @@ begin
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
procedure
TFViewItems
.
DisablePagination
;
var
i
:
Integer
;
li
:
TJSHTMLElement
;
ul
:
TJSHTMLElement
;
begin
ul
:=
TJSHTMLElement
(
document
.
getElementById
(
'pagination'
));
if
Assigned
(
ul
)
then
begin
for
i
:=
0
to
ul
.
children
.
length
-
1
do
begin
li
:=
TJSHTMLElement
(
ul
.
children
[
i
]);
li
.
setAttribute
(
'disabled'
,
'true'
);
li
.
style
.
setProperty
(
'pointer-events'
,
'none'
);
// Disable click
li
.
style
.
setProperty
(
'opacity'
,
'0.5'
);
end
;
end
;
end
;
procedure
TFViewItems
.
EnablePagination
;
var
i
:
Integer
;
li
:
TJSHTMLElement
;
ul
:
TJSHTMLElement
;
begin
ul
:=
TJSHTMLElement
(
document
.
getElementById
(
'pagination'
));
if
Assigned
(
ul
)
then
begin
for
i
:=
0
to
ul
.
children
.
length
-
1
do
begin
li
:=
TJSHTMLElement
(
ul
.
children
[
i
]);
li
.
removeAttribute
(
'disabled'
);
li
.
style
.
removeProperty
(
'pointer-events'
);
li
.
style
.
removeProperty
(
'opacity'
);
end
;
end
;
end
;
procedure
TFViewItems
.
GeneratePagination
(
TotalPages
:
Integer
);
procedure
TFViewItems
.
GeneratePagination
(
TotalPages
:
Integer
);
// Generates pagination for the table.
// Generates pagination for the table.
...
@@ -220,7 +232,7 @@ begin
...
@@ -220,7 +232,7 @@ begin
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
begin
begin
if
PageNumber
>
1
then
if
(
(
PageNumber
>
1
)
and
(
not
FViewMain
.
change
)
)
then
begin
begin
Dec
(
PageNumber
);
Dec
(
PageNumber
);
GetItems
(
GenerateSearchOptions
());
GetItems
(
GenerateSearchOptions
());
...
@@ -261,9 +273,12 @@ begin
...
@@ -261,9 +273,12 @@ begin
var
var
PageNum
:
Integer
;
PageNum
:
Integer
;
begin
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
if
(
not
FViewMain
.
change
)
then
PageNumber
:=
PageNum
;
begin
GetItems
(
GenerateSearchOptions
());
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
end
;
end
);
end
);
PageItem
.
appendChild
(
PageLink
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
PaginationElement
.
appendChild
(
PageItem
);
...
@@ -300,9 +315,12 @@ begin
...
@@ -300,9 +315,12 @@ begin
var
var
PageNum
:
Integer
;
PageNum
:
Integer
;
begin
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
if
(
not
FViewMain
.
change
)
then
PageNumber
:=
PageNum
;
begin
GetItems
(
GenerateSearchOptions
());
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
end
;
end
);
end
);
PageItem
.
appendChild
(
PageLink
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
PaginationElement
.
appendChild
(
PageItem
);
...
@@ -337,9 +355,12 @@ begin
...
@@ -337,9 +355,12 @@ begin
var
var
PageNum
:
Integer
;
PageNum
:
Integer
;
begin
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
if
(
not
FViewMain
.
change
)
then
PageNumber
:=
PageNum
;
begin
GetItems
(
generateSearchOptions
());
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
generateSearchOptions
());
end
;
end
);
end
);
end
;
end
;
PageItem
.
appendChild
(
PageLink
);
PageItem
.
appendChild
(
PageLink
);
...
@@ -356,7 +377,7 @@ begin
...
@@ -356,7 +377,7 @@ begin
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
begin
begin
if
PageNumber
<
TotalPages
then
if
(
(
PageNumber
<
TotalPages
)
and
(
not
FViewMain
.
change
)
)
then
begin
begin
Inc
(
PageNumber
);
Inc
(
PageNumber
);
GetItems
(
GenerateSearchOptions
());
GetItems
(
GenerateSearchOptions
());
...
@@ -411,7 +432,7 @@ begin
...
@@ -411,7 +432,7 @@ begin
GeneratePagination
(
TotalPages
);
GeneratePagination
(
TotalPages
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve items: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
...
@@ -436,14 +457,41 @@ begin
...
@@ -436,14 +457,41 @@ begin
newform
.
ShowModal
(
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
procedure
(
AValue
:
TModalResult
)
begin
begin
getItems
(
generateSearchOptions
());
if
newform
.
confirm
then
begin
xdwdsItems
.
Append
;
xdwdsItems
.
FieldByName
(
'QB_ID'
).
AsString
:=
newform
.
QB_ID
;
xdwdsItems
.
FieldByName
(
'name'
).
AsString
:=
newform
.
name
;
xdwdsItems
.
FieldByName
(
'description'
).
AsString
:=
newform
.
description
;
xdwdsItems
.
FieldByName
(
'status'
).
AsString
:=
newform
.
status
;
xdwdsItems
.
Post
;
EditMode
();
lblFormState
.
Caption
:=
'Add Mode'
;
end
;
end
end
);
);
end
;
end
;
procedure
TFViewItems
.
btnCancelClick
(
Sender
:
TObject
);
procedure
TFViewItems
.
btnCancelClick
(
Sender
:
TObject
);
begin
begin
ShowToast
(
'Editing items is not yet implemented.'
,
'info'
);
ShowConfirmationModal
(
'Are you sure you want to cancel all changes to the customer?'
,
'Yes'
,
'No'
,
procedure
(
confirmed
:
Boolean
)
begin
if
confirmed
then
begin
FViewMain
.
change
:=
false
;
ViewMode
();
ShowToast
(
'failure:Changes Discarded'
);
xdwdsItems
.
Cancel
;
xdwdsItems
.
First
;
getItems
(
GenerateSearchOptions
());
end
;
end
);
end
;
end
;
...
@@ -454,38 +502,47 @@ end;
...
@@ -454,38 +502,47 @@ end;
procedure
TFViewItems
.
btnEditClick
(
Sender
:
TObject
);
procedure
TFViewItems
.
btnEditClick
(
Sender
:
TObject
);
begin
begin
ShowToast
(
'Editing items is not yet implemented.'
,
'info'
);
EditMode
();
//EditMode();
end
;
end
;
procedure
TFViewItems
.
btnSaveClick
(
Sender
:
TObject
);
procedure
TFViewItems
.
btnSaveClick
(
Sender
:
TObject
);
//TODO implement editting items
//TODO implement editting items
begin
begin
ShowToast
(
'Editing items is not yet implemented.'
,
'info'
);
//ShowToast('Editing items is not yet implemented.', 'info');
//ViewMode();
if
lblFormState
.
Caption
=
'Edit Mode'
then
mode
:=
'EDIT'
else
mode
:=
'ADD'
;
xdwdsItems
.
Post
;
AddItem
();
ViewMode
();
end
;
end
;
procedure
TFViewItems
.
AddItem
(
itemOptions
:
string
);
procedure
TFViewItems
.
AddItem
();
// adds an item to the database.
// adds an item to the database.
var
var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
item
:
TJSObject
;
item
:
TJSObject
;
itemJSON
:
TJSONObject
;
begin
begin
try
try
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddItem'
,
[
itemOptions
]));
itemJSON
:=
TJSONObject
.
Create
;
itemJSON
.
AddPair
(
'qb_items_id'
,
xdwdsItems
.
FieldByName
(
'ID'
).
AsString
);
itemJSON
.
AddPair
(
'qb_item_name'
,
xdwdsItems
.
FieldByName
(
'name'
).
AsString
);
itemJSON
.
AddPair
(
'item_desc'
,
xdwdsItems
.
FieldByName
(
'description'
).
AsString
);
itemJSON
.
AddPair
(
'status'
,
xdwdsItems
.
FieldByName
(
'status'
).
AsString
);
itemJSON
.
AddPair
(
'qb_items_qb_id'
,
xdwdsItems
.
FieldByName
(
'QB_ID'
).
AsString
);
itemJSON
.
AddPair
(
'mode'
,
mode
);
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddItem'
,
[
itemJSON
.
ToString
]));
getItems
(
GenerateSearchOptions
());
getItems
(
GenerateSearchOptions
());
item
:=
TJSObject
(
xdcResponse
.
Result
);
item
:=
TJSObject
(
xdcResponse
.
Result
);
edtName
.
Text
:=
string
(
item
[
'name'
]);
showToast
(
string
(
item
[
'msg'
]));
edtDescription
.
Text
:=
string
(
item
[
'description'
]);
if
item
[
'status'
]
=
'ACTIVE'
then
cbStatus
.
Checked
:=
true
else
cbStatus
.
Checked
:=
false
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not add item: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -497,6 +554,17 @@ begin
...
@@ -497,6 +554,17 @@ begin
getItems
(
GenerateSearchOptions
());
getItems
(
GenerateSearchOptions
());
end
;
end
;
procedure
TFViewItems
.
wdbtcItemsClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
begin
if
lblFormState
.
Caption
=
'View Mode'
then
begin
console
.
log
(
wdbtcItems
.
Cells
[
3
,
ARow
]);
console
.
log
(
xdwdsItems
.
Locate
(
'ID'
,
wdbtcItems
.
Cells
[
0
,
ARow
],
[]));
console
.
log
(
wdbtcItems
.
Cells
[
0
,
ARow
]);
xdwdsItems
.
Locate
(
'ID'
,
wdbtcItems
.
Cells
[
0
,
ARow
],
[]);
end
;
end
;
procedure
TFViewItems
.
ClearTable
();
procedure
TFViewItems
.
ClearTable
();
// clears the table
// clears the table
var
var
...
@@ -518,5 +586,50 @@ begin
...
@@ -518,5 +586,50 @@ begin
Result
:=
searchOptions
;
Result
:=
searchOptions
;
end
;
end
;
procedure
TFViewItems
.
ViewMode
;
// Enables Customer Fields while disabling shipping address fields.
begin
wcbPageSize
.
Enabled
:=
true
;
wdbtcItems
.
Enabled
:=
true
;
EnablePagination
();
btnAdd
.
Enabled
:=
true
;
btnDelete
.
Enabled
:=
true
;
btnSave
.
Enabled
:=
false
;
btnCancel
.
Enabled
:=
false
;
btnEdit
.
Enabled
:=
true
;
FViewMain
.
change
:=
false
;
lblFormState
.
Caption
:=
'View Mode'
;
lblFormState
.
ElementHandle
.
classList
.
remove
(
'text-success'
);
lblFormState
.
ElementHandle
.
classList
.
add
(
'text-danger'
);
end
;
procedure
TFViewItems
.
EditMode
();
begin
xdwdsItems
.
Edit
;
wdbtcItems
.
Enabled
:=
false
;
wcbPageSize
.
Enabled
:=
false
;
FViewMain
.
change
:=
true
;
btnAdd
.
Enabled
:=
false
;
btnDelete
.
Enabled
:=
false
;
btnSave
.
Enabled
:=
true
;
btnCancel
.
Enabled
:=
True
;
btnEdit
.
Enabled
:=
false
;
edtName
.
Enabled
:=
true
;
edtDescription
.
Enabled
:=
true
;
cbStatus
.
enabled
:=
true
;
DisablePagination
();
lblFormState
.
Caption
:=
'Edit Mode'
;
lblFormState
.
ElementHandle
.
classList
.
remove
(
'text-danger'
);
lblFormState
.
ElementHandle
.
classList
.
add
(
'text-success'
);
end
;
end
.
end
.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
a143692e
...
@@ -1586,6 +1586,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
...
@@ -1586,6 +1586,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
FieldName = 'supplied_by_customer_order_date'
end
end
object XDataWebDataSet1inQuickBooks: TStringField
FieldName = 'inQuickBooks'
end
end
end
object WebDataSource1: TWebDataSource
object WebDataSource1: TWebDataSource
AutoEdit = False
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
a143692e
...
@@ -199,6 +199,7 @@ type
...
@@ -199,6 +199,7 @@ type
btnAdd
:
TWebButton
;
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1inQuickBooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
@@ -568,7 +569,7 @@ begin
...
@@ -568,7 +569,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
window
.
open
(
pdfURL
,
'_blank'
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate corrugated PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -600,7 +601,7 @@ begin
...
@@ -600,7 +601,7 @@ begin
[
OrderID
,
'corrugated'
,
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_id'
])]));
[
OrderID
,
'corrugated'
,
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_id'
])]));
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not delete order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -986,7 +987,7 @@ begin
...
@@ -986,7 +987,7 @@ begin
xdwdsQBITEM
.
Open
;
xdwdsQBITEM
.
Open
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -1025,7 +1026,7 @@ begin
...
@@ -1025,7 +1026,7 @@ begin
dtpApprovedDate
.
Date
:=
0
;
dtpApprovedDate
.
Date
:=
0
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customer: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
...
kgOrdersClient/View.OrderEntryCuttingDie.dfm
View file @
a143692e
...
@@ -64,7 +64,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
...
@@ -64,7 +64,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
ElementID = 'edtinquickbooks'
ElementID = 'edtinquickbooks'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'inQuickBooks'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
end
object dtpOrderDate: TWebDateTimePicker
object dtpOrderDate: TWebDateTimePicker
...
...
kgOrdersClient/View.OrderEntryCuttingDie.pas
View file @
a143692e
...
@@ -420,7 +420,7 @@ begin
...
@@ -420,7 +420,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
window
.
open
(
pdfURL
,
'_blank'
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate cutting die PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -441,7 +441,7 @@ begin
...
@@ -441,7 +441,7 @@ begin
mode
:=
'EDIT'
;
mode
:=
'EDIT'
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save cutting die order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -572,7 +572,7 @@ begin
...
@@ -572,7 +572,7 @@ begin
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
...
...
kgOrdersClient/View.OrderEntryWeb.dfm
View file @
a143692e
...
@@ -1668,6 +1668,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
...
@@ -1668,6 +1668,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
object XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField
object XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField
FieldName = 'supplied_by_customer_b_w_or_co'
FieldName = 'supplied_by_customer_b_w_or_co'
end
end
object XDataWebDataSet1InQuickbooks: TStringField
FieldName = 'InQuickbooks'
end
end
end
object WebDataSource1: TWebDataSource
object WebDataSource1: TWebDataSource
AutoEdit = False
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryWeb.pas
View file @
a143692e
...
@@ -203,6 +203,7 @@ type
...
@@ -203,6 +203,7 @@ type
btnAdd
:
TWebButton
;
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1InQuickbooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
@@ -594,7 +595,7 @@ begin
...
@@ -594,7 +595,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
window
.
open
(
pdfURL
,
'_blank'
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate web order PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -614,7 +615,7 @@ begin
...
@@ -614,7 +615,7 @@ begin
mode
:=
'EDIT'
;
mode
:=
'EDIT'
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save web order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
@@ -883,7 +884,7 @@ begin
...
@@ -883,7 +884,7 @@ begin
xdwdsQBITEM
.
Open
;
xdwdsQBITEM
.
Open
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
...
...
kgOrdersClient/View.Orders.dfm
View file @
a143692e
...
@@ -416,7 +416,7 @@ object FViewOrders: TFViewOrders
...
@@ -416,7 +416,7 @@ object FViewOrders: TFViewOrders
object tmrReturn: TWebTimer
object tmrReturn: TWebTimer
Enabled = False
Enabled = False
OnTimer = tmrReturnTimer
OnTimer = tmrReturnTimer
Left = 29
4
Left = 29
2
Top =
362
Top =
414
end
end
end
end
kgOrdersClient/View.Orders.pas
View file @
a143692e
// Displays orders in the grid. Allows the user
// Displays orders in the grid. Allows the user
// to sort the entries, filter their search, and search for a specific person.
// to sort the entries, filter their search, and search for a specific person.
// Authors:
// Authors:
// Cameron Hayes
// Cameron Hayes
...
@@ -235,8 +235,7 @@ begin
...
@@ -235,8 +235,7 @@ begin
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
begin
begin
Utils
.
ShowErrorModal
(
'Could not generate report PDF: '
+
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
E
.
ErrorResult
.
ErrorMessage
);
if
Assigned
(
APdfTab
)
then
if
Assigned
(
APdfTab
)
then
APdfTab
.
close
;
// close the blank tab on failure
APdfTab
.
close
;
// close the blank tab on failure
end
;
end
;
...
@@ -248,7 +247,7 @@ end;
...
@@ -248,7 +247,7 @@ end;
procedure
TFViewOrders
.
WebButton1Click
(
Sender
:
TObject
);
procedure
TFViewOrders
.
WebButton1Click
(
Sender
:
TObject
);
begin
begin
if
status
OrderID
<>
''
then
if
OrderID
<>
''
then
ShowSetStatusForm
()
ShowSetStatusForm
()
else
else
ShowToast
(
'Failure: Please select an order'
);
ShowToast
(
'Failure: Please select an order'
);
...
@@ -769,7 +768,7 @@ begin
...
@@ -769,7 +768,7 @@ begin
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve orders: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
finally
finally
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
...
...
kgOrdersClient/View.SelectCustomer.pas
View file @
a143692e
...
@@ -126,7 +126,7 @@ begin
...
@@ -126,7 +126,7 @@ begin
PopulateGridManually
;
PopulateGridManually
;
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve QuickBooks customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
...
kgOrdersClient/View.UserProfile.pas
View file @
a143692e
...
@@ -91,7 +91,7 @@ begin
...
@@ -91,7 +91,7 @@ begin
FViewMain
.
ViewOrders
(
''
);
FViewMain
.
ViewOrders
(
''
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Error editing user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
on
E
:
Exception
do
on
E
:
Exception
do
Utils
.
ShowErrorModal
(
'Unexpected error: '
+
E
.
Message
);
Utils
.
ShowErrorModal
(
'Unexpected error: '
+
E
.
Message
);
end
;
end
;
...
@@ -145,7 +145,7 @@ begin
...
@@ -145,7 +145,7 @@ begin
chkAdminUser
.
Checked
:=
boolean
(
user
[
'admin'
]);
chkAdminUser
.
Checked
:=
boolean
(
user
[
'admin'
]);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
end
;
end
;
...
...
kgOrdersClient/View.Users.pas
View file @
a143692e
...
@@ -362,7 +362,7 @@ begin
...
@@ -362,7 +362,7 @@ begin
GeneratePagination
(
TotalPages
);
GeneratePagination
(
TotalPages
);
except
except
on
E
:
EXDataClientRequestException
do
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
a143692e
...
@@ -47,6 +47,7 @@ type
...
@@ -47,6 +47,7 @@ type
name
:
string
;
name
:
string
;
description
:
string
;
description
:
string
;
status
:
string
;
status
:
string
;
QB_ID
:
string
;
end
;
end
;
TItemList
=
class
TItemList
=
class
...
@@ -481,7 +482,7 @@ type
...
@@ -481,7 +482,7 @@ type
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
[
HttpGet
]
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
[
HttpGet
]
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
[
HttpGet
]
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
[
HttpGet
]
function
GetCustomers
(
customerInfo
:
string
):
TCustomerList
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
[
HttpGet
]
function
GenerateOrderListPDF
(
searchOptions
:
string
):
string
;
[
HttpGet
]
function
GenerateOrderListPDF
(
searchOptions
:
string
):
string
;
[
HttpGet
]
function
GenerateOrderCorrugatedPDF
(
orderID
:
string
):
string
;
[
HttpGet
]
function
GenerateOrderCorrugatedPDF
(
orderID
:
string
):
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
a143692e
...
@@ -35,7 +35,7 @@ type
...
@@ -35,7 +35,7 @@ type
function
GetUsers
(
searchOptions
:
string
):
TUserList
;
function
GetUsers
(
searchOptions
:
string
):
TUserList
;
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetCustomers
():
TCustomerList
;
function
GetCustomers
(
customerInfo
:
string
):
TCustomerList
;
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
...
@@ -136,15 +136,27 @@ begin
...
@@ -136,15 +136,27 @@ begin
end
;
end
;
function
TLookupService
.
GetCustomers
:
TCustomerList
;
function
TLookupService
.
GetCustomers
(
customerInfo
:
string
)
:
TCustomerList
;
// Retrieves a list of customers and sends it to the client in object form.
// Retrieves a list of customers and sends it to the client in object form.
// The object contains the ID, Name, Short Name, and the shipping address.
// The object contains the ID, Name, Short Name, and the shipping address.
var
var
SQL
:
string
;
SQL
:
string
;
customer
:
TCustomerItem
;
customer
:
TCustomerItem
;
params
:
TStringList
;
PageNum
,
PageSize
:
integer
;
offset
,
limit
:
string
;
begin
begin
params
:=
TStringList
.
Create
;
params
.
StrictDelimiter
:=
true
;
params
.
Delimiter
:=
'&'
;
params
.
DelimitedText
:=
customerInfo
;
PageNum
:=
StrToInt
(
params
.
Values
[
'pagenumber'
]);
PageSize
:=
StrToInt
(
params
.
Values
[
'pagesize'
]);
offset
:=
IntToStr
((
PageNum
-
1
)
*
PageSize
);
limit
:=
IntToStr
(
PageSize
);
try
try
SQL
:=
'select * from customers
'
;
SQL
:=
'select * from customers
limit '
+
limit
+
' offset '
+
offset
;
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
result
:=
TCustomerList
.
Create
;
result
:=
TCustomerList
.
Create
;
...
@@ -167,15 +179,18 @@ begin
...
@@ -167,15 +179,18 @@ begin
customer
.
START_DATE
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'START_DATE'
).
AsString
;
customer
.
START_DATE
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'START_DATE'
).
AsString
;
result
.
data
.
Add
(
customer
);
result
.
data
.
Add
(
customer
);
result
.
count
:=
result
.
count
+
1
;
ordersDB
.
UniQuery1
.
Next
;
ordersDB
.
UniQuery1
.
Next
;
end
;
end
;
ordersDB
.
UniQuery1
.
Close
;
ordersDB
.
UniQuery1
.
Close
;
SQL
:=
'SELECT COUNT(*) AS total_count from customers'
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
Result
.
count
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'total_count'
).
AsInteger
;
ordersDB
.
UniQuery1
.
Close
;
except
except
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetCustomers: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetCustomers: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve customer list:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve customer list:
A KG Orders Database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -251,7 +266,7 @@ begin
...
@@ -251,7 +266,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetCustomer: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetCustomer: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve customer:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve customer:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -295,7 +310,10 @@ begin
...
@@ -295,7 +310,10 @@ begin
Logger
.
log
(
5
,
'PDF Report successfully generated for searchOptions: '
+
params
.
DelimitedText
);
Logger
.
log
(
5
,
'PDF Report successfully generated for searchOptions: '
+
params
.
DelimitedText
);
except
except
on
E
:
Exception
do
on
E
:
Exception
do
raise
EXDataHttpException
.
Create
(
500
,
'Failed to generate PDF: '
+
E
.
Message
);
begin
logger
.
Log
(
2
,
'An error has occurred in TLookupServiceImpl.GenerateOrderListPDF: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Failed to generate PDF: A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
finally
finally
rptOrderList
.
Free
;
rptOrderList
.
Free
;
...
@@ -532,7 +550,7 @@ begin
...
@@ -532,7 +550,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
1
,
'Error generating corrugated PDF: '
+
E
.
Message
);
Logger
.
Log
(
1
,
'Error generating corrugated PDF: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating corrugated PDF:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating corrugated PDF:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
finally
finally
...
@@ -561,7 +579,7 @@ begin
...
@@ -561,7 +579,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
1
,
'Error generating web PDF: '
+
E
.
Message
);
Logger
.
Log
(
1
,
'Error generating web PDF: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating web PDF:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating web PDF:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
finally
finally
...
@@ -589,7 +607,7 @@ begin
...
@@ -589,7 +607,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
1
,
'Error generating cutting die PDF: '
+
E
.
Message
);
Logger
.
Log
(
1
,
'Error generating cutting die PDF: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating cutting die PDF:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Error generating cutting die PDF:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
finally
finally
...
@@ -918,7 +936,7 @@ begin
...
@@ -918,7 +936,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetOrders: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetOrders: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve order list:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve order list:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1131,7 +1149,7 @@ begin
...
@@ -1131,7 +1149,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetOrder: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve
order: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve
corrugated order: A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1274,7 +1292,7 @@ begin
...
@@ -1274,7 +1292,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetWebOrder: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetWebOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve web order:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve web order:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1337,7 +1355,8 @@ begin
...
@@ -1337,7 +1355,8 @@ begin
except
except
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
raise
EXDataHttpException
.
Create
(
500
,
'Could not retrieve cutting die order: '
+
E
.
Message
);
logger
.
Log
(
2
,
'An Error has occurred in TLookupSerivceImpl.GetCuttingDieOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Could not retrieve cutting die order: A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1393,6 +1412,7 @@ begin
...
@@ -1393,6 +1412,7 @@ begin
item
.
name
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
;
item
.
name
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
;
item
.
description
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
;
item
.
description
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
;
item
.
status
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
;
item
.
status
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
;
item
.
QB_ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_qb_id'
).
AsString
;
ordersDB
.
UniQuery1
.
Next
;
ordersDB
.
UniQuery1
.
Next
;
end
;
end
;
...
@@ -1405,7 +1425,7 @@ begin
...
@@ -1405,7 +1425,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in GetItems: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in GetItems: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve item list:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve item list:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1471,10 +1491,8 @@ begin
...
@@ -1471,10 +1491,8 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
ordersDB
.
UniQuery1
.
Close
;
ordersDB
.
UniQuery1
.
Close
;
raise
EXDataHttpException
.
Create
(
logger
.
Log
(
2
,
'An error has occurred in TLookupServiceImpl.GetUsers: '
+
E
.
Message
);
500
,
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve users: A KG Orders database issue has occurred!'
);
'Unable to retrieve users: '
+
E
.
Message
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -1702,7 +1720,8 @@ begin
...
@@ -1702,7 +1720,8 @@ begin
except
except
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Result
:=
TJSONObject
.
Create
.
AddPair
(
'error'
,
E
.
Message
);
Logger
.
Log
(
2
,
'Error in AddCorrugatedOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to add or edit web order: A KG Orders database issue has occurred!'
);
end
end
end
;
end
;
end
;
end
;
...
@@ -1968,7 +1987,10 @@ begin
...
@@ -1968,7 +1987,10 @@ begin
Result
:=
'Failure: Username already taken'
;
Result
:=
'Failure: Username already taken'
;
except
except
on
E
:
Exception
do
on
E
:
Exception
do
raise
EXDataHttpException
.
Create
(
500
,
'AddUser failed: '
+
E
.
Message
);
begin
logger
.
Log
(
2
,
'An error occurred in TlookupServiceImpl.AddUser: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to Add User: A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
...
@@ -1981,8 +2003,9 @@ var
...
@@ -1981,8 +2003,9 @@ var
JSONData
:
TJSONObject
;
JSONData
:
TJSONObject
;
Name
:
string
;
Name
:
string
;
Description
,
mode
:
string
;
Description
,
mode
:
string
;
Status
:
boolean
;
Status
:
string
;
SQL
:
string
;
SQL
:
string
;
ID
:
string
;
begin
begin
try
try
...
@@ -1995,12 +2018,13 @@ begin
...
@@ -1995,12 +2018,13 @@ begin
Name
:=
JSONData
.
GetValue
<
string
>(
'qb_item_name'
);
Name
:=
JSONData
.
GetValue
<
string
>(
'qb_item_name'
);
Description
:=
JSONData
.
GetValue
<
string
>(
'item_desc'
);
Description
:=
JSONData
.
GetValue
<
string
>(
'item_desc'
);
Status
:=
StrToBool
(
JSONData
.
GetValue
<
string
>(
'status'
));
ID
:=
JSONData
.
GetValue
<
string
>(
'qb_items_id'
);
Status
:=
JSONData
.
GetValue
<
string
>(
'status'
);
SQL
:=
'select * from qb_items where qb_item_name = '
+
QuotedStr
(
Name
);
if
mode
=
'ADD'
then
if
mode
=
'ADD'
then
begin
begin
SQL
:=
'select * from qb_items where qb_item_name = '
+
QuotedStr
(
Name
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
if
true
then
//ordersDB.UniQuery1.IsEmpty then
if
true
then
//ordersDB.UniQuery1.IsEmpty then
begin
begin
...
@@ -2008,10 +2032,7 @@ begin
...
@@ -2008,10 +2032,7 @@ begin
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
:=
Name
;
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
:=
Name
;
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
:=
Description
;
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
:=
Description
;
if
status
then
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
status
;
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'ACTIVE'
else
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'INACTIVE'
;
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_qb_id'
).
AsString
:=
JSONData
.
GetValue
<
string
>(
'qb_items_qb_id'
);
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_qb_id'
).
AsString
:=
JSONData
.
GetValue
<
string
>(
'qb_items_qb_id'
);
...
@@ -2023,6 +2044,25 @@ begin
...
@@ -2023,6 +2044,25 @@ begin
end
end
else
else
Result
.
AddPair
(
'msg'
,
'Failure: Item already exists'
);
Result
.
AddPair
(
'msg'
,
'Failure: Item already exists'
);
end
else
begin
SQL
:=
'select * from qb_items where qb_items_id = '
+
ID
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
if
(
not
ordersDB
.
UniQuery1
.
IsEmpty
)
then
begin
ordersDB
.
UniQuery1
.
Edit
;
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
:=
Name
;
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
:=
Description
;
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
status
;
ordersDB
.
UniQuery1
.
Post
;
Result
.
AddPair
(
'msg'
,
'Success: Item successfully edited'
);
end
;
end
;
end
;
except
except
on
E
:
Exception
do
on
E
:
Exception
do
...
@@ -2151,7 +2191,7 @@ begin
...
@@ -2151,7 +2191,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in AddWebOrder: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in AddWebOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to add or edit web order:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to add or edit web order:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -2242,7 +2282,7 @@ begin
...
@@ -2242,7 +2282,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in AddCuttingDieOrder: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in AddCuttingDieOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to add cutting die order:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to add cutting die order:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -2372,7 +2412,7 @@ begin
...
@@ -2372,7 +2412,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in delOrder: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in delOrder: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to delete order:
'
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to delete order:
A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -2566,7 +2606,7 @@ begin
...
@@ -2566,7 +2606,7 @@ begin
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
Logger
.
Log
(
2
,
'Error in getQBCustomers: '
+
E
.
Message
);
Logger
.
Log
(
2
,
'Error in getQBCustomers: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve QuickBooks
customers: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve QuickBooks
Customers: A QuickBooks interface error has occurred!'
);
end
;
end
;
end
;
end
;
finally
finally
...
@@ -2596,87 +2636,89 @@ var
...
@@ -2596,87 +2636,89 @@ var
LastRefresh
:
TDateTime
;
LastRefresh
:
TDateTime
;
iniFile
:
TIniFile
;
iniFile
:
TIniFile
;
begin
begin
Result
:=
TJSONArray
.
Create
;
iniFile
:=
nil
;
iniFile
:=
TIniFile
.
Create
(
ExtractFilePath
(
Application
.
ExeName
)
+
'kgOrdersServer.ini'
);
restClient
:=
nil
;
restClient
:=
TRESTClient
.
Create
(
nil
);
restRequest
:=
nil
;
restRequest
:=
TRESTRequest
.
Create
(
nil
);
restResponse
:=
nil
;
restResponse
:=
TRESTResponse
.
Create
(
nil
);
try
restRequest
.
Client
:=
restClient
;
try
restRequest
.
Response
:=
restResponse
;
Result
:=
TJSONArray
.
Create
;
iniFile
:=
TIniFile
.
Create
(
ExtractFilePath
(
Application
.
ExeName
)
+
'kgOrdersServer.ini'
);
restClient
:=
TRESTClient
.
Create
(
nil
);
if
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
)
=
''
then
restRequest
:=
TRESTRequest
.
Create
(
nil
);
LastRefresh
:=
0
restResponse
:=
TRESTResponse
.
Create
(
nil
);
else
restRequest
.
Client
:=
restClient
;
LastRefresh
:=
StrToDateTime
(
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
));
restRequest
.
Response
:=
restResponse
;
if
MinutesBetween
(
Now
,
LastRefresh
)
>
58
then
RefreshAccessToken
();
Client
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'ClientID'
,
''
);
Secret
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'ClientSecret'
,
''
);
CompanyID
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'CompanyID'
,
''
);
RefreshToken
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'RefreshToken'
,
''
);
AccessToken
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'AccessToken'
,
''
);
restClient
.
BaseURL
:=
'https://sandbox-quickbooks.api.intuit.com'
;
if
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
)
=
''
then
LastRefresh
:=
0
else
LastRefresh
:=
StrToDateTime
(
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
));
if
MinutesBetween
(
Now
,
LastRefresh
)
>
58
then
RefreshAccessToken
();
if
MinutesBetween
(
Now
,
LastRefresh
)
>
58
then
Client
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'ClientID'
,
''
);
begin
Secret
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'ClientSecret'
,
''
);
RefreshAccessToken
();
CompanyID
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'CompanyID'
,
''
);
end
;
RefreshToken
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'RefreshToken'
,
''
);
AccessToken
:=
iniFile
.
ReadString
(
'Quickbooks'
,
'AccessToken'
,
''
);
restRequest
.
Method
:=
rmGET
;
restClient
.
BaseURL
:=
'https://sandbox-quickbooks.api.intuit.com'
;
res
:=
'/v3/company/'
+
companyID
+
'/query?query=select * from Item&minorversion=75'
;
restRequest
.
Resource
:=
res
;
restRequest
.
Method
:=
rmGET
;
res
:=
'/v3/company/'
+
companyID
+
'/query?query=select * from Item&minorversion=75'
;
restRequest
.
Resource
:=
res
;
param
:=
restRequest
.
Params
.
AddItem
;
param
:=
restRequest
.
Params
.
AddItem
;
param
.
Name
:=
'Authorization'
;
param
.
Name
:=
'Authorization'
;
param
.
Kind
:=
pkHTTPHEADER
;
param
.
Kind
:=
pkHTTPHEADER
;
param
.
Options
:=
param
.
Options
+
[
TRESTRequestParameterOption
.
poDoNotEncode
];
param
.
Options
:=
param
.
Options
+
[
TRESTRequestParameterOption
.
poDoNotEncode
];
param
.
Value
:=
'Bearer '
+
AccessToken
;
param
.
Value
:=
'Bearer '
+
AccessToken
;
restRequest
.
Execute
;
restRequest
.
Execute
;
//memo1.Lines.Add(restresponse.Content);
jsValue
:=
restResponse
.
JSONValue
;
jsObj
:=
TJSONObject
(
jsValue
);
ItemList
:=
TJSONArray
(
TJSONObject
(
jsObj
.
GetValue
(
'QueryResponse'
)).
GetValue
(
'Item'
));
jsValue
:=
restResponse
.
JSONValue
;
for
I
:=
0
to
ItemList
.
Count
-
1
do
begin
Item
:=
ItemList
.
Items
[
I
]
as
TJSONObject
;
ParsedItem
:=
TJSONObject
.
Create
;
jsObj
:=
TJSONObject
(
jsValue
);
SQL
:=
'select qb_items_id from qb_items where qb_item_name = '
+
QuotedStr
(
Item
.
GetValue
<
string
>(
'Name'
));
//CustomerList := TJSONArray(restResponse.JSONValue);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
//Memo1.Lines.Add( jsObj.Format(2) );
ItemList
:=
TJSONArray
(
TJSONObject
(
jsObj
.
GetValue
(
'QueryResponse'
)
).
GetValue
(
'Item'
));
ParsedItem
.
AddPair
(
'qb_items_id'
,
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_id'
).
AsString
);
for
I
:=
0
to
ItemList
.
Count
-
1
do
ParsedItem
.
AddPair
(
'qb_item_name'
,
Item
.
GetValue
<
string
>(
'Name'
));
begin
if
Item
.
TryGetValue
<
string
>(
'Description'
,
desc
)
then
Item
:=
ItemList
.
Items
[
I
]
as
TJSONObject
;
ParsedItem
.
AddPair
(
'item_desc'
,
desc
)
ParsedItem
:=
TJSONObject
.
Create
;
else
ParsedItem
.
AddPair
(
'item_desc'
,
'N/A'
);
ParsedItem
.
AddPair
(
'status'
,
Item
.
GetValue
<
string
>(
'Active'
));
ParsedItem
.
AddPair
(
'qb_items_qb_id'
,
Item
.
GetValue
<
string
>(
'Id'
));
SQL
:=
'select qb_items_id from qb_items where qb_item_name = '
+
quotedStr
(
Item
.
GetValue
<
string
>(
'Name'
)
);
Result
.
AddElement
(
ParsedItem
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
)
;
end
;
ParsedItem
.
AddPair
(
'qb_items_id'
,
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_id'
).
AsString
);
except
ParsedItem
.
AddPair
(
'qb_item_name'
,
item
.
GetValue
<
string
>(
'Name'
));
on
E
:
Exception
do
if
item
.
TryGetValue
<
string
>(
'Description'
,
desc
)
then
begin
ParsedItem
.
AddPair
(
'item_desc'
,
desc
)
Logger
.
Log
(
2
,
'Error in getQBCustomers: '
+
E
.
Message
);
else
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve QuickBooks Items: A QuickBooks interface error has occurred!'
);
ParsedItem
.
AddPair
(
'item_desc'
,
'N/A'
);
end
;
ParsedItem
.
AddPair
(
'status'
,
item
.
GetValue
<
string
>(
'Active'
));
end
;
ParsedItem
.
AddPair
(
'qb_items_qb_id'
,
item
.
GetValue
<
string
>(
'Id'
));
Result
.
AddElement
(
ParsedItem
);
finally
iniFile
.
Free
;
restClient
.
Free
;
restRequest
.
Free
;
restResponse
.
Free
;
end
;
end
;
// Load customer info
restClient
.
Free
;
restRequest
.
Free
;
restResponse
.
Free
;
iniFile
.
Free
end
;
end
;
procedure
TLookupService
.
AddAddrBlock
(
prefix
:
string
;
AddrJSON
:
TJSONObject
);
procedure
TLookupService
.
AddAddrBlock
(
prefix
:
string
;
AddrJSON
:
TJSONObject
);
// the point of this function would be to save space in import QB Customer
// the point of this function would be to save space in import QB Customer
begin
begin
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
a143692e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
MemoLogLevel
=
3
FileLogLevel
=
5
FileLogLevel
=
5
webClientVersion
=
0.9.7
webClientVersion
=
0.9.7
LogFileNum
=
8
26
LogFileNum
=
8
44
[Database]
[Database]
Server
=
192.168.159.144
Server
=
192.168.159.144
...
@@ -17,6 +17,8 @@ Password=emsys01
...
@@ -17,6 +17,8 @@ Password=emsys01
CompanyID
=
9341454272655710
CompanyID
=
9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-10-H0-1760618473k44t73jittvqlr4wynn6
RefreshToken
=
RT1-119-H0-176089178955akizxqky85tnrj9nnl
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..IwosInYT2Am8LdNGXuY-zQ._QdW6AZ0up2uAna580wQy7qAZPo3nkfHo0eeSpKllcJ_s69nh33Ld41MnTkxeAv1v1bxhvkDxEvkevfNGnggNHU3XSqIqb6tTKcAqR4zPf14JYgOkn82tw_q2VXWLgboMMpP6CfcBHeZPIbJcEOkmX5g4CY0NOum1-_beYmDHE2sxAxnKxcg3rhjBo33BTFjXSg1xknvkTO_GVbyAWdyZmQOpFRfdXAeUDnPAEZhYNVfACFkEDubdK7PyfcAs_7un_E0NZf270tMc2W0HTyk24wCSLbfeeH2Su-G2wi21JszcNsXSNt9ayGtHEXNcWG6A54k1M8U7o_mvpCXLPEXDtJkx8HnBvTz_ZXrFaztQf0_c8DLld5zW8FC1wn-SzHyoCbYbR2M6tBjVLiK80_FlAal_YjBI8fk9BX7nBab6LbCBIcunt7hRsLWCPiRI8_fwM_Nj8rlvxtIoClcyV7_VpIpxCVUgmxKmgf7zuWD3fYc3i8Bg-DpgGgWPVATXSlfNKhOWIDZfyy0YOlkreXPlNdQwCJ1Su3_3yzu_DioV76C5orqoeWk25NiopiAqJ7cBMj15EiuFx-w3jaqCv6ovzEc5r3by510TNu6msjUh2RQ-nxVqLjyLt6VIp3O00e_.2itJJ0rFwI-foW2v1hDSrw
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..nC8S1UW9Us5C-eV2R-Pz3Q.VQrMSJBJ_25MmQ0tiuGnhYhzDRhQhIOkV92ScgMb4ikGyYq4Br3QFT4AYA73WMEzD3uFLxKiCYdJ7I-B2L2q4u1YCg2n5vWLfmljecOvN64DVQNTksUFC71_9pUFtHL0VlqmV-p2RN2QDhnFjnGFa8CXRGW9K8njUWBrZdeJs4M2NRfbIJWdC2JnY2Fq3X5W26xc9cLXpY5BmijXEu8I7AK25NH7r2ZLdGrrh0aGmOj3JgnW68fYLaGONfBSgRcLyW69jDjM21DP1ujflaf9O2BGDb5LctGv-KgyZ-j9OVCMp7otPevN-o3DGL-Bdawmy_ZDN9L2USSSIXal4S3a6Q25_sOkoI7mp4R_onrsProjids8hzsUTSg7bfWOTu7elG_Hjie2cuZvH3eBsYMd8a-sAOo6hZrECUhHFjpULsRiGRIMLCU3nAOHlGP_IFxgIczYGDx27i54CZhvYgLZR7XBnhlpWMLIntogrU50FSw.4pHLJDZLlpzFGjk-oRqTtQ
LastRefresh
=
7/7/2025 1:49:30 PM
LastRefresh
=
7/11/2025 11:51:34 AM
--RefreshToken
=
RT1-10-H0-1760618473k44t73jittvqlr4wynn6
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