Commit 98a86152 by Mac Stephens

fixed selected id issue and added confirm button closure

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