Skip to content

Commit

Permalink
Fix Notification Service (#2186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fosol committed Aug 16, 2024
1 parent 96ff9a3 commit 3ccfec5
Show file tree
Hide file tree
Showing 13 changed files with 8,216 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div style="font-size:22px; font-weight:500;"><p>@(Settings.Subject.ShowTodaysDate ? $" {ReportExtensions.GetTodaysDate():dd-MMM-yyyy}" : "")</p></div>
</a>

@if (Content.Count() == 0)
@if (Content.Count() == 0 && !ViewOnWebOnly)
{
<p>There is no content in this report.</p>
}
Expand Down
27 changes: 27 additions & 0 deletions libs/net/core/Extensions/IEnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,31 @@ public static IList<T> AppendRange<T>(this IEnumerable<T> list, IEnumerable<T> a
result.AddRange(add);
return result;
}

/// <summary>
/// Handle async select.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TResult"></typeparam>
/// <param name="enumeration"></param>
/// <param name="func"></param>
/// <returns></returns>
public static async Task<IEnumerable<TResult>> SelectAsync<T, TResult>(
this IEnumerable<T> enumeration, Func<T, Task<TResult>> method)
{
return await Task.WhenAll(enumeration.Select(async s => await method(s)));
}

/// <summary>
/// Handle async select many.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="T1"></typeparam>
/// <param name="enumeration"></param>
/// <param name="func"></param>
/// <returns></returns>
public static async Task<IEnumerable<TResult>> SelectManyAsync<T, TResult>(this IEnumerable<T> enumeration, Func<T, Task<IEnumerable<TResult>>> func)
{
return (await Task.WhenAll(enumeration.Select(func))).SelectMany(s => s);
}
}
355 changes: 355 additions & 0 deletions libs/net/dal/Migrations/1.2.5/Down/PostDown/00-ReportTemplate.sql

Large diffs are not rendered by default.

355 changes: 355 additions & 0 deletions libs/net/dal/Migrations/1.2.5/Up/PostUp/00-ReportTemplate.sql

Large diffs are not rendered by default.

Loading

0 comments on commit 3ccfec5

Please sign in to comment.