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
1eb5d96c
Commit
1eb5d96c
authored
Aug 05, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EditUsers now autofills the users
parent
7a63b7a9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
198 additions
and
168 deletions
+198
-168
View.EditUser.dfm
kgOrdersClient/View.EditUser.dfm
+86
-88
View.EditUser.html
kgOrdersClient/View.EditUser.html
+19
-12
View.EditUser.pas
kgOrdersClient/View.EditUser.pas
+47
-39
View.Main.dfm
kgOrdersClient/View.Main.dfm
+4
-4
View.Main.pas
kgOrdersClient/View.Main.pas
+6
-3
View.Users.html
kgOrdersClient/View.Users.html
+4
-2
View.Users.pas
kgOrdersClient/View.Users.pas
+31
-19
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.EditUser.dfm
View file @
1eb5d96c
...
...
@@ -2,17 +2,6 @@ object FViewEditUser: TFViewEditUser
Width = 640
Height = 480
OnShow = WebFormCreate
object WebLabel1: TWebLabel
Left = 8
Top = 125
Width = 73
Height = 15
Caption = 'Make Admin?'
Color = clBtnFace
ElementID = 'lblAdmin'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object WebLabel2: TWebLabel
Left = 16
Top = 8
...
...
@@ -35,19 +24,19 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object
WebLabel4
: TWebLabel
Left = 6
Top = 6
2
Width = 8
4
object
lblQB
: TWebLabel
Left =
25
6
Top = 6
5
Width = 8
0
Height = 15
Caption = '
Phone Number
:'
Caption = '
Quickbooks ID
:'
Color = clBtnFace
ElementID = 'lbl
phone
'
ElementID = 'lbl
QB
'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object WebLabel5: TWebLabel
Left = 2
56
Left = 2
84
Top = 8
Width = 56
Height = 15
...
...
@@ -69,8 +58,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000
end
object WebLabel7: TWebLabel
Left =
252
Top = 6
9
Left =
35
Top = 6
2
Width = 32
Height = 15
Caption = 'Email:'
...
...
@@ -80,8 +69,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000
end
object lblactive: TWebLabel
Left =
291
Top = 1
25
Left =
45
Top = 1
63
Width = 38
Height = 15
Caption = 'Active?'
...
...
@@ -90,23 +79,33 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object lbl
Location
: TWebLabel
object lbl
Rights
: TWebLabel
Left = 3
Top = 96
Width =
87
Width =
74
Height = 15
Caption = '
Default Location
'
ElementID = 'lbl
location
'
Caption = '
System Rights
'
ElementID = 'lbl
rights
'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtPhoneNumber: TWebEdit
Left = 96
Top = 62
Width = 121
Height = 22
ChildOrder = 7
ElementID = 'edtphonenumber'
object lblAccess: TWebLabel
Left = 272
Top = 96
Width = 66
Height = 15
Caption = 'Access Type:'
ElementID = 'lblaccess'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object lblPerspective: TWebLabel
Left = 3
Top = 132
Width = 77
Height = 15
Caption = 'Perspective ID:'
ElementID = 'lblperspective'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
...
...
@@ -121,7 +120,7 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000
end
object edtEmail: TWebEdit
Left =
348
Left =
96
Top = 62
Width = 121
Height = 22
...
...
@@ -140,26 +139,9 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbAdmin: TWebCheckBox
Left = 96
Top = 124
Width = 107
Height = 20
Caption = 'Make Admin?'
ChildOrder = 12
ElementID = 'cbadminuser'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
end
object btnConfirm: TWebButton
Left = 96
Top =
17
0
Top =
20
0
Width = 96
Height = 25
Caption = 'Confirm'
...
...
@@ -197,8 +179,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000
end
object btnCancel: TWebButton
Left = 2
37
Top =
17
0
Left = 2
21
Top =
20
0
Width = 96
Height = 25
Caption = 'Cancel'
...
...
@@ -234,7 +216,7 @@ object FViewEditUser: TFViewEditUser
Height = 33
ElementID = 'view.login.message'
ChildOrder = 17
TabOrder =
10
TabOrder =
8
object lblMessage: TWebLabel
Left = 16
Top = 11
...
...
@@ -257,14 +239,14 @@ object FViewEditUser: TFViewEditUser
OnClick = btnCloseNotificationClick
end
end
object cb
Active
: TWebCheckBox
Left =
34
6
Top = 1
24
object cb
Status
: TWebCheckBox
Left =
9
6
Top = 1
62
Width = 107
Height = 20
Caption = 'Active?'
ChildOrder = 12
ElementID = 'cb
active
'
ElementID = 'cb
status
'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
...
...
@@ -274,47 +256,63 @@ object FViewEditUser: TFViewEditUser
ParentFont = False
WidthPercent = 100.000000000000000000
end
object wcbLocation: TWebLookupComboBox
object edtQB: TWebEdit
Left = 348
Top = 62
Width = 121
Height = 22
ChildOrder = 7
ElementID = 'edtQB'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtRights: TWebEdit
Left = 96
Top = 9
6
Width = 1
45
Top = 9
3
Width = 1
21
Height = 22
ElementID = 'wcblocation'
ElementFont = efCSS
ChildOrder = 19
ElementID = 'edtrights'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbAccess: TWebComboBox
Left = 352
Top = 90
Width = 145
Height = 23
ElementID = 'cbaccess'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
LookupValues = <
item
DisplayText = 'All'
end
item
Value = '(716) 681-8820'
DisplayText = 'Galleria'
end
item
Value = '(716) 297-4654'
DisplayText = 'NF Outlet'
end
item
Value = '(585) 445-8911'
DisplayText = 'Rochester'
end
item
Value = '(315) 565-4138'
DisplayText = 'Syracuse'
end>
Items.Strings = (
'PLATE'
'MOUNT'
'SHIP'
'ART'
'ALL'
'ACTIVE')
end
object edtPerspective: TWebEdit
Left = 96
Top = 129
Width = 121
Height = 22
ChildOrder = 23
ElementID = 'edtperspective'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left =
462
Top =
164
Left =
556
Top =
416
end
object WebTimer1: TWebTimer
Enabled = False
Interval = 500
OnTimer = WebTimer1Timer
Left =
236
Top =
194
Left =
430
Top =
382
end
end
kgOrdersClient/View.EditUser.html
View file @
1eb5d96c
...
...
@@ -39,30 +39,37 @@
<form
class=
"form-inline"
>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px;"
id=
"lbl
phone"
>
Phone Number
:
</label>
<input
id=
"edt
phonenumber
"
class=
"form-control input-sm"
width=
'50%'
/>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px;"
id=
"lbl
email"
>
Email Address
:
</label>
<input
id=
"edt
email
"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-sm"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px"
id=
"lbl
email"
>
Email Address
:
</label>
<input
class=
"form-control input-sm"
id=
"edt
email
"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px"
id=
"lbl
QB"
>
Quickbook ID
:
</label>
<input
class=
"form-control input-sm"
id=
"edt
QB
"
>
</div>
</div>
</form>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px"
id=
"lbllocation"
>
Location:
</label>
<select
class=
"custom-select-large"
id=
"wcblocation"
style=
"font-size: 1.00rem;"
></select>
<div
class=
"col-sm"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px;"
id=
"lblrights"
>
System Rights:
</label>
<input
id=
"edtrights"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-sm-6"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px;"
id=
"lblperspective"
>
Perspective ID:
</label>
<input
id=
"edtperspective"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm py-3"
>
<label
class=
'pe-2'
style=
"font-weight: 700;font-size: 15px"
id=
"lblaccess"
>
Access Type:
</label>
<select
class=
"custom-select-large"
id=
"cbaccess"
style=
"font-size: 1.00rem;"
></select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<form
class=
'form-inline'
>
<div
class=
"col-sm"
>
<div
class=
"form-cells"
><input
type=
"checkbox"
id=
"cbadminuser"
></div>
<div
class=
"form-cells ps-1 py-2"
><label
style=
"font-weight: 700;font-size: 15px"
id=
"lblAdmin"
>
Make Admin?
</label></div>
</div>
<div
class=
"col-sm"
>
<div
class=
"form-cells"
><input
type=
"checkbox"
id=
"cbactive"
></div>
<div
class=
"form-cells"
><input
type=
"checkbox"
id=
"cbstatus"
></div>
<div
class=
"form-cells ps-1 py-2"
><label
style=
"font-weight: 700;font-size: 15px"
id=
"lblactive"
>
Active>
</label></div>
</div>
</form>
...
...
kgOrdersClient/View.EditUser.pas
View file @
1eb5d96c
...
...
@@ -12,18 +12,15 @@ uses
type
TFViewEditUser
=
class
(
TWebForm
)
WebLabel1
:
TWebLabel
;
WebLabel2
:
TWebLabel
;
WebLabel3
:
TWebLabel
;
WebLabel4
:
TWebLabel
;
lblQB
:
TWebLabel
;
WebLabel5
:
TWebLabel
;
WebLabel6
:
TWebLabel
;
WebLabel7
:
TWebLabel
;
edtPhoneNumber
:
TWebEdit
;
edtConfirmPassword
:
TWebEdit
;
edtEmail
:
TWebEdit
;
edtPassword
:
TWebEdit
;
cbAdmin
:
TWebCheckBox
;
btnConfirm
:
TWebButton
;
edtFullname
:
TWebEdit
;
edtUsername
:
TWebEdit
;
...
...
@@ -35,9 +32,14 @@ type
lblMessage
:
TWebLabel
;
btnCloseNotification
:
TWebButton
;
lblactive
:
TWebLabel
;
cbActive
:
TWebCheckBox
;
lblLocation
:
TWebLabel
;
wcbLocation
:
TWebLookupComboBox
;
cbStatus
:
TWebCheckBox
;
lblRights
:
TWebLabel
;
edtQB
:
TWebEdit
;
edtRights
:
TWebEdit
;
lblAccess
:
TWebLabel
;
cbAccess
:
TWebComboBox
;
lblPerspective
:
TWebLabel
;
edtPerspective
:
TWebEdit
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
...
...
@@ -49,12 +51,14 @@ type
FMessage
:
string
;
Mode
:
string
;
Username
:
string
;
Password
:
string
;
FullName
:
string
;
Phone
:
string
;
Status
:
string
;
Email
:
string
;
Location
:
string
;
Admin
:
boolean
;
Active
:
boolean
;
Access
:
string
;
Rights
:
string
;
Perspective
:
string
;
QB
:
string
;
[
async
]
procedure
EditUser
();
[
async
]
function
AddUser
():
string
;
procedure
HideNotification
();
...
...
@@ -62,7 +66,8 @@ type
public
{ Public declarations }
Info
:
string
;
class
function
CreateForm
(
AElementID
,
Mode
,
Username
,
FullName
,
Phone
,
Email
,
Location
:
string
;
Admin
,
Active
:
boolean
):
TWebForm
;
class
function
CreateForm
(
AElementID
,
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
):
TWebForm
;
end
;
var
...
...
@@ -111,10 +116,10 @@ begin
userInfo
:=
'&username='
+
string
(
edtUsername
.
Text
).
ToLower
+
'&password='
+
edtPassword
.
Text
+
'&fullname='
+
edtFullName
.
Text
+
'&phonenumber='
+
edtPhoneNumber
.
Text
+
'&email='
+
edtEmail
.
Text
+
'&admin='
+
BoolToStr
(
cbAdmin
.
Checked
)
+
'&location='
+
wcbLocation
.
Value
;
//
'&phonenumber=' + edtPhoneNumber.Text +
'&email='
+
edtEmail
.
Text
;
//
'&admin=' + BoolToStr(cbAdmin.Checked) +
//
'&location=' + wcbLocation.Value;
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddUser'
,
[
userInfo
]));
...
...
@@ -146,13 +151,14 @@ begin
editOptions
:=
'username='
+
Username
+
'&fullname='
+
edtFullName
.
Text
+
'&phonenumber='
+
edtPhoneNumber
.
Text
+
'&password='
+
edtPassword
.
Text
+
'&status='
+
BoolToStr
(
cbStatus
.
Checked
)
+
'&email='
+
edtEmail
.
Text
+
'&a
dmin='
+
BoolToStr
(
cbAdmin
.
Checked
)
+
'&a
ccess='
+
cbAccess
.
Text
+
'&newuser='
+
edtUsername
.
Text
+
'&
password='
+
edtPassword
.
Text
+
'&
active='
+
BoolToStr
(
cbActive
.
Checked
)
+
'&
location='
+
wcbLocation
.
Display
Text
;
'&
rights='
+
edtRights
.
Text
+
'&
Perspective='
+
''
+
'&
QB='
+
edtQB
.
Text
;
console
.
log
(
editOptions
);
...
...
@@ -163,18 +169,20 @@ begin
end
;
class
function
TFViewEditUser
.
CreateForm
(
AElementID
,
Mode
,
Username
,
FullName
,
Phone
,
Email
,
Location
:
string
;
Admin
,
Active
:
boolean
):
TWebForm
;
class
function
TFViewEditUser
.
CreateForm
(
AElementID
,
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
):
TWebForm
;
// Autofills known information about a user on create
procedure
AfterCreate
(
AForm
:
TObject
);
begin
TFViewEditUser
(
AForm
).
Mode
:=
Mode
;
TFViewEditUser
(
AForm
).
Username
:=
Username
;
TFViewEditUser
(
AForm
).
FullName
:=
FullName
;
TFViewEditUser
(
AForm
).
Phone
:=
Phone
;
TFViewEditUser
(
AForm
).
Email
:=
Email
;
TFViewEditUser
(
AForm
).
Location
:=
Location
;
TFViewEditUser
(
AForm
).
Admin
:=
Admin
;
TFViewEditUser
(
AForm
).
Active
:=
Active
;
TFViewEditUser
(
AForm
).
FullName
:=
Name
;
TFViewEditUser
(
AForm
).
Status
:=
Status
;
TFViewEditUser
(
AForm
).
Email
:=
Email
;
TFViewEditUser
(
AForm
).
Access
:=
Access
;
TFViewEditUser
(
AForm
).
Rights
:=
Rights
;
TFViewEditUser
(
AForm
).
Perspective
:=
Perspective
;
TFViewEditUser
(
AForm
).
QB
:=
QB
;
end
;
{$R *.dfm}
...
...
@@ -197,14 +205,14 @@ begin
begin
edtPassword
.
Text
:=
'hidden'
;
edtConfirmPassword
.
Text
:=
'hidden'
;
end
e
lse
cbAdmin
.
Enabled
:=
False
;
wcbLocation
.
DisplayText
:=
Location
;
edt
PhoneNumber
.
Text
:=
Phone
;
edtEmail
.
Text
:=
Email
;
cbAdmin
.
checked
:=
Admin
;
cbActive
.
Checked
:=
Active
;
end
;
e
dtEmail
.
Text
:=
Email
;
cbAccess
.
Text
:=
Access
;
edtRights
.
Text
:=
Rights
;
edt
QB
.
Text
:=
QB
;
if
Status
=
'ACTIVE'
then
cbStatus
.
checked
:=
true
;
edtPerspective
.
Text
:=
Perspective
end
;
procedure
TFViewEditUser
.
WebTimer1Timer
(
Sender
:
TObject
);
...
...
@@ -229,7 +237,7 @@ var
charIndex
:
integer
;
phoneNum
:
string
;
begin
checkString
:=
edtFullName
.
Text
+
edtUsername
.
Text
+
edtPassword
.
Text
{
checkString := edtFullName.Text + edtUsername.Text + edtPassword.Text
+ edtConfirmPassword.Text + edtPhoneNumber.Text + edtEmail.Text;
if string(edtFullName.Text).IsEmpty then
begin
...
...
@@ -334,9 +342,9 @@ begin
asm
var confirmationModal = new bootstrap.Modal(document.getElementById('confirmation_modal'), {
keyboard: false }
);
keyboard: false }
{
);
confirmationModal.show();
end
;
end;
}
end
;
end
.
kgOrdersClient/View.Main.dfm
View file @
1eb5d96c
...
...
@@ -84,8 +84,8 @@ object FViewMain: TFViewMain
Caption = 'Users'
end
object WebPanel1: TWebPanel
Left =
136
Top = 11
0
Left =
77
Top = 11
2
Width = 471
Height = 369
ElementID = 'main.webpanel'
...
...
@@ -102,8 +102,8 @@ object FViewMain: TFViewMain
Opacity = 0.200000000000000000
end
object WebMemo1: TWebMemo
Left =
136
Top = 4
67
Left =
77
Top = 4
79
Width = 471
Height = 83
ElementID = 'main.debugmemo'
...
...
kgOrdersClient/View.Main.pas
View file @
1eb5d96c
...
...
@@ -42,7 +42,8 @@ type
{ Public declarations }
class
procedure
Display
(
LogoutProc
:
TLogoutProc
);
procedure
ShowForm
(
AFormClass
:
TWebFormClass
);
procedure
EditUser
(
Mode
,
FullName
,
Username
,
Phone
,
Email
,
Location
:
string
;
admin
,
active
:
boolean
);
procedure
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
);
procedure
ShowUserForm
(
Info
:
string
);
end
;
...
...
@@ -151,11 +152,13 @@ begin
Application
.
CreateForm
(
AFormClass
,
WebPanel1
.
ElementID
,
FChildForm
);
end
;
procedure
TFViewMain
.
EditUser
(
Mode
,
FullName
,
Username
,
Phone
,
Email
,
Location
:
string
;
Admin
,
Active
:
boolean
);
procedure
TFViewMain
.
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
:
string
);
begin
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
FChildForm
:=
TFViewEditUser
.
CreateForm
(
WebPanel1
.
ElementID
,
Mode
,
FullName
,
Username
,
Phone
,
Email
,
Location
,
Admin
,
Active
);
FChildForm
:=
TFViewEditUser
.
CreateForm
(
WebPanel1
.
ElementID
,
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
Access
,
Rights
,
Perspective
,
QB
);
end
;
procedure
TFViewMain
.
ShowUserForm
(
Info
:
string
);
...
...
kgOrdersClient/View.Users.html
View file @
1eb5d96c
<div
class=
"row"
>
<div
class=
"col-12"
>
<h1
class=
"page-header pt-3"
id=
"view.calls.title"
style=
"font-size: 24px;"
>
Users
</h1>
<div
class=
"container mt-4"
>
<div
class=
"container mt-4
px-0
"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-12 col-md-8"
>
<div
class=
"row"
>
...
...
@@ -12,6 +12,7 @@
</div>
</div>
</div>
</div>
<div
class=
"row justify-content-center py-2"
>
<div
class=
"col-sm"
>
<button
id=
"btnadduser"
class=
"btn btn-primary"
>
Add User>
</button>
...
...
@@ -30,6 +31,7 @@
<th
scope=
"col"
>
System Rights
</th>
<th
scope=
"col"
>
Perspective ID
</th>
<th
scope=
"col"
>
QB ID
</th>
<th
scope=
"col"
>
Edit
</th>
</tr>
</thead>
<tbody>
...
...
@@ -47,7 +49,7 @@
</div>
</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"
>
...
...
kgOrdersClient/View.Users.pas
View file @
1eb5d96c
...
...
@@ -121,12 +121,14 @@ var
cells
:
TJSHTMLCollection
;
UserID
:
TJSNode
;
Username
:
TJSNode
;
Password
:
TJSNode
;
FullName
:
TJSNode
;
PhoneNum
:
TJSNode
;
Status
:
TJSNode
;
Email
:
TJSNode
;
Admin
:
TJSNode
;
Password
:
TJSNode
;
Location
:
TJSNode
;
Access
:
TJSNode
;
Rights
:
TJSNode
;
Perspective
:
TJSNode
;
QB
:
TJSNode
;
isAdmin
:
boolean
;
isActive
:
boolean
;
ButtonCancel
:
TJSHTMLElement
;
...
...
@@ -143,18 +145,16 @@ begin
Username
:=
cells
[
1
];
Password
:=
cells
[
2
];
FullName
:=
cells
[
3
];
PhoneNum
:=
cells
[
4
];
Status
:=
cells
[
4
];
Email
:=
cells
[
5
];
Location
:=
cells
[
6
];
if
TJSHTMLElement
(
cells
[
7
].
childNodes
.
item
(
0
).
childNodes
.
item
(
0
)).
attributes
.
Attrs
[
'checked'
]
=
nil
then
isAdmin
:=
false
else
isAdmin
:=
true
;
if
TJSHTMLElement
(
cells
[
8
].
childNodes
.
item
(
0
).
childNodes
.
item
(
0
)).
attributes
.
Attrs
[
'checked'
]
=
nil
then
isActive
:=
false
else
isActive
:=
true
;
FViewMain
.
EditUser
(
'Edit'
,
Username
.
innerText
,
FullName
.
innerText
,
PhoneNum
.
innerText
,
Email
.
innerText
,
Location
.
innerText
,
isAdmin
,
isActive
);
Access
:=
cells
[
6
];
Rights
:=
cells
[
7
];
Perspective
:=
cells
[
8
];
QB
:=
cells
[
9
];
FViewMain
.
EditUser
(
'Edit'
,
Username
.
innerText
,
Password
.
innerText
,
FullName
.
innerText
,
Status
.
innerText
,
Email
.
innerText
,
Access
.
innerText
,
Rights
.
innerText
,
Perspective
.
innerText
,
QB
.
innerText
);
end
;
...
...
@@ -346,10 +346,9 @@ begin
XDataWebDataSet1
.
Open
;
for
i
:=
0
to
data
.
Length
-
1
do
begin
console
.
log
(
user
);
user
:=
TJSObject
(
data
[
i
]);
AddRowToTable
(
XDataWebDataSet1userID
.
AsString
,
XDataWebDataSet1username
.
AsString
,
XDataWebDataSet1
full_name
.
AsString
,
XDataWebDataSet1password
.
AsString
,
XDataWebDataSet1
password
.
AsString
,
XDataWebDataSet1full_name
.
AsString
,
XDataWebDataSet1status
.
AsString
,
XDataWebDataSet1email_address
.
AsString
,
XDataWebDataSet1Atype
.
AsString
,
XDataWebDataSet1perspectiveID
.
AsString
,
XDataWebDataSet1QBID
.
AsString
,
XDataWebDataSet1rights
.
AsInteger
);
...
...
@@ -409,7 +408,7 @@ begin
Cell
.
innerText
:=
Full_Name
;
NewRow
.
appendChild
(
Cell
);
//
Phone
Cell
//
Status
Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Status'
);
Cell
.
innerText
:=
Status
;
...
...
@@ -446,6 +445,19 @@ begin
Cell
.
innerText
:=
QBID
;
NewRow
.
appendChild
(
Cell
);
// Edit Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Edit'
);
Button
:=
TJSHTMLElement
(
document
.
createElement
(
'a'
));
Button
.
className
:=
'btn btn-primary'
;
Button
.
innerHTML
:=
'<i class="far fa-edit fa-fw"></i><span>Edit</span>'
;
Button
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
begin
EditUser
(
TJSHTMLElement
(
NewRow
));
end
);
Cell
.
appendChild
(
Button
);
NewRow
.
appendChild
(
Cell
);
// Appends new rows to the table body
TJSHTMLElement
(
document
.
getElementById
(
'tblPhoneGrid'
).
getElementsByTagName
(
'tbody'
)[
0
]).
appendChild
(
NewRow
);
end
;
...
...
@@ -453,7 +465,7 @@ end;
procedure
TFViewUsers
.
btnAddUserClick
(
Sender
:
TObject
);
begin
//Info := '';
FViewMain
.
EditUser
(
'Add'
,
''
,
''
,
''
,
''
,
'
All'
,
false
,
true
);
FViewMain
.
EditUser
(
'Add'
,
''
,
''
,
''
,
''
,
'
'
,
''
,
''
,
''
,
''
);
end
;
procedure
TFViewUsers
.
btnCloseNotificationClick
(
Sender
:
TObject
);
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
1eb5d96c
[Options]
LogFileNum
=
1
6
LogFileNum
=
1
7
UpdateTimerLength
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment