From 1b8fa76d37e79c2bd04ecf511bbf6332a31feabd Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 27 Oct 2023 11:44:57 +0800 Subject: [PATCH] feat(notifications): add dynamic notifications support. --- .../notifications/definitions/groups/index.ts | 40 + .../definitions/groups/model/index.ts | 23 + .../definitions/notifications/index.ts | 40 + .../definitions/notifications/model/index.ts | 43 + .../src/api/realtime/notifications/index.ts | 51 + .../api/realtime/notifications/model/index.ts | 19 + .../notifications/subscribes/index.ts | 23 + .../notifications/subscribes/model/index.ts | 14 + .../api/realtime/notifications/types/index.ts | 60 + .../components/GroupDefinitionModal.vue | 215 + .../components/GroupDefinitionTable.vue | 149 + .../definitions/groups/datas/ModalData.ts | 15 + .../definitions/groups/datas/TableData.ts | 43 + .../definitions/groups/index.vue | 16 + .../NotificationDefinitionModal.vue | 338 ++ .../NotificationDefinitionTable.vue | 288 + .../components/NotificationSendModal.vue | 307 + .../notifications/datas/ModalData.ts | 50 + .../notifications/datas/TableData.ts | 91 + .../hooks/useNotificationDefinition.ts | 115 + .../definitions/notifications/index.vue | 16 + ...d-With-Notification-Definition.Designer.cs | 5314 +++++++++++++++++ ..._Add-Field-With-Notification-Definition.cs | 29 + .../SingleMigrationsDbContextModelSnapshot.cs | 3 + .../NotificationGroupDefinitionCreateDto.cs | 11 + ...icationGroupDefinitionCreateOrUpdateDto.cs | 19 + .../Dto/NotificationGroupDefinitionDto.cs | 12 + ...NotificationGroupDefinitionGetListInput.cs | 5 + .../NotificationGroupDefinitionUpdateDto.cs | 4 + .../INotificationGroupDefinitionAppService.cs | 18 + .../Dto/NotificationDefinitionCreateDto.cs | 15 + ...NotificationDefinitionCreateOrUpdateDto.cs | 31 + .../Dto/NotificationDefinitionDto.cs | 29 + .../Dto/NotificationDefinitionGetListInput.cs | 11 + .../Dto/NotificationDefinitionUpdateDto.cs | 4 + .../INotificationDefinitionAppService.cs | 13 + .../Notifications/Dto/NotificationSendDto.cs | 42 +- .../Dto/NotificationTemplateSendDto.cs | 4 + .../Notifications/INotificationAppService.cs | 2 + .../Permissions/NotificationsPermissions.cs | 20 +- ...ificationsPermissionsDefinitionProvider.cs | 35 + .../AbpNotificationsApplicationModule.cs | 5 +- .../AbpNotificationsApplicationServiceBase.cs | 13 +- .../NotificationGroupDefinitionAppService.cs | 219 + .../NotificationDefinitionAppService.cs | 301 + .../Notifications/MyNotificationAppService.cs | 3 +- .../Notifications/MySubscriptionAppService.cs | 3 +- .../Notifications/NotificationAppService.cs | 68 +- ...pNotificationTemplateDefinitionProvider.cs | 13 +- .../IDynamicNotificationDefinitionStore.cs | 2 + .../INotificationDefinitionManager.cs | 2 + .../IStaticNotificationDefinitionStore.cs | 2 + .../Notifications/NotificationDefinition.cs | 7 + .../NotificationDefinitionManager.cs | 10 +- .../NotificationGroupDefinition.cs | 10 +- .../NullDynamicNotificationDefinitionStore.cs | 6 + .../StaticNotificationDefinitionStore.cs | 9 +- .../Localization/DomainShared/en.json | 45 +- .../Localization/DomainShared/zh-Hans.json | 45 +- .../NotificationDefinitionRecordConsts.cs | 1 + .../Notifications/NotificationsErrorCodes.cs | 58 +- ...amicNotificationDefinitionInMemoryCache.cs | 36 +- .../DynamicNotificationDefinitionStore.cs | 14 + ...ficationDefinitionStoreCacheInvalidator.cs | 66 + ...DynamicNotificationDefinitionStoreCache.cs | 2 + ...ficationDefinitionGroupRecordRepository.cs | 3 + ...INotificationDefinitionRecordRepository.cs | 3 + .../NotificationDefinitionGroupRecord.cs | 20 + .../NotificationDefinitionRecord.cs | 66 + .../NotificationDefinitionSerializer.cs | 1 + ...ficationDefinitionGroupRecordRepository.cs | 14 +- ...eNotificationDefinitionRecordRepository.cs | 13 +- .../NotificationGroupDefinitionController.cs | 59 + .../NotificationDefinitionController.cs | 59 + .../Notifications/NotificationController.cs | 20 +- .../Localization/Resources/en.json | 13 + .../Localization/Resources/zh-Hans.json | 13 + .../BackgroundJobs/NotificationPublishJob.cs | 44 + .../NotificationPublishJobArgs.cs | 22 + .../Distributed/ChatMessageEventHandler.cs | 59 + .../Distributed/NotificationEventHandler.cs | 467 ++ .../Distributed/TenantSynchronizer.cs | 53 + .../Distributed/UserCreateEventHandler.cs | 30 + .../Local/UserCreateJoinIMEventHandler.cs | 58 + .../UserCreateSendWelcomeEventHandler.cs | 69 + ...rviceApplicationsSingleModule.Configure.cs | 12 + .../MicroServiceApplicationsSingleModule.cs | 1 + .../MultiTenancy/ITenantConfigurationCache.cs | 10 + .../MultiTenancy/TenantConfigurationCache.cs | 59 + .../TenantConfigurationCacheItem.cs | 19 + .../FolderProfile1.pubxml.user | 2 +- 91 files changed, 9580 insertions(+), 126 deletions(-) create mode 100644 apps/vue/src/api/realtime/notifications/definitions/groups/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/definitions/groups/model/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/definitions/notifications/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/definitions/notifications/model/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/model/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/subscribes/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/subscribes/model/index.ts create mode 100644 apps/vue/src/api/realtime/notifications/types/index.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionModal.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionTable.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/groups/datas/ModalData.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/groups/datas/TableData.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/groups/index.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionModal.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/datas/ModalData.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/datas/TableData.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/hooks/useNotificationDefinition.ts create mode 100644 apps/vue/src/views/realtime/notifications/definitions/notifications/index.vue create mode 100644 aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231026015443_Add-Field-With-Notification-Definition.Designer.cs create mode 100644 aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231026015443_Add-Field-With-Notification-Definition.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/Dto/NotificationGroupDefinitionCreateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/Dto/NotificationGroupDefinitionCreateOrUpdateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/Dto/NotificationGroupDefinitionDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/Dto/NotificationGroupDefinitionGetListInput.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/Dto/NotificationGroupDefinitionUpdateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Groups/INotificationGroupDefinitionAppService.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/Dto/NotificationDefinitionCreateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/Dto/NotificationDefinitionCreateOrUpdateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/Dto/NotificationDefinitionDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/Dto/NotificationDefinitionGetListInput.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/Dto/NotificationDefinitionUpdateDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Definitions/Notifications/INotificationDefinitionAppService.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/Dto/NotificationTemplateSendDto.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionAppService.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionAppService.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/DynamicNotificationDefinitionStoreCacheInvalidator.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/Definitions/Groups/NotificationGroupDefinitionController.cs create mode 100644 aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/Definitions/Notifications/NotificationDefinitionController.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/BackgroundJobs/NotificationPublishJob.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/BackgroundJobs/NotificationPublishJobArgs.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Distributed/ChatMessageEventHandler.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Distributed/NotificationEventHandler.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Distributed/TenantSynchronizer.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Distributed/UserCreateEventHandler.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Local/UserCreateJoinIMEventHandler.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/EventBus/Local/UserCreateSendWelcomeEventHandler.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/MultiTenancy/ITenantConfigurationCache.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/MultiTenancy/TenantConfigurationCache.cs create mode 100644 aspnet-core/services/LY.MicroService.Applications.Single/MultiTenancy/TenantConfigurationCacheItem.cs diff --git a/apps/vue/src/api/realtime/notifications/definitions/groups/index.ts b/apps/vue/src/api/realtime/notifications/definitions/groups/index.ts new file mode 100644 index 000000000..a94f9ac84 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/definitions/groups/index.ts @@ -0,0 +1,40 @@ +import { defHttp } from '/@/utils/http/axios'; +import { + NotificationGroupDefinitionDto, + NotificationGroupDefinitionCreateDto, + NotificationGroupDefinitionUpdateDto, + NotificationGroupDefinitionGetListInput, +} from './model'; + +export const CreateAsyncByInput = (input: NotificationGroupDefinitionCreateDto) => { + return defHttp.post({ + url: '/api/notifications/definitions/groups', + data: input, + }); +}; + +export const DeleteAsyncByName = (name: string) => { + return defHttp.delete({ + url: `/api/notifications/definitions/groups/${name}`, + }); +}; + +export const GetAsyncByName = (name: string) => { + return defHttp.get({ + url: `/api/notifications/definitions/groups/${name}`, + }); +}; + +export const GetListAsyncByInput = (input: NotificationGroupDefinitionGetListInput) => { + return defHttp.get>({ + url: '/api/notifications/definitions/groups', + params: input, + }); +}; + +export const UpdateAsyncByNameAndInput = (name: string, input: NotificationGroupDefinitionUpdateDto) => { + return defHttp.put({ + url: `/api/notifications/definitions/groups/${name}`, + data: input, + }); +}; diff --git a/apps/vue/src/api/realtime/notifications/definitions/groups/model/index.ts b/apps/vue/src/api/realtime/notifications/definitions/groups/model/index.ts new file mode 100644 index 000000000..f1a5a5516 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/definitions/groups/model/index.ts @@ -0,0 +1,23 @@ +interface NotificationGroupDefinitionCreateOrUpdateDto extends IHasExtraProperties { + displayName: string; + description?: string; + allowSubscriptionToClients: boolean; +} + +export interface NotificationGroupDefinitionCreateDto extends NotificationGroupDefinitionCreateOrUpdateDto { + name: string; +} + +export interface NotificationGroupDefinitionDto extends ExtensibleObject { + name: string; + displayName: string; + description?: string; + isStatic: boolean; + allowSubscriptionToClients: boolean; +} + +export interface NotificationGroupDefinitionGetListInput { + filter?: string; +} + +export type NotificationGroupDefinitionUpdateDto = NotificationGroupDefinitionCreateOrUpdateDto; diff --git a/apps/vue/src/api/realtime/notifications/definitions/notifications/index.ts b/apps/vue/src/api/realtime/notifications/definitions/notifications/index.ts new file mode 100644 index 000000000..f31a12bc7 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/definitions/notifications/index.ts @@ -0,0 +1,40 @@ +import { defHttp } from '/@/utils/http/axios'; +import { + NotificationDefinitionDto, + NotificationDefinitionCreateDto, + NotificationDefinitionUpdateDto, + NotificationDefinitionGetListInput, +} from './model'; + +export const CreateAsyncByInput = (input: NotificationDefinitionCreateDto) => { + return defHttp.post({ + url: '/api/notifications/definitions/notifications', + data: input, + }); +}; + +export const DeleteAsyncByName = (name: string) => { + return defHttp.delete({ + url: `/api/notifications/definitions/notifications/${name}`, + }); +}; + +export const GetAsyncByName = (name: string) => { + return defHttp.get({ + url: `/api/notifications/definitions/notifications/${name}`, + }); +}; + +export const GetListAsyncByInput = (input: NotificationDefinitionGetListInput) => { + return defHttp.get>({ + url: '/api/notifications/definitions/notifications', + params: input, + }); +}; + +export const UpdateAsyncByNameAndInput = (name: string, input: NotificationDefinitionUpdateDto) => { + return defHttp.put({ + url: `/api/notifications/definitions/notifications/${name}`, + data: input, + }); +}; diff --git a/apps/vue/src/api/realtime/notifications/definitions/notifications/model/index.ts b/apps/vue/src/api/realtime/notifications/definitions/notifications/model/index.ts new file mode 100644 index 000000000..4da093f55 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/definitions/notifications/model/index.ts @@ -0,0 +1,43 @@ +import { NotificationContentType, NotificationLifetime, NotificationType } from "../../../types"; + +interface NotificationDefinitionCreateOrUpdateDto extends IHasExtraProperties { + displayName: string; + description?: string; + template?: string; + allowSubscriptionToClients: boolean; + notificationType: NotificationType; + contentType: NotificationContentType; + notificationLifetime: NotificationLifetime; + providers: string[]; +} + +export interface NotificationDefinitionCreateDto extends NotificationDefinitionCreateOrUpdateDto { + name: string; + groupName: string; +} + +export interface NotificationDefinitionDto extends ExtensibleObject { + name: string; + groupName: string; + isStatic: boolean; + displayName: string; + description?: string; + template?: string; + allowSubscriptionToClients: boolean; + notificationType: NotificationType; + contentType: NotificationContentType; + notificationLifetime: NotificationLifetime; + providers: string[]; +} + +export interface NotificationDefinitionGetListInput { + filter?: string; + groupName?: string; + template?: string; + allowSubscriptionToClients?: boolean; + notificationType?: NotificationType; + contentType?: NotificationContentType; + notificationLifetime?: NotificationLifetime; +} + +export type NotificationDefinitionUpdateDto = NotificationDefinitionCreateOrUpdateDto; diff --git a/apps/vue/src/api/realtime/notifications/index.ts b/apps/vue/src/api/realtime/notifications/index.ts new file mode 100644 index 000000000..888d21bb6 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/index.ts @@ -0,0 +1,51 @@ +import { defHttp } from '/@/utils/http/axios'; +import { + GetNotificationPagedRequest, NotificationSendDto, +} from './model'; +import { NotificationGroup, NotificationInfo, NotificationReadState } from './types'; + +export const markReadState = ( + ids: string[], + state: NotificationReadState = NotificationReadState.Read, +) => { + return defHttp.put({ + url: '/api/notifications/my-notifilers/mark-read-state', + data: { + idList: ids, + state: state, + }, + }); +}; + +export const deleteById = (id: string) => { + return defHttp.delete({ + url: `/api/notifications/my-notifilers/${id}`, + }); +}; + +export const getList = (input: GetNotificationPagedRequest) => { + return defHttp.get>({ + url: '/api/notifications/my-notifilers', + params: input, + }); +}; + +export const getAssignableNotifiers = () => { + return defHttp.get>({ + url: '/api/notifications/assignables', + }); +}; + +export const send = (input: NotificationSendDto) => { + return defHttp.post({ + url: '/api/notifications/send', + data: input, + }); +} + +export const sendTemplate = (input: NotificationSendDto) => { + return defHttp.post({ + url: '/api/notifications/send/template', + data: input, + }); +} diff --git a/apps/vue/src/api/realtime/notifications/model/index.ts b/apps/vue/src/api/realtime/notifications/model/index.ts new file mode 100644 index 000000000..5e95b5cc5 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/model/index.ts @@ -0,0 +1,19 @@ +import { NotificationReadState, NotificationSeverity } from "../types"; + +export interface GetNotificationPagedRequest extends PagedAndSortedResultRequestDto { + reverse?: boolean; + readState?: NotificationReadState; +} + +export interface UserIdentifier { + userId: string; + userName?: string; +} + +export interface NotificationSendDto { + name: string; + culture?: string; + toUsers?: UserIdentifier[]; + severity?: NotificationSeverity; + data: Dictionary; +} diff --git a/apps/vue/src/api/realtime/notifications/subscribes/index.ts b/apps/vue/src/api/realtime/notifications/subscribes/index.ts new file mode 100644 index 000000000..5b1f5a89a --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/subscribes/index.ts @@ -0,0 +1,23 @@ +import { defHttp } from '/@/utils/http/axios'; +import { UserSubscreNotificationListResult } from './model'; + +export const getAll = () => { + return defHttp.get({ + url: '/api/notifications/my-subscribes/all', + }); +}; + +export const subscribe = (name: string) => { + return defHttp.post({ + url: '/api/notifications/my-subscribes', + data: { + name: name, + }, + }); +}; + +export const unSubscribe = (name: string) => { + return defHttp.delete({ + url: `/api/notifications/my-subscribes?name=${name}`, + }); +}; diff --git a/apps/vue/src/api/realtime/notifications/subscribes/model/index.ts b/apps/vue/src/api/realtime/notifications/subscribes/model/index.ts new file mode 100644 index 000000000..4c3efcbbf --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/subscribes/model/index.ts @@ -0,0 +1,14 @@ +export interface UserSubscreNotification { + name: string; +} + +export interface UserSubscriptionsResult { + isSubscribed: boolean; +} + +export interface GetSubscriptionsPagedRequest extends PagedAndSortedResultRequestDto {} + +export interface UserSubscreNotificationPagedResult + extends PagedResultDto {} + +export interface UserSubscreNotificationListResult extends ListResultDto {} diff --git a/apps/vue/src/api/realtime/notifications/types/index.ts b/apps/vue/src/api/realtime/notifications/types/index.ts new file mode 100644 index 000000000..cb7669252 --- /dev/null +++ b/apps/vue/src/api/realtime/notifications/types/index.ts @@ -0,0 +1,60 @@ +export enum NotificationLifetime { + Persistent = 0, + OnlyOne = 1, +} + +export enum NotificationType { + Application = 0, + System = 10, + User = 20, + ServiceCallback = 30, +} + +export enum NotificationContentType { + Text = 0, + Html = 1, + Markdown = 2, + Json = 3, +} + +export enum NotificationSeverity { + Success = 0, + Info = 10, + Warn = 20, + Error = 30, + Fatal = 40, +} + +export enum NotificationReadState { + Read = 0, + UnRead = 1, +} + +export interface NotificationData { + type: string; + extraProperties: { [key: string]: any }; +} + +export interface NotificationInfo { + // tenantId?: string; + name: string; + id: string; + data: NotificationData; + creationTime: Date; + lifetime: NotificationLifetime; + type: NotificationType; + severity: NotificationSeverity; + contentType: NotificationContentType; +} + +export interface NotificationGroup { + name: string; + displayName: string; + notifications: { + name: string; + displayName: string; + description: string; + type: NotificationType; + lifetime: NotificationLifetime; + }[]; +} diff --git a/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionModal.vue b/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionModal.vue new file mode 100644 index 000000000..18f4fdd0b --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionModal.vue @@ -0,0 +1,215 @@ + + + + + \ No newline at end of file diff --git a/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionTable.vue b/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionTable.vue new file mode 100644 index 000000000..543d95714 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/groups/components/GroupDefinitionTable.vue @@ -0,0 +1,149 @@ + + + diff --git a/apps/vue/src/views/realtime/notifications/definitions/groups/datas/ModalData.ts b/apps/vue/src/views/realtime/notifications/definitions/groups/datas/ModalData.ts new file mode 100644 index 000000000..958a47493 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/groups/datas/ModalData.ts @@ -0,0 +1,15 @@ +import { useLocalization } from '/@/hooks/abp/useLocalization'; +import { FormSchema } from '/@/components/Form'; + +const { L } = useLocalization(['AbpUi']); + +export function getSearchFormSchemas():FormSchema[] { + return [ + { + field: 'filter', + component: 'Input', + label: L('Search'), + colProps: { span: 24 }, + }, + ]; +} diff --git a/apps/vue/src/views/realtime/notifications/definitions/groups/datas/TableData.ts b/apps/vue/src/views/realtime/notifications/definitions/groups/datas/TableData.ts new file mode 100644 index 000000000..e9331e7bf --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/groups/datas/TableData.ts @@ -0,0 +1,43 @@ +import { useLocalization } from '/@/hooks/abp/useLocalization'; +import { BasicColumn } from '/@/components/Table'; +import { sorter } from '/@/utils/table'; + +const { L } = useLocalization(['Notifications']); + +export function getDataColumns(): BasicColumn[] { + return [ + { + title: L('DisplayName:Name'), + dataIndex: 'name', + align: 'left', + width: 350, + resizable: true, + sorter: (a, b) => sorter(a, b, 'name'), + }, + { + title: L('DisplayName:DisplayName'), + dataIndex: 'displayName', + align: 'left', + width: 180, + resizable: true, + sorter: (a, b) => sorter(a, b, 'displayName'), + }, + { + title: L('DisplayName:Description'), + dataIndex: 'description', + align: 'left', + width: 280, + resizable: true, + sorter: (a, b) => sorter(a, b, 'description'), + }, + { + title: L('DisplayName:IsStatic'), + dataIndex: 'isStatic', + align: 'center', + width: 150, + resizable: true, + defaultHidden: true, + sorter: (a, b) => sorter(a, b, 'isStatic'), + }, + ]; +} diff --git a/apps/vue/src/views/realtime/notifications/definitions/groups/index.vue b/apps/vue/src/views/realtime/notifications/definitions/groups/index.vue new file mode 100644 index 000000000..7525f1d96 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/groups/index.vue @@ -0,0 +1,16 @@ + + + diff --git a/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionModal.vue b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionModal.vue new file mode 100644 index 000000000..612f8e263 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionModal.vue @@ -0,0 +1,338 @@ + + + + + \ No newline at end of file diff --git a/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue new file mode 100644 index 000000000..4f682bc23 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationDefinitionTable.vue @@ -0,0 +1,288 @@ + + + diff --git a/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue new file mode 100644 index 000000000..83113b834 --- /dev/null +++ b/apps/vue/src/views/realtime/notifications/definitions/notifications/components/NotificationSendModal.vue @@ -0,0 +1,307 @@ +