Commit 2eb52536 by Cam Hayes

more minor v0.9.15.1 changes

parent 245de583
...@@ -217,10 +217,6 @@ object FViewAddCustomer: TFViewAddCustomer ...@@ -217,10 +217,6 @@ object FViewAddCustomer: TFViewAddCustomer
OnDblClickCell = wdbtcAddressesDblClickCell OnDblClickCell = wdbtcAddressesDblClickCell
Columns = < Columns = <
item item
DataField = 'ship_id'
Title = 'ID'
end
item
DataField = 'ship_block' DataField = 'ship_block'
Title = 'Address' Title = 'Address'
end> end>
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Customer ID:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Customer ID:</label>
<input id="edtcompanyaccountname"type="text" class="form-control" style="width: 150px" required/> <input id="edtcompanyaccountname"type="text" class="form-control" style="width: 150px" required/>
<div class="invalid-feedback" id="shortnamefeedback" style="font-size: 15px;"> <div class="invalid-feedback" id="shortnamefeedback" style="font-size: 15px;">
Please Provide a Company ID. Please Provide a Customer ID.
</div> </div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
......
...@@ -156,6 +156,7 @@ var ...@@ -156,6 +156,7 @@ var
JSONStr: string; JSONStr: string;
input: TJSHTMLInputElement; input: TJSHTMLInputElement;
begin begin
console.log('init');
if customerID = '' then if customerID = '' then
begin begin
mode := 'ADD'; mode := 'ADD';
...@@ -341,6 +342,7 @@ begin ...@@ -341,6 +342,7 @@ begin
TJSHTMLInputElement(document.getElementById('edtbillingcity')).classList.remove('changed-field'); TJSHTMLInputElement(document.getElementById('edtbillingcity')).classList.remove('changed-field');
TJSHTMLInputElement(document.getElementById('edtbillingstate')).classList.remove('changed-field'); TJSHTMLInputElement(document.getElementById('edtbillingstate')).classList.remove('changed-field');
TJSHTMLInputElement(document.getElementById('edtbillingzip')).classList.remove('changed-field'); TJSHTMLInputElement(document.getElementById('edtbillingzip')).classList.remove('changed-field');
console.log(CustomerID);
if CustomerID <> '' then if CustomerID <> '' then
FViewMain.ViewAddCustomer(CustomerID, 'Failure: Changes Discarded') FViewMain.ViewAddCustomer(CustomerID, 'Failure: Changes Discarded')
else else
...@@ -382,6 +384,7 @@ procedure TFViewAddCustomer.btnLinkClic(Sender: TObject); ...@@ -382,6 +384,7 @@ procedure TFViewAddCustomer.btnLinkClic(Sender: TObject);
var var
newform: TFSelectCustomer; newform: TFSelectCustomer;
begin begin
console.log(CustomerID);
newform := TFSelectCustomer.CreateNew; newform := TFSelectCustomer.CreateNew;
newform.Caption := 'Select Customer to Link'; newform.Caption := 'Select Customer to Link';
...@@ -402,6 +405,7 @@ begin ...@@ -402,6 +405,7 @@ begin
XDataWebDataSet1QB_LIST_ID.AsString := newform.QB_ID; XDataWebDataSet1QB_LIST_ID.AsString := newform.QB_ID;
XDataWebDataSet1.Post; XDataWebDataSet1.Post;
UpdateCustomer(); UpdateCustomer();
console.log(CustomerID);
end; end;
end end
); );
...@@ -456,7 +460,7 @@ procedure TFViewAddCustomer.UpdateCustomer; ...@@ -456,7 +460,7 @@ procedure TFViewAddCustomer.UpdateCustomer;
var var
customer: TJSObject; customer: TJSObject;
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
msg, temp: string; msg, short_name: string;
change: boolean; change: boolean;
input: TJSHTMLInputElement; input: TJSHTMLInputElement;
begin begin
...@@ -465,6 +469,7 @@ begin ...@@ -465,6 +469,7 @@ begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.UpdateCustomer', [XDataWebDataSet1QB_LIST_ID.AsString])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.UpdateCustomer', [XDataWebDataSet1QB_LIST_ID.AsString]));
customer := TJSObject(xdcResponse.Result); customer := TJSObject(xdcResponse.Result);
change := false; change := false;
short_name := edtShortName.Text;
input := TJSHTMLInputElement(document.getElementById('edtcompanyname')); input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if string(customer['NAME']) <> XDataWebDataSet1NAME.AsString then if string(customer['NAME']) <> XDataWebDataSet1NAME.AsString then
...@@ -514,16 +519,19 @@ begin ...@@ -514,16 +519,19 @@ begin
XDataWebDataSet1.Close; XDataWebDataSet1.Close;
XDataWebDataSet1.SetJsonData(customer); XDataWebDataSet1.SetJsonData(customer);
XDataWebDataSet1.Open; XDataWebDataSet1.Open;
XDataWebDataSet1.Edit;
XDataWebDataSet1CUSTOMER_ID.AsString := CustomerID;
XDataWebDataSet1SHORT_NAME.AsString := short_name;
memoAddressBlock.Text := string(customer['staff_fields_invoice_to']); memoAddressBlock.Text := string(customer['staff_fields_invoice_to']);
Utils.HideSpinner('spinner'); Utils.HideSpinner('spinner');
if change then if change then
begin begin
EditMode; EditMode;
ShowToast('Update successful. Changes have been highlighted'); ShowToast('Changes have been highlighted');
end end
else else
ShowToast('Update successful. No Changes needed'); ShowToast('No Changes needed');
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
begin begin
......
...@@ -206,7 +206,6 @@ object FSelectCustomer: TFSelectCustomer ...@@ -206,7 +206,6 @@ object FSelectCustomer: TFSelectCustomer
ScrollMode = scmItemScrolling ScrollMode = scmItemScrolling
DesignTimeSampleData = True DesignTimeSampleData = True
OnCellClick = TMSFNCGrid1CellClick OnCellClick = TMSFNCGrid1CellClick
ExplicitLeft = 4
end end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 556 Left = 556
......
...@@ -86,13 +86,12 @@ begin ...@@ -86,13 +86,12 @@ begin
ShowToast('Please Select a Customer', 'danger') ShowToast('Please Select a Customer', 'danger')
else else
begin begin
if ( string(self.Caption).ToLower.Contains('add') and xdwdsCustomers.FieldByName('InKGOrders').AsBoolean) then if ( xdwdsCustomers.FieldByName('InKGOrders').AsBoolean ) then
ShowToast('failure:Customer Already in Database') ShowToast('failure:Customer Already in Database')
else else
begin begin
confirm := true; confirm := true;
QB_ID := xdwdsCustomers.FieldByName('Id').AsString; QB_ID := xdwdsCustomers.FieldByName('Id').AsString;
FViewMain.ViewAddCustomer('', QB_ID);
Close(); Close();
end; end;
end; end;
......
...@@ -82,7 +82,8 @@ begin ...@@ -82,7 +82,8 @@ begin
newform.ShowModal( newform.ShowModal(
procedure(AValue: TModalResult) procedure(AValue: TModalResult)
begin begin
if newform.confirm then
FViewMain.ViewAddCustomer('', newform.QB_ID);
end end
); );
end; end;
......
...@@ -560,10 +560,10 @@ begin ...@@ -560,10 +560,10 @@ begin
if change then if change then
begin begin
EditMode; EditMode;
ShowToast('Update successful. Changes have been highlighted'); ShowToast('Changes have been highlighted');
end end
else else
ShowToast('Update successful. No Changes needed'); ShowToast('No Changes needed');
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
......
...@@ -153,8 +153,14 @@ object FViewMain: TFViewMain ...@@ -153,8 +153,14 @@ object FViewMain: TFViewMain
Caption = 'TEST MODE' Caption = 'TEST MODE'
ElementID = 'view.main.test' ElementID = 'view.main.test'
ElementFont = efCSS ElementFont = efCSS
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
HeightStyle = ssAuto HeightStyle = ssAuto
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object WebPanel1: TWebPanel object WebPanel1: TWebPanel
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<a id="view.main.apptitle" class="navbar-brand" href="index.html">Koehler-Gibson Orders</a> <a id="view.main.apptitle" class="navbar-brand" href="index.html">Koehler-Gibson Orders</a>
<span id="view.main.version" class="small text-muted ms-2 me-5"></span> <span id="view.main.version" class="small text-muted ms-2 me-5"></span>
<span id="view.main.test" class="test-warning fw-bold mb-1" style="display: none;">TEST MODE</span> <span id="view.main.test" class="test-warning fw-bold mb-1 text-nowrap" style="display: none; font-size: 0.85rem;">TEST MODE</span>
</div> </div>
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
text-align: center; text-align: center;
} }
#tblPhoneGrid thead th:nth-child(20) {
font-size: 0.9rem !important;
font-weight: bold; /* Optional: keep it bold if shrinking makes it too thin */
}
input[type="text"] { input[type="text"] {
min-width: 50px; min-width: 50px;
max-width: 100%; max-width: 100%;
...@@ -42,11 +47,11 @@ input[type=number] { ...@@ -42,11 +47,11 @@ input[type=number] {
.changed-field { .changed-field {
border: 1px solid #ffc107 !important; border: 1px solid #FFFF00 !important;
} }
.changed-field-label { .changed-field-label {
background-color: #fff3cd; background-color: #FFFF00;
border-radius: 4px; border-radius: 4px;
padding: 2px 6px; padding: 2px 6px;
} }
......
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