From 7df45938ba69312548b7609d5071085dc2a015c7 Mon Sep 17 00:00:00 2001 From: Ruel Tmeizeh - RuhNet Date: Tue, 25 Nov 2025 15:59:22 -0500 Subject: [PATCH] improved faxbox number finding reliability; added help tooltip --- app.js | 30 ++++++++++++++++-------------- i18n/de-DE.json | 1 + i18n/en-US.json | 1 + style/app.css | 15 +++++++++++++++ style/app.scss | 15 +++++++++++++++ views/outbound-faxes.html | 2 +- 6 files changed, 49 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index 3cc3252..5295c5d 100644 --- a/app.js +++ b/app.js @@ -918,22 +918,24 @@ define(function(require) { self.getCallflows(function(callflows) { //get all callflows let done = new Promise((resolve, reject) => { //let these finish before proceeding if (callflows.length == 0) resolve(); - _.each(callflows, function(cf, idx) { - if (cf.modules.includes('faxbox')) { //if callflow uses the faxbox module, get it individually - self.getCallflow(cf.id, function(callflow) { - var fbid = findFaxboxId(callflow.flow); //search for the faxbox ID - if (fbid) faxboxNumbers[fbid] = []; - _.each(cf.numbers, function(cfnum) { //check each callflow number to see if it's a real DID - if (numbers.includes(cfnum)) { - faxboxNumbers[fbid].push(cfnum); //add the number (if it's a DID) to the list for this faxbox ID - } - }); - if (faxboxNumbers[fbid] && faxboxNumbers[fbid].length == 0) { //this faxbox has no DIDs routing to it - console.log('Warning: faxbox '+fbid+' has no DIDs routing to it!'); + var faxCallflows = _.filter(callflows, function(cf) { //ignore non-faxbox callflows + return cf.modules.includes('faxbox'); + }); + if (faxCallflows.length == 0) resolve(); + _.each(faxCallflows, function(cf, idx) { + self.getCallflow(cf.id, function(callflow) { //this callflow has faxbox, so get it for details + var fbid = findFaxboxId(callflow.flow); //search for the faxbox ID + if (fbid) faxboxNumbers[fbid] = []; + _.each(cf.numbers, function(cfnum) { //check each callflow number to see if it's a real DID + if (numbers.includes(cfnum)) { + faxboxNumbers[fbid].push(cfnum); //add the number (if it's a DID) to the list for this faxbox ID } }); - } - if ((idx + 1) == callflows.length) resolve(); //processed all callflows so we're done + if (faxboxNumbers[fbid] && faxboxNumbers[fbid].length == 0) { //this faxbox has no DIDs routing to it + console.log('Warning: faxbox '+fbid+' has no DIDs routing to it!'); + } + if ((idx + 1) == faxCallflows.length) resolve(); //processed all callflows so we're done + }); }); }); done.then(() => { diff --git a/i18n/de-DE.json b/i18n/de-DE.json index e0abe89..c5377bc 100644 --- a/i18n/de-DE.json +++ b/i18n/de-DE.json @@ -82,6 +82,7 @@ "enterToNumber": "Enter Fax To Number", "fromNumber": "From Number", "fromNumberAll": "From Number [All Numbers]", + "help": "After a fax has been queued, please allow several minutes for it to send before expecting it to be available in the outbound faxes table below.", "missingFile": "You must choose a PDF or TIFF file to send", "missingFrom": "You must select the source number.", "missingTo": "You must enter the destination fax number.", diff --git a/i18n/en-US.json b/i18n/en-US.json index 0002bed..8effc27 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -12,6 +12,7 @@ "enterToNumber": "Enter Fax To Number", "fromNumber": "From Number", "fromNumberAll": "From Number [All Numbers]", + "help": "After a fax has been queued, please allow several minutes for it to send before expecting it to be available in the outbound faxes table below.", "missingFile": "You must choose a PDF or TIFF file to send", "missingFrom": "You must select the source number.", "missingTo": "You must enter the destination fax number.", diff --git a/style/app.css b/style/app.css index 7dfc524..c3c6159 100644 --- a/style/app.css +++ b/style/app.css @@ -217,3 +217,18 @@ flex-direction: row; align-items: center; } + +.sendbutton-help { + display: flex; + flex-direction: row; +} + +button.sendbutton-help { + font-size: +1.6em; +} + +#send_help { + font-size: +1.5em; + margin-left: 12px; + color: #555; +} diff --git a/style/app.scss b/style/app.scss index 1648aac..6598e29 100644 --- a/style/app.scss +++ b/style/app.scss @@ -261,3 +261,18 @@ flex-direction: row; align-items: center; } + +.sendbutton-help { + display: flex; + flex-direction: row; +} + +button.sendbutton-help { + font-size: +1.6em; +} + +#send_help { + font-size: +1.5em; + margin-left: 12px; + color: #555; +} diff --git a/views/outbound-faxes.html b/views/outbound-faxes.html index b81b67a..ed6f6b1 100644 --- a/views/outbound-faxes.html +++ b/views/outbound-faxes.html @@ -39,7 +39,7 @@ - +