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
c99d264d
Commit
c99d264d
authored
Aug 13, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished the item page
parent
6d65b61f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
130 deletions
+54
-130
View.Calls.dfm
kgOrdersClient/View.Calls.dfm
+4
-68
View.Calls.html
kgOrdersClient/View.Calls.html
+37
-26
View.Calls.pas
kgOrdersClient/View.Calls.pas
+10
-33
View.Main.dfm
kgOrdersClient/View.Main.dfm
+1
-1
View.Main.html
kgOrdersClient/View.Main.html
+1
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.Calls.dfm
View file @
c99d264d
...
...
@@ -22,37 +22,6 @@ object FViewCalls: TFViewCalls
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbLocation: TWebLookupComboBox
Left = 154
Top = 0
Width = 145
Height = 22
ElementID = 'wcblocation'
ElementFont = efCSS
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>
end
object wcbPageSize: TWebComboBox
Left = 0
Top = 0
...
...
@@ -71,23 +40,6 @@ object FViewCalls: TFViewCalls
'25'
'50')
end
object wcbSortBy: TWebComboBox
Left = 442
Top = 52
Width = 145
Height = 21
ElementClassName = 'custom-select'
ElementID = 'wcbsortby'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = 'Date'
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'Date'
'Phone Number')
end
object btnApply: TWebButton
Left = 478
Top = 128
...
...
@@ -103,43 +55,27 @@ object FViewCalls: TFViewCalls
WidthPercent = 100.000000000000000000
OnClick = btnApplyClick
end
object edtSearch: TWebEdit
Left = 48
Top = 382
Width = 121
Height = 22
HelpType = htKeyword
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtsearch'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HideSelection = False
TextHint = 'Format: (XXX) XXX-XXXX'
WidthPercent = 100.000000000000000000
end
object dtpStartDate: TWebEdit
object edtName: TWebEdit
Left = 342
Top = 0
Width = 121
Height = 22
ChildOrder = 10
ElementClassName = 'form-control'
ElementID = '
dtpstartdat
e'
ElementID = '
edtnam
e'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object
dtpEndDate
: TWebEdit
object
edtDescription
: TWebEdit
Left = 478
Top = 0
Width = 121
Height = 22
ChildOrder = 10
ElementClassName = 'form-control'
ElementID = '
dtpenddate
'
ElementID = '
edtdescription
'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
...
...
kgOrdersClient/View.Calls.html
View file @
c99d264d
...
...
@@ -5,39 +5,33 @@
<div
class=
"row justify-content-center"
>
<div
class=
"col-12 col-md-8"
>
<form
class=
"form-inline"
>
<div
class=
"col-sm py-2"
>
<label
class=
'pe-2'
style=
"font-weight: 700;"
>
Location:
</label>
<select
class=
"custom-select"
id=
"wcblocation"
style=
"font-size: 1.00rem;"
></select>
</div>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<label
class=
'pe-2'
style=
"font-weight: 700;"
>
Phone Number:
</label>
<input
class=
"form-control input-sm"
id=
"edtsearch"
>
</div>
</div>
</form>
<form
class=
"form-inline"
>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<label
style=
"font-weight: 700;"
>
Start Dat
e:
</label>
<input
class=
"form-control input-sm"
id=
"
dtpstartdate"
type=
"dat
e"
>
<label
style=
"font-weight: 700;"
>
Nam
e:
</label>
<input
class=
"form-control input-sm"
id=
"
edtnam
e"
>
</div>
<div
class=
"col-sm-6"
>
<label
class=
'pe-2'
style=
"font-weight: 700;"
>
End Date
:
</label>
<input
class=
"form-control input-sm"
id=
"
dtpenddate"
type=
"date
"
>
<label
class=
'pe-2'
style=
"font-weight: 700;"
>
Description
:
</label>
<input
class=
"form-control input-sm"
id=
"
edtdescription
"
>
</div>
</div>
</form>
<div
class=
"row"
>
<div
class=
"col-sm"
>
<form
class=
'form-inline'
>
<div
class=
"col-sm"
>
<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>
</div>
</div>
<form
class=
"form-inline"
>
<div
class=
"row"
>
<div
class=
"col-sm-5"
>
<label
class=
"py-2"
style=
"font-weight: 700;"
>
Show
<select
class=
"custom-select"
id=
"wcbpagesize"
style=
"font-size: 1.00rem;"
></select>
entries
</label>
</div>
<div
class=
"col-sm-5"
>
<label
class=
"py-2"
style=
"font-weight: 700;"
>
Sorted by:
</label>
<select
class=
"custom-select"
id=
"wcbsortby"
style=
"font-size: 1.00rem;"
></select>
</div>
<div
class=
"col-sm-2"
>
<button
class=
"ps-3"
id=
"btnapply"
></button>
</div>
</div>
...
...
@@ -86,10 +80,27 @@
</div>
<script>
// JavaScript function to stop audio
function
stopAudio
()
{
var
audioPlayer
=
document
.
getElementById
(
'audioPlayer'
);
audioPlayer
.
pause
();
// Pause the audio
audioPlayer
.
currentTime
=
0
;
// Reset audio to beginning
}
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.Calls.pas
View file @
c99d264d
...
...
@@ -16,16 +16,13 @@ uses
type
TFViewCalls
=
class
(
TWebForm
)
wcbLocation
:
TWebLookupComboBox
;
XDataWebClient1
:
TXDataWebClient
;
XDataWebDataSet1
:
TXDataWebDataSet
;
lblEntries
:
TWebLabel
;
wcbPageSize
:
TWebComboBox
;
wcbSortBy
:
TWebComboBox
;
btnApply
:
TWebButton
;
edtSearch
:
TWebEdit
;
dtpStartDate
:
TWebEdit
;
dtpEndDate
:
TWebEdit
;
edtName
:
TWebEdit
;
edtDescription
:
TWebEdit
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
btnApplyClick
(
Sender
:
TObject
);
procedure
btnSearchClick
(
Sender
:
TObject
);
...
...
@@ -72,8 +69,7 @@ begin
PageNumber
:=
1
;
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'10'
;
getUser
();
wcbSortBy
.
Text
:=
'Date'
;
getItems
(
GenerateSearchOptions
());
end
;
procedure
TFViewCalls
.
getUser
();
...
...
@@ -82,12 +78,7 @@ var
userList
,
user
:
TJSObject
;
data
:
TJSArray
;
begin
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.GetUsers'
,
[
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_name'
])]));
userList
:=
TJSObject
(
xdcResponse
.
Result
);
data
:=
TJSArray
(
userList
[
'data'
]);
user
:=
TJSObject
(
data
[
0
]);
wcbLocation
.
DisplayText
:=
string
(
user
[
'location'
]);
end
;
...
...
@@ -403,17 +394,10 @@ searchOptions: string;
begin
PageNumber
:=
1
;
PageSize
:=
StrToInt
(
wcbPageSize
.
Text
);
StartDate
:=
dtpStartDate
.
Text
;
EndDate
:=
dtpEndDate
.
Text
;
OrderBy
:=
wcbSortBy
.
Text
;
Caller
:=
edtSearch
.
Text
;
searchOptions
:=
'&phonenumber='
+
wcbLocation
.
Value
+
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&startdate='
+
StartDate
+
'&enddate='
+
EndDate
+
'&orderby='
+
OrderBy
+
'&caller='
+
Caller
;
'&orderby='
+
OrderBy
;
console
.
log
(
'GetItems'
);
GetItems
(
searchOptions
);
end
;
...
...
@@ -451,7 +435,7 @@ end;
procedure
TFViewCalls
.
btnSearchClick
(
Sender
:
TObject
);
// calls Search method
begin
Search
(
edtSearch
.
Text
);
//
Search(edtSearch.Text);
end
;
procedure
TFViewCalls
.
ClearTable
();
...
...
@@ -469,16 +453,9 @@ var
searchOptions
:
string
;
begin
PageSize
:=
StrToInt
(
wcbPageSize
.
Text
);
StartDate
:=
dtpStartDate
.
Text
;
EndDate
:=
dtpEndDate
.
Text
;
OrderBy
:=
wcbSortBy
.
Text
;
searchOptions
:=
'&phonenumber='
+
wcbLocation
.
Value
+
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&startdate='
+
StartDate
+
'&enddate='
+
EndDate
+
'&orderby='
+
OrderBy
+
'&caller='
+
Caller
;
'&orderby='
+
OrderBy
;
Result
:=
searchOptions
;
end
;
...
...
kgOrdersClient/View.Main.dfm
View file @
c99d264d
...
...
@@ -64,7 +64,7 @@ object FViewMain: TFViewMain
Top = 56
Width = 29
Height = 15
ElementID = 'dropdown.menu.
calls
list'
ElementID = 'dropdown.menu.
item
list'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
...
...
kgOrdersClient/View.Main.html
View file @
c99d264d
...
...
@@ -16,7 +16,7 @@
<a
class=
"dropdown-item"
id=
"dropdown.menu.userprofile"
href=
"#"
><i
class=
"fa fa-user fa-fw"
></i><span>
User Profile
</span></a>
</li>
<li>
<a
class=
"dropdown-item"
id=
"dropdown.menu.
callslist"
href=
"#"
><i
class=
"fa fa-phone fa-fw"
></i><span>
Call
s
</span></a>
<a
class=
"dropdown-item"
id=
"dropdown.menu.
itemlist"
href=
"#"
><i
class=
"fa fa-phone fa-fw"
></i><span>
Item
s
</span></a>
</li>
<li>
<a
class=
"dropdown-item"
id=
"dropdown.menu.users"
href=
"#"
><i
class=
"fas fa-address-book fa-fw"
></i><span>
Users
</span></abbr></a>
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
c99d264d
[Options]
LogFileNum
=
3
1
LogFileNum
=
3
2
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