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
CSSLibrary = cssBootstrap
ElementFont = efCSS
object lblFormState: TWebLabel
Left = 1
8
Top =
16
Width =
3
Left = 1
9
Top =
578
Width =
79
Height = 15
ElementID = 'lbl_form_state'
HeightPercent = 100.000000000000000000
...
...
@@ -39,7 +39,7 @@ object FViewAddCustomer: TFViewAddCustomer
Text = ''
end
object edtShortName: TWebDBEdit
Left =
19
Left =
24
Top = 12
Width = 121
Height = 22
...
...
kgOrdersClient/AddCustomer.pas
View file @
a143692e
...
...
@@ -79,7 +79,7 @@ type
XDataWebDataSet1REP_USER_ID
:
TStringField
;
xdwdsUsersfull_name
:
TStringField
;
lblFormState
:
TWebLabel
;
procedure
btnSaveClick
(
Sender
:
TObject
);
[
async
]
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
...
...
@@ -424,8 +424,8 @@ procedure TFViewAddCustomer.btnSaveClick(Sender: TObject);
begin
if
VerifyCustomer
()
then
begin
sendCustomerToServer
(
);
GetCustomer
(
);
await
(
sendCustomerToServer
()
);
await
(
GetCustomer
()
);
ViewMode
();
end
;
end
;
...
...
kgOrdersClient/View.AddItem.pas
View file @
a143692e
...
...
@@ -43,6 +43,8 @@ type
public
{ Public declarations }
notification
:
string
;
confirm
:
Boolean
;
QB_ID
,
name
,
description
,
status
:
string
;
end
;
var
...
...
@@ -80,7 +82,18 @@ begin
else
if
xdwdsCustomers
.
FieldByName
(
'qb_items_id'
).
AsString
<>
''
then
edtNotification
.
Text
:=
'Item Already In Database'
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
;
procedure
TfViewAddItem
.
getItems
;
...
...
@@ -90,18 +103,25 @@ var
i
:
integer
;
begin
// Fetch data from XData service
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
Utils
.
ShowSpinner
(
'spinner'
);
try
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
// Load data into TXDataWebDataset
// Load data into TXDataWebDataset
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
Open
;
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
Open
;
// Manually populate the grid
PopulateGridManually
;
//Utils.HideSpinner('spinner');
// Manually populate the grid
PopulateGridManually
;
//Utils.HideSpinner('spinner');
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
procedure
TFViewAddItem
.
PopulateGridManually
;
...
...
kgOrdersClient/View.Customers.dfm
View file @
a143692e
...
...
@@ -42,15 +42,14 @@ object FViewCustomers: TFViewCustomers
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = '50
0
'
Text = '50'
WidthPercent = 100.000000000000000000
OnChange = wcbPageSizeChange
ItemIndex = -1
Items.Strings = (
'100'
'250'
'500'
'1000')
'10'
'25'
'50')
end
object pnlMessage: TWebPanel
Left = 12
...
...
kgOrdersClient/View.Customers.pas
View file @
a143692e
...
...
@@ -83,16 +83,7 @@ begin
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
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
;
...
...
@@ -108,8 +99,8 @@ begin
DMConnection
.
ApiConnection
.
Connected
:=
True
;
PageNumber
:=
1
;
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'50
0
'
;
PageSize
:=
50
0
;
wcbPageSize
.
Text
:=
'50'
;
PageSize
:=
50
;
HideNotification
();
getCustomers
(
GenerateSearchOptions
());
end
;
...
...
@@ -135,21 +126,23 @@ begin
xdwdsCustomers
.
Open
;
customerListLength
:=
integer
(
customerList
[
'count'
]);
TotalPages
:=
(
(
customerListLength
+
PageSize
-
1
)
div
PageSize
);
TotalPages
:=
(
customerListLength
+
PageSize
-
1
)
div
PageSize
;
generatePagination
(
TotalPages
);
if
customerListLength
=
0
then
lblEntries
.
Caption
:=
'No entries found'
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
customerListLength
)
+
' of '
+
IntToStr
(
customerListLength
)
else
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
customerListLength
)
+
' of '
+
IntToStr
(
customerListLength
);
begin
lblEntries
.
Caption
:=
'No entries found'
;
ShowToast
(
'No entries found'
,
'danger'
);
end
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
[(
PageNumber
-
1
)
*
PageSize
+
1
,
PageNumber
*
PageSize
,
customerListLength
])
else
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
[(
PageNumber
-
1
)
*
PageSize
+
1
,
customerListLength
,
customerListLength
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
@@ -180,7 +173,6 @@ begin
getCustomers
(
GenerateSearchOptions
());
end
;
procedure
TFViewCustomers
.
wdbtcCustomersDblClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
begin
...
...
kgOrdersClient/View.EditUser.pas
View file @
a143692e
...
...
@@ -107,7 +107,7 @@ begin
Info
:=
string
(
responseString
[
'value'
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not add user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.Items.dfm
View file @
a143692e
...
...
@@ -21,6 +21,17 @@ object FViewItems: TFViewItems
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
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
Left = 0
Top = 0
...
...
@@ -150,10 +161,11 @@ object FViewItems: TFViewItems
Header.ListItemElementClassName = 'page-item'
Header.ListLinkElementClassName = 'page-link'
WordWrap = True
OnClickCell = wdbtcItemsClickCell
Columns = <
item
DataField = 'ID'
Title = '
KG Orders
ID'
Title = '
Item
ID'
end
item
DataField = 'name'
...
...
@@ -166,6 +178,10 @@ object FViewItems: TFViewItems
item
DataField = 'status'
Title = 'Status'
end
item
DataField = 'QB_ID'
Title = 'QB ID'
end>
DataSource = wdsItems
end
...
...
@@ -175,7 +191,6 @@ object FViewItems: TFViewItems
Width = 121
Height = 22
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtname'
ElementFont = efCSS
HeightStyle = ssAuto
...
...
@@ -190,7 +205,6 @@ object FViewItems: TFViewItems
Width = 121
Height = 22
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtdescription'
ElementFont = efCSS
HeightStyle = ssAuto
...
...
@@ -199,13 +213,13 @@ object FViewItems: TFViewItems
DataField = 'description'
DataSource = wdsItems
end
object
cbStatus: TWeb
CheckBox
object
CBStatus: TWebDB
CheckBox
Left = 352
Top = 3
6
Top = 3
4
Width = 113
Height = 22
Caption = 'Active?'
ChildOrder = 1
0
ChildOrder = 1
1
ElementClassName = 'custom-control custom-checkbox'
ElementButtonClassName = 'custom-control-input'
ElementLabelClassName = 'custom-control-label'
...
...
@@ -214,6 +228,10 @@ object FViewItems: TFViewItems
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'status'
DataSource = wdsItems
ValueChecked = 'ACTIVE'
ValueUnChecked = 'INACTIVE'
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
...
...
@@ -226,10 +244,6 @@ object FViewItems: TFViewItems
object xdwdsItemsstatus: TStringField
FieldName = 'status'
end
object xdwdsItemsqb_items_qb_id: TStringField
FieldName = 'qb_items_qb_id'
Size = 0
end
object xdwdsItemsID: TStringField
FieldName = 'ID'
end
...
...
@@ -239,8 +253,12 @@ object FViewItems: TFViewItems
object xdwdsItemsdescription: TStringField
FieldName = 'description'
end
object xdwdsItemsQB_ID: TStringField
FieldName = 'QB_ID'
end
end
object wdsItems: TWebDataSource
AutoEdit = False
DataSet = xdwdsItems
Left = 268
Top = 300
...
...
kgOrdersClient/View.Items.html
View file @
a143692e
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top"
style=
"z-index: 100;"
>
<div
class=
"container-fluid ps-0"
>
<ul
class=
"navbar-nav me-auto ps-2"
>
<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>
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top border-light"
style=
"z-index: 100;"
>
<div
class=
"container-fluid d-flex align-items-center ps-0 pe-0"
>
<!-- Left-aligned form state label -->
<div
class=
"me-auto ps-3"
>
<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>
</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>
<div
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"container mt-4"
>
...
...
@@ -80,46 +89,4 @@
</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>
<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
uses
System
.
SysUtils
,
System
.
Classes
,
Web
,
WEBLib
.
Graphics
,
WEBLib
.
Forms
,
WEBLib
.
Dialogs
,
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
;
type
...
...
@@ -28,19 +28,21 @@ type
wdbtcItems
:
TWebDBTableControl
;
wdsItems
:
TWebDataSource
;
xdwdsItemsstatus
:
TStringField
;
xdwdsItemsqb_items_qb_id
:
TStringField
;
xdwdsItemsID
:
TStringField
;
xdwdsItemsname
:
TStringField
;
xdwdsItemsdescription
:
TStringField
;
edtName
:
TWebDBEdit
;
edtDescription
:
TWebDBEdit
;
cbStatus
:
TWebCheckBox
;
CBStatus
:
TWebDBCheckBox
;
xdwdsItemsQB_ID
:
TStringField
;
lblFormState
:
TWebLabel
;
procedure
btnAddClick
(
Sender
:
TObject
);
procedure
wcbPageSizeChange
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnDeleteClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
wdbtcItemsClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
private
FChildForm
:
TWebForm
;
procedure
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
...
...
@@ -49,8 +51,10 @@ type
function
GenerateSearchOptions
():
string
;
procedure
ViewMode
();
procedure
EditMode
();
procedure
DisablePagination
();
procedure
EnablePagination
();
[
async
]
procedure
GetItems
(
searchOptions
:
string
);
[
async
]
procedure
AddItem
(
itemOptions
:
string
);
[
async
]
procedure
AddItem
();
[
async
]
procedure
InitializeForm
;
var
PageNumber
:
integer
;
...
...
@@ -61,6 +65,7 @@ type
OrderBy
:
string
;
Caller
:
string
;
notification
:
string
;
mode
:
string
;
public
class
function
CreateForm
(
AElementID
:
string
):
TWebForm
;
...
...
@@ -72,7 +77,7 @@ var
implementation
uses
JS
,
XData
.
Model
.
Classes
,
XData
.
Model
.
Classes
,
ConnectionModule
,
Auth
.
Service
,
Utils
,
View
.
AddItem
,
View
.
Main
;
{$R *.dfm}
...
...
@@ -101,37 +106,9 @@ begin
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'10'
;
await
(
getItems
(
GenerateSearchOptions
()));
ViewMode
();
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
);
// 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.
...
...
@@ -196,8 +173,43 @@ begin
Utils
.
HideSpinner
(
'spinner'
);
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
);
// Generates pagination for the table.
...
...
@@ -220,7 +232,7 @@ begin
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
begin
if
PageNumber
>
1
then
if
(
(
PageNumber
>
1
)
and
(
not
FViewMain
.
change
)
)
then
begin
Dec
(
PageNumber
);
GetItems
(
GenerateSearchOptions
());
...
...
@@ -261,9 +273,12 @@ begin
var
PageNum
:
Integer
;
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
if
(
not
FViewMain
.
change
)
then
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
end
;
end
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
...
...
@@ -300,9 +315,12 @@ begin
var
PageNum
:
Integer
;
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
if
(
not
FViewMain
.
change
)
then
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
GenerateSearchOptions
());
end
;
end
);
PageItem
.
appendChild
(
PageLink
);
PaginationElement
.
appendChild
(
PageItem
);
...
...
@@ -337,9 +355,12 @@ begin
var
PageNum
:
Integer
;
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
generateSearchOptions
());
if
(
not
FViewMain
.
change
)
then
begin
PageNum
:=
StrToInt
((
Event
.
currentTarget
as
TJSHTMLElement
).
innerText
);
PageNumber
:=
PageNum
;
GetItems
(
generateSearchOptions
());
end
;
end
);
end
;
PageItem
.
appendChild
(
PageLink
);
...
...
@@ -356,7 +377,7 @@ begin
PageLink
.
setAttribute
(
'href'
,
'javascript:void(0)'
);
PageLink
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
begin
if
PageNumber
<
TotalPages
then
if
(
(
PageNumber
<
TotalPages
)
and
(
not
FViewMain
.
change
)
)
then
begin
Inc
(
PageNumber
);
GetItems
(
GenerateSearchOptions
());
...
...
@@ -411,7 +432,7 @@ begin
GeneratePagination
(
TotalPages
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve items: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
@@ -436,14 +457,41 @@ begin
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
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
;
procedure
TFViewItems
.
btnCancelClick
(
Sender
:
TObject
);
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
;
...
...
@@ -454,38 +502,47 @@ end;
procedure
TFViewItems
.
btnEditClick
(
Sender
:
TObject
);
begin
ShowToast
(
'Editing items is not yet implemented.'
,
'info'
);
//EditMode();
EditMode
();
end
;
procedure
TFViewItems
.
btnSaveClick
(
Sender
:
TObject
);
//TODO implement editting items
begin
ShowToast
(
'Editing items is not yet implemented.'
,
'info'
);
//ViewMode();
//ShowToast('Editing items is not yet implemented.', 'info');
if
lblFormState
.
Caption
=
'Edit Mode'
then
mode
:=
'EDIT'
else
mode
:=
'ADD'
;
xdwdsItems
.
Post
;
AddItem
();
ViewMode
();
end
;
procedure
TFViewItems
.
AddItem
(
itemOptions
:
string
);
procedure
TFViewItems
.
AddItem
();
// adds an item to the database.
var
xdcResponse
:
TXDataClientResponse
;
item
:
TJSObject
;
itemJSON
:
TJSONObject
;
begin
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
());
item
:=
TJSObject
(
xdcResponse
.
Result
);
edtName
.
Text
:=
string
(
item
[
'name'
]);
edtDescription
.
Text
:=
string
(
item
[
'description'
]);
if
item
[
'status'
]
=
'ACTIVE'
then
cbStatus
.
Checked
:=
true
else
cbStatus
.
Checked
:=
false
;
showToast
(
string
(
item
[
'msg'
]));
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not add item: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -497,6 +554,17 @@ begin
getItems
(
GenerateSearchOptions
());
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
();
// clears the table
var
...
...
@@ -518,5 +586,50 @@ begin
Result
:=
searchOptions
;
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
.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
a143692e
...
...
@@ -1586,6 +1586,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
end
object XDataWebDataSet1inQuickBooks: TStringField
FieldName = 'inQuickBooks'
end
end
object WebDataSource1: TWebDataSource
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
a143692e
...
...
@@ -199,6 +199,7 @@ type
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1inQuickBooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
...
@@ -568,7 +569,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate corrugated PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -600,7 +601,7 @@ begin
[
OrderID
,
'corrugated'
,
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_id'
])]));
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not delete order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -986,7 +987,7 @@ begin
xdwdsQBITEM
.
Open
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -1025,7 +1026,7 @@ begin
dtpApprovedDate
.
Date
:=
0
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customer: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.OrderEntryCuttingDie.dfm
View file @
a143692e
...
...
@@ -64,7 +64,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
ElementID = 'edtinquickbooks'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'inQuickBooks'
DataSource = WebDataSource1
end
object dtpOrderDate: TWebDateTimePicker
...
...
kgOrdersClient/View.OrderEntryCuttingDie.pas
View file @
a143692e
...
...
@@ -420,7 +420,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate cutting die PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -441,7 +441,7 @@ begin
mode
:=
'EDIT'
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save cutting die order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -572,7 +572,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersClient/View.OrderEntryWeb.dfm
View file @
a143692e
...
...
@@ -1668,6 +1668,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
object XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField
FieldName = 'supplied_by_customer_b_w_or_co'
end
object XDataWebDataSet1InQuickbooks: TStringField
FieldName = 'InQuickbooks'
end
end
object WebDataSource1: TWebDataSource
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryWeb.pas
View file @
a143692e
...
...
@@ -203,6 +203,7 @@ type
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1InQuickbooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
...
@@ -594,7 +595,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate web order PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -614,7 +615,7 @@ begin
mode
:=
'EDIT'
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save web order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -883,7 +884,7 @@ begin
xdwdsQBITEM
.
Open
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersClient/View.Orders.dfm
View file @
a143692e
...
...
@@ -416,7 +416,7 @@ object FViewOrders: TFViewOrders
object tmrReturn: TWebTimer
Enabled = False
OnTimer = tmrReturnTimer
Left = 29
4
Top =
362
Left = 29
2
Top =
414
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.
// Authors:
// Cameron Hayes
...
...
@@ -235,8 +235,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
begin
Utils
.
ShowErrorModal
(
'Could not generate report PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
if
Assigned
(
APdfTab
)
then
APdfTab
.
close
;
// close the blank tab on failure
end
;
...
...
@@ -248,7 +247,7 @@ end;
procedure
TFViewOrders
.
WebButton1Click
(
Sender
:
TObject
);
begin
if
status
OrderID
<>
''
then
if
OrderID
<>
''
then
ShowSetStatusForm
()
else
ShowToast
(
'Failure: Please select an order'
);
...
...
@@ -769,7 +768,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve orders: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
finally
Utils
.
HideSpinner
(
'spinner'
);
...
...
kgOrdersClient/View.SelectCustomer.pas
View file @
a143692e
...
...
@@ -126,7 +126,7 @@ begin
PopulateGridManually
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve QuickBooks customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.UserProfile.pas
View file @
a143692e
...
...
@@ -91,7 +91,7 @@ begin
FViewMain
.
ViewOrders
(
''
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Error editing user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
on
E
:
Exception
do
Utils
.
ShowErrorModal
(
'Unexpected error: '
+
E
.
Message
);
end
;
...
...
@@ -145,7 +145,7 @@ begin
chkAdminUser
.
Checked
:=
boolean
(
user
[
'admin'
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.Users.pas
View file @
a143692e
...
...
@@ -362,7 +362,7 @@ begin
GeneratePagination
(
TotalPages
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
a143692e
...
...
@@ -47,6 +47,7 @@ type
name
:
string
;
description
:
string
;
status
:
string
;
QB_ID
:
string
;
end
;
TItemList
=
class
...
...
@@ -481,7 +482,7 @@ type
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
[
HttpGet
]
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
[
HttpGet
]
function
GetCustomers
(
customerInfo
:
string
):
TCustomerList
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
[
HttpGet
]
function
GenerateOrderListPDF
(
searchOptions
:
string
):
string
;
[
HttpGet
]
function
GenerateOrderCorrugatedPDF
(
orderID
:
string
):
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
a143692e
...
...
@@ -35,7 +35,7 @@ type
function
GetUsers
(
searchOptions
:
string
):
TUserList
;
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetCustomers
():
TCustomerList
;
function
GetCustomers
(
customerInfo
:
string
):
TCustomerList
;
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
...
...
@@ -136,15 +136,27 @@ begin
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.
// The object contains the ID, Name, Short Name, and the shipping address.
var
SQL
:
string
;
customer
:
TCustomerItem
;
params
:
TStringList
;
PageNum
,
PageSize
:
integer
;
offset
,
limit
:
string
;
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
SQL
:=
'select * from customers
'
;
SQL
:=
'select * from customers
limit '
+
limit
+
' offset '
+
offset
;
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
result
:=
TCustomerList
.
Create
;
...
...
@@ -167,15 +179,18 @@ begin
customer
.
START_DATE
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'START_DATE'
).
AsString
;
result
.
data
.
Add
(
customer
);
result
.
count
:=
result
.
count
+
1
;
ordersDB
.
UniQuery1
.
Next
;
end
;
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
on
E
:
Exception
do
begin
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
;
...
...
@@ -251,7 +266,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -295,7 +310,10 @@ begin
Logger
.
log
(
5
,
'PDF Report successfully generated for searchOptions: '
+
params
.
DelimitedText
);
except
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
;
finally
rptOrderList
.
Free
;
...
...
@@ -532,7 +550,7 @@ begin
on
E
:
Exception
do
begin
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
;
finally
...
...
@@ -561,7 +579,7 @@ begin
on
E
:
Exception
do
begin
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
;
finally
...
...
@@ -589,7 +607,7 @@ begin
on
E
:
Exception
do
begin
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
;
finally
...
...
@@ -918,7 +936,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -1131,7 +1149,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -1274,7 +1292,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -1337,7 +1355,8 @@ begin
except
on
E
:
Exception
do
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
;
...
...
@@ -1393,6 +1412,7 @@ begin
item
.
name
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
;
item
.
description
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
;
item
.
status
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
;
item
.
QB_ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_qb_id'
).
AsString
;
ordersDB
.
UniQuery1
.
Next
;
end
;
...
...
@@ -1405,7 +1425,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -1471,10 +1491,8 @@ begin
on
E
:
Exception
do
begin
ordersDB
.
UniQuery1
.
Close
;
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve users: '
+
E
.
Message
);
logger
.
Log
(
2
,
'An error has occurred in TLookupServiceImpl.GetUsers: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve users: A KG Orders database issue has occurred!'
);
end
;
end
;
end
;
...
...
@@ -1702,7 +1720,8 @@ begin
except
on
E
:
Exception
do
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
;
...
...
@@ -1968,7 +1987,10 @@ begin
Result
:=
'Failure: Username already taken'
;
except
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
;
...
...
@@ -1981,8 +2003,9 @@ var
JSONData
:
TJSONObject
;
Name
:
string
;
Description
,
mode
:
string
;
Status
:
boolean
;
Status
:
string
;
SQL
:
string
;
ID
:
string
;
begin
try
...
...
@@ -1995,12 +2018,13 @@ begin
Name
:=
JSONData
.
GetValue
<
string
>(
'qb_item_name'
);
Description
:=
JSONData
.
GetValue
<
string
>(
'item_desc'
);
Status
:=
StrToBool
(
JSONData
.
GetValue
<
string
>(
'status'
));
SQL
:=
'select * from qb_items where qb_item_name = '
+
QuotedStr
(
Name
);
ID
:=
JSONData
.
GetValue
<
string
>(
'qb_items_id'
);
Status
:=
JSONData
.
GetValue
<
string
>(
'status'
);
if
mode
=
'ADD'
then
begin
SQL
:=
'select * from qb_items where qb_item_name = '
+
QuotedStr
(
Name
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
if
true
then
//ordersDB.UniQuery1.IsEmpty then
begin
...
...
@@ -2008,10 +2032,7 @@ begin
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
:=
Name
;
ordersDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
:=
Description
;
if
status
then
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'ACTIVE'
else
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'INACTIVE'
;
ordersDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
status
;
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_qb_id'
).
AsString
:=
JSONData
.
GetValue
<
string
>(
'qb_items_qb_id'
);
...
...
@@ -2023,6 +2044,25 @@ begin
end
else
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
;
except
on
E
:
Exception
do
...
...
@@ -2151,7 +2191,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -2242,7 +2282,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -2372,7 +2412,7 @@ begin
on
E
:
Exception
do
begin
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
;
...
...
@@ -2566,7 +2606,7 @@ begin
on
E
:
Exception
do
begin
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
;
finally
...
...
@@ -2596,87 +2636,89 @@ var
LastRefresh
:
TDateTime
;
iniFile
:
TIniFile
;
begin
Result
:=
TJSONArray
.
Create
;
iniFile
:=
TIniFile
.
Create
(
ExtractFilePath
(
Application
.
ExeName
)
+
'kgOrdersServer.ini'
);
restClient
:=
TRESTClient
.
Create
(
nil
);
restRequest
:=
TRESTRequest
.
Create
(
nil
);
restResponse
:=
TRESTResponse
.
Create
(
nil
);
restRequest
.
Client
:=
restClient
;
restRequest
.
Response
:=
restResponse
;
if
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
)
=
''
then
LastRefresh
:=
0
else
LastRefresh
:=
StrToDateTime
(
iniFile
.
ReadString
(
'Quickbooks'
,
'LastRefresh'
,
''
));
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'
,
''
);
iniFile
:=
nil
;
restClient
:=
nil
;
restRequest
:=
nil
;
restResponse
:=
nil
;
try
try
Result
:=
TJSONArray
.
Create
;
iniFile
:=
TIniFile
.
Create
(
ExtractFilePath
(
Application
.
ExeName
)
+
'kgOrdersServer.ini'
);
restClient
:=
TRESTClient
.
Create
(
nil
);
restRequest
:=
TRESTRequest
.
Create
(
nil
);
restResponse
:=
TRESTResponse
.
Create
(
nil
);
restRequest
.
Client
:=
restClient
;
restRequest
.
Response
:=
restResponse
;
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
begin
RefreshAccessToken
();
end
;
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'
,
''
);
restRequest
.
Method
:=
rmGET
;
res
:=
'/v3/company/'
+
companyID
+
'/query?query=select * from Item&minorversion=75'
;
restRequest
.
Resource
:=
res
;
restClient
.
BaseURL
:=
'https://sandbox-quickbooks.api.intuit.com'
;
restRequest
.
Method
:=
rmGET
;
res
:=
'/v3/company/'
+
companyID
+
'/query?query=select * from Item&minorversion=75'
;
restRequest
.
Resource
:=
res
;
param
:=
restRequest
.
Params
.
AddItem
;
param
.
Name
:=
'Authorization'
;
param
.
Kind
:=
pkHTTPHEADER
;
param
.
Options
:=
param
.
Options
+
[
TRESTRequestParameterOption
.
poDoNotEncode
];
param
.
Value
:=
'Bearer '
+
AccessToken
;
param
:=
restRequest
.
Params
.
AddItem
;
param
.
Name
:=
'Authorization'
;
param
.
Kind
:=
pkHTTPHEADER
;
param
.
Options
:=
param
.
Options
+
[
TRESTRequestParameterOption
.
poDoNotEncode
];
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
);
//CustomerList := TJSONArray(restResponse.JSONValue);
//Memo1.Lines.Add( jsObj.Format(2) );
SQL
:=
'select qb_items_id from qb_items where qb_item_name = '
+
QuotedStr
(
Item
.
GetValue
<
string
>(
'Name'
));
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
ItemList
:=
TJSONArray
(
TJSONObject
(
jsObj
.
GetValue
(
'QueryResponse'
)
).
GetValue
(
'Item'
));
for
I
:=
0
to
ItemList
.
Count
-
1
do
begin
Item
:=
ItemList
.
Items
[
I
]
as
TJSONObject
;
ParsedItem
:=
TJSONObject
.
Create
;
ParsedItem
.
AddPair
(
'qb_items_id'
,
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_id'
).
AsString
);
ParsedItem
.
AddPair
(
'qb_item_name'
,
Item
.
GetValue
<
string
>(
'Name'
));
if
Item
.
TryGetValue
<
string
>(
'Description'
,
desc
)
then
ParsedItem
.
AddPair
(
'item_desc'
,
desc
)
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'
)
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
)
;
Result
.
AddElement
(
ParsedItem
);
end
;
ParsedItem
.
AddPair
(
'qb_items_id'
,
ordersDB
.
UniQuery1
.
FieldByName
(
'qb_items_id'
).
AsString
);
ParsedItem
.
AddPair
(
'qb_item_name'
,
item
.
GetValue
<
string
>(
'Name'
));
if
item
.
TryGetValue
<
string
>(
'Description'
,
desc
)
then
ParsedItem
.
AddPair
(
'item_desc'
,
desc
)
else
ParsedItem
.
AddPair
(
'item_desc'
,
'N/A'
);
ParsedItem
.
AddPair
(
'status'
,
item
.
GetValue
<
string
>(
'Active'
));
ParsedItem
.
AddPair
(
'qb_items_qb_id'
,
item
.
GetValue
<
string
>(
'Id'
));
except
on
E
:
Exception
do
begin
Logger
.
Log
(
2
,
'Error in getQBCustomers: '
+
E
.
Message
);
raise
EXDataHttpException
.
Create
(
500
,
'Unable to retrieve QuickBooks Items: A QuickBooks interface error has occurred!'
);
end
;
end
;
Result
.
AddElement
(
ParsedItem
);
finally
iniFile
.
Free
;
restClient
.
Free
;
restRequest
.
Free
;
restResponse
.
Free
;
end
;
// Load customer info
restClient
.
Free
;
restRequest
.
Free
;
restResponse
.
Free
;
iniFile
.
Free
end
;
procedure
TLookupService
.
AddAddrBlock
(
prefix
:
string
;
AddrJSON
:
TJSONObject
);
// the point of this function would be to save space in import QB Customer
begin
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
a143692e
...
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.7
LogFileNum
=
8
26
LogFileNum
=
8
44
[Database]
Server
=
192.168.159.144
...
...
@@ -17,6 +17,8 @@ Password=emsys01
CompanyID
=
9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-10-H0-1760618473k44t73jittvqlr4wynn6
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
LastRefresh
=
7/7/2025 1:49:30 PM
RefreshToken
=
RT1-119-H0-176089178955akizxqky85tnrj9nnl
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..nC8S1UW9Us5C-eV2R-Pz3Q.VQrMSJBJ_25MmQ0tiuGnhYhzDRhQhIOkV92ScgMb4ikGyYq4Br3QFT4AYA73WMEzD3uFLxKiCYdJ7I-B2L2q4u1YCg2n5vWLfmljecOvN64DVQNTksUFC71_9pUFtHL0VlqmV-p2RN2QDhnFjnGFa8CXRGW9K8njUWBrZdeJs4M2NRfbIJWdC2JnY2Fq3X5W26xc9cLXpY5BmijXEu8I7AK25NH7r2ZLdGrrh0aGmOj3JgnW68fYLaGONfBSgRcLyW69jDjM21DP1ujflaf9O2BGDb5LctGv-KgyZ-j9OVCMp7otPevN-o3DGL-Bdawmy_ZDN9L2USSSIXal4S3a6Q25_sOkoI7mp4R_onrsProjids8hzsUTSg7bfWOTu7elG_Hjie2cuZvH3eBsYMd8a-sAOo6hZrECUhHFjpULsRiGRIMLCU3nAOHlGP_IFxgIczYGDx27i54CZhvYgLZR7XBnhlpWMLIntogrU50FSw.4pHLJDZLlpzFGjk-oRqTtQ
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