Commit 8d360d08 by Mac Stephens

Merge branch 'cam'

parents 63620b75 c515903d
...@@ -7,7 +7,7 @@ uses ...@@ -7,7 +7,7 @@ uses
XData.Web.Client; XData.Web.Client;
const const
TOKEN_NAME = 'WEBENVOYCALLS_TOKEN'; TOKEN_NAME = 'KG_ORDERS_WEB_TOKEN';
type type
TOnLoginSuccess = reference to procedure; TOnLoginSuccess = reference to procedure;
......
...@@ -5,30 +5,6 @@ ...@@ -5,30 +5,6 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-12 col-md-8"> <div class="col-12 col-md-8">
<form class="form-inline"> <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 Date:</label>
<input class="form-control input-sm" id="dtpstartdate" type="date">
</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">
</div>
</div>
</form>
<form class="form-inline">
<div class= "row"> <div class= "row">
<div class="col-sm-5"> <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> <label class="py-2" style="font-weight: 700;">Show <select class="custom-select" id="wcbpagesize" style="font-size: 1.00rem;"></select> entries</label>
...@@ -42,16 +18,25 @@ ...@@ -42,16 +18,25 @@
</div> </div>
</div> </div>
</form> </form>
</div>
<table class="table table-responsive table-striped table-bordered" id="tblPhoneGrid"> <table class="table table-responsive table-striped table-bordered" id="tblPhoneGrid">
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th scope="col">Phone Number</th> <th scope="col">Order ID</th>
<th scope="col">Caller</th> <th scope="col">Company Name</th>
<th scope="col">Time</th> <th scope="col">Job Name</th>
<th scope="col">Duration</th> <th scope="col">Order Date</th>
<th scope="col">Transcript</th> <th scope="col">Proof Due</th>
<th scope="col">Listen</th> <th scope="col">Proof Date</th>
<th scope="col">Art Due</th>
<th scope="col">Art Done</th>
<th scope="col">Mount Due</th>
<th scope="col">Mount Done</th>
<th scope="col">Ship Due</th>
<th scope="col">Ship Done</th>
<th scope="col">Price</th>
<th scope="col">Quickbooks Reference Number</th>
<th scope="col">Colors</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -68,7 +53,6 @@ ...@@ -68,7 +53,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="audioModal" tabindex="-1" aria-labelledby="audioModalLabel" aria-hidden="true"> <div class="modal fade" id="audioModal" tabindex="-1" aria-labelledby="audioModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
......
...@@ -2,17 +2,6 @@ object FViewEditUser: TFViewEditUser ...@@ -2,17 +2,6 @@ object FViewEditUser: TFViewEditUser
Width = 640 Width = 640
Height = 480 Height = 480
OnShow = WebFormCreate 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 object WebLabel2: TWebLabel
Left = 16 Left = 16
Top = 8 Top = 8
...@@ -35,19 +24,19 @@ object FViewEditUser: TFViewEditUser ...@@ -35,19 +24,19 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebLabel4: TWebLabel object lblQB: TWebLabel
Left = 6 Left = 256
Top = 62 Top = 65
Width = 84 Width = 80
Height = 15 Height = 15
Caption = 'Phone Number:' Caption = 'Quickbooks ID:'
Color = clBtnFace Color = clBtnFace
ElementID = 'lblphone' ElementID = 'lblQB'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebLabel5: TWebLabel object WebLabel5: TWebLabel
Left = 256 Left = 284
Top = 8 Top = 8
Width = 56 Width = 56
Height = 15 Height = 15
...@@ -69,8 +58,8 @@ object FViewEditUser: TFViewEditUser ...@@ -69,8 +58,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebLabel7: TWebLabel object WebLabel7: TWebLabel
Left = 252 Left = 35
Top = 69 Top = 62
Width = 32 Width = 32
Height = 15 Height = 15
Caption = 'Email:' Caption = 'Email:'
...@@ -80,8 +69,8 @@ object FViewEditUser: TFViewEditUser ...@@ -80,8 +69,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblactive: TWebLabel object lblactive: TWebLabel
Left = 291 Left = 45
Top = 125 Top = 163
Width = 38 Width = 38
Height = 15 Height = 15
Caption = 'Active?' Caption = 'Active?'
...@@ -90,23 +79,33 @@ object FViewEditUser: TFViewEditUser ...@@ -90,23 +79,33 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblLocation: TWebLabel object lblRights: TWebLabel
Left = 3 Left = 3
Top = 96 Top = 96
Width = 87 Width = 74
Height = 15 Height = 15
Caption = 'Default Location' Caption = 'System Rights'
ElementID = 'lbllocation' ElementID = 'lblrights'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtPhoneNumber: TWebEdit object lblAccess: TWebLabel
Left = 96 Left = 272
Top = 62 Top = 96
Width = 121 Width = 66
Height = 22 Height = 15
ChildOrder = 7 Caption = 'Access Type:'
ElementID = 'edtphonenumber' 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 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
...@@ -121,7 +120,7 @@ object FViewEditUser: TFViewEditUser ...@@ -121,7 +120,7 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtEmail: TWebEdit object edtEmail: TWebEdit
Left = 348 Left = 96
Top = 62 Top = 62
Width = 121 Width = 121
Height = 22 Height = 22
...@@ -140,26 +139,9 @@ object FViewEditUser: TFViewEditUser ...@@ -140,26 +139,9 @@ object FViewEditUser: TFViewEditUser
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end 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 object btnConfirm: TWebButton
Left = 96 Left = 96
Top = 170 Top = 200
Width = 96 Width = 96
Height = 25 Height = 25
Caption = 'Confirm' Caption = 'Confirm'
...@@ -197,8 +179,8 @@ object FViewEditUser: TFViewEditUser ...@@ -197,8 +179,8 @@ object FViewEditUser: TFViewEditUser
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 237 Left = 221
Top = 170 Top = 200
Width = 96 Width = 96
Height = 25 Height = 25
Caption = 'Cancel' Caption = 'Cancel'
...@@ -234,7 +216,7 @@ object FViewEditUser: TFViewEditUser ...@@ -234,7 +216,7 @@ object FViewEditUser: TFViewEditUser
Height = 33 Height = 33
ElementID = 'view.login.message' ElementID = 'view.login.message'
ChildOrder = 17 ChildOrder = 17
TabOrder = 10 TabOrder = 8
object lblMessage: TWebLabel object lblMessage: TWebLabel
Left = 16 Left = 16
Top = 11 Top = 11
...@@ -257,14 +239,14 @@ object FViewEditUser: TFViewEditUser ...@@ -257,14 +239,14 @@ object FViewEditUser: TFViewEditUser
OnClick = btnCloseNotificationClick OnClick = btnCloseNotificationClick
end end
end end
object cbActive: TWebCheckBox object cbStatus: TWebCheckBox
Left = 346 Left = 96
Top = 124 Top = 162
Width = 107 Width = 107
Height = 20 Height = 20
Caption = 'Active?' Caption = 'Active?'
ChildOrder = 12 ChildOrder = 12
ElementID = 'cbactive' ElementID = 'cbstatus'
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -274,47 +256,63 @@ object FViewEditUser: TFViewEditUser ...@@ -274,47 +256,63 @@ object FViewEditUser: TFViewEditUser
ParentFont = False ParentFont = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end 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 Left = 96
Top = 96 Top = 93
Width = 145 Width = 121
Height = 22 Height = 22
ElementID = 'wcblocation' ChildOrder = 19
ElementFont = efCSS 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 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
ItemIndex = -1 ItemIndex = -1
LookupValues = < Items.Strings = (
item 'PLATE'
DisplayText = 'All' 'MOUNT'
end 'SHIP'
item 'ART'
Value = '(716) 681-8820' 'ALL'
DisplayText = 'Galleria' 'ACTIVE')
end end
item object edtPerspective: TWebEdit
Value = '(716) 297-4654' Left = 96
DisplayText = 'NF Outlet' Top = 129
end Width = 121
item Height = 22
Value = '(585) 445-8911' ChildOrder = 23
DisplayText = 'Rochester' ElementID = 'edtperspective'
end HeightPercent = 100.000000000000000000
item WidthPercent = 100.000000000000000000
Value = '(315) 565-4138'
DisplayText = 'Syracuse'
end>
end end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 462 Left = 556
Top = 164 Top = 416
end end
object WebTimer1: TWebTimer object WebTimer1: TWebTimer
Enabled = False Enabled = False
Interval = 500 Interval = 500
OnTimer = WebTimer1Timer OnTimer = WebTimer1Timer
Left = 236 Left = 430
Top = 194 Top = 382
end end
end end
<div class="row"> <div class="row">
<div class="col-12"> <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">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-12 col-md-8"> <div class="col-12 col-md-8">
...@@ -39,30 +38,37 @@ ...@@ -39,30 +38,37 @@
<form class="form-inline"> <form class="form-inline">
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<label class='pe-2' style="font-weight: 700;font-size: 15px;" id="lblphone">Phone Number:</label> <label class='pe-2' style="font-weight: 700;font-size: 15px;" id="lblemail">Email Address:</label>
<input id="edtphonenumber" class= "form-control input-sm" width='50%'/> <input id="edtemail" class= "form-control input-sm" width='50%'/>
</div> </div>
<div class="col-sm"> <div class="col-sm">
<label class= 'pe-2' style="font-weight: 700;font-size: 15px"id="lblemail">Email Address:</label> <label class= 'pe-2' style="font-weight: 700;font-size: 15px"id="lblQB">Quickbook ID:</label>
<input class="form-control input-sm" id="edtemail"> <input class="form-control input-sm" id="edtQB">
</div> </div>
</div> </div>
</form> </form>
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<label class= 'pe-2' style="font-weight: 700;font-size: 15px"id="lbllocation">Location:</label> <label class='pe-2' style="font-weight: 700;font-size: 15px;" id="lblrights">System Rights:</label>
<select class="custom-select-large" id="wcblocation" style="font-size: 1.00rem;"></select> <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>
<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>
<div class="row"> <div class="row">
<div class="col-sm"> <div class="col-sm">
<form class='form-inline'> <form class='form-inline'>
<div class="col-sm"> <div class="col-sm">
<div class="form-cells"><input type="checkbox" id="cbadminuser"></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="lblAdmin">Make Admin?</label></div>
</div>
<div class="col-sm">
<div class="form-cells"><input type="checkbox" id="cbactive"></div>
<div class="form-cells ps-1 py-2"><label style="font-weight: 700;font-size: 15px" id="lblactive">Active></label></div> <div class="form-cells ps-1 py-2"><label style="font-weight: 700;font-size: 15px" id="lblactive">Active></label></div>
</div> </div>
</form> </form>
......
...@@ -12,18 +12,15 @@ uses ...@@ -12,18 +12,15 @@ uses
type type
TFViewEditUser = class(TWebForm) TFViewEditUser = class(TWebForm)
WebLabel1: TWebLabel;
WebLabel2: TWebLabel; WebLabel2: TWebLabel;
WebLabel3: TWebLabel; WebLabel3: TWebLabel;
WebLabel4: TWebLabel; lblQB: TWebLabel;
WebLabel5: TWebLabel; WebLabel5: TWebLabel;
WebLabel6: TWebLabel; WebLabel6: TWebLabel;
WebLabel7: TWebLabel; WebLabel7: TWebLabel;
edtPhoneNumber: TWebEdit;
edtConfirmPassword: TWebEdit; edtConfirmPassword: TWebEdit;
edtEmail: TWebEdit; edtEmail: TWebEdit;
edtPassword: TWebEdit; edtPassword: TWebEdit;
cbAdmin: TWebCheckBox;
btnConfirm: TWebButton; btnConfirm: TWebButton;
edtFullname: TWebEdit; edtFullname: TWebEdit;
edtUsername: TWebEdit; edtUsername: TWebEdit;
...@@ -35,9 +32,14 @@ type ...@@ -35,9 +32,14 @@ type
lblMessage: TWebLabel; lblMessage: TWebLabel;
btnCloseNotification: TWebButton; btnCloseNotification: TWebButton;
lblactive: TWebLabel; lblactive: TWebLabel;
cbActive: TWebCheckBox; cbStatus: TWebCheckBox;
lblLocation: TWebLabel; lblRights: TWebLabel;
wcbLocation: TWebLookupComboBox; edtQB: TWebEdit;
edtRights: TWebEdit;
lblAccess: TWebLabel;
cbAccess: TWebComboBox;
lblPerspective: TWebLabel;
edtPerspective: TWebEdit;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure btnConfirmClick(Sender: TObject); procedure btnConfirmClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
...@@ -49,12 +51,14 @@ type ...@@ -49,12 +51,14 @@ type
FMessage: string; FMessage: string;
Mode: string; Mode: string;
Username: string; Username: string;
Password: string;
FullName: string; FullName: string;
Phone: string; Status: string;
Email: string; Email: string;
Location: string; Access: string;
Admin: boolean; Rights: string;
Active: boolean; Perspective: string;
QB: string;
[async] procedure EditUser(); [async] procedure EditUser();
[async] function AddUser(): string; [async] function AddUser(): string;
procedure HideNotification(); procedure HideNotification();
...@@ -62,7 +66,8 @@ type ...@@ -62,7 +66,8 @@ type
public public
{ Public declarations } { Public declarations }
Info: string; 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; end;
var var
...@@ -108,13 +113,16 @@ var ...@@ -108,13 +113,16 @@ var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
responseString: TJSObject; responseString: TJSObject;
begin begin
userInfo := '&username=' + string(edtUsername.Text).ToLower + userInfo := '&username=' + edtUsername.Text +
'&password=' + edtPassword.Text + '&fullname=' + edtFullName.Text +
'&fullname=' + edtFullName.Text + '&password=' + edtPassword.Text +
'&phonenumber=' + edtPhoneNumber.Text + '&status=' + BoolToStr(cbStatus.Checked) +
'&email=' + edtEmail.Text + '&email=' + edtEmail.Text +
'&admin=' + BoolToStr(cbAdmin.Checked) + '&access=' + cbAccess.Text +
'&location=' + wcbLocation.Value; '&newuser=' + edtUsername.Text +
'&rights=' + edtRights.Text +
'&perspective=' + edtPerspective.Text +
'&QB=' + edtQB.Text;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddUser', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddUser',
[userInfo])); [userInfo]));
...@@ -146,13 +154,14 @@ begin ...@@ -146,13 +154,14 @@ begin
editOptions := 'username=' + Username + editOptions := 'username=' + Username +
'&fullname=' + edtFullName.Text + '&fullname=' + edtFullName.Text +
'&phonenumber=' + edtPhoneNumber.Text + '&password=' + edtPassword.Text +
'&status=' + BoolToStr(cbStatus.Checked) +
'&email=' + edtEmail.Text + '&email=' + edtEmail.Text +
'&admin=' + BoolToStr(cbAdmin.Checked) + '&access=' + cbAccess.Text +
'&newuser=' + edtUsername.Text + '&newuser=' + edtUsername.Text +
'&password=' + edtPassword.Text + '&rights=' + edtRights.Text +
'&active=' + BoolToStr(cbActive.Checked) + '&perspective=' + edtPerspective.Text +
'&location=' + wcbLocation.DisplayText; '&QB=' + edtQB.Text;
console.log(editOptions); console.log(editOptions);
...@@ -163,18 +172,20 @@ begin ...@@ -163,18 +172,20 @@ begin
end; 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 // Autofills known information about a user on create
procedure AfterCreate(AForm: TObject); procedure AfterCreate(AForm: TObject);
begin begin
TFViewEditUser(AForm).Mode := Mode; TFViewEditUser(AForm).Mode := Mode;
TFViewEditUser(AForm).Username := Username; TFViewEditUser(AForm).Username := Username;
TFViewEditUser(AForm).FullName := FullName; TFViewEditUser(AForm).FullName := Name;
TFViewEditUser(AForm).Phone := Phone; TFViewEditUser(AForm).Status := Status;
TFViewEditUser(AForm).Email:= Email; TFViewEditUser(AForm).Email := Email;
TFViewEditUser(AForm).Location:= Location; TFViewEditUser(AForm).Access := Access;
TFViewEditUser(AForm).Admin := Admin; TFViewEditUser(AForm).Rights := Rights;
TFViewEditUser(AForm).Active := Active; TFViewEditUser(AForm).Perspective := Perspective;
TFViewEditUser(AForm).QB := QB;
end; end;
{$R *.dfm} {$R *.dfm}
...@@ -197,14 +208,14 @@ begin ...@@ -197,14 +208,14 @@ begin
begin begin
edtPassword.Text := 'hidden'; edtPassword.Text := 'hidden';
edtConfirmPassword.Text := 'hidden'; edtConfirmPassword.Text := 'hidden';
end end;
else edtEmail.Text := Email;
cbAdmin.Enabled := False; cbAccess.Text := Access;
wcbLocation.DisplayText := Location; edtRights.Text := Rights;
edtPhoneNumber.Text := Phone; edtQB.Text := QB;
edtEmail.Text := Email; if Status = 'ACTIVE' then
cbAdmin.checked := Admin; cbStatus.checked := true;
cbActive.Checked := Active; edtPerspective.Text := Perspective
end; end;
procedure TFViewEditUser.WebTimer1Timer(Sender: TObject); procedure TFViewEditUser.WebTimer1Timer(Sender: TObject);
...@@ -229,7 +240,7 @@ var ...@@ -229,7 +240,7 @@ var
charIndex: integer; charIndex: integer;
phoneNum: string; phoneNum: string;
begin begin
checkString := edtFullName.Text + edtUsername.Text + edtPassword.Text { checkString := edtFullName.Text + edtUsername.Text + edtPassword.Text
+ edtConfirmPassword.Text + edtPhoneNumber.Text + edtEmail.Text; + edtConfirmPassword.Text + edtPhoneNumber.Text + edtEmail.Text;
if string(edtFullName.Text).IsEmpty then if string(edtFullName.Text).IsEmpty then
begin begin
...@@ -331,7 +342,7 @@ begin ...@@ -331,7 +342,7 @@ begin
ShowNotification('Passwords must be between 6-20 characters!'); ShowNotification('Passwords must be between 6-20 characters!');
exit; exit;
end; end;
}
asm asm
var confirmationModal = new bootstrap.Modal(document.getElementById('confirmation_modal'), { var confirmationModal = new bootstrap.Modal(document.getElementById('confirmation_modal'), {
keyboard: false }); keyboard: false });
......
object FViewCalls: TFViewCalls object FViewItems: TFViewItems
Width = 676 Width = 676
Height = 480 Height = 480
CSSLibrary = cssBootstrap CSSLibrary = cssBootstrap
...@@ -22,37 +22,6 @@ object FViewCalls: TFViewCalls ...@@ -22,37 +22,6 @@ object FViewCalls: TFViewCalls
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end 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 object wcbPageSize: TWebComboBox
Left = 0 Left = 0
Top = 0 Top = 0
...@@ -65,29 +34,13 @@ object FViewCalls: TFViewCalls ...@@ -65,29 +34,13 @@ object FViewCalls: TFViewCalls
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Text = '10' Text = '10'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnChange = wcbPageSizeChange
ItemIndex = -1 ItemIndex = -1
Items.Strings = ( Items.Strings = (
'10' '10'
'25' '25'
'50') '50')
end 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 object btnApply: TWebButton
Left = 478 Left = 478
Top = 128 Top = 128
...@@ -103,43 +56,42 @@ object FViewCalls: TFViewCalls ...@@ -103,43 +56,42 @@ object FViewCalls: TFViewCalls
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnApplyClick OnClick = btnApplyClick
end end
object edtSearch: TWebEdit object edtName: TWebEdit
Left = 48 Left = 342
Top = 382 Top = 0
Width = 121 Width = 121
Height = 22 Height = 22
HelpType = htKeyword ChildOrder = 10
ChildOrder = 8
ElementClassName = 'form-control' ElementClassName = 'form-control'
ElementID = 'edtsearch' ElementID = 'edtname'
ElementFont = efCSS ElementFont = efCSS
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
HideSelection = False
TextHint = 'Format: (XXX) XXX-XXXX'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object dtpStartDate: TWebEdit object edtDescription: TWebEdit
Left = 342 Left = 478
Top = 0 Top = 0
Width = 121 Width = 121
Height = 22 Height = 22
ChildOrder = 10 ChildOrder = 10
ElementClassName = 'form-control' ElementClassName = 'form-control'
ElementID = 'dtpstartdate' ElementID = 'edtdescription'
ElementFont = efCSS ElementFont = efCSS
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object dtpEndDate: TWebEdit object cbStatus: TWebCheckBox
Left = 478 Left = 354
Top = 0 Top = 52
Width = 121 Width = 113
Height = 22 Height = 22
ChildOrder = 10 ChildOrder = 5
ElementClassName = 'form-control' ElementClassName = 'custom-control custom-checkbox'
ElementID = 'dtpenddate' ElementButtonClassName = 'custom-control-input'
ElementLabelClassName = 'custom-control-label'
ElementID = 'cbstatus'
ElementFont = efCSS ElementFont = efCSS
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
......
<div class="row">
<div class="col-12">
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-12 col-md-8">
<form class="form-inline">
<div class="row">
<div class="col-sm-6">
<label style="font-weight: 700;">Name:</label>
<input class="form-control input-sm" id="edtname">
</div>
<div class="col-sm-6">
<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">
<button class= "ps-3" id="btnapply"></button>
</div>
</div>
</form>
<table class="table table-responsive table-striped table-bordered" id="tblPhoneGrid">
<thead class="thead-dark">
<tr>
<th scope="col">ID</th>
<th scope="col">Name</th>
<th scope="col">Description</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<!-- Rows will be added dynamically via Delphi code -->
</tbody>
</table>
<label id="lblentries"></label>
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center" id="pagination">
<!-- Pagination items will be added dynamically via Delphi code -->
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="audioModal" tabindex="-1" aria-labelledby="audioModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="audioModalLabel">Audio Player</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" onclick="stopAudio()"></button>
</div>
<div class="modal-body">
<audio controls id="audioPlayer">
<source src="" type="audio/mp3" id="audioSource">
Your browser does not support the audio element.
</audio>
</div>
</div>
</div>
</div>
<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>
<nav class="navbar navbar-light bg-light login-navbar"> <nav class="navbar navbar-light bg-light login-navbar">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#">Envoy Calls</a> <a class="navbar-brand" href="#">Koehler-Gibson Orders</a>
</div> </div>
</nav> </nav>
<div class="container mt-5"> <div class="container mt-5">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-auto">
<img id="kgpicture"style="width: 250px; height: 250px;">
</div>
<div class="col-md-6 col-lg-4"> <div class="col-md-6 col-lg-4">
<div class="card login-card"> <div class="card login-card">
<div class="card-header"> <div class="card-header">
......
...@@ -6,7 +6,7 @@ uses ...@@ -6,7 +6,7 @@ uses
System.SysUtils, System.Classes, Web, WEBLib.Graphics, WEBLib.Controls, WEBLib.Forms, WEBLib.Dialogs, System.SysUtils, System.Classes, Web, WEBLib.Graphics, WEBLib.Controls, WEBLib.Forms, WEBLib.Dialogs,
Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.JSON, Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls, WEBLib.JSON,
JS, XData.Web.Connection, WEBLib.ExtCtrls, JS, XData.Web.Connection, WEBLib.ExtCtrls,
App.Types, ConnectionModule, XData.Web.Client; App.Types, ConnectionModule, XData.Web.Client, Vcl.Imaging.pngimage;
type type
TFViewLogin = class(TWebForm) TFViewLogin = class(TWebForm)
...@@ -18,6 +18,7 @@ type ...@@ -18,6 +18,7 @@ type
lblMessage: TWebLabel; lblMessage: TWebLabel;
btnCloseNotification: TWebButton; btnCloseNotification: TWebButton;
XDataWebClient: TXDataWebClient; XDataWebClient: TXDataWebClient;
WebImageControl1: TWebImageControl;
procedure btnLoginClick(Sender: TObject); procedure btnLoginClick(Sender: TObject);
procedure btnCloseNotificationClick(Sender: TObject); procedure btnCloseNotificationClick(Sender: TObject);
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
......
...@@ -28,7 +28,7 @@ object FViewMain: TFViewMain ...@@ -28,7 +28,7 @@ object FViewMain: TFViewMain
end end
object wllblLogout: TWebLinkLabel object wllblLogout: TWebLinkLabel
Left = 551 Left = 551
Top = 85 Top = 143
Width = 41 Width = 41
Height = 15 Height = 15
ElementID = 'dropdown.menu.logout' ElementID = 'dropdown.menu.logout'
...@@ -51,29 +51,29 @@ object FViewMain: TFViewMain ...@@ -51,29 +51,29 @@ object FViewMain: TFViewMain
object lblAppTitle: TWebLabel object lblAppTitle: TWebLabel
Left = 57 Left = 57
Top = 31 Top = 31
Width = 60 Width = 82
Height = 15 Height = 15
Caption = 'Envoy Calls' Caption = 'Koehler-Gibson'
ElementID = 'view.main.apptitle' ElementID = 'view.main.apptitle'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Transparent = False Transparent = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblCallsList: TWebLinkLabel object lblItemsList: TWebLinkLabel
Left = 564 Left = 560
Top = 56 Top = 85
Width = 25 Width = 29
Height = 15 Height = 15
ElementID = 'dropdown.menu.callslist' ElementID = 'dropdown.menu.itemlist'
ElementFont = efCSS ElementFont = efCSS
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = lblCallsListClick OnClick = lblItemsListClick
Caption = 'Calls' Caption = 'Items'
end end
object lblUsers: TWebLinkLabel object lblUsers: TWebLinkLabel
Left = 561 Left = 561
Top = 70 Top = 108
Width = 28 Width = 28
Height = 15 Height = 15
ElementID = 'dropdown.menu.users' ElementID = 'dropdown.menu.users'
...@@ -83,9 +83,48 @@ object FViewMain: TFViewMain ...@@ -83,9 +83,48 @@ object FViewMain: TFViewMain
OnClick = lblUsersClick OnClick = lblUsersClick
Caption = 'Users' Caption = 'Users'
end end
object lblorders: TWebLabel
Left = 556
Top = 52
Width = 35
Height = 15
Caption = 'Orders'
ElementID = 'lblorders'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = lblordersClick
end
object lblCustomers: TWebLabel
Left = 540
Top = 69
Width = 57
Height = 15
Caption = 'Customers'
ElementID = 'lblcustomers'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = lblCustomersClick
end
object lblQuickbooks: TWebLabel
Left = 546
Top = 125
Width = 63
Height = 15
Caption = 'QuickBooks'
ElementID = 'lblquickbooks'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = lblQuickbooksClick
end
object WebPanel1: TWebPanel object WebPanel1: TWebPanel
Left = 136 Left = 77
Top = 110 Top = 112
Width = 471 Width = 471
Height = 369 Height = 369
ElementID = 'main.webpanel' ElementID = 'main.webpanel'
...@@ -102,8 +141,8 @@ object FViewMain: TFViewMain ...@@ -102,8 +141,8 @@ object FViewMain: TFViewMain
Opacity = 0.200000000000000000 Opacity = 0.200000000000000000
end end
object WebMemo1: TWebMemo object WebMemo1: TWebMemo
Left = 136 Left = 77
Top = 467 Top = 479
Width = 471 Width = 471
Height = 83 Height = 83
ElementID = 'main.debugmemo' ElementID = 'main.debugmemo'
......
<div id="wrapper"> <div id="wrapper">
<nav class="navbar navbar-expand navbar-light bg-light" style="margin-bottom: 0px;"> <nav class="navbar navbar-expand navbar-light bg-light" style="margin-bottom: 0px;">
<div class="container-fluid"> <div class="container-fluid">
<a id="view.main.apptitle" class="navbar-brand" href="index.html">Envoy Calls</a> <a id="view.main.apptitle" class="navbar-brand" href="index.html">Koehler-Gibson Orders</a>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="dropdown-item" id="lblorders" href="#"><i class="fa fa-tags fa-fw"></i><span> Orders</span></a>
</li>
<li class="nav-item">
<a class="dropdown-item" id="lblcustomers" href="#"><i class="fa fa-tags fa-fw"></i><span> Customers</span></a>
</li>
<li class="nav-item">
<a class="dropdown-item" id="dropdown.menu.itemlist" href="#"><i class="fa fa-cubes fa-fw"></i><span> Items</span></a>
</li>
<li class="nav-item">
<a class="dropdown-item" id="lblquickbooks" href="#"><i class="fa fa-tags fa-fw"></i><span> QuickBooks</span></a>
</li>
</ul>
<div class="collapse navbar-collapse show" id="navbarNavDropdown"> <div class="collapse navbar-collapse show" id="navbarNavDropdown">
<ul class="navbar-nav ms-auto"> <ul class="navbar-nav ms-auto">
<li class="nav-item dropdown"> <li class="nav-item dropdown">
...@@ -16,9 +30,6 @@ ...@@ -16,9 +30,6 @@
<a class="dropdown-item" id="dropdown.menu.userprofile" href="#"><i class="fa fa-user fa-fw"></i><span> User Profile</span></a> <a class="dropdown-item" id="dropdown.menu.userprofile" href="#"><i class="fa fa-user fa-fw"></i><span> User Profile</span></a>
</li> </li>
<li> <li>
<a class="dropdown-item" id="dropdown.menu.callslist" href="#"><i class="fa fa-phone fa-fw"></i><span> Calls</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> <a class="dropdown-item" id="dropdown.menu.users" href="#"><i class="fas fa-address-book fa-fw"></i><span> Users</span></abbr></a>
</li> </li>
<li> <li>
......
...@@ -19,15 +19,21 @@ type ...@@ -19,15 +19,21 @@ type
lblAppTitle: TWebLabel; lblAppTitle: TWebLabel;
WebMemo1: TWebMemo; WebMemo1: TWebMemo;
XDataWebClient: TXDataWebClient; XDataWebClient: TXDataWebClient;
lblCallsList: TWebLinkLabel; lblItemsList: TWebLinkLabel;
lblUsers: TWebLinkLabel; lblUsers: TWebLinkLabel;
lblorders: TWebLabel;
lblCustomers: TWebLabel;
lblQuickbooks: TWebLabel;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure mnuLogoutClick(Sender: TObject); procedure mnuLogoutClick(Sender: TObject);
procedure wllblUserProfileClick(Sender: TObject); procedure wllblUserProfileClick(Sender: TObject);
procedure wllblLogoutClick(Sender: TObject); procedure wllblLogoutClick(Sender: TObject);
procedure lblHomeClick(Sender: TObject); procedure lblHomeClick(Sender: TObject);
procedure lblCallsListClick(Sender: TObject); procedure lblItemsListClick(Sender: TObject);
procedure lblUsersClick(Sender: TObject); procedure lblUsersClick(Sender: TObject);
procedure lblordersClick(Sender: TObject);
procedure lblCustomersClick(Sender: TObject);
procedure lblQuickbooksClick(Sender: TObject);
private private
{ Private declarations } { Private declarations }
FUserInfo: string; FUserInfo: string;
...@@ -38,11 +44,15 @@ type ...@@ -38,11 +44,15 @@ type
procedure ShowCrudForm( AFormClass: TWebFormClass ); procedure ShowCrudForm( AFormClass: TWebFormClass );
//procedure EditUser( AParam, BParam, CParam, DParam, EParam: string); //procedure EditUser( AParam, BParam, CParam, DParam, EParam: string);
function GetUserInfo: string; function GetUserInfo: string;
procedure setActive(page: string);
public public
{ Public declarations } { Public declarations }
class procedure Display(LogoutProc: TLogoutProc); class procedure Display(LogoutProc: TLogoutProc);
procedure ShowForm( AFormClass: TWebFormClass ); 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 ViewOrderEntry(orderInfo, mode: string);
procedure ViewOrders(info: string);
procedure ShowUserForm(Info: string); procedure ShowUserForm(Info: string);
end; end;
...@@ -56,10 +66,11 @@ uses ...@@ -56,10 +66,11 @@ uses
View.Login, View.Login,
View.UserProfile, View.UserProfile,
View.Home, View.Home,
View.Calls, View.Items,
View.Admin,
View.Users, View.Users,
View.EditUser; View.EditUser,
View.Orders,
View.OrderEntryCorrugated;
{$R *.dfm} {$R *.dfm}
...@@ -76,25 +87,71 @@ begin ...@@ -76,25 +87,71 @@ begin
//Change this later //Change this later
lblUsers.Visible := true; lblUsers.Visible := true;
ShowForm(TFViewHome); ShowForm(TFViewOrders);
lblAppTitle.Caption := 'Koehler-Gibson Orders';
setActive('Orders');
end; end;
procedure TFViewMain.lblCustomersClick(Sender: TObject);
begin
//ShowForm(TFViewCustomers);
lblAppTitle.Caption := 'Koehler-Gibson Customers';
setActive('Customers');
end;
procedure TFViewMain.lblHomeClick(Sender: TObject); procedure TFViewMain.lblHomeClick(Sender: TObject);
begin begin
ShowForm(TFViewHome); ShowForm(TFViewHome);
lblAppTitle.Caption := 'Koehler-Gibson Home';
//setActive('Home');
end;
procedure TFViewMain.lblordersClick(Sender: TObject);
begin
ShowForm(TFViewOrders);
lblAppTitle.Caption := 'Koehler-Gibson Orders';
setActive('Orders');
end;
procedure TFViewMain.lblQuickbooksClick(Sender: TObject);
begin
//ShowForm(TFViewQuickbooks);
lblAppTitle.Caption := 'Koehler-Gibson QuickBooks';
setActive('QuickBooks');
end; end;
procedure TFViewMain.lblUsersClick(Sender: TObject); procedure TFViewMain.lblUsersClick(Sender: TObject);
begin begin
ShowForm(TFViewUsers); ShowForm(TFViewUsers);
lblAppTitle.Caption := 'Koehler-Gibson Users';
end;
procedure TFViewMain.lblItemsListClick(Sender: TObject);
begin
ShowForm(TFViewItems);
lblAppTitle.Caption := 'Koehler-Gibson Items';
setActive('Items');
end; end;
procedure TFViewMain.lblCallsListClick(Sender: TObject); procedure TFViewMain.setActive(page: string);
var
links: TJSNodeList;
link: TJSHTMLElement;
i: integer;
begin begin
ShowForm(TFViewCalls); // Get all the links in the navbar
links := document.querySelectorAll('.navbar-nav .nav-item a');
for i := 0 to links.length - 1 do
begin
link := TJSHTMLElement(links[i]);
link.classList.remove('active');
if link.innerText.Contains(page) then
link.classList.add('active');
end;
end; end;
procedure TFViewMain.mnuLogoutClick(Sender: TObject); procedure TFViewMain.mnuLogoutClick(Sender: TObject);
...@@ -112,6 +169,7 @@ end; ...@@ -112,6 +169,7 @@ end;
procedure TFViewMain.wllblUserProfileClick(Sender: TObject); procedure TFViewMain.wllblUserProfileClick(Sender: TObject);
begin begin
ShowCrudForm(TFViewUserProfile); ShowCrudForm(TFViewUserProfile);
lblAppTitle.Caption := 'Koehler-Gibson User Profile';
end; end;
...@@ -152,11 +210,29 @@ begin ...@@ -152,11 +210,29 @@ begin
Application.CreateForm(AFormClass, WebPanel1.ElementID, FChildForm); Application.CreateForm(AFormClass, WebPanel1.ElementID, FChildForm);
end; 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, Username,
Password, Name, Status, Email, Access, Rights, Perspective, QB);
end;
procedure TFViewMain.ViewOrders(info: string);
begin
if Assigned(FChildForm) then
FChildForm.Free;
FChildForm := TFViewOrders.CreateForm(WebPanel1.ElementID, info);
end;
procedure TFViewMain.ViewOrderEntry(orderInfo, mode: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
if Assigned(FChildForm) then if Assigned(FChildForm) then
FChildForm.Free; FChildForm.Free;
FChildForm := TFViewEditUser.CreateForm(WebPanel1.ElementID, Mode, FullName, Username, Phone, Email, Location, Admin, Active); FChildForm := TFOrderEntry.CreateForm(WebPanel1.ElementID, orderInfo, mode);
end; end;
procedure TFViewMain.ShowUserForm(Info: string); procedure TFViewMain.ShowUserForm(Info: string);
......
object FOrderList: TFOrderList
Width = 1016
Height = 683
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
ParentFont = False
OnShow = WebFormShow
object lblEntries: TWebLabel
Left = 0
Top = 336
Width = 77
Height = 14
Caption = 'Showing 0 of ...'
ElementID = 'lblentries'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object lblEntries2: TWebLabel
Left = 8
Top = 358
Width = 49
Height = 14
Caption = 'lblEntries2'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtSearch: TWebEdit
Left = 8
Top = 384
Width = 121
Height = 22
HelpType = htKeyword
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtsearch'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HideSelection = False
WidthPercent = 100.000000000000000000
end
object pnlMessage: TWebPanel
Left = 24
Top = 57
Width = 121
Height = 33
ElementClassName = 'card'
ElementID = 'pnl_message'
ChildOrder = 5
ElementBodyClassName = 'card-body'
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 1
object lblMessage: TWebLabel
Left = 28
Top = 9
Width = 44
Height = 14
Caption = 'Message'
ElementID = 'pnl_message'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
end
end
object WebDBTableControl: TWebDBTableControl
Left = 172
Top = 287
Width = 530
Height = 265
ElementClassName = 'table-responsive'
ElementId = 'customer_list'
BorderColor = clSilver
ChildOrder = 5
ColHeader = False
ElementTableClassName = 'table table-striped table-bordered table-hover dataTable'
Options.ResizeColumns = True
Columns = <
item
DataField = 'ID'
Title = 'ID'
Width = 24
end
item
DataField = 'NAME'
Title = 'NAME'
Width = 100
end
item
DataField = 'SHORT_NAME'
Title = 'SHORT_NAME'
end
item
DataField = 'ADDRESS'
Title = 'ADDRESS'
end>
DataSource = wdsCustomers
end
object cbCorrugatedPlate: TWebCheckBox
Left = 172
Top = 210
Width = 113
Height = 22
Caption = 'Corrugated Plate'
Checked = True
ChildOrder = 5
HeightPercent = 100.000000000000000000
State = cbChecked
WidthPercent = 100.000000000000000000
OnClick = cbCorrugatedPlateClick
end
object cbWebPlate: TWebCheckBox
Left = 304
Top = 210
Width = 113
Height = 22
Caption = 'Web Plate'
ChildOrder = 5
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbWebPlateClick
end
object edtCompanyName: TWebEdit
Left = 302
Top = 252
Width = 121
Height = 22
ChildOrder = 7
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtID: TWebEdit
Left = 172
Top = 252
Width = 121
Height = 22
ChildOrder = 8
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnConfirm: TWebButton
Left = 564
Top = 251
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 9
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 88
Top = 434
end
object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 84
Top = 490
object xdwdsCustomersID: TIntegerField
FieldName = 'ID'
end
object xdwdsCustomersNAME: TStringField
FieldName = 'NAME'
end
object xdwdsCustomersSHORT_NAME: TStringField
FieldName = 'SHORT_NAME'
end
object xdwdsCustomersADDRESS: TStringField
FieldName = 'ADDRESS'
end
end
object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers
Left = 38
Top = 562
end
end
<div class="row">
<div class="col-12">
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-12 col-md-8">
<div class="row">
<div class="col-sm">
<div id="pnl_message" class="alert alert-danger">
<button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button>
<span id="view.login.message.label"></span>
</div>
</div>
</div>
<div class="row">
<label id="lblentries"></label>
</div>
<label id="lblentries2"></label>
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center" id="pagination">
<!-- Pagination items will be added dynamically via Delphi code -->
</ul>
</nav>
</div>
</div>
</div>
</div>
unit View.OrderList;
interface
uses
System.SysUtils, System.Generics.Collections, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
WEBLib.Forms, WEBLib.Dialogs, WEBLib.Menus, WEBLib.ExtCtrls, WEBLib.StdCtrls,
WEBLib.JSON, Auth.Service, XData.Web.Client, WebLib.Storage,
ConnectionModule, App.Types, Vcl.StdCtrls, Vcl.Controls, WEBLib.DBCtrls,
Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB, WEBLib.Grids,
Vcl.Grids;
type
TFOrderList = class(TWebForm)
lblEntries: TWebLabel;
lblEntries2: TWebLabel;
edtSearch: TWebEdit;
pnlMessage: TWebPanel;
lblMessage: TWebLabel;
btnCloseNotification: TWebButton;
XDataWebClient1: TXDataWebClient;
xdwdsCustomers: TXDataWebDataSet;
wdsCustomers: TWebDataSource;
xdwdsCustomersID: TIntegerField;
xdwdsCustomersNAME: TStringField;
xdwdsCustomersSHORT_NAME: TStringField;
xdwdsCustomersADDRESS: TStringField;
WebDBTableControl: TWebDBTableControl;
cbCorrugatedPlate: TWebCheckBox;
cbWebPlate: TWebCheckBox;
edtCompanyName: TWebEdit;
edtID: TWebEdit;
btnConfirm: TWebButton;
procedure WebFormShow(Sender: TObject);
procedure WebDBTableControlGetCellChildren(Sender: TObject; ACol,
ARow: Integer; AField: TField; AValue: string;
AElement: TJSHTMLElementRecord);
procedure cbCorrugatedPlateClick(Sender: TObject);
procedure cbWebPlateClick(Sender: TObject);
private
//FJSONProc: TJSONProc;
procedure AddRowToTable();
procedure ClearTable();
[async] procedure getCustomers();
public
class function CreateForm(AElementID: string): TWebForm;
end;
var
FOrderList: TFOrderList;
implementation
{$R *.dfm}
class function TFOrderList.CreateForm(AElementID: string): TWebForm;
begin
Application.CreateForm(TFOrderList, AElementID, Result,
procedure(AForm: TObject)
begin
with TFOrderList(AForm) do
begin
end;
end
);
end;
procedure TFOrderList.WebDBTableControlGetCellChildren(Sender: TObject; ACol,
ARow: Integer; AField: TField; AValue: string;
AElement: TJSHTMLElementRecord);
begin
//WebDBTableControl.WidthStyle := TSizeStyle.ssAuto;
console.log(AValue);
WebDBTableControl.ColWidths[ACol] := AValue.Length * 12;
end;
procedure TFOrderList.WebFormShow(Sender: TObject);
begin
getCustomers();
end;
procedure TFOrderList.cbCorrugatedPlateClick(Sender: TObject);
begin
cbWebPlate.Checked := false;
end;
procedure TFOrderList.cbWebPlateClick(Sender: TObject);
begin
cbCorrugatedPlate.Checked := false;
end;
procedure TFOrderList.ClearTable();
// clears the table
var
tbody: TJSHTMLElement;
begin
tbody := TJSHTMLElement(document.getElementById('tblCustomerGrid').getElementsByTagName('tbody')[0]);
tbody.innerHTML := '';
end;
procedure TFOrderList.getCustomers();
var
xdcResponse: TXDataClientResponse;
customerList: TJSObject;
data: TJSArray;
i, count: integer;
temp: TJSONObject;
customer: TJSObject;
begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomers',
[]));
customerList := TJSObject(xdcResponse.Result);
data := TJSArray(customerList['data']);
count := integer(customerList['count']);
xdwdsCustomers.Close;
xdwdsCustomers.SetJsonData(customerList['data']);
xdwdsCustomers.Open;
end;
procedure TFOrderList.AddRowToTable();
var
NewRow, Cell, P, Button, Audio: TJSHTMLElement;
ClickHandler: TJSFunction;
//strColorList: string;
id: integer;
begin
NewRow := TJSHTMLElement(document.createElement('tr'));
//NewRow.Attrs['orderType'] := XDataWebDataSet1orderType.Value;
NewRow.addEventListener('click', procedure
begin
//orderEntry(NewRow.Attrs['id'], 'EDIT');
end);
// Company ID Cell
NewRow.Attrs['id'] := xdwdsCustomersID.AsString;
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Order ID');
if xdwdsCustomersID.AsString = '' then
Cell.innerText := 'None'
else
Cell.innerText := xdwdsCustomersID.AsString;
NewRow.appendChild(Cell);
// Company Name Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Company Name');
if xdwdsCustomersNAME.Value = '' then
Cell.innerText := 'None'
else
Cell.innerText := xdwdsCustomersNAME.Value;
NewRow.appendChild(Cell);
// Short Name Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Job Name');
if xdwdsCustomersSHORT_NAME.Value = '' then
Cell.innerText := 'None'
else
Cell.innerText := xdwdsCustomersSHORT_NAME.Value;
NewRow.appendChild(Cell);
// Address Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Order Date');
if xdwdsCustomersADDRESS.Value = '' then
Cell.innerText := 'None'
else
Cell.innerText := xdwdsCustomersADDRESS.Value;
NewRow.appendChild(Cell);
// Appends new rows to the table body
TJSHTMLElement(document.getElementById('tblCustomerGrid').getElementsByTagName('tbody')[0]).appendChild(NewRow);
end;
end.
object FViewOrders: TFViewOrders
Width = 676
Height = 480
CSSLibrary = cssBootstrap
ElementFont = efCSS
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
OnCreate = WebFormCreate
OnShow = WebFormShow
object lblEntries: TWebLabel
Left = 0
Top = 336
Width = 77
Height = 13
Caption = 'Showing 0 of ...'
ElementID = 'lblentries'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object lblEntries2: TWebLabel
Left = 8
Top = 358
Width = 49
Height = 13
Caption = 'lblEntries2'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbPageSize: TWebComboBox
Left = -4
Top = 52
Width = 145
Height = 21
ElementClassName = 'custom-select'
ElementID = 'wcbpagesize'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = '10'
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'10'
'25'
'50')
end
object wcbSortBy: TWebComboBox
Left = 0
Top = 18
Width = 145
Height = 21
ElementClassName = 'custom-select'
ElementID = 'wcbsortby'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = 'PROOF DONE'
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'PROOF DUE'
'PROOF DONE'
'ART DUE'
'ART DONE'
'PLATE DUE'
'PLATE DONE'
'MOUNT DUE'
'MOUNT DONE'
'SHIP DUE'
'SHIP DONE')
end
object btnApply: TWebButton
Left = 542
Top = 16
Width = 96
Height = 25
Caption = 'Apply'
ChildOrder = 7
ElementClassName = 'btn btn-light'
ElementID = 'btnapply'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
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
WidthPercent = 100.000000000000000000
end
object btnaddOrder: TWebButton
Left = 0
Top = 79
Width = 96
Height = 25
Caption = 'Add Order'
ChildOrder = 5
ElementClassName = 'btn btn-light'
ElementID = 'btnaddorder'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnaddOrderClick
end
object btnFilters: TWebButton
Left = 542
Top = 50
Width = 96
Height = 25
Caption = 'Show Filters'
ChildOrder = 6
ElementClassName = 'btn btn-light'
ElementID = 'btnfilters'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnFiltersClick
end
object dtpStartDate: TWebDateTimePicker
Left = 168
Top = 16
Width = 170
Height = 22
ElementClassName = 'form-control'
ElementID = 'dtpstartdate'
HeightStyle = ssAuto
BorderStyle = bsSingle
ChildOrder = 7
Color = clWhite
Date = 45553.505972858790000000
ElementFont = efCSS
Role = ''
Text = ''
end
object dtpEndDate: TWebDateTimePicker
Left = 356
Top = 16
Width = 170
Height = 22
ElementClassName = 'form-control'
ElementID = 'dtpenddate'
HeightStyle = ssAuto
BorderStyle = bsSingle
ChildOrder = 7
Color = clWhite
Date = 45553.505972858790000000
ElementFont = efCSS
Role = ''
Text = ''
end
object pnlMessage: TWebPanel
Left = 220
Top = 429
Width = 121
Height = 33
ElementClassName = 'card'
ElementID = 'pnl_message'
ChildOrder = 5
ElementBodyClassName = 'card-body'
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 8
object lblMessage: TWebLabel
Left = 28
Top = 9
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'pnl_message'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object WebButton1: TWebButton
Left = 174
Top = 79
Width = 96
Height = 25
Caption = 'Set Status'
ChildOrder = 11
ElementClassName = 'btn btn-light'
ElementID = 'btnsetstatus'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object WebButton2: TWebButton
Left = 344
Top = 79
Width = 96
Height = 25
Caption = 'PDF'
ChildOrder = 12
ElementClassName = 'btn btn-light'
ElementID = 'btngeneratepdf'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnConfirm: TWebButton
Left = 566
Top = 317
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 13
ElementClassName = 'btn btn-light'
ElementID = 'btn_confirm_order'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
end
object wcbCustomers: TWebDBLookupComboBox
Left = 550
Top = 286
Width = 145
Height = 22
ElementClassName = 'custom-select'
ElementID = 'wcbcustomer'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wcbCustomersChange
DataField = 'CURR_ID'
DataSource = wdsSave
KeyField = 'ID'
ListField = 'NAME'
ListSource = wdsCustomers
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 8
Top = 430
end
object XDataWebDataSet1: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 58
Top = 432
object XDataWebDataSet1ID: TStringField
FieldName = 'ID'
end
object XDataWebDataSet1companyName: TStringField
FieldName = 'companyName'
end
object XDataWebDataSet1jobName: TStringField
FieldName = 'jobName'
end
object XDataWebDataSet1orderDate: TStringField
FieldName = 'orderDate'
end
object XDataWebDataSet1proofDue: TStringField
FieldName = 'proofDue'
end
object XDataWebDataSet1proofDone: TStringField
FieldName = 'proofDone'
end
object XDataWebDataSet1artDue: TStringField
FieldName = 'artDue'
end
object XDataWebDataSet1artDone: TStringField
FieldName = 'artDone'
end
object XDataWebDataSet1mountDue: TStringField
FieldName = 'mountDue'
end
object XDataWebDataSet1mountDone: TStringField
FieldName = 'mountDone'
end
object XDataWebDataSet1shipDue: TStringField
FieldName = 'shipDue'
end
object XDataWebDataSet1shipDone: TStringField
FieldName = 'shipDone'
end
object XDataWebDataSet1price: TStringField
FieldName = 'price'
end
object XDataWebDataSet1qbRefNum: TStringField
FieldName = 'qbRefNum'
end
object XDataWebDataSet1colors: TStringField
FieldName = 'colors'
end
object XDataWebDataSet1plateDue: TStringField
FieldName = 'plateDue'
end
object XDataWebDataSet1plateDone: TStringField
FieldName = 'plateDone'
end
object XDataWebDataSet1orderType: TStringField
FieldName = 'orderType'
end
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
Left = 94
Top = 430
end
object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers
Left = 598
Top = 406
end
object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 596
Top = 354
object xdwdsCustomersNAME: TStringField
FieldName = 'NAME'
end
object xdwdsCustomersID: TIntegerField
FieldName = 'ID'
end
object xdwdsCustomersCURR_ID: TIntegerField
FieldName = 'CURR_ID'
end
end
object xdwdsSave: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 498
Top = 352
object xdwdsSaveCURR_ID: TIntegerField
FieldName = 'CURR_ID'
end
end
object wdsSave: TWebDataSource
DataSet = xdwdsSave
Left = 490
Top = 408
end
end
<div class="row">
<div class="col-12">
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-12 col-md-8">
<div class="row">
<div class="col-sm">
<div id="pnl_message" class="alert alert-danger">
<button id="view.login.message.button" type="button" class="btn-close" aria-label="Close"></button>
<span id="view.login.message.label"></span>
</div>
</div>
</div>
<div class="mb-3" id="filter_info" style="display: none;">
<div class="row">
<!-- Search Input Field -->
<div class="col-auto">
<label class='pe-2' style="font-weight: 700;">Search:</label>
<input class="form-control input-sm" id="edtsearch">
</div>
<!-- Start Date Input Field -->
<div class="col-auto">
<label class='pe-2' style="font-weight: 700;">Start Date:</label>
<input class="form-control input-sm" id="dtpstartdate" type="date">
</div>
<!-- End Date Input Field -->
<div class="col-auto">
<label class='pe-2' style="font-weight: 700;">End Date:</label>
<input class="form-control input-sm" id="dtpenddate" type="date">
</div>
<!-- Status Type Dropdown -->
<div class="col-auto">
<label style="font-weight: 700;">Status Type:</label>
<div>
<select class="form-control input-sm" id="wcbsortby" style="font-size: 1.00rem; height: calc(2.25rem + 2px); padding-top: 0.375rem; padding-bottom: 0.375rem;"></select>
</div>
</div>
<!-- Button (Align this with the inputs) -->
<div class="col-auto d-flex align-items-end">
<label style="font-weight: 700;"> </label>
<button class="btn btn-primary btn-sm" id="btnapply">Apply</button>
</div>
</div>
</div>
<form class="form-inline">
<div class= "row">
<div class="col-sm-3">
<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-2">
<button class= "ps-3" id="btnaddorder"></button>
</div>
<div class="col-sm-2">
<button class= "ps-3" id="btnsetstatus"></button>
</div>
<div class="col-sm-2">
<button class= "ps-3" id="btngeneratepdf"></button>
</div>
<div class="col-sm-2">
<button class= "ps-3" id="btnfilters"></button>
</div>
</div>
</form>
</div>
<div class="row">
<label id="lblentries"></label>
</div>
<table class="table table-responsive table-striped table-bordered" id="tblPhoneGrid">
<thead class="thead-dark">
<tr>
<th scope="col">Order ID</th>
<th scope="col">Company Name</th>
<th scope="col">Job Name</th>
<th scope="col">Order Date</th>
<th scope="col">Proof Due</th>
<th scope="col">Proof Date</th>
<th scope="col">Art Due</th>
<th scope="col">Art Done</th>
<th scope="col">Plate Due</th>
<th scope="col">Plate Done</th>
<th scope="col">Mount Due</th>
<th scope="col">Mount Done</th>
<th scope="col">Ship Due</th>
<th scope="col">Ship Done</th>
<th scope="col">Price</th>
<th scope="col">Quickbooks Reference Number</th>
<th scope="col">Colors</th>
</tr>
</thead>
<tbody>
<!-- Rows will be added dynamically via Delphi code -->
</tbody>
</table>
<label id="lblentries2"></label>
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center" id="pagination">
<!-- Pagination items will be added dynamically via Delphi code -->
</ul>
</nav>
</div>
</div>
</div>
</div>
<!-- Modal -->
<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">Select Customer</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<select class="form-control input-sm" id="wcbcustomer"></select>
</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_order">Confirm</button>
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h1 class="page-header" id="view.userprofile.title">User Profile</h1>
<div class="row"> <div class="row">
<div class=col-sm> <div class=col-sm>
<div id="view.login.message" class="alert alert-danger"> <div id="view.login.message" class="alert alert-danger">
......
<div class="row"> <div class="row">
<div class="col-12"> <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 px-0">
<div class="container mt-4">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-12 col-md-8"> <div class="col-12 col-md-8">
<div class="row"> <div class="row">
...@@ -12,6 +11,7 @@ ...@@ -12,6 +11,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="row justify-content-center py-2"> <div class="row justify-content-center py-2">
<div class="col-sm"> <div class="col-sm">
<button id="btnadduser" class="btn btn-primary">Add User></button> <button id="btnadduser" class="btn btn-primary">Add User></button>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<th scope="col">System Rights</th> <th scope="col">System Rights</th>
<th scope="col">Perspective ID</th> <th scope="col">Perspective ID</th>
<th scope="col">QB ID</th> <th scope="col">QB ID</th>
<th scope="col">Edit</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
</div> </div>
</div> </div>
</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 fade" id="confirmation_modal" tabindex="-1" aria-labelledby="confirmation_modal_label" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
......
...@@ -121,12 +121,14 @@ var ...@@ -121,12 +121,14 @@ var
cells: TJSHTMLCollection; cells: TJSHTMLCollection;
UserID: TJSNode; UserID: TJSNode;
Username: TJSNode; Username: TJSNode;
Password: TJSNode;
FullName: TJSNode; FullName: TJSNode;
PhoneNum: TJSNode; Status: TJSNode;
Email: TJSNode; Email: TJSNode;
Admin: TJSNode; Access: TJSNode;
Password: TJSNode; Rights: TJSNode;
Location: TJSNode; Perspective: TJSNode;
QB: TJSNode;
isAdmin: boolean; isAdmin: boolean;
isActive: boolean; isActive: boolean;
ButtonCancel: TJSHTMLElement; ButtonCancel: TJSHTMLElement;
...@@ -143,18 +145,16 @@ begin ...@@ -143,18 +145,16 @@ begin
Username := cells[1]; Username := cells[1];
Password := cells[2]; Password := cells[2];
FullName := cells[3]; FullName := cells[3];
PhoneNum := cells[4]; Status := cells[4];
Email := cells[5]; Email := cells[5];
Location := cells[6]; Access := cells[6];
if TJSHTMLElement(cells[7].childNodes.item(0).childNodes.item(0)).attributes.Attrs['checked'] = nil then Rights := cells[7];
isAdmin := false Perspective := cells[8];
else QB := cells[9];
isAdmin := true;
if TJSHTMLElement(cells[8].childNodes.item(0).childNodes.item(0)).attributes.Attrs['checked'] = nil then FViewMain.EditUser('Edit', Username.innerText, Password.innerText, FullName.innerText,
isActive := false Status.innerText, Email.innerText, Access.innerText,
else Rights.innerText, Perspective.innerText, QB.innerText);
isActive := true;
FViewMain.EditUser('Edit', Username.innerText, FullName.innerText, PhoneNum.innerText, Email.innerText, Location.innerText, isAdmin, isActive);
end; end;
...@@ -346,10 +346,9 @@ begin ...@@ -346,10 +346,9 @@ begin
XDataWebDataSet1.Open; XDataWebDataSet1.Open;
for i := 0 to data.Length - 1 do for i := 0 to data.Length - 1 do
begin begin
console.log(user);
user := TJSObject(data[i]); user := TJSObject(data[i]);
AddRowToTable(XDataWebDataSet1userID.AsString, XDataWebDataSet1username.AsString, AddRowToTable(XDataWebDataSet1userID.AsString, XDataWebDataSet1username.AsString,
XDataWebDataSet1full_name.AsString, XDataWebDataSet1password.AsString, XDataWebDataSet1password.AsString, XDataWebDataSet1full_name.AsString,
XDataWebDataSet1status.AsString, XDataWebDataSet1email_address.AsString, XDataWebDataSet1status.AsString, XDataWebDataSet1email_address.AsString,
XDataWebDataSet1Atype.AsString, XDataWebDataSet1perspectiveID.AsString, XDataWebDataSet1Atype.AsString, XDataWebDataSet1perspectiveID.AsString,
XDataWebDataSet1QBID.AsString, XDataWebDataSet1rights.AsInteger); XDataWebDataSet1QBID.AsString, XDataWebDataSet1rights.AsInteger);
...@@ -409,7 +408,7 @@ begin ...@@ -409,7 +408,7 @@ begin
Cell.innerText := Full_Name; Cell.innerText := Full_Name;
NewRow.appendChild(Cell); NewRow.appendChild(Cell);
// Phone Cell // Status Cell
Cell := TJSHTMLElement(document.createElement('td')); Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Status'); Cell.setAttribute('data-label', 'Status');
Cell.innerText := Status; Cell.innerText := Status;
...@@ -446,6 +445,19 @@ begin ...@@ -446,6 +445,19 @@ begin
Cell.innerText := QBID; Cell.innerText := QBID;
NewRow.appendChild(Cell); 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 // Appends new rows to the table body
TJSHTMLElement(document.getElementById('tblPhoneGrid').getElementsByTagName('tbody')[0]).appendChild(NewRow); TJSHTMLElement(document.getElementById('tblPhoneGrid').getElementsByTagName('tbody')[0]).appendChild(NewRow);
end; end;
...@@ -453,7 +465,7 @@ end; ...@@ -453,7 +465,7 @@ end;
procedure TFViewUsers.btnAddUserClick(Sender: TObject); procedure TFViewUsers.btnAddUserClick(Sender: TObject);
begin begin
//Info := ''; //Info := '';
FViewMain.EditUser('Add', '', '', '', '', 'All', false, true); FViewMain.EditUser('Add', '', '', '', '', '', '', '', '', '');
end; end;
procedure TFViewUsers.btnCloseNotificationClick(Sender: TObject); procedure TFViewUsers.btnCloseNotificationClick(Sender: TObject);
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
background-color: #fff; background-color: #fff;
} }
.card-header { .card-header {
width: 100%; width: 100%;
text-align: left; /* Align text to the left */ text-align: left; /* Align text to the left */
...@@ -19,10 +21,84 @@ ...@@ -19,10 +21,84 @@
box-sizing: border-box; /* Ensure padding is included in the element's total width and height */ box-sizing: border-box; /* Ensure padding is included in the element's total width and height */
} }
/* Ensure that the title does not affect the navbar layout */
#view.main.apptitle {
display: flex;
align-items: center;
justify-content: flex-start; /* Align title to the left */
width: auto; /* Ensure it doesn't stretch the container */
margin-right: 20px; /* Optional: add space between title and navbar items */
}
/* Fixed width for title area to prevent shifting */
#title {
white-space: nowrap; /* Prevent the title text from wrapping */
width: 200px; /* Fixed width for the title */
text-overflow: ellipsis; /* Truncate text with ellipsis if it overflows */
overflow: hidden;
font-weight: bold; /* Optional: make the title text bold */
}
/* Navbar items - keep them aligned and spaced out */
.navbar-nav .nav-item {
padding: 0 15px; /* Adjust spacing between navbar items */
}
/* Flexbox for the entire navbar */
.navbar-nav {
display: flex;
justify-content: flex-end; /* Align navbar items to the right */
width: 100%;
}
/* Additional mobile responsiveness (optional) */
@media (max-width: 1200px) {
.navbar-nav {
flex-direction: column; /* Stack items vertically on smaller screens */
align-items: flex-start; /* Align items to the left */
}
.navbar-nav-spaced .nav-item {
padding: 10px 0; /* Adjust vertical spacing between items */
}
}
/* Make sure active navbar item color gets applied */
.navbar-nav .nav-item a.active {
color: #fff !important; /* Set text color to white for active item */
background-color: #004F84 !important; /* Darker blue for active background */
font-weight: bold;
}
/* Default navbar item color */
.navbar-nav .nav-item a {
color: #000 !important; /* Default color for links */
transition: color 0.3s ease;
}
/* Navbar item hover state */
.navbar-nav .nav-item a:hover {
color: #fff !important; /* Set hover text color to white */
background-color: #286090 !important; /* Light blue on hover */
}
.nav-item {
padding: 0 20px; /* Adjust this value for desired spacing between labels */
}
.mr-2 { .mr-2 {
margin-right: 0.5rem; margin-right: 0.5rem;
} }
.custom-h4 {
margin-bottom: 5px;
}
.custom-hr {
margin-top: 5px;
margin-bottom: 10px;
}
.custom-select-large { .custom-select-large {
font-size: 1.25rem; font-size: 1.25rem;
padding: 0.5rem; padding: 0.5rem;
......
program webKGOrders; program webKGOrders;
uses uses
Vcl.Forms, Vcl.Forms,
XData.Web.Connection, XData.Web.Connection,
...@@ -13,12 +11,14 @@ uses ...@@ -13,12 +11,14 @@ uses
View.ErrorPage in 'View.ErrorPage.pas' {FViewErrorPage: TWebForm} {*.html}, View.ErrorPage in 'View.ErrorPage.pas' {FViewErrorPage: TWebForm} {*.html},
App.Config in 'App.Config.pas', App.Config in 'App.Config.pas',
Paginator.Plugins in 'Paginator.Plugins.pas', Paginator.Plugins in 'Paginator.Plugins.pas',
View.Calls in 'View.Calls.pas' {FViewCalls: TWebForm} {*.html}, View.Items in 'View.Items.pas' {FViewItems: TWebForm} {*.html},
View.Main in 'View.Main.pas' {FViewMain: TWebForm} {*.html}, View.Main in 'View.Main.pas' {FViewMain: TWebForm} {*.html},
View.Home in 'View.Home.pas' {FViewHome: TWebForm} {*.html}, View.Home in 'View.Home.pas' {FViewHome: TWebForm} {*.html},
View.Admin in 'View.Admin.pas' {FViewAdmin: TWebForm} {*.html},
View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html}, View.Users in 'View.Users.pas' {FViewUsers: TWebForm} {*.html},
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html}; View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html},
View.OrderList in 'View.OrderList.pas' {FOrderList: TWebForm} {*.html};
{$R *.res} {$R *.res}
......
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,8 @@
</DCCReference> </DCCReference>
<DCCReference Include="App.Config.pas"/> <DCCReference Include="App.Config.pas"/>
<DCCReference Include="Paginator.Plugins.pas"/> <DCCReference Include="Paginator.Plugins.pas"/>
<DCCReference Include="View.Calls.pas"> <DCCReference Include="View.Items.pas">
<Form>FViewCalls</Form> <Form>FViewItems</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
...@@ -151,11 +151,6 @@ ...@@ -151,11 +151,6 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.Admin.pas">
<Form>FViewAdmin</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.Users.pas"> <DCCReference Include="View.Users.pas">
<Form>FViewUsers</Form> <Form>FViewUsers</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
...@@ -166,6 +161,21 @@ ...@@ -166,6 +161,21 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass> <DesignClass>TWebForm</DesignClass>
</DCCReference> </DCCReference>
<DCCReference Include="View.Orders.pas">
<Form>FViewOrders</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.OrderEntryCorrugated.pas">
<Form>FOrderEntry</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.OrderList.pas">
<Form>FOrderList</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/> <None Include="index.html"/>
<None Include="template\css\app.css"/> <None Include="template\css\app.css"/>
<BuildConfiguration Include="Base"> <BuildConfiguration Include="Base">
......
...@@ -15,6 +15,95 @@ type ...@@ -15,6 +15,95 @@ type
ucKG: TUniConnection; ucKG: TUniConnection;
UniQuery1: TUniQuery; UniQuery1: TUniQuery;
MySQLUniProvider1: TMySQLUniProvider; MySQLUniProvider1: TMySQLUniProvider;
UniQuery2: TUniQuery;
uqOrders: TUniQuery;
uqOrdersORDER_ID: TIntegerField;
uqOrdersCOMPANY_ID: TIntegerField;
uqOrdersUSER_ID: TIntegerField;
uqOrdersORDER_DATE: TDateTimeField;
uqOrdersSTART_DATE: TDateField;
uqOrdersEND_DATE: TDateField;
uqOrdersORDER_STATUS: TStringField;
uqOrdersSCHED_JSON: TStringField;
uqOrdersstaff_fields_order_date: TDateField;
uqOrdersstaff_fields_proof_date: TDateField;
uqOrdersstaff_fields_ship_date: TDateField;
uqOrdersstaff_fields_ship_via: TStringField;
uqOrdersstaff_fields_price: TStringField;
uqOrdersstaff_fields_invoice_to: TStringField;
uqOrdersstaff_fields_invoice_attention: TStringField;
uqOrdersstaff_fields_ship_to: TStringField;
uqOrdersstaff_fields_ship_attention: TStringField;
uqOrdersstaff_fields_po_number: TStringField;
uqOrdersstaff_fields_job_name: TStringField;
uqOrdersstaff_fields_art_due: TDateField;
uqOrdersstaff_fields_plate_due: TDateField;
uqOrdersstaff_fields_mount_due: TDateField;
uqOrdersplates_job_number: TStringField;
uqOrderssupplied_by_customer_b_w_copy: TStringField;
uqOrderssupplied_by_customer_color_copy: TStringField;
uqOrderssupplied_by_customer_plates: TStringField;
uqOrderssupplied_by_customer_sample_ca: TStringField;
uqOrderssupplied_by_customer_dimension: TStringField;
uqOrderssupplied_by_customer_disk_or_cd: TStringField;
uqOrderssupplied_by_customer_e_mail: TStringField;
uqOrderssupplied_by_customer_ftp: TStringField;
uqOrderssupplied_by_customer_other: TStringField;
uqOrderssupplied_by_customer_existing_: TStringField;
uqOrderssupplied_by_customer_ref_art_p: TStringField;
uqOrderssupplied_by_customer_ref_art_a: TStringField;
uqOrderscut_die_cutdier: TStringField;
uqOrderscut_die_cutdieb: TStringField;
uqOrderscut_die_cutdief: TStringField;
uqOrderscut_die_cutdierkr: TStringField;
uqOrderscut_die_cutdiefkr: TStringField;
uqOrderscut_die_cad_file: TStringField;
uqOrderscut_die_attached: TStringField;
uqOrderscut_die_boxpol250: TStringField;
uqOrderscut_die_boxpol155: TStringField;
uqOrderscut_die_boxpol125: TStringField;
uqOrderscut_die_brub: TStringField;
uqOrdersproofing_fax: TStringField;
uqOrdersproofing_fax_attn: TStringField;
uqOrdersproofing_e_mail: TStringField;
uqOrdersproofing_e_mail_attn: TStringField;
uqOrdersproofing_ship_to: TStringField;
uqOrdersproofing_full_size_panel: TStringField;
uqOrdersproofing_print_card: TStringField;
uqOrdersproofing_wide_format: TStringField;
uqOrdersproofing_pdf_file: TStringField;
uqOrdersproofing_other: TStringField;
uqOrdersproofing_art_approved_as_is: TStringField;
uqOrdersproofing_approved_date: TDateField;
uqOrdersproofing_changes_required: TStringField;
uqOrdersproofing_changes_date: TDateField;
uqOrderslayout_rsc_l: TStringField;
uqOrderslayout_rcs_w: TStringField;
uqOrderslayout_rcs_d: TStringField;
uqOrderslayout_die_cut_no: TStringField;
uqOrderslayout_accross_no: TStringField;
uqOrderslayout_around_no: TStringField;
uqOrderslayout_cad_file: TStringField;
uqOrderslayout_excalibur_die: TStringField;
uqOrdersmounting_loose: TStringField;
uqOrdersmounting_sticky_bak: TStringField;
uqOrdersmounting_full_mount: TStringField;
uqOrdersmounting_strip_mount: TStringField;
uqOrderscolors_cylinder_size: TStringField;
uqOrderscolors_machine_ident: TStringField;
uqOrdersmounting_standard_setup: TStringField;
uqOrdersmounting_custom_backing: TStringField;
uqOrdersmounting_custom_adhesive: TStringField;
uqOrderscolors_cross_hairs: TStringField;
uqOrderscolors_clemson: TStringField;
uqOrdersplates_thickness: TStringField;
uqOrdersplates_plate_material: TStringField;
uqOrdersgeneral_special_instructions: TStringField;
uqOrderscolors_colors: TStringField;
uqOrdersstaff_fields_quickbooks_item: TStringField;
uqOrdersstaff_fields_quantity: TStringField;
uqOrderslayout_rsc_style: TStringField;
uqOrdersstaff_fields_art_location: TStringField;
procedure DataModuleCreate(Sender: TObject); procedure DataModuleCreate(Sender: TObject);
private private
{ Private declarations } { Private declarations }
......
...@@ -20,34 +20,6 @@ const ...@@ -20,34 +20,6 @@ const
API_MODEL = 'Api'; API_MODEL = 'Api';
type type
TCallItem = class
// Class of the info we want from the database from a specific call.
// callSid: SID of the call, 34 digit string.
// fromNumber: Who the phone call was from. (xxx) xxx-xxxx
// toNumber: Who the phone call was to. (xxx) xxx-xxxx
// dateCreated: Date the phone call was created. mm/dd/yyyy hh:nn:ss am/pm
// mediaURL: Link to the recording audio
// duration: Length of the entire call and recording.
// transcription: Transcription of the recording. Not always present due to
// the call being answerered or caller did not leave a message.
public
callSid: string;
fromNumber: string;
toNumber: string;
dateCreated: string;
mediaUrl: string;
duration: string;
transcription: string;
end;
// List of call items
// count: Total amount of records that fit the SQL query
// data: List of retrieved calls
TCallList = class
public
count: integer;
data: TList<TCallItem>;
end;
TUserItem = class TUserItem = class
public public
...@@ -69,17 +41,174 @@ type ...@@ -69,17 +41,174 @@ type
data: TList<TUserItem>; data: TList<TUserItem>;
end; end;
TItemItem = class
public
ID: string;
name: string;
description: string;
status: string;
end;
TItemList = class
public
count: integer;
data: TList<TItemItem>;
end;
TOrderItem = class
public
ID,
companyName,
jobName,
orderDate,
proofDue,
proofDone,
artDue,
artDone,
plateDue,
plateDone,
mountDue,
mountDone,
shipDue,
shipDone,
price,
qbRefNum,
orderType,
colors: string;
end;
TOrderList = class
Public
count: integer;
data: TList<TOrderItem>;
end;
TCustomerItem = class
Public
NAME: string;
ID: integer;
SHORT_NAME: string;
ADDRESS: string;
end;
TCustomerList = class
Public
count: integer;
data: TList<TCustomerItem>;
end;
TFullOrder = class
Public
//Company
NAME: string;
SHORT_NAME: string;
inQuickBooks: string;
// Staff Fields:
staff_fields_order_date: string;
staff_fields_proof_date: string;
staff_fields_ship_date: string;
staff_fields_ship_via: string;
staff_fields_quantity: string;
staff_fields_price: string;
staff_fields_invoice_to: string;
staff_fields_ship_to: string;
staff_fields_po_number: string;
staff_fields_job_name: string;
staff_fields_quickbooks_item: string;
staff_fields_art_due: string;
staff_fields_plate_due: string;
staff_fields_mount_due: string;
staff_fields_art_location: string;
// Supplied by Customer:
supplied_by_customer_b_w_copy: boolean;
supplied_by_customer_color_copy: boolean;
supplied_by_customer_plates: boolean;
supplied_by_customer_sample_ca: boolean;
supplied_by_customer_dimension: string;
supplied_by_customer_disk_or_cd: boolean;
supplied_by_customer_e_mail: string;
supplied_by_customer_ftp: string;
supplied_by_customer_other: string;
supplied_by_customer_existing_: string;
supplied_by_customer_ref_art_p: string;
supplied_by_customer_ref_art_a: string;
// Layout
layout_rsc_l: string;
//Typos to match database typos
layout_rcs_w: string;
layout_rcs_d: string;
layout_die_cut_no: string;
layout_accross_no: string;
layout_around_no: string;
layout_cad_file: string;
layout_excalibur_die: boolean;
layout_rsc_style: string;
// Mounting
mounting_loose: string;
mounting_sticky_bak: boolean;
mounting_full_mount: boolean;
mounting_strip_mount: string;
mounting_standard_setup: string;
mounting_custom_backing: string;
mounting_custom_adhesive: string;
// Colors
colors_cylinder_size: string;
colors_machine_ident: string;
colors_cross_hairs: string;
colors_clemson: string;
colors_colors: string;
// Proofing
proofing_fax: string;
proofing_fax_attn: string;
proofing_e_mail: string;
proofing_e_mail_attn: string;
proofing_ship_to: string;
proofing_full_size_panel: boolean;
proofing_print_card: boolean;
proofing_wide_format: boolean;
proofing_pdf_file: boolean;
proofing_other: string;
proofing_art_approved_as_is: boolean;
proofing_approved_date: string;
// Plates
plates_thickness: string;
plates_plate_material: string;
plates_job_number: string;
// General
general_special_instructions: string;
end;
type type
[ServiceContract] [ServiceContract]
ILookupService = interface(IInvokable) ILookupService = interface(IInvokable)
['{F24E1468-5279-401F-A877-CD48B44F4416}'] ['{F24E1468-5279-401F-A877-CD48B44F4416}']
[HttpGet] function GetCalls(searchOptions: string): TCallList; [HttpGet] function Search(phoneNum: string): TOrderList;
[HttpGet] function Search(phoneNum: string): TCallList;
[HttpGet] function GetUsers(searchOptions: string): TUserList; [HttpGet] function GetUsers(searchOptions: string): TUserList;
[HttpGet] function GetItems(searchOptions: string): TItemList;
[HttpGet] function GetOrders(searchOptions: string): TOrderList;
[HttpGet] function GetOrder(orderInfo: string): TFullOrder;
[HttpGet] function GetCustomers(): TCustomerList;
function AddUser(userInfo: string): string; function AddUser(userInfo: string): string;
function AddItem(itemInfo: string): string;
function DelUser(username: string): string; function DelUser(username: string): string;
function EditUser(const editOptions: string): string; function EditUser(const editOptions: string): string;
function AddCorrugatedOrder(orderInfo: string): TJSONObject;
function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string;
end; end;
implementation implementation
......
object FMain: TFMain object FMain: TFMain
Left = 0 Left = 0
Top = 0 Top = 0
Caption = 'envoy Calls Server 2' Caption = 'KG Orders Server'
ClientHeight = 597 ClientHeight = 597
ClientWidth = 764 ClientWidth = 764
Color = clBtnFace Color = clBtnFace
......
unit Main; unit Main;
//Main form of the program. This program gets calls/recordings/transcriptions from
//twilio and stores them in a database. From there it is able to be accessed by the client.
//Has access to every visual form for debugging purposes.
//Authors: //Authors:
//Elias Sarraf //Elias Sarraf
//Mac ... //Mac ...
......
...@@ -156,6 +156,6 @@ begin ...@@ -156,6 +156,6 @@ begin
Application.MainFormOnTaskbar := True; Application.MainFormOnTaskbar := True;
Application.CreateForm(TFMain, FMain); Application.CreateForm(TFMain, FMain);
Logger.AddAppender(TMemoLogAppender.Create( 5, FMain.memoinfo )); Logger.AddAppender(TMemoLogAppender.Create( 5, FMain.memoinfo ));
Logger.AddAppender(TFileLogAppender.Create( 5, 'envoyCallsServer' )); Logger.AddAppender(TFileLogAppender.Create( 5, 'kgOrdersServer' ));
Application.Run; Application.Run;
end. end.
[Options] [Options]
LogFileNum=15 LogFileNum=223
UpdateTimerLength=0 UpdateTimerLength=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment