case 4310 plus misc cleanup of ay-report as it's actually visible to users if they go into the file system
This commit is contained in:
@@ -1,78 +1 @@
|
|||||||
todo: clean up solutions.txt and research.txt and move into a consolidated coding focused how-to.md doc
|
todo: clean up solutions.txt and research.txt and move into a consolidated coding focused how-to.md doc
|
||||||
todo: test regular notification after case 4310 isn't broken by changes to mail delivery system
|
|
||||||
{[
|
|
||||||
{
|
|
||||||
"Id": 544,
|
|
||||||
"Concurrency": 41215321,
|
|
||||||
"Serial": 544,
|
|
||||||
"Notes": "top\nUpdated on render at Fri Nov 18 2022 15:34:53 GMT-0800 (Pacific Standard Time)",
|
|
||||||
"Wiki": null,
|
|
||||||
"CustomFields": {
|
|
||||||
"c1": "Here is some custom text",
|
|
||||||
"c2": "2022-11-18T08:00:00Z",
|
|
||||||
"c3": "true"
|
|
||||||
},
|
|
||||||
"Tags": [],
|
|
||||||
"CustomerId": 17,
|
|
||||||
"CustomerViz": "Adams, Gleason and Runolfsson",
|
|
||||||
"CustomerTechNotesViz": null,
|
|
||||||
"CustomerPhone1Viz": "697.907.8664 x7787",
|
|
||||||
"CustomerPhone2Viz": "(406) 837-7972 x321",
|
|
||||||
"CustomerPhone3Viz": "416-306-6458",
|
|
||||||
"CustomerPhone4Viz": "",
|
|
||||||
"CustomerPhone5Viz": "",
|
|
||||||
"CustomerEmailAddressViz": "johncrdnl@gmail.com",
|
|
||||||
"ProjectId": null,
|
|
||||||
"ProjectViz": null,
|
|
||||||
"InternalReferenceNumber": null,
|
|
||||||
"CustomerReferenceNumber": null,
|
|
||||||
"CustomerContactName": null,
|
|
||||||
"FromQuoteId": null,
|
|
||||||
"FromPMId": null,
|
|
||||||
"CreatedDate": "2022-11-18T19:10:26.870114Z",
|
|
||||||
"ServiceDate": "2022-11-18T19:10:20.989Z",
|
|
||||||
"CompleteByDate": null,
|
|
||||||
"DurationToCompleted": "00:00:00",
|
|
||||||
"InvoiceNumber": null,
|
|
||||||
"CustomerSignature": null,
|
|
||||||
"CustomerSignatureName": null,
|
|
||||||
"CustomerSignatureCaptured": null,
|
|
||||||
"TechSignature": null,
|
|
||||||
"TechSignatureName": null,
|
|
||||||
"TechSignatureCaptured": null,
|
|
||||||
"Onsite": true,
|
|
||||||
"ContractId": null,
|
|
||||||
"ContractViz": "-",
|
|
||||||
"LastStatusId": null,
|
|
||||||
"PostAddress": "6901 Langosh Village",
|
|
||||||
"PostCity": "Emardhaven",
|
|
||||||
"PostRegion": "Georgia",
|
|
||||||
"PostCountry": "Saint Vincent and the Grenadines",
|
|
||||||
"PostCode": "12106-4039",
|
|
||||||
"Address": "174 Yost Corners",
|
|
||||||
"City": "Emardhaven",
|
|
||||||
"Region": "Georgia",
|
|
||||||
"Country": "Saint Vincent and the Grenadines",
|
|
||||||
"Latitude": -81.341400,
|
|
||||||
"Longitude": 74.885800,
|
|
||||||
"Items": [],
|
|
||||||
"States": [],
|
|
||||||
"IsLockedAtServer": false,
|
|
||||||
"AlertViz": "",
|
|
||||||
"FromQuoteViz": null,
|
|
||||||
"FromPMViz": null,
|
|
||||||
"LastStateUserViz": null,
|
|
||||||
"LastStateNameViz": null,
|
|
||||||
"LastStateColorViz": null,
|
|
||||||
"LastStateCompletedViz": false,
|
|
||||||
"LastStateLockedViz": false,
|
|
||||||
"IsCompleteRecord": true,
|
|
||||||
"UserIsRestrictedType": false,
|
|
||||||
"UserIsTechRestricted": false,
|
|
||||||
"UserIsSubContractorFull": false,
|
|
||||||
"UserIsSubContractorRestricted": false,
|
|
||||||
"UserCanViewPartCosts": true,
|
|
||||||
"UserCanViewLaborOrTravelRateCosts": true,
|
|
||||||
"UserCanViewLoanerCosts": true
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
@@ -15,6 +15,7 @@ See the [upgrade instructions](ops-upgrade.md) section of this manual for detail
|
|||||||
#### Added
|
#### Added
|
||||||
|
|
||||||
- Server: Added new internal API route `/api/v8/notify/direct-smtp` to support on demand notification scenarios
|
- Server: Added new internal API route `/api/v8/notify/direct-smtp` to support on demand notification scenarios
|
||||||
|
- Server, App: log to AyaNova event log when User sends a direct smtp message using new notify API route, can be viewed in [Event history](adm-history.md)
|
||||||
- Server: Report api utility methods ayPutToAPI, ayPostToAPI, ayGetFromAPI was incorrectly throwing exception on empty return body (202, 204 results)
|
- Server: Report api utility methods ayPutToAPI, ayPostToAPI, ayGetFromAPI was incorrectly throwing exception on empty return body (202, 204 results)
|
||||||
- App: added `z_API send SMTP from work order report` example report to show how to use the new API notify via smpt method added to
|
- App: added `z_API send SMTP from work order report` example report to show how to use the new API notify via smpt method added to
|
||||||
send an email when a report is rendered automatically.
|
send an email when a report is rendered automatically.
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
/// Currently supported types are Customer, HeadOffice, Vendor, User
|
/// Currently supported types are Customer, HeadOffice, Vendor, User
|
||||||
/// WARNING: be careful using this method; high volume emailing or spam-like behavior
|
/// WARNING: be careful using this method; high volume emailing or spam-like behavior
|
||||||
/// could result in a ban or block of your mail account or mail server or domain
|
/// could result in a ban or block of your mail account or mail server or domain
|
||||||
///
|
/// Use of this method is logged to AyaNova event log on successful attempted delivery
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Accepted on success or error</returns>
|
/// <returns>Accepted on success or error</returns>
|
||||||
[HttpPost("direct-smtp")]
|
[HttpPost("direct-smtp")]
|
||||||
|
|||||||
@@ -147,8 +147,6 @@ Handlebars.registerHelper("ayConcat", function () {
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Turn a utc date into a displayable
|
// Turn a utc date into a displayable
|
||||||
// short date and time
|
// short date and time
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString
|
|
||||||
//(PRIVATE NOT DOCUMENTED, FOR HELPER USE)
|
|
||||||
//
|
//
|
||||||
function utcDateToShortDateAndTimeLocalized(ayValue) {
|
function utcDateToShortDateAndTimeLocalized(ayValue) {
|
||||||
if (!ayValue) {
|
if (!ayValue) {
|
||||||
@@ -177,7 +175,6 @@ function utcDateToShortDateAndTimeLocalized(ayValue) {
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Turn a utc date into a displayable
|
// Turn a utc date into a displayable
|
||||||
// short date
|
// short date
|
||||||
//(PRIVATE NOT DOCUMENTED, FOR HELPER USE)
|
|
||||||
function utcDateToShortDateLocalized(ayValue) {
|
function utcDateToShortDateLocalized(ayValue) {
|
||||||
if (!ayValue) {
|
if (!ayValue) {
|
||||||
return "";
|
return "";
|
||||||
@@ -203,7 +200,6 @@ function utcDateToShortDateLocalized(ayValue) {
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Turn a utc date into a displayable
|
// Turn a utc date into a displayable
|
||||||
// short time
|
// short time
|
||||||
//(PRIVATE NOT DOCUMENTED, FOR HELPER USE)
|
|
||||||
function utcDateToShortTimeLocalized(ayValue) {
|
function utcDateToShortTimeLocalized(ayValue) {
|
||||||
if (!ayValue) {
|
if (!ayValue) {
|
||||||
return "";
|
return "";
|
||||||
@@ -230,7 +226,6 @@ function utcDateToShortTimeLocalized(ayValue) {
|
|||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// CURRENCY LOCALIZATION
|
// CURRENCY LOCALIZATION
|
||||||
//(PRIVATE NOT DOCUMENTED, FOR HELPER USE)
|
|
||||||
//
|
//
|
||||||
function currencyLocalized(ayValue) {
|
function currencyLocalized(ayValue) {
|
||||||
if (!ayValue) {
|
if (!ayValue) {
|
||||||
@@ -247,7 +242,6 @@ function currencyLocalized(ayValue) {
|
|||||||
|
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// DECIMAL LOCALIZATION
|
// DECIMAL LOCALIZATION
|
||||||
//(PRIVATE NOT DOCUMENTED, FOR HELPER USE)
|
|
||||||
//
|
//
|
||||||
function decimalLocalized(ayValue) {
|
function decimalLocalized(ayValue) {
|
||||||
if (!ayValue) {
|
if (!ayValue) {
|
||||||
@@ -278,9 +272,6 @@ async function ayGetTranslations(keys) {
|
|||||||
ayTranslationKeyCache[item.key] = item.value;
|
ayTranslationKeyCache[item.key] = item.value;
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//fundamental error, can't proceed with this call
|
|
||||||
// handleError("GET", error, route);
|
|
||||||
//todo: deal with this properly
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -307,9 +298,6 @@ async function ayGetFromAPI(route, token) {
|
|||||||
});
|
});
|
||||||
return await extractBodyEx(r);
|
return await extractBodyEx(r);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//fundamental error, can't proceed with this call
|
|
||||||
// handleError("GET", error, route);
|
|
||||||
//todo: deal with this properly
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,12 +365,8 @@ async function ayPutToAPI(route, data, token) {
|
|||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// attachment download URL
|
// attachment download URL
|
||||||
// (PRIVATE NOT DOCUMENTED FOR HELPER USE)
|
// (INTERNAL USE NOT DOCUMENTED FOR HELPER USE)
|
||||||
function attachmentDownloadUrl(fileId, ctype) {
|
function attachmentDownloadUrl(fileId, ctype) {
|
||||||
//http://localhost:7575/api/v8/attachment/download/100?t=sssss
|
|
||||||
//Ctype is optional and is the MIME content type, used to detect image urls at client for drag and drop ops
|
|
||||||
//in wiki but ignored by server
|
|
||||||
|
|
||||||
let url =
|
let url =
|
||||||
"attachment/download/" +
|
"attachment/download/" +
|
||||||
fileId +
|
fileId +
|
||||||
@@ -459,10 +443,3 @@ function ayGroupByKey(reportDataArray, groupByKeyName) {
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// //Utils
|
|
||||||
// function ayPad(n, width, z) {
|
|
||||||
// z = z || "0";
|
|
||||||
// n = n + "";
|
|
||||||
// return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
|
|
||||||
// }
|
|
||||||
|
|||||||
Reference in New Issue
Block a user