Enhanced the group management system by introducing dynamic group capabilities, allowing for the exclusion of elements from dynamic groups. Updated the Group and GroupItem models to support a new GroupMode, enabling the distinction between static and dynamic groups. Implemented API endpoints for excluding elements and updated related services to handle group composition based on the selected mode. Improved the frontend to accommodate these changes, including new API functions and UI components for managing exclusions and group modes, thereby enhancing the overall user experience in group management.
18 lines
768 B
C#
18 lines
768 B
C#
using TeleWave.Application.Common.Interfaces;
|
|
using TeleWave.Application.Programming.Groups;
|
|
|
|
namespace TeleWave.Application.Tests.Support;
|
|
|
|
/// <summary>
|
|
/// Сборка сервисов группы для тестов: их четыре и они цепляются друг за друга, а в тестах нужен
|
|
/// каждый раз один и тот же набор. В приложении это делает контейнер.
|
|
/// </summary>
|
|
internal static class GroupServices
|
|
{
|
|
public static DynamicGroupResolver Dynamic(IAppDbContext db) =>
|
|
new(new GroupFilterMatcher(db), new GroupElementResolver(db));
|
|
|
|
public static GroupStatsService Stats(IAppDbContext db) =>
|
|
new(db, new GroupElementResolver(db), Dynamic(db));
|
|
}
|