Commit 2eb52536 by Cam Hayes

more minor v0.9.15.1 changes

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