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
cc8b2b36
Commit
cc8b2b36
authored
Jul 07, 2025
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional confirmation modal updates to users and main, also set status updated
parent
bae0384f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
172 deletions
+97
-172
View.Main.pas
kgOrdersClient/View.Main.pas
+11
-37
View.SetStatus.dfm
kgOrdersClient/View.SetStatus.dfm
+53
-75
View.SetStatus.pas
kgOrdersClient/View.SetStatus.pas
+0
-1
View.UserProfile.pas
kgOrdersClient/View.UserProfile.pas
+25
-36
View.Users.html
kgOrdersClient/View.Users.html
+2
-19
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+3
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+3
-3
No files found.
kgOrdersClient/View.Main.pas
View file @
cc8b2b36
...
...
@@ -47,7 +47,6 @@ type
function
GetUserInfo
:
string
;
procedure
setActive
(
page
:
string
);
procedure
ConfirmLogout
;
procedure
OnConfirmLogout
(
Event
:
TJSEvent
);
public
{ Public declarations }
class
procedure
Display
(
LogoutProc
:
TLogoutProc
);
...
...
@@ -209,47 +208,22 @@ begin
ConfirmLogout
;
end
;
procedure
TFViewMain
.
ConfirmLogout
;
var
yesBtn
:
TJSElement
;
begin
document
.
getElementById
(
'modal_body'
).
innerHTML
:=
'Are you sure you want to log out?'
;
document
.
getElementById
(
'btn_confirm_cancel'
).
innerText
:=
'No'
;
document
.
getElementById
(
'btn_confirm_delete'
).
innerText
:=
'Yes'
;
asm
var
modal
=
document
.
getElementById
(
'confirmation_modal'
);
if
(
modal
&&
modal
.
parentNode
!==
document
.
body
)
{
document.body.appendChild(modal);
}
end
;
// Detach any existing click handler (optional cleanup if reused often)
yesBtn
:=
document
.
getElementById
(
'btn_confirm_delete'
);
if
Assigned
(
yesBtn
)
then
begin
TJSElement
(
yesBtn
).
removeEventListener
(
'click'
,
@
OnConfirmLogout
);
TJSElement
(
yesBtn
).
addEventListener
(
'click'
,
@
OnConfirmLogout
);
end
;
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false
}
);
confirmationModal
.
show
();
end
;
end
;
procedure
TFViewMain
.
OnConfirmLogout
(
Event
:
TJSEvent
);
procedure
TFViewMain
.
ConfirmLogout
;
begin
if
Assigned
(
FLogoutProc
)
then
FLogoutProc
(
''
);
ShowConfirmationModal
(
'Are you sure you want to log out?'
,
'Yes'
,
'No'
,
procedure
(
confirmed
:
Boolean
)
begin
if
confirmed
and
Assigned
(
FLogoutProc
)
then
FLogoutProc
(
''
);
end
);
end
;
procedure
TFViewMain
.
wllblUserProfileClick
(
Sender
:
TObject
);
begin
ShowCrudForm
(
TFViewUserProfile
);
...
...
kgOrdersClient/View.SetStatus.dfm
View file @
cc8b2b36
object FSetStatus: TFSetStatus
Width = 640
Height =
361
Height =
278
OnShow = WebFormShow
object lblStatus1: TWebLabel
Left = 32
6
Top =
80
Left = 32
8
Top =
32
Width = 38
Height = 14
Caption = 'Status:'
...
...
@@ -18,8 +18,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object WebLabel1: TWebLabel
Left = 48
4
Top =
80
Left = 48
6
Top =
32
Width = 91
Height = 14
Caption = 'Date Completed:'
...
...
@@ -33,8 +33,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object WebLabel2: TWebLabel
Left = 1
4
Top =
80
Left = 1
6
Top =
32
Width = 48
Height = 14
Caption = 'Order ID:'
...
...
@@ -48,8 +48,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object WebLabel3: TWebLabel
Left = 17
2
Top =
78
Left = 17
4
Top =
30
Width = 57
Height = 14
Caption = 'Job Name:'
...
...
@@ -63,8 +63,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object WebLabel4: TWebLabel
Left = 1
1
Top =
142
Left = 1
3
Top =
94
Width = 51
Height = 14
Caption = 'Ship Due:'
...
...
@@ -78,8 +78,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object WebLabel5: TWebLabel
Left = 1
69
Top =
142
Left = 1
71
Top =
94
Width = 78
Height = 14
Caption = 'New Due Date:'
...
...
@@ -93,8 +93,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblMount: TWebLabel
Left = 32
4
Top =
200
Left = 32
6
Top =
152
Width = 62
Height = 14
Caption = 'Mount Due:'
...
...
@@ -108,8 +108,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblMountNew: TWebLabel
Left = 48
2
Top =
200
Left = 48
4
Top =
152
Width = 78
Height = 14
Caption = 'New Due Date:'
...
...
@@ -123,8 +123,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblPlate: TWebLabel
Left = 1
1
Top =
200
Left = 1
3
Top =
152
Width = 54
Height = 14
Caption = 'Plate Due:'
...
...
@@ -138,8 +138,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblPlateNew: TWebLabel
Left = 1
69
Top =
200
Left = 1
71
Top =
152
Width = 78
Height = 14
Caption = 'New Due Date:'
...
...
@@ -153,8 +153,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblArt: TWebLabel
Left = 32
4
Top =
142
Left = 32
6
Top =
94
Width = 44
Height = 14
Caption = 'Art Due:'
...
...
@@ -168,8 +168,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object lblArtNew: TWebLabel
Left = 48
2
Top =
142
Left = 48
4
Top =
94
Width = 78
Height = 14
Caption = 'New Due Date:'
...
...
@@ -183,8 +183,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object wlcbStatus: TWebLookupComboBox
Left = 32
6
Top =
100
Left = 32
8
Top =
52
Width = 145
Height = 22
ElementClassName = 'custom-select'
...
...
@@ -194,8 +194,8 @@ object FSetStatus: TFSetStatus
LookupValues = <>
end
object dtpDate: TWebDateTimePicker
Left = 48
4
Top =
100
Left = 48
6
Top =
52
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -206,8 +206,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object btnConfirm: TWebButton
Left = 1
4
Top = 2
73
Left = 1
6
Top = 2
25
Width = 96
Height = 25
Caption = 'Confirm'
...
...
@@ -222,8 +222,8 @@ object FSetStatus: TFSetStatus
OnClick = btnConfirmClick
end
object btnCancel: TWebButton
Left = 12
5
Top = 2
73
Left = 12
7
Top = 2
25
Width = 96
Height = 25
Caption = 'Cancel'
...
...
@@ -238,8 +238,8 @@ object FSetStatus: TFSetStatus
OnClick = btnCancelClick
end
object edtOrderID: TWebEdit
Left = 1
4
Top =
100
Left = 1
6
Top =
52
Width = 145
Height = 22
HelpType = htKeyword
...
...
@@ -259,31 +259,9 @@ object FSetStatus: TFSetStatus
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object edtNotification: TWebEdit
Left = 14
Top = 24
Width = 303
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementFont = efCSS
Enabled = False
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -8
Font.Name = 'Arial'
Font.Style = []
HeightPercent = 100.000000000000000000
HideSelection = False
ParentFont = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object edtJobName: TWebEdit
Left = 17
2
Top =
100
Left = 17
4
Top =
52
Width = 145
Height = 22
HelpType = htKeyword
...
...
@@ -304,8 +282,8 @@ object FSetStatus: TFSetStatus
WidthPercent = 100.000000000000000000
end
object dtpShipDue: TWebDateTimePicker
Left = 1
1
Top = 1
62
Left = 1
3
Top = 1
14
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -317,8 +295,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpNewShipDue: TWebDateTimePicker
Left = 1
69
Top = 1
62
Left = 1
71
Top = 1
14
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -329,8 +307,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpMountDue: TWebDateTimePicker
Left = 32
4
Top =
220
Left = 32
6
Top =
172
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -342,8 +320,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpNewMountDue: TWebDateTimePicker
Left = 48
2
Top =
220
Left = 48
4
Top =
172
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -354,8 +332,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpPlateDue: TWebDateTimePicker
Left = 1
1
Top =
220
Left = 1
3
Top =
172
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -367,8 +345,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpNewPlateDue: TWebDateTimePicker
Left = 1
69
Top =
220
Left = 1
71
Top =
172
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -379,8 +357,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpArtDue: TWebDateTimePicker
Left = 32
4
Top = 1
62
Left = 32
6
Top = 1
14
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
@@ -392,8 +370,8 @@ object FSetStatus: TFSetStatus
Text = ''
end
object dtpNewArtDue: TWebDateTimePicker
Left = 48
2
Top = 1
62
Left = 48
4
Top = 1
14
Width = 145
Height = 22
BorderStyle = bsSingle
...
...
kgOrdersClient/View.SetStatus.pas
View file @
cc8b2b36
...
...
@@ -17,7 +17,6 @@ type
btnCancel
:
TWebButton
;
WebLabel2
:
TWebLabel
;
edtOrderID
:
TWebEdit
;
edtNotification
:
TWebEdit
;
edtJobName
:
TWebEdit
;
WebLabel3
:
TWebLabel
;
WebLabel4
:
TWebLabel
;
...
...
kgOrdersClient/View.UserProfile.pas
View file @
cc8b2b36
...
...
@@ -57,35 +57,19 @@ begin
Exit
;
end
;
asm
var
modal
=
document
.
getElementById
(
'confirmation_modal'
);
var
btnCancel
=
document
.
getElementById
(
'btn_confirm_cancel'
);
var
btnConfirm
=
document
.
getElementById
(
'btn_confirm_delete'
);
var
modalBody
=
document
.
getElementById
(
'modal_body'
);
var
self
=
this
;
if
(
modal
&&
btnCancel
&&
btnConfirm
&&
modalBody
)
{
modalBody.innerText = 'Are you sure you want to save changes to your profile?';
btnCancel.innerText = 'Cancel';
btnConfirm.innerText = 'Save';
if (modal.parentNode !== document.body) {
document.body.appendChild(modal);
}
var
bsModal
=
new
bootstrap
.
Modal
(
modal
,
{ keyboard: false }
);
bsModal
.
show
();
btnConfirm
.
onclick
=
function
()
{
self.EditUser();
bsModal.hide();
}
;
}
end
;
ShowConfirmationModal
(
'Are you sure you want to save changes to your profile?'
,
'Save'
,
'Cancel'
,
procedure
(
confirmed
:
Boolean
)
begin
if
confirmed
then
EditUser
;
end
);
end
;
[
async
]
procedure
TFViewUserProfile
.
EditUser
;
var
xdcResponse
:
TXDataClientResponse
;
...
...
@@ -114,28 +98,33 @@ begin
end
;
procedure
TFViewUserProfile
.
btnCancelClick
(
Sender
:
TObject
);
var
xdcResponse
:
TXDataClientResponse
;
userList
:
TJSObject
;
data
:
TJSArray
;
user
:
TJSObject
;
begin
GetUser
();
showToast
(
'Failure: Changes discarded'
);
ShowConfirmationModal
(
'Are you sure you want to cancel all your changes?'
,
'Yes'
,
'No'
,
procedure
(
confirmed
:
Boolean
)
begin
if
confirmed
then
begin
GetUser
();
ShowToast
(
'Changes discarded'
,
'danger'
);
end
;
end
);
end
;
procedure
TFViewUserProfile
.
WebFormShow
(
Sender
:
TObject
);
begin
GetUser
();
//edtJwt.Text := TJSJSON.stringify(AuthService.TokenPayload);
// View.UserProfile.WebFormShow
chkAdminUser
.
Checked
:=
SameText
(
string
(
AuthService
.
TokenPayload
.
Properties
[
'user_admin'
]),
'true'
);
end
;
procedure
TFViewUserProfile
.
GetUser
;
var
xdcResponse
:
TXDataClientResponse
;
...
...
kgOrdersClient/View.Users.html
View file @
cc8b2b36
...
...
@@ -43,22 +43,5 @@
</div>
</div>
</div>
<!--</div> -->
<!--</div> -->
<div
class=
"modal fade"
id=
"confirmation_modal"
tabindex=
"-1"
aria-labelledby=
"confirmation_modal_label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"confirmation_modal_label"
>
Confirm
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
Are you sure you want to make these changes?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-bs-dismiss=
"modal"
id=
"btn_confirm_delete"
>
Confirm
</button>
</div>
</div>
</div>
</div>
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
cc8b2b36
...
...
@@ -87,6 +87,7 @@ uses
System
.
Generics
.
Collections
,
XData
.
Sys
.
Exceptions
,
uLibrary
,
rOrderWeb
,
rOrderCutting
;
procedure
TLookupService
.
AfterConstruction
;
begin
inherited
;
...
...
@@ -94,12 +95,14 @@ begin
end
;
procedure
TLookupService
.
BeforeDestruction
;
begin
ordersDB
.
Free
;
inherited
;
end
;
function
TLookupService
.
DelShippingAddress
(
AddressID
,
CustomerID
:
string
):
TJSONObject
;
var
SQL
:
string
;
...
...
@@ -300,7 +303,6 @@ begin
end
;
function
TLookupService
.
AddShippingAddress
(
AddressInfo
:
string
):
TJSONObject
;
var
JSONData
:
TJSONObject
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
cc8b2b36
...
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.6
LogFileNum
=
78
3
LogFileNum
=
78
7
[Database]
--Server
=
192.168.159.153
...
...
@@ -18,5 +18,5 @@ CompanyID=9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-55-H0-1760199851kjdi3btbxslf7tq8m7cl
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..
O3e979eZoknEyMWs1-5Q5w.-z37ae8MYhIzRcekkINv43asF8sdeAzWmwRNHjt5btSaQGgK9yIK-ClhdmUaDUBuUyHYVu-rJyqTZ_2BjZUQZEDHNxC43iTtZGPNawcjJMEmVR6PdftSizoqz_ITuTVeyBCa0eKNFOcodeROFXVN0gW2Iu8fWiRbAk08vwGfuHoWR5B6v4Wipmc3EzVVFYHfzgifsomn3EwavpK33n6g4TrZ7nEOIEHZNHKXFpJ4fS1Y1DgYSJu1QEqDqQ6ONG7DfB5dm8OBy0dbMVJ3d7ajSSigLBpWKzGhfFDM_wlxk_cfWLHTqJ1vrZm1c0GmNozHcWqGkQAtKoucq6jua22L-3EM0UWryjBHIh3tDFqRdLtl9g8vLYPtXukTnefCst985xcG00jPyQNmxN4CBlgMlfD8Y0s76usKQzNBd6_LlF46StKXyX0f1EWehoEDZ7xya8jeh8Xu4cKJPPquRV4soGHgMQ76LCyHA8QfSHNdH8bYtNLVmX2PUjHFiO0PUFDSfI9ukjfeBv4gZmlPycf_7YNucdNAPogqWwyQ0WBRnkRCR4GmPIOI6XEIn5b_RavaYlwaLVxMch9Hz7yJLFkTINDP0u9VoZT1NOARdXCuRIyk1FdmI4j-rWE8UOsM1Bnl.AMj-4o-sgsryeHsA8ED04Q
LastRefresh
=
7/
2/2025 2:45:23 P
M
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..
SfER6nQ3SXAYYnEHK1PyTQ.D7j-TLHc2sTn73hXvNqdDM130yMmQjJjdOcY4RFA6sbpOePs0tcvdk3dg3BDZtPMLF4wHBsF49s6tlkUSgfe-p2LhBLzXUw_hUzLIOEUkJuvvM60Jq8s8X0L8fjy862UcpEF69tgg66_Tez6ENAZpi88iGfGOj5dmey2JMYJIkFiZ0_WnHUmW0BhiZPWqoxbCI6IAVCsigkkZMLSvV6FAYYhs6J20C9zHjvbrBnRrsJ6Ep_MZf3src6z8nv4BagVCl02A_u-em7M-V3Z4OnsoFaTHJpZ76zFlYFLS_pC2m3TaDPXw0KOhMH3Ax8pOjhK4WdEK2v4vcCq1dccqJjoNWhcQIIjwN-OhWAoe9BqUdtR8R-KQRJ49zys_zMCicepj3zLGJbkerMGPMLajXWNzd0rDwRGIFtNHnNXNhncnbK8vGpgI8idY2Da3Uj4WJ1tVFleKIhgxi1zQSWuypxC36MnD0Dg55jQA5Is0npfaNJKXG07qHuG4ro5SAALoTihuBewH57fKFGAkZK6XYOjm21al-Me2zf_PWQkO_S59XFQsgbbmB9l4j5qdr4xhdBnYin3O7T9hYo9UdP-qjIULEG0sQ-UIFoxFA5k3FQWEYTBZ337yJ3Qq7GATokzot6G.9FP-Ggly-5gd7suf8iM00w
LastRefresh
=
7/
3/2025 9:23:39 A
M
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