Commit 98a86152 by Mac Stephens

fixed selected id issue and added confirm button closure

parent f2d52452
...@@ -9,31 +9,6 @@ object FAddOrder: TFAddOrder ...@@ -9,31 +9,6 @@ object FAddOrder: TFAddOrder
Font.Name = 'Arial' Font.Name = 'Arial'
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
OnShow = WebFormShow
object WebLabel2: TWebLabel
Left = 296
Top = 41
Width = 95
Height = 14
Caption = 'Enter Customer Info'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object WebLabel1: TWebLabel
Left = 473
Top = 41
Width = 53
Height = 14
Caption = 'Selected Id'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object cbWebPlate: TWebCheckBox object cbWebPlate: TWebCheckBox
Left = 58 Left = 58
Top = 53 Top = 53
...@@ -43,7 +18,6 @@ object FAddOrder: TFAddOrder ...@@ -43,7 +18,6 @@ object FAddOrder: TFAddOrder
ChildOrder = 5 ChildOrder = 5
ElementID = 'cbwebplate' ElementID = 'cbwebplate'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epIgnore
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthStyle = ssAuto WidthStyle = ssAuto
...@@ -60,7 +34,6 @@ object FAddOrder: TFAddOrder ...@@ -60,7 +34,6 @@ object FAddOrder: TFAddOrder
ChildOrder = 5 ChildOrder = 5
ElementID = 'cbcorrugatedplate' ElementID = 'cbcorrugatedplate'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epIgnore
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
State = cbChecked State = cbChecked
...@@ -69,14 +42,13 @@ object FAddOrder: TFAddOrder ...@@ -69,14 +42,13 @@ object FAddOrder: TFAddOrder
OnClick = cbCorrugatedPlateClick OnClick = cbCorrugatedPlateClick
end end
object edtSearch: TWebEdit object edtSearch: TWebEdit
Left = 296 Left = 300
Top = 55 Top = 53
Width = 146 Width = 146
Height = 22 Height = 22
ChildOrder = 8 ChildOrder = 8
ElementID = 'edtTEST' ElementID = 'edtTEST'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthStyle = ssAuto WidthStyle = ssAuto
...@@ -91,7 +63,6 @@ object FAddOrder: TFAddOrder ...@@ -91,7 +63,6 @@ object FAddOrder: TFAddOrder
ChildOrder = 8 ChildOrder = 8
ElementID = 'edtid' ElementID = 'edtid'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epIgnore
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthStyle = ssAuto WidthStyle = ssAuto
...@@ -106,7 +77,6 @@ object FAddOrder: TFAddOrder ...@@ -106,7 +77,6 @@ object FAddOrder: TFAddOrder
ChildOrder = 9 ChildOrder = 9
ElementID = 'btnconfirm' ElementID = 'btnconfirm'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epIgnore
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthStyle = ssAuto WidthStyle = ssAuto
...@@ -114,7 +84,7 @@ object FAddOrder: TFAddOrder ...@@ -114,7 +84,7 @@ object FAddOrder: TFAddOrder
OnClick = btnConfirmClick OnClick = btnConfirmClick
end end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 720 Left = 722
Top = 52 Top = 52
Width = 96 Width = 96
Height = 25 Height = 25
...@@ -122,7 +92,6 @@ object FAddOrder: TFAddOrder ...@@ -122,7 +92,6 @@ object FAddOrder: TFAddOrder
ChildOrder = 9 ChildOrder = 9
ElementID = 'btncancel' ElementID = 'btncancel'
ElementFont = efCSS ElementFont = efCSS
ElementPosition = epIgnore
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthStyle = ssAuto WidthStyle = ssAuto
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
<!-- Checkbox 1: Web Plate --> <!-- Checkbox 1: Web Plate -->
<div class="col-auto d-flex align-items-center"> <div class="col-auto d-flex align-items-center">
<div class="form-check form-check-lg mt-4 me-2"> <div class="form-check form-check-lg mt-4 me-2">
<input class="form-check-input" type="checkbox" id="cbwebplate" style="transform: scale(1.5);">
<label class="form-check-label ms-2" for="cbwebplate">Web Plate</label> <label class="form-check-label ms-2" for="cbwebplate">Web Plate</label>
<input class="form-check-input" type="checkbox" id="cbwebplate">
</div> </div>
</div> </div>
<!-- Checkbox 2: Corrugated Plate --> <!-- Checkbox 2: Corrugated Plate -->
<div class="col-auto d-flex align-items-center"> <div class="col-auto d-flex align-items-center">
<div class="form-check form-check-lg mt-4 me-2"> <div class="form-check form-check-lg mt-4 me-2">
<input class="form-check-input" type="checkbox" id="cbcorrugatedplate" checked style="transform: scale(1.5);">
<label class="form-check-label ms-2" for="cbcorrugatedplate">Corrugated Plate</label> <label class="form-check-label ms-2" for="cbcorrugatedplate">Corrugated Plate</label>
<input class="form-check-input" type="checkbox" id="cbcorrugatedplate" checked>
</div> </div>
</div> </div>
<!-- Search Input --> <!-- Search Input -->
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!-- Selected ID --> <!-- Selected ID -->
<div class="col-auto"> <div class="col-auto">
<label for="edtid" class="form-label mb-0">Selected ID</label> <label for="edtid" class="form-label mb-0">Selected ID</label>
<input type="text" class="form-control" id="edtid" readonly> <input type="text" class="form-control" id="edtid">
</div> </div>
<!-- Buttons --> <!-- Buttons -->
<div class="col-auto d-flex justify-content-end"> <div class="col-auto d-flex justify-content-end">
......
...@@ -24,8 +24,6 @@ type ...@@ -24,8 +24,6 @@ type
cbWebPlate: TWebCheckBox; cbWebPlate: TWebCheckBox;
cbCorrugatedPlate: TWebCheckBox; cbCorrugatedPlate: TWebCheckBox;
edtSearch: TWebEdit; edtSearch: TWebEdit;
WebLabel2: TWebLabel;
WebLabel1: TWebLabel;
edtID: TWebEdit; edtID: TWebEdit;
btnConfirm: TWebButton; btnConfirm: TWebButton;
btnCancel: TWebButton; btnCancel: TWebButton;
...@@ -37,9 +35,8 @@ type ...@@ -37,9 +35,8 @@ type
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer); procedure TMSFNCGrid1SelectedCell(Sender: TObject; ACol, ARow: Integer);
procedure edtSearchChange(Sender: TObject); procedure edtSearchChange(Sender: TObject);
procedure WebFormShow(Sender: TObject);
private private
[async] procedure getCustomers(); [async] procedure GetCustomers();
procedure PopulateGridManually; procedure PopulateGridManually;
procedure ApplyFilter; procedure ApplyFilter;
public public
...@@ -63,7 +60,6 @@ begin ...@@ -63,7 +60,6 @@ begin
with TFAddOrder(AForm) do with TFAddOrder(AForm) do
begin begin
GetCustomers(); GetCustomers();
Console.Log('edtSearch Element:', document.getElementById('edtsearch'));
end; end;
end end
); );
...@@ -72,7 +68,6 @@ end; ...@@ -72,7 +68,6 @@ end;
procedure TFAddOrder.edtSearchChange(Sender: TObject); procedure TFAddOrder.edtSearchChange(Sender: TObject);
begin begin
Console.Log('edtSearchChange triggered, Text: ' + edtSearch.Text);
ApplyFilter; ApplyFilter;
end; end;
...@@ -143,14 +138,6 @@ begin ...@@ -143,14 +138,6 @@ begin
end; end;
procedure TFAddOrder.WebFormShow(Sender: TObject);
begin
// Set the Delphi OnChange event for edtSearch
edtSearch.OnChange := edtSearchChange;
Console.Log('edtSearch OnChange is set to edtSearchChange');
end;
procedure TFAddOrder.ApplyFilter; procedure TFAddOrder.ApplyFilter;
var var
fd: TTMSFNCGridFilterData; fd: TTMSFNCGridFilterData;
...@@ -193,10 +180,13 @@ end; ...@@ -193,10 +180,13 @@ end;
procedure TFAddOrder.btnConfirmClick(Sender: TObject); procedure TFAddOrder.btnConfirmClick(Sender: TObject);
begin begin
ApplyFilter; edtID.Text := '';
window.location.reload(true);
end; end;
procedure TFAddOrder.btnCancelClick(Sender: TObject); procedure TFAddOrder.btnCancelClick(Sender: TObject);
var
PanelElement: TJSHTMLElement;
begin begin
edtID.Text := ''; edtID.Text := '';
Close; Close;
...@@ -204,5 +194,9 @@ end; ...@@ -204,5 +194,9 @@ end;
end. end.
...@@ -12,7 +12,7 @@ object FViewOrders: TFViewOrders ...@@ -12,7 +12,7 @@ object FViewOrders: TFViewOrders
OnCreate = WebFormCreate OnCreate = WebFormCreate
OnShow = WebFormShow OnShow = WebFormShow
object lblEntries: TWebLabel object lblEntries: TWebLabel
Left = 66 Left = 68
Top = 333 Top = 333
Width = 77 Width = 77
Height = 13 Height = 13
...@@ -23,18 +23,6 @@ object FViewOrders: TFViewOrders ...@@ -23,18 +23,6 @@ object FViewOrders: TFViewOrders
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object lblEntries2: TWebLabel
Left = 66
Top = 317
Width = 49
Height = 13
Caption = 'lblEntries2'
ElementID = 'lblentries2'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbSortBy: TWebComboBox object wcbSortBy: TWebComboBox
Left = 368 Left = 368
Top = 16 Top = 16
......
...@@ -96,15 +96,6 @@ ...@@ -96,15 +96,6 @@
</table> </table>
</div> </div>
<!-- Entries Label Section (Below Table) -->
<div class="container mt-3">
<div class="row">
<div class="col">
<label id="lblentries2"></label>
</div>
</div>
</div>
<!-- Pagination Section --> <!-- Pagination Section -->
<div class="container mt-4"> <div class="container mt-4">
<div class="row justify-content-center"> <div class="row justify-content-center">
......
...@@ -43,7 +43,6 @@ type ...@@ -43,7 +43,6 @@ type
btnFilters: TWebButton; btnFilters: TWebButton;
dtpStartDate: TWebDateTimePicker; dtpStartDate: TWebDateTimePicker;
dtpEndDate: TWebDateTimePicker; dtpEndDate: TWebDateTimePicker;
lblEntries2: TWebLabel;
XDataWebDataSet1plateDue: TStringField; XDataWebDataSet1plateDue: TStringField;
XDataWebDataSet1plateDone: TStringField; XDataWebDataSet1plateDone: TStringField;
XDataWebDataSet1orderType: TStringField; XDataWebDataSet1orderType: TStringField;
...@@ -182,6 +181,7 @@ begin ...@@ -182,6 +181,7 @@ begin
OrdersPanel.style.setProperty('display', 'block'); OrdersPanel.style.setProperty('display', 'block');
end; end;
procedure TFViewOrders.AddRowToTable(temp: string); procedure TFViewOrders.AddRowToTable(temp: string);
// Adds rows to the table // Adds rows to the table
// PhoneNumber: phone number of the location // PhoneNumber: phone number of the location
...@@ -608,25 +608,18 @@ begin ...@@ -608,25 +608,18 @@ begin
if callListLength = 0 then if callListLength = 0 then
begin begin
lblEntries.Caption := 'No entries found'; lblEntries.Caption := 'No entries found';
lblEntries2.Caption := 'No entries found';
end end
else if (PageNumber * PageSize) < callListLength then else if (PageNumber * PageSize) < callListLength then
begin begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) + lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(PageNumber * PageSize) + ' - ' + IntToStr(PageNumber * PageSize) +
' of ' + IntToStr(callListLength); ' of ' + IntToStr(callListLength);
lblEntries2.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(PageNumber * PageSize) +
' of ' + IntToStr(callListLength);
end end
else if (PageNumber * PageSize) >= callListLength then else if (PageNumber * PageSize) >= callListLength then
begin begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) + lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(callListLength) + ' - ' + IntToStr(callListLength) +
' of ' + IntToStr(callListLength); ' of ' + IntToStr(callListLength);
lblEntries2.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(callListLength) +
' of ' + IntToStr(callListLength);
end; end;
GeneratePagination(TotalPages); GeneratePagination(TotalPages);
end; end;
......
[Options] [Options]
LogFileNum=30 LogFileNum=31
[Database] [Database]
--Server=192.168.159.132 --Server=192.168.159.132
......
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