This commit is contained in:
@@ -280,7 +280,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
//TODO: this is shitty, needs to mention notifications to be maximally useful
|
||||
if (await ct.NotifySubscription.AnyAsync(z => z.AttachReportId == inObj.Id) == true)
|
||||
if (await ct.NotifySubscription.AnyAsync(z => z.LinkToReportId == inObj.Id) == true)
|
||||
{
|
||||
AddError(ApiErrorCode.INVALID_OPERATION, null, "LT:ErrorDBForeignKeyViolation");
|
||||
return;
|
||||
@@ -396,18 +396,23 @@ namespace AyaNova.Biz
|
||||
await page.AddScriptTagAsync(new AddTagOptions() { Content = report.JsHelpers });
|
||||
await page.AddStyleTagAsync(new AddTagOptions() { Content = report.Style });
|
||||
|
||||
//add Client meta data
|
||||
//Client meta data
|
||||
var clientMeta = "{}";
|
||||
if (reportParam.ClientMeta != null)
|
||||
clientMeta = reportParam.ClientMeta.ToString();
|
||||
|
||||
//add Server meta data
|
||||
//Server meta data
|
||||
var serverMeta = $"{{ayApiUrl:`{apiUrl}`}}";
|
||||
|
||||
//add Report meta data
|
||||
//Report meta data
|
||||
var reportMeta = $"{{Id:{report.Id},Name:`{report.Name}`,Notes:`{report.Notes}`,ObjectType:`{report.ObjectType}`,DataListKey:`{reportParam.DataListKey}`,ListView:`{reportParam.ListView}`,SelectedRowIds: `{string.Join(",", reportParam.SelectedRowIds)}`}}";
|
||||
|
||||
|
||||
//duplicate meta data in report page wide variable for use by our internal functions
|
||||
await page.AddScriptTagAsync(new AddTagOptions() { Content = $"var AYMETA={{ ayReportMetaData:{reportMeta}, ayClientMetaData:{clientMeta}, ayServerMetaData:{serverMeta} }}" });
|
||||
|
||||
|
||||
|
||||
#if (DEBUG)
|
||||
//view page contents
|
||||
var pagecontent = await page.GetContentAsync();
|
||||
|
||||
Reference in New Issue
Block a user