Compare commits
2 Commits
c477eb5460
...
9c8d1aa1dc
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | 9c8d1aa1dc | |
Sofia Papacharalampous | 1d465955be |
|
@ -276,7 +276,7 @@ const appRoutes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'notifications',
|
path: 'notifications',
|
||||||
loadChildren: () => import('./ui/admin/notification/notification.module').then(m => m.NotificationModule),
|
loadChildren: () => import('@notification-service/ui/admin/notification/notification.module').then(m => m.NotificationModule),
|
||||||
data: {
|
data: {
|
||||||
authContext: {
|
authContext: {
|
||||||
permissions: [AppPermission.ViewNotificationPage]
|
permissions: [AppPermission.ViewNotificationPage]
|
||||||
|
@ -288,7 +288,7 @@ const appRoutes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'notification-templates',
|
path: 'notification-templates',
|
||||||
loadChildren: () => import('./ui/admin/notification-template/notification-template.module').then(m => m.NotificationTemplateModule),
|
loadChildren: () => import('@notification-service/ui/admin/notification-template/notification-template.module').then(m => m.NotificationTemplateModule),
|
||||||
data: {
|
data: {
|
||||||
authContext: {
|
authContext: {
|
||||||
permissions: [AppPermission.ViewNotificationTemplatePage]
|
permissions: [AppPermission.ViewNotificationTemplatePage]
|
||||||
|
@ -300,7 +300,7 @@ const appRoutes: Routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mine-notifications',
|
path: 'mine-notifications',
|
||||||
loadChildren: () => import('./ui/inapp-notification/mine-inapp-notification.module').then(m => m.MineInAppNotificationModule),
|
loadChildren: () => import('@notification-service/ui/inapp-notification/mine-inapp-notification.module').then(m => m.MineInAppNotificationModule),
|
||||||
data: {
|
data: {
|
||||||
authContext: {
|
authContext: {
|
||||||
permissions: [AppPermission.ViewMineInAppNotificationPage]
|
permissions: [AppPermission.ViewMineInAppNotificationPage]
|
||||||
|
|
|
@ -121,6 +121,7 @@ export function InstallationConfigurationFactory(appConfig: ConfigurationService
|
||||||
KeycloakAngularModule,
|
KeycloakAngularModule,
|
||||||
CoreServiceModule.forRoot(),
|
CoreServiceModule.forRoot(),
|
||||||
CoreAnnotationServiceModule.forRoot(),
|
CoreAnnotationServiceModule.forRoot(),
|
||||||
|
CoreNotificationServiceModule.forRoot(),
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
CommonUiModule,
|
CommonUiModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
export enum ContactInfoType {
|
|
||||||
Email = 0
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
export enum NotificationInAppTracking {
|
|
||||||
Stored = 0,
|
|
||||||
Delivered = 1
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
export enum NotificationNotifyState {
|
|
||||||
PENDING = 0,
|
|
||||||
PROCESSING = 1,
|
|
||||||
SUCCESSFUL = 2,
|
|
||||||
ERROR = 3,
|
|
||||||
OMITTED = 4
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
export enum NotificationTemplateChannel {
|
|
||||||
Email = 0,
|
|
||||||
InApp = 1,
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
export enum NotificationTemplateKind {
|
|
||||||
Draft = 0,
|
|
||||||
Secondary = 1,
|
|
||||||
Primary = 2,
|
|
||||||
Default = 3
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
export enum NotificationTrackingProcess {
|
|
||||||
PENDING = 0,
|
|
||||||
PROCESSING = 1,
|
|
||||||
SUCCESSFUL = 2,
|
|
||||||
ERROR = 3,
|
|
||||||
OMITTED = 4
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
export enum NotificationTrackingState {
|
|
||||||
UNDEFINED = 0,
|
|
||||||
NA = 1,
|
|
||||||
QUEUED = 2,
|
|
||||||
SENT = 3,
|
|
||||||
DELIVERED = 4,
|
|
||||||
UNDELIVERED = 5,
|
|
||||||
FAILED = 6,
|
|
||||||
UNSENT = 7
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
export enum NotificationType {
|
|
||||||
dmpInvitationExternalUserType = '065deecd-21bb-44af-9983-e660fdf24bc4',
|
|
||||||
dmpInvitationExistingUserType = '4904dea2-5079-46d3-83be-3a19c9ab45dc',
|
|
||||||
dmpModifiedType = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb',
|
|
||||||
dmpFinalisedType = '90db0b46-42de-bd89-aebf-6f27efeb256e',
|
|
||||||
descriptionModifiedType = '4fdbfa80-7a71-4a69-b854-67cbb70648f1',
|
|
||||||
descriptionFinalisedType = '33790bad-94d4-488a-8ee2-7f6295ca18ea',
|
|
||||||
mergeAccountConfirmationType = 'bfe68845-cb05-4c5a-a03d-29161a7c9660',
|
|
||||||
removeCredentialConfirmationType = 'c9bc3f16-057e-4bba-8a5f-36bd835e5604',
|
|
||||||
dmpDepositType = '55736f7a-83ab-4190-af43-9d031a6f9612',
|
|
||||||
descriptionTemplateInvitationType = '223bb607-efa1-4ce7-99ec-4beabfef9a8b',
|
|
||||||
contactSupportType = '5b1d6c52-88f9-418b-9b8a-6f1f963d9ead',
|
|
||||||
publicContactSupportType = 'b542b606-acc6-4629-adef-4d8ee2f01222'
|
|
||||||
|
|
||||||
}
|
|
|
@ -31,7 +31,6 @@ import { FileTransformerService } from './services/file-transformer/file-transfo
|
||||||
import { PrincipalService } from './services/http/principal.service';
|
import { PrincipalService } from './services/http/principal.service';
|
||||||
import { LanguageHttpService } from './services/language/language.http.service';
|
import { LanguageHttpService } from './services/language/language.http.service';
|
||||||
import { MaintenanceService } from './services/maintenance/maintenance.service';
|
import { MaintenanceService } from './services/maintenance/maintenance.service';
|
||||||
import { NotificationTemplateService } from './services/notification-template/notification-template.service';
|
|
||||||
import { ReferenceTypeService } from './services/reference-type/reference-type.service';
|
import { ReferenceTypeService } from './services/reference-type/reference-type.service';
|
||||||
import { ReferenceService } from './services/reference/reference.service';
|
import { ReferenceService } from './services/reference/reference.service';
|
||||||
import { SupportiveMaterialService } from './services/supportive-material/supportive-material.service';
|
import { SupportiveMaterialService } from './services/supportive-material/supportive-material.service';
|
||||||
|
@ -43,8 +42,6 @@ import { UserService } from './services/user/user.service';
|
||||||
import { FileUtils } from './services/utilities/file-utils.service';
|
import { FileUtils } from './services/utilities/file-utils.service';
|
||||||
import { QueryParamsService } from './services/utilities/query-params.service';
|
import { QueryParamsService } from './services/utilities/query-params.service';
|
||||||
import { FileTransformerHttpService } from './services/file-transformer/file-transformer.http.service';
|
import { FileTransformerHttpService } from './services/file-transformer/file-transformer.http.service';
|
||||||
import { InAppNotificationService } from './services/inapp-notification/inapp-notification.service';
|
|
||||||
import { NotificationService } from './services/notification/notification-service';
|
|
||||||
import { SemanticsService } from './services/semantic/semantics.service';
|
import { SemanticsService } from './services/semantic/semantics.service';
|
||||||
import { PrefillingSourceService } from './services/prefilling-source/prefilling-source.service';
|
import { PrefillingSourceService } from './services/prefilling-source/prefilling-source.service';
|
||||||
import { VisibilityRulesService } from '@app/ui/description/editor/description-form/visibility-rules/visibility-rules.service';
|
import { VisibilityRulesService } from '@app/ui/description/editor/description-form/visibility-rules/visibility-rules.service';
|
||||||
|
@ -106,13 +103,10 @@ export class CoreServiceModule {
|
||||||
DmpService,
|
DmpService,
|
||||||
DescriptionService,
|
DescriptionService,
|
||||||
MaintenanceService,
|
MaintenanceService,
|
||||||
NotificationTemplateService,
|
|
||||||
TagService,
|
TagService,
|
||||||
CanDeactivateGuard,
|
CanDeactivateGuard,
|
||||||
FileTransformerService,
|
FileTransformerService,
|
||||||
FileTransformerHttpService,
|
FileTransformerHttpService,
|
||||||
InAppNotificationService,
|
|
||||||
NotificationService,
|
|
||||||
SemanticsService,
|
SemanticsService,
|
||||||
PrefillingSourceService,
|
PrefillingSourceService,
|
||||||
VisibilityRulesService,
|
VisibilityRulesService,
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { User } from '../user/user';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
|
||||||
|
|
||||||
export interface InAppNotification {
|
|
||||||
id: Guid;
|
|
||||||
user: User;
|
|
||||||
isActive: IsActive;
|
|
||||||
type: Guid;
|
|
||||||
trackingState: NotificationInAppTracking;
|
|
||||||
subject: string;
|
|
||||||
body: string;
|
|
||||||
createdAt: Date;
|
|
||||||
updatedAt: Date;
|
|
||||||
hash: string;
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
import { NotificationTemplateChannel } from "@app/core/common/enum/notification-template-channel";
|
|
||||||
import { NotificationTemplateKind } from "@app/core/common/enum/notification-template-kind";
|
|
||||||
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
|
|
||||||
import { Guid } from "@common/types/guid";
|
|
||||||
import { NotificationDataType } from "@app/core/common/enum/notification-data-type";
|
|
||||||
import { EmailOverrideMode } from "@app/core/common/enum/email-override-mode";
|
|
||||||
import { NotificationType } from "@app/core/common/enum/notification-type";
|
|
||||||
|
|
||||||
export interface NotificationTemplate extends BaseEntity{
|
|
||||||
channel: NotificationTemplateChannel;
|
|
||||||
notificationType: NotificationType;
|
|
||||||
kind: NotificationTemplateKind;
|
|
||||||
languageCode: string;
|
|
||||||
value: NotificationTemplateValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationTemplateValue {
|
|
||||||
subjectText: string;
|
|
||||||
subjectKey: string;
|
|
||||||
subjectFieldOptions: NotificationFieldOptions;
|
|
||||||
bodyText: string;
|
|
||||||
bodyKey: string;
|
|
||||||
priorityKey: string;
|
|
||||||
allowAttachments: Boolean;
|
|
||||||
cc: string[];
|
|
||||||
ccMode: EmailOverrideMode;
|
|
||||||
bcc: string[];
|
|
||||||
bccMode: EmailOverrideMode;
|
|
||||||
extraDataKeys: string[];
|
|
||||||
bodyFieldOptions: NotificationFieldOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationFieldOptions {
|
|
||||||
mandatory?: string[];
|
|
||||||
optional?: NotificationFieldInfo[];
|
|
||||||
formatting?: { [key: string]: string };
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationFieldInfo {
|
|
||||||
key: string;
|
|
||||||
type: NotificationDataType,
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Persist
|
|
||||||
|
|
||||||
export interface NotificationTemplatePersist extends BaseEntityPersist{
|
|
||||||
channel: NotificationTemplateChannel;
|
|
||||||
notificationType: NotificationType;
|
|
||||||
kind: NotificationTemplateKind;
|
|
||||||
languageCode: string;
|
|
||||||
value: NotificationTemplateValuePersist;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationTemplateValuePersist {
|
|
||||||
subjectText: string;
|
|
||||||
subjectKey: string;
|
|
||||||
subjectFieldOptions: NotificationFieldOptionsPersist;
|
|
||||||
bodyText: string;
|
|
||||||
bodyKey: string;
|
|
||||||
priorityKey: string;
|
|
||||||
allowAttachments: Boolean;
|
|
||||||
cc: string[];
|
|
||||||
ccMode: EmailOverrideMode;
|
|
||||||
bcc: string[];
|
|
||||||
bccMode: EmailOverrideMode;
|
|
||||||
extraDataKeys: string[];
|
|
||||||
bodyFieldOptions: NotificationFieldOptionsPersist;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationFieldOptionsPersist {
|
|
||||||
mandatory?: string[];
|
|
||||||
optional?: NotificationFieldInfoPersist[];
|
|
||||||
formatting?: { [key: string]: string };
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationFieldInfoPersist {
|
|
||||||
key: string;
|
|
||||||
type: NotificationDataType,
|
|
||||||
value: string;
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
import { NotificationContactType } from '@app/core/common/enum/notification-contact-type';
|
|
||||||
import { User } from '../user/user';
|
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
|
||||||
import { BaseEntity } from '@common/base/base-entity.model';
|
|
||||||
import { NotificationNotifyState } from '@app/core/common/enum/notification-notify-state';
|
|
||||||
import { NotificationTrackingProcess } from '@app/core/common/enum/notification-tracking-process';
|
|
||||||
import { NotificationTrackingState } from '@app/core/common/enum/notification-tracking-state';
|
|
||||||
|
|
||||||
export interface Notification extends BaseEntity{
|
|
||||||
user: User;
|
|
||||||
type: NotificationType;
|
|
||||||
contactTypeHint: NotificationContactType;
|
|
||||||
contactHint: string;
|
|
||||||
data: string;
|
|
||||||
notifyState: NotificationNotifyState;
|
|
||||||
notifiedWith: NotificationContactType;
|
|
||||||
notifiedAt: Date;
|
|
||||||
retryCount: number;
|
|
||||||
trackingState: NotificationTrackingState;
|
|
||||||
trackingProcess: NotificationTrackingProcess;
|
|
||||||
trackingData: string;
|
|
||||||
}
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { ContactInfoType } from "@app/core/common/enum/contact-info-type";
|
|
||||||
import { RoleOrganizationType } from "@app/core/common/enum/role-organization-type";
|
import { RoleOrganizationType } from "@app/core/common/enum/role-organization-type";
|
||||||
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
|
import { BaseEntity, BaseEntityPersist } from "@common/base/base-entity.model";
|
||||||
import { Guid } from "@common/types/guid";
|
import { Guid } from "@common/types/guid";
|
||||||
import { Reference } from "../reference/reference";
|
import { Reference } from "../reference/reference";
|
||||||
|
import { ContactInfoType } from "@notification-service/core/enum/contact-info-type.enum";
|
||||||
|
|
||||||
export interface User extends BaseEntity {
|
export interface User extends BaseEntity {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -10,17 +10,7 @@ import { DmpBlueprintStatus } from '@app/core/common/enum/dmp-blueprint-status';
|
||||||
import { DmpBlueprintSystemFieldType } from '@app/core/common/enum/dmp-blueprint-system-field-type';
|
import { DmpBlueprintSystemFieldType } from '@app/core/common/enum/dmp-blueprint-system-field-type';
|
||||||
import { DmpContactType } from '@app/core/common/enum/dmp-contact-type';
|
import { DmpContactType } from '@app/core/common/enum/dmp-contact-type';
|
||||||
import { DmpUserRole } from '@app/core/common/enum/dmp-user-role';
|
import { DmpUserRole } from '@app/core/common/enum/dmp-user-role';
|
||||||
import { EmailOverrideMode } from '@app/core/common/enum/email-override-mode';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { NotificationContactType } from '@app/core/common/enum/notification-contact-type';
|
|
||||||
import { NotificationDataType } from '@app/core/common/enum/notification-data-type';
|
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
|
||||||
import { NotificationNotifyState } from '@app/core/common/enum/notification-notify-state';
|
|
||||||
import { NotificationTemplateChannel } from '@app/core/common/enum/notification-template-channel';
|
|
||||||
import { NotificationTemplateKind } from '@app/core/common/enum/notification-template-kind';
|
|
||||||
import { NotificationTrackingProcess } from '@app/core/common/enum/notification-tracking-process';
|
|
||||||
import { NotificationTrackingState } from '@app/core/common/enum/notification-tracking-state';
|
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
|
||||||
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
||||||
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
||||||
import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type';
|
import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type';
|
||||||
|
@ -234,40 +224,6 @@ export class EnumUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toNotificationTemplateKindString(status: NotificationTemplateKind): string {
|
|
||||||
switch (status) {
|
|
||||||
case NotificationTemplateKind.Draft: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.DRAFT');
|
|
||||||
case NotificationTemplateKind.Secondary: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.SECONDARY');
|
|
||||||
case NotificationTemplateKind.Primary: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.PRIMARY');
|
|
||||||
case NotificationTemplateKind.Default: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.DEFAULT');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toNotificationTemplateChannelString(status: NotificationTemplateChannel): string {
|
|
||||||
switch (status) {
|
|
||||||
case NotificationTemplateChannel.Email: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-CHANNEL.EMAIL');
|
|
||||||
case NotificationTemplateChannel.InApp: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-CHANNEL.INAPP');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toNotificationTemplateDataTypeString(status: NotificationDataType): string {
|
|
||||||
switch (status) {
|
|
||||||
case NotificationDataType.Integer: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.INTEGER');
|
|
||||||
case NotificationDataType.Demical: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DEMICAL');
|
|
||||||
case NotificationDataType.Double: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DOUBLE');
|
|
||||||
case NotificationDataType.DateTime: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DATE-TIME');
|
|
||||||
case NotificationDataType.String: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.STRING');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toEmailOverrideModeString(status: EmailOverrideMode): string {
|
|
||||||
switch (status) {
|
|
||||||
case EmailOverrideMode.NotOverride: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.NOT');
|
|
||||||
case EmailOverrideMode.Additive: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.ADDITIVE');
|
|
||||||
case EmailOverrideMode.Replace: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.REPLACE');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toRecentActivityOrderString(status: RecentActivityOrder): string {
|
toRecentActivityOrderString(status: RecentActivityOrder): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
// case RecentActivityOrder.CREATED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.CREATED');
|
// case RecentActivityOrder.CREATED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.CREATED');
|
||||||
|
@ -280,70 +236,6 @@ export class EnumUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toNotificationTypeString(status: NotificationType): string {
|
|
||||||
switch (status) {
|
|
||||||
case NotificationType.dmpInvitationExternalUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXTERNAL-USER');
|
|
||||||
case NotificationType.dmpInvitationExistingUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXISTING-USER');
|
|
||||||
case NotificationType.dmpModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-MODIFIED');
|
|
||||||
case NotificationType.dmpFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-FINALISED');
|
|
||||||
case NotificationType.descriptionModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-MODIFIED');
|
|
||||||
case NotificationType.descriptionFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-FINALISED');
|
|
||||||
case NotificationType.mergeAccountConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.MERGE-ACCOUNT-CONFIRMATION');
|
|
||||||
case NotificationType.removeCredentialConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.REMOVE-CREDENTIAL-CONFIRMATION');
|
|
||||||
case NotificationType.dmpDepositType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-DEPOSIT');
|
|
||||||
case NotificationType.descriptionTemplateInvitationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-TEMPLATE-INVITATION');
|
|
||||||
case NotificationType.contactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.CONTACT-SUPPORT');
|
|
||||||
case NotificationType.publicContactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PUBLIC-CONTACT-SUPPORT');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toNotificationInAppTrackingString(value: NotificationInAppTracking): string {
|
|
||||||
switch (value) {
|
|
||||||
case NotificationInAppTracking.Delivered: return this.language.instant('TYPES.NOTIFICATION-INAPP-TRACKING.DELIVERED');
|
|
||||||
case NotificationInAppTracking.Stored: return this.language.instant('TYPES.NOTIFICATION-INAPP-TRACKING.STORED');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toNotificationContactTypeString(value: NotificationContactType): string {
|
|
||||||
switch (value) {
|
|
||||||
case NotificationContactType.EMAIL: return this.language.instant('TYPES.NOTIFICATION-CONTACT-TYPE.EMAIL');
|
|
||||||
case NotificationContactType.IN_APP: return this.language.instant('TYPES.NOTIFICATION-CONTACT-TYPE.INAPP');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toNotificationNotifyStateString(value: NotificationNotifyState): string {
|
|
||||||
switch (value) {
|
|
||||||
case NotificationNotifyState.PENDING: return this.language.instant('TYPES.NOTIFICATION-NOTIFY-STATE.PENDING');
|
|
||||||
case NotificationNotifyState.PROCESSING: return this.language.instant('TYPES.NOTIFICATION-NOTIFY-STATE.PROCESSING');
|
|
||||||
case NotificationNotifyState.SUCCESSFUL: return this.language.instant('TYPES.NOTIFICATION-NOTIFY-STATE.SUCCESSFUL');
|
|
||||||
case NotificationNotifyState.ERROR: return this.language.instant('TYPES.NOTIFICATION-NOTIFY-STATE.ERROR');
|
|
||||||
case NotificationNotifyState.OMITTED: return this.language.instant('TYPES.NOTIFICATION-NOTIFY-STATE.OMITTED');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toNotificationTrackingStateString(value: NotificationTrackingState): string {
|
|
||||||
switch (value) {
|
|
||||||
case NotificationTrackingState.UNDEFINED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNDEFINED');
|
|
||||||
case NotificationTrackingState.NA: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.NA');
|
|
||||||
case NotificationTrackingState.QUEUED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.QUEUED');
|
|
||||||
case NotificationTrackingState.SENT: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.SENT');
|
|
||||||
case NotificationTrackingState.DELIVERED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.DELIVERED');
|
|
||||||
case NotificationTrackingState.UNDELIVERED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNDELIVERED');
|
|
||||||
case NotificationTrackingState.FAILED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.FAILED');
|
|
||||||
case NotificationTrackingState.UNSENT: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNSENT');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toNotificationTrackingProcessString(value: NotificationTrackingProcess): string {
|
|
||||||
switch (value) {
|
|
||||||
case NotificationTrackingProcess.PENDING: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.PENDING');
|
|
||||||
case NotificationTrackingProcess.PROCESSING: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.PROCESSING');
|
|
||||||
case NotificationTrackingProcess.SUCCESSFUL: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.SUCCESSFUL');
|
|
||||||
case NotificationTrackingProcess.ERROR: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.ERROR');
|
|
||||||
case NotificationTrackingProcess.OMITTED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.OMITTED');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public toDmpAccessTypeString(value: DmpAccessType): string {
|
public toDmpAccessTypeString(value: DmpAccessType): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case DmpAccessType.Public: return this.language.instant('TYPES.DMP-ACCESS-TYPE.PUBLIC');
|
case DmpAccessType.Public: return this.language.instant('TYPES.DMP-ACCESS-TYPE.PUBLIC');
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
::ng-deep.mat-mdc-menu-panel {
|
|
||||||
max-width: 100% !important;
|
|
||||||
height: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host::ng-deep.mat-mdc-menu-content:not(:empty) {
|
|
||||||
padding-top: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.filter-button{
|
|
||||||
padding-top: .6rem;
|
|
||||||
padding-bottom: .6rem;
|
|
||||||
// .mat-icon{
|
|
||||||
// font-size: 1.5em;
|
|
||||||
// width: 1.2em;
|
|
||||||
// height: 1.2em;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ import { takeUntil } from 'rxjs/operators';
|
||||||
import { StartNewDmpDialogComponent } from '../dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
import { StartNewDmpDialogComponent } from '../dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
||||||
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
||||||
import { UserDialogComponent } from './user-dialog/user-dialog.component';
|
import { UserDialogComponent } from './user-dialog/user-dialog.component';
|
||||||
import { MineInAppNotificationListingDialogComponent } from '../inapp-notification/listing-dialog/mine-inapp-notification-listing-dialog.component';
|
import { MineInAppNotificationListingDialogComponent } from '@notification-service/ui/inapp-notification/listing-dialog/mine-inapp-notification-listing-dialog.component';
|
||||||
import { InAppNotificationService } from '@app/core/services/inapp-notification/inapp-notification.service';
|
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
||||||
import { timer } from 'rxjs';
|
import { timer } from 'rxjs';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
|
||||||
|
|
|
@ -1130,16 +1130,18 @@
|
||||||
"INACTIVE": "Inactive"
|
"INACTIVE": "Inactive"
|
||||||
},
|
},
|
||||||
"NOTIFICATION-TYPE": {
|
"NOTIFICATION-TYPE": {
|
||||||
"REGISTRATION-INVITATION": "Registration Invitation",
|
"DMP-INVITATION-EXISTING-USER-TYPE": "DMP invitation on existing user",
|
||||||
"TOTP-OVERRIDE-USED": "TOPT Override Used",
|
"DMP-INVITATION-EXTERNAL-USER-TYPE": "DMP invitation on external user",
|
||||||
"CREDENTIAL-RESET": "Credential Reset",
|
"DMP-MODIFIED-TYPE": "Modified a DMP",
|
||||||
"DIRECT-LINK": "Direct Link",
|
"DMP-FINALISED-TYPE": "Finalised a DMP",
|
||||||
"FORGET-ME-REQUEST": "Forget me Request",
|
"DESCRIPTION-MODIFIED-TYPE": "Modified a Description",
|
||||||
"WHAT-YOU-KNOW-ABOUT-ME-REQUEST": "'What you Know about me' request",
|
"DESCRIPTION-FINALISED-TYPE": "Finalised a Description",
|
||||||
"WHAT-YOU-KNOW-ABOUT-ME-REQUEST-COMPLETED": "Completion of 'what you Know about me' request",
|
"MERGE-ACCOUNT-CONFIRMATION-TYPE": "Confirmation to merge an account",
|
||||||
"EMAIL-RESET-REQUEST": "Email reset request",
|
"REMOVE-CREDENTIAL-CONFIRMATION-TYPE": "Confirmation to remove an account",
|
||||||
"EMAIL-RESET-AWARENESS": "Awareness of 'email reset' request",
|
"DMP-DEPOSIT-TYPE": "Deposit a DMP",
|
||||||
"EMAIL-RESET-REMOVE": "Remove email reset request"
|
"DESCRIPTION-TEMPLATE-INVITATION-TYPE": "Description Template invitation",
|
||||||
|
"CONTACT-SUPPORT-TYPE": "Contact Support",
|
||||||
|
"PUBLIC-CONTACT-SUPPORT-TYPE": "Public Contact Support"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"USER-PROFILE": {
|
"USER-PROFILE": {
|
||||||
|
@ -1710,7 +1712,7 @@
|
||||||
"INTERNAL": "Internal",
|
"INTERNAL": "Internal",
|
||||||
"EXTERNAL": "External"
|
"EXTERNAL": "External"
|
||||||
},
|
},
|
||||||
"NOTIFICATION-TEMPLATE-KIND": {
|
"NOTIFICATION-TEMPLATE-KIND - HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!": {
|
||||||
"DRAFT": "Draft",
|
"DRAFT": "Draft",
|
||||||
"SECONDARY": "Secondary",
|
"SECONDARY": "Secondary",
|
||||||
"PRIMARY": "Primary",
|
"PRIMARY": "Primary",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationContactTypeFormat' })
|
@Pipe({ name: 'NotificationContactTypeFormat' })
|
||||||
export class NotificationContactTypePipe implements PipeTransform {
|
export class NotificationContactTypePipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationContactTypeString(value);
|
return this.enumUtils.toNotificationContactTypeString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationNotifyStateFormat' })
|
@Pipe({ name: 'NotificationNotifyStateFormat' })
|
||||||
export class NotificationNotifyStatePipe implements PipeTransform {
|
export class NotificationNotifyStatePipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationNotifyStateString(value);
|
return this.enumUtils.toNotificationNotifyStateString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationTemplateChannelFormat' })
|
@Pipe({ name: 'NotificationTemplateChannelFormat' })
|
||||||
export class NotificationTemplateChannelPipe implements PipeTransform {
|
export class NotificationTemplateChannelPipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationTemplateChannelString(value);
|
return this.enumUtils.toNotificationTemplateChannelString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationTemplateKindFormat' })
|
@Pipe({ name: 'NotificationTemplateKindFormat' })
|
||||||
export class NotificationTemplateKindPipe implements PipeTransform {
|
export class NotificationTemplateKindPipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationTemplateKindString(value);
|
return this.enumUtils.toNotificationTemplateKindString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationTrackingProcessFormat' })
|
@Pipe({ name: 'NotificationTrackingProcessFormat' })
|
||||||
export class NotificationTrackingProcessPipe implements PipeTransform {
|
export class NotificationTrackingProcessPipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationTrackingProcessString(value);
|
return this.enumUtils.toNotificationTrackingProcessString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationTrackingStateFormat' })
|
@Pipe({ name: 'NotificationTrackingStateFormat' })
|
||||||
export class NotificationTrackingStatePipe implements PipeTransform {
|
export class NotificationTrackingStatePipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationTrackingStateString(value);
|
return this.enumUtils.toNotificationTrackingStateString(value);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Pipe, PipeTransform } from '@angular/core';
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
|
||||||
@Pipe({ name: 'NotificationTypeFormat' })
|
@Pipe({ name: 'NotificationTypeFormat' })
|
||||||
export class NotificationTypePipe implements PipeTransform {
|
export class NotificationTypePipe implements PipeTransform {
|
||||||
constructor(private enumUtils: EnumUtils) { }
|
constructor(private enumUtils: NotificationServiceEnumUtils) { }
|
||||||
|
|
||||||
public transform(value): any {
|
public transform(value): any {
|
||||||
return this.enumUtils.toNotificationTypeString(value);
|
return this.enumUtils.toNotificationTypeString(value);
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
export enum ContactInfoType {
|
export enum ContactInfoType {
|
||||||
Email = 0,
|
Email = 0,
|
||||||
MobilePhone = 1,
|
|
||||||
LandLinePhone = 2,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
export enum ContactType {
|
|
||||||
Email = 0,
|
|
||||||
SlackBroadcast = 1,
|
|
||||||
Sms = 2,
|
|
||||||
InApp = 3,
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
export enum EmailOverrideMode {
|
export enum EmailOverrideMode {
|
||||||
NotOverride = 0,
|
NotOverride = 0,
|
||||||
Additive = 1,
|
Additive = 1,
|
||||||
Replace = 2
|
Replace = 2
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
export enum NotificationContactType {
|
export enum NotificationContactType {
|
||||||
EMAIL = 0,
|
EMAIL = 0,
|
||||||
IN_APP = 3,
|
IN_APP = 3,
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
export enum NotificationNotifyState {
|
export enum NotificationNotifyState {
|
||||||
Pending = 0,
|
PENDING = 0,
|
||||||
Processing = 1,
|
PROCESSING = 1,
|
||||||
Successful = 2,
|
SUCCESSFUL = 2,
|
||||||
Error = 3,
|
ERROR = 3,
|
||||||
Omitted = 4
|
OMITTED = 4
|
||||||
}
|
}
|
|
@ -1,6 +1,4 @@
|
||||||
export enum NotificationTemplateChannel {
|
export enum NotificationTemplateChannel {
|
||||||
Email = 0,
|
Email = 0,
|
||||||
SlackBroadcast = 1,
|
InApp = 1,
|
||||||
Sms = 2,
|
|
||||||
InApp = 3,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export enum NotificationTrackingProcess {
|
export enum NotificationTrackingProcess {
|
||||||
Pending = 0,
|
PENDING = 0,
|
||||||
Processing = 1,
|
PROCESSING = 1,
|
||||||
Completed = 2,
|
SUCCESSFUL = 2,
|
||||||
Error = 3,
|
ERROR = 3,
|
||||||
Omitted = 4
|
OMITTED = 4
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,10 @@
|
||||||
export enum NotificationTrackingState {
|
export enum NotificationTrackingState {
|
||||||
/// <summary>
|
UNDEFINED = 0,
|
||||||
/// Initial state
|
|
||||||
/// </summary>
|
|
||||||
Undefined = 0,
|
|
||||||
/// <summary>
|
|
||||||
/// Final for notifiers that do not provide any kind of tracking
|
|
||||||
/// </summary>
|
|
||||||
NA = 1,
|
NA = 1,
|
||||||
Queued = 2,
|
QUEUED = 2,
|
||||||
Sent = 3,
|
SENT = 3,
|
||||||
Delivered = 4,
|
DELIVERED = 4,
|
||||||
Undelivered = 5,
|
UNDELIVERED = 5,
|
||||||
Failed = 6,
|
FAILED = 6,
|
||||||
Unsent = 7
|
UNSENT = 7
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
export enum NotificationType {
|
export enum NotificationType {
|
||||||
RegistrationInvitation = '4fdbfa80-7a71-4a69-b854-67cbb70648f1',
|
dmpInvitationExternalUserType = '065deecd-21bb-44af-9983-e660fdf24bc4',
|
||||||
TotpOverrideUsed = '065deecd-21bb-44af-9983-e660fdf24bc4',
|
dmpInvitationExistingUserType = '4904dea2-5079-46d3-83be-3a19c9ab45dc',
|
||||||
CredentialReset = '90db0b46-42de-bd89-aebf-6f27efeb256e',
|
dmpModifiedType = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb',
|
||||||
DirectLink = 'bfe68845-cb05-4c5a-a03d-29161a7c9660',
|
dmpFinalisedType = '90db0b46-42de-bd89-aebf-6f27efeb256e',
|
||||||
ForgetMeRequest = '4542262a-22f8-4baa-9db6-1c8e70ac1dbb',
|
descriptionModifiedType = '4fdbfa80-7a71-4a69-b854-67cbb70648f1',
|
||||||
WhatYouKnowAboutMeRequest = 'd3cd55fe-8da2-42e7-a501-3795ee4f16d3',
|
descriptionFinalisedType = '33790bad-94d4-488a-8ee2-7f6295ca18ea',
|
||||||
WhatYouKnowAboutMeRequestCompleted = '55736f7a-83ab-4190-af43-9d031a6f9612',
|
mergeAccountConfirmationType = 'bfe68845-cb05-4c5a-a03d-29161a7c9660',
|
||||||
EmailResetRequest = '223bb607-efa1-4ce7-99ec-4beabfef9a8b',
|
removeCredentialConfirmationType = 'c9bc3f16-057e-4bba-8a5f-36bd835e5604',
|
||||||
EmailResetAwareness = 'c9bc3f16-057e-4bba-8a5f-36bd835e5604',
|
dmpDepositType = '55736f7a-83ab-4190-af43-9d031a6f9612',
|
||||||
EmailResetRemove = '1aeb49e8-c817-4088-8b45-08e0a5155796',
|
descriptionTemplateInvitationType = '223bb607-efa1-4ce7-99ec-4beabfef9a8b',
|
||||||
Unknown1 = "5b1d6c52-88f9-418b-9b8a-6f1f963d9ead",
|
contactSupportType = '5b1d6c52-88f9-418b-9b8a-6f1f963d9ead',
|
||||||
Unknown2 = "b542b606-acc6-4629-adef-4d8ee2f01222",
|
publicContactSupportType = 'b542b606-acc6-4629-adef-4d8ee2f01222'
|
||||||
Unknown3 = "33790bad-94d4-488a-8ee2-7f6295ca18ea",
|
|
||||||
Unknown4 = "4904dea2-5079-46d3-83be-3a19c9ab45dc",
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
export enum TenantConfigurationType {
|
|
||||||
SlackBroadcast = 0,
|
|
||||||
EmailClientConfiguration = 1,
|
|
||||||
SmsClientConfiguration = 2,
|
|
||||||
DefaultUserLocale = 3,
|
|
||||||
NotifierList = 4
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { BaseEnumUtilsService } from '@common/base/base-enum-utils.service';
|
import { BaseEnumUtilsService } from '@common/base/base-enum-utils.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
import { NotificationNotifyState } from '@notification-service/core/enum/notification-notify-state.enum';
|
import { NotificationNotifyState } from '@notification-service/core/enum/notification-notify-state.enum';
|
||||||
|
@ -10,6 +9,9 @@ import { NotificationTemplateKind } from '@notification-service/core/enum/notifi
|
||||||
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
||||||
import { NotificationTrackingState } from '@notification-service/core/enum/notification-tracking-state.enum';
|
import { NotificationTrackingState } from '@notification-service/core/enum/notification-tracking-state.enum';
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { NotificationDataType } from '../enum/notification-data-type';
|
||||||
|
import { EmailOverrideMode } from '../enum/email-override-mode';
|
||||||
|
import { NotificationContactType } from '../enum/notification-contact-type';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NotificationServiceEnumUtils extends BaseEnumUtilsService {
|
export class NotificationServiceEnumUtils extends BaseEnumUtilsService {
|
||||||
|
@ -26,74 +28,70 @@ export class NotificationServiceEnumUtils extends BaseEnumUtilsService {
|
||||||
|
|
||||||
public toNotificationTypeString(value: NotificationType): string {
|
public toNotificationTypeString(value: NotificationType): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationType.RegistrationInvitation: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.REGISTRATION-INVITATION');
|
case NotificationType.dmpInvitationExternalUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXTERNAL-USER');
|
||||||
case NotificationType.TotpOverrideUsed: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.TOTP-OVERRIDE-USED');
|
case NotificationType.dmpInvitationExistingUserType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-INVITATION-EXISTING-USER');
|
||||||
case NotificationType.CredentialReset: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.CREDENTIAL-RESET');
|
case NotificationType.dmpModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-MODIFIED');
|
||||||
case NotificationType.DirectLink: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.DIRECT-LINK');
|
case NotificationType.dmpFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-FINALISED');
|
||||||
case NotificationType.ForgetMeRequest: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.FORGET-ME-REQUEST');
|
case NotificationType.descriptionModifiedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-MODIFIED');
|
||||||
case NotificationType.WhatYouKnowAboutMeRequest: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.WHAT-YOU-KNOW-ABOUT-ME-REQUEST');
|
case NotificationType.descriptionFinalisedType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-FINALISED');
|
||||||
case NotificationType.WhatYouKnowAboutMeRequestCompleted: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.WHAT-YOU-KNOW-ABOUT-ME-REQUEST-COMPLETED');
|
case NotificationType.mergeAccountConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.MERGE-ACCOUNT-CONFIRMATION');
|
||||||
case NotificationType.EmailResetRequest: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.EMAIL-RESET-REQUEST');
|
case NotificationType.removeCredentialConfirmationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.REMOVE-CREDENTIAL-CONFIRMATION');
|
||||||
case NotificationType.EmailResetAwareness: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.EMAIL-RESET-AWARENESS');
|
case NotificationType.dmpDepositType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DMP-DEPOSIT');
|
||||||
case NotificationType.EmailResetRemove: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.EMAIL-RESET-REMOVE');
|
case NotificationType.descriptionTemplateInvitationType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.DESCRIPTION-TEMPLATE-INVITATION');
|
||||||
case NotificationType.Unknown1: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.UNKOWN1');
|
case NotificationType.contactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.CONTACT-SUPPORT');
|
||||||
case NotificationType.Unknown2: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.UNKOWN2');
|
case NotificationType.publicContactSupportType: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-NOTIFICATION-TYPE.PUBLIC-CONTACT-SUPPORT');
|
||||||
case NotificationType.Unknown3: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.UNKOWN3');
|
|
||||||
case NotificationType.Unknown4: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TYPE.UNKOWN4');
|
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public toContactTypeString(value: ContactType): string {
|
public toContactTypeString(value: NotificationContactType): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case ContactType.Email: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.EMAIL');
|
case NotificationContactType.EMAIL: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.EMAIL');
|
||||||
case ContactType.SlackBroadcast: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.SLACK-BROADCAST');
|
case NotificationContactType.IN_APP: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.IN-APP');
|
||||||
case ContactType.Sms: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.SMS');
|
|
||||||
case ContactType.InApp: return this.language.instant('NOTIFICATION-SERVICE.TYPES.CONTACT-TYPE.IN-APP');
|
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public toNotificationNotifyStateString(value: NotificationNotifyState): string {
|
public toNotificationNotifyStateString(value: NotificationNotifyState): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationNotifyState.Pending: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.PENDING');
|
case NotificationNotifyState.PENDING: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.PENDING');
|
||||||
case NotificationNotifyState.Processing: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.PROCESSING');
|
case NotificationNotifyState.PROCESSING: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.PROCESSING');
|
||||||
case NotificationNotifyState.Successful: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.SUCCESSFUL');
|
case NotificationNotifyState.SUCCESSFUL: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.SUCCESSFUL');
|
||||||
case NotificationNotifyState.Error: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.ERROR');
|
case NotificationNotifyState.ERROR: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.ERROR');
|
||||||
case NotificationNotifyState.Omitted: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.OMITTED');
|
case NotificationNotifyState.OMITTED: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-NOTIFY-STATE.OMITTED');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public toNotificationTrackingStateString(value: NotificationTrackingState): string {
|
public toNotificationTrackingStateString(value: NotificationTrackingState): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationTrackingState.Undefined: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.UNDEFINED');
|
case NotificationTrackingState.UNDEFINED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNDEFINED');
|
||||||
case NotificationTrackingState.NA: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.NA');
|
case NotificationTrackingState.NA: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.NA');
|
||||||
case NotificationTrackingState.Queued: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.QUEUED');
|
case NotificationTrackingState.QUEUED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.QUEUED');
|
||||||
case NotificationTrackingState.Sent: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.SENT');
|
case NotificationTrackingState.SENT: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.SENT');
|
||||||
case NotificationTrackingState.Delivered: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.DELIVERED');
|
case NotificationTrackingState.DELIVERED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.DELIVERED');
|
||||||
case NotificationTrackingState.Undelivered: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.UNDELIVERED');
|
case NotificationTrackingState.UNDELIVERED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNDELIVERED');
|
||||||
case NotificationTrackingState.Failed: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.FAILED');
|
case NotificationTrackingState.FAILED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.FAILED');
|
||||||
case NotificationTrackingState.Unsent: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-STATE.UNSENT');
|
case NotificationTrackingState.UNSENT: return this.language.instant('TYPES.NOTIFICATION-TRACKING-STATE.UNSENT');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public toNotificationTrackingProcessString(value: NotificationTrackingProcess): string {
|
public toNotificationTrackingProcessString(value: NotificationTrackingProcess): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationTrackingProcess.Pending: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-PROCESS.PENDING');
|
case NotificationTrackingProcess.PENDING: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.PENDING');
|
||||||
case NotificationTrackingProcess.Processing: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-PROCESS.PROCESSING');
|
case NotificationTrackingProcess.PROCESSING: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.PROCESSING');
|
||||||
case NotificationTrackingProcess.Completed: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-PROCESS.COMPLETED');
|
case NotificationTrackingProcess.SUCCESSFUL: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.SUCCESSFUL');
|
||||||
case NotificationTrackingProcess.Error: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-PROCESS.ERROR');
|
case NotificationTrackingProcess.ERROR: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.ERROR');
|
||||||
case NotificationTrackingProcess.Omitted: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TRACKING-PROCESS.OMITTED');
|
case NotificationTrackingProcess.OMITTED: return this.language.instant('TYPES.NOTIFICATION-TRACKING-PROCESS.OMITTED');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public toNotificationInAppTrackingString(value: NotificationInAppTracking): string {
|
public toNotificationInAppTrackingString(value: NotificationInAppTracking): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationInAppTracking.Delivered: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-INAPP-TRACKING.DELIVERED');
|
case NotificationInAppTracking.Delivered: return this.language.instant('TYPES.NOTIFICATION-INAPP-TRACKING.DELIVERED');
|
||||||
case NotificationInAppTracking.Stored: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-INAPP-TRACKING.STORED');
|
case NotificationInAppTracking.Stored: return this.language.instant('TYPES.NOTIFICATION-INAPP-TRACKING.STORED');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,8 +99,6 @@ export class NotificationServiceEnumUtils extends BaseEnumUtilsService {
|
||||||
public toNotificationChannelString(value: NotificationTemplateChannel): string {
|
public toNotificationChannelString(value: NotificationTemplateChannel): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationTemplateChannel.Email: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.EMAIL');
|
case NotificationTemplateChannel.Email: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.EMAIL');
|
||||||
case NotificationTemplateChannel.SlackBroadcast: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.SLACK-BROADCAST');
|
|
||||||
case NotificationTemplateChannel.Sms: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.SMS');
|
|
||||||
case NotificationTemplateChannel.InApp: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.IN-APP');
|
case NotificationTemplateChannel.InApp: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-CHANNEL.IN-APP');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
|
@ -110,11 +106,43 @@ export class NotificationServiceEnumUtils extends BaseEnumUtilsService {
|
||||||
|
|
||||||
public toNotificationTemplateKindString(value: NotificationTemplateKind): string {
|
public toNotificationTemplateKindString(value: NotificationTemplateKind): string {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case NotificationTemplateKind.Default: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-KIND.DEFAULT');
|
case NotificationTemplateKind.Draft: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.DRAFT');
|
||||||
case NotificationTemplateKind.Primary: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-KIND.PRIMARY');
|
case NotificationTemplateKind.Secondary: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.SECONDARY');
|
||||||
case NotificationTemplateKind.Secondary: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-KIND.SECONDARY');
|
case NotificationTemplateKind.Primary: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.PRIMARY');
|
||||||
case NotificationTemplateKind.Draft: return this.language.instant('NOTIFICATION-SERVICE.TYPES.NOTIFICATION-TEMPLATE-KIND.DRAFT');
|
case NotificationTemplateKind.Default: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-KIND.DEFAULT');
|
||||||
default: return '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toNotificationTemplateChannelString(status: NotificationTemplateChannel): string {
|
||||||
|
switch (status) {
|
||||||
|
case NotificationTemplateChannel.Email: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-CHANNEL.EMAIL');
|
||||||
|
case NotificationTemplateChannel.InApp: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-CHANNEL.INAPP');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toNotificationTemplateDataTypeString(status: NotificationDataType): string {
|
||||||
|
switch (status) {
|
||||||
|
case NotificationDataType.Integer: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.INTEGER');
|
||||||
|
case NotificationDataType.Demical: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DEMICAL');
|
||||||
|
case NotificationDataType.Double: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DOUBLE');
|
||||||
|
case NotificationDataType.DateTime: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.DATE-TIME');
|
||||||
|
case NotificationDataType.String: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-DATA-TYPE.STRING');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toEmailOverrideModeString(status: EmailOverrideMode): string {
|
||||||
|
switch (status) {
|
||||||
|
case EmailOverrideMode.NotOverride: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.NOT');
|
||||||
|
case EmailOverrideMode.Additive: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.ADDITIVE');
|
||||||
|
case EmailOverrideMode.Replace: return this.language.instant('TYPES.NOTIFICATION-TEMPLATE-EMAIL-OVERRIDE-MODE.REPLACE');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public toNotificationContactTypeString(value: NotificationContactType): string {
|
||||||
|
switch (value) {
|
||||||
|
case NotificationContactType.EMAIL: return this.language.instant('TYPES.NOTIFICATION-CONTACT-TYPE.EMAIL');
|
||||||
|
case NotificationContactType.IN_APP: return this.language.instant('TYPES.NOTIFICATION-CONTACT-TYPE.INAPP');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { DatePipe } from '@angular/common';
|
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonFormattingModule } from '@common/formatting/common-formatting.module';
|
import { CommonFormattingModule } from '@common/formatting/common-formatting.module';
|
||||||
import { PipeService } from '@common/formatting/pipe.service';
|
import { PipeService } from '@common/formatting/pipe.service';
|
||||||
import { IsActiveTypePipe } from '@notification-service/core/formatting/pipes/is-active-type.pipe';
|
import { IsActiveTypePipe } from '@notification-service/core/formatting/pipes/is-active-type.pipe';
|
||||||
import { NotificationInAppTrackingTypePipe } from '@notification-service/core/formatting/pipes/notification-inapp-tracking-type.pipe';
|
import { NotificationInAppTrackingTypePipe } from '@notification-service/core/formatting/pipes/notification-inapp-tracking-type.pipe';
|
||||||
|
import { NotificationServiceEnumUtils } from './enum-utils.service';
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -12,7 +12,7 @@ import { NotificationInAppTrackingTypePipe } from '@notification-service/core/fo
|
||||||
//
|
//
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonFormattingModule
|
CommonFormattingModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
IsActiveTypePipe,
|
IsActiveTypePipe,
|
||||||
|
@ -21,13 +21,13 @@ import { NotificationInAppTrackingTypePipe } from '@notification-service/core/fo
|
||||||
exports: [
|
exports: [
|
||||||
CommonFormattingModule,
|
CommonFormattingModule,
|
||||||
IsActiveTypePipe,
|
IsActiveTypePipe,
|
||||||
NotificationInAppTrackingTypePipe
|
NotificationInAppTrackingTypePipe,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
PipeService,
|
PipeService,
|
||||||
DatePipe,
|
|
||||||
IsActiveTypePipe,
|
IsActiveTypePipe,
|
||||||
NotificationInAppTrackingTypePipe
|
NotificationInAppTrackingTypePipe,
|
||||||
|
NotificationServiceEnumUtils
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class NotificationServiceFormattingModule { }
|
export class NotificationServiceFormattingModule { }
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import { User } from '@app/core/model/user/user';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
import { NotificationServiceUser } from '@notification-service/core/model/user.model';
|
|
||||||
|
|
||||||
export interface InAppNotification {
|
export interface InAppNotification {
|
||||||
id: Guid;
|
id: Guid;
|
||||||
user: NotificationServiceUser;
|
user: User;
|
||||||
isActive: IsActive;
|
isActive: IsActive;
|
||||||
type: Guid;
|
type: Guid;
|
||||||
trackingState: NotificationInAppTracking;
|
trackingState: NotificationInAppTracking;
|
||||||
|
|
|
@ -3,46 +3,87 @@ import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
import { NotificationTemplateChannel } from '@notification-service/core/enum/notification-template-channel.enum';
|
import { NotificationTemplateChannel } from '@notification-service/core/enum/notification-template-channel.enum';
|
||||||
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { EmailOverrideMode } from '../enum/email-override-mode';
|
||||||
|
import { NotificationDataType } from '../enum/notification-data-type';
|
||||||
|
|
||||||
export interface NotificationTemplate {
|
export interface NotificationTemplate {
|
||||||
id: Guid;
|
id?: Guid;
|
||||||
channel: NotificationTemplateChannel;
|
channel: NotificationTemplateChannel;
|
||||||
notificationType: NotificationType;
|
notificationType: NotificationType;
|
||||||
kind: NotificationTemplateKind;
|
kind: NotificationTemplateKind;
|
||||||
language: string;
|
languageCode: string;
|
||||||
description: string;
|
|
||||||
value: NotificationTemplateValue;
|
value: NotificationTemplateValue;
|
||||||
isActive: IsActive;
|
isActive?: IsActive;
|
||||||
createdAt: Date;
|
createdAt?: Date;
|
||||||
updatedAt: Date;
|
updatedAt?: Date;
|
||||||
hash: string;
|
hash?: string;
|
||||||
|
belongsToCurrentTenant?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NotificationTemplateValue {
|
export interface NotificationTemplateValue {
|
||||||
subjectText: string;
|
subjectText: string;
|
||||||
|
subjectKey: string;
|
||||||
subjectFieldOptions: NotificationFieldOptions;
|
subjectFieldOptions: NotificationFieldOptions;
|
||||||
bodyText: string;
|
bodyText: string;
|
||||||
|
bodyKey: string;
|
||||||
|
priorityKey: string;
|
||||||
|
allowAttachments: Boolean;
|
||||||
|
cc: string[];
|
||||||
|
ccMode: EmailOverrideMode;
|
||||||
|
bcc: string[];
|
||||||
|
bccMode: EmailOverrideMode;
|
||||||
|
extraDataKeys: string[];
|
||||||
bodyFieldOptions: NotificationFieldOptions;
|
bodyFieldOptions: NotificationFieldOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NotificationFieldOptions {
|
export interface NotificationFieldOptions {
|
||||||
mandatory?: string[];
|
mandatory?: string[];
|
||||||
options?: NotificationFieldInfo[];
|
optional?: NotificationFieldInfo[];
|
||||||
formatting?: { [key: string]: string };
|
formatting?: { [key: string]: string };
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NotificationFieldInfo {
|
export interface NotificationFieldInfo {
|
||||||
key: string;
|
key: string;
|
||||||
|
type: NotificationDataType,
|
||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Persist
|
||||||
|
|
||||||
export interface NotificationTemplatePersist {
|
export interface NotificationTemplatePersist {
|
||||||
id?: Guid;
|
id?: Guid;
|
||||||
channel: NotificationTemplateChannel;
|
channel: NotificationTemplateChannel;
|
||||||
notificationType: NotificationType;
|
notificationType: NotificationType;
|
||||||
kind: NotificationTemplateKind;
|
kind: NotificationTemplateKind;
|
||||||
language: string;
|
languageCode: string;
|
||||||
description: string;
|
value: NotificationTemplateValuePersist;
|
||||||
value: NotificationTemplateValue;
|
|
||||||
hash?: string;
|
hash?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NotificationTemplateValuePersist {
|
||||||
|
subjectText: string;
|
||||||
|
subjectKey: string;
|
||||||
|
subjectFieldOptions: NotificationFieldOptionsPersist;
|
||||||
|
bodyText: string;
|
||||||
|
bodyKey: string;
|
||||||
|
priorityKey: string;
|
||||||
|
allowAttachments: Boolean;
|
||||||
|
cc: string[];
|
||||||
|
ccMode: EmailOverrideMode;
|
||||||
|
bcc: string[];
|
||||||
|
bccMode: EmailOverrideMode;
|
||||||
|
extraDataKeys: string[];
|
||||||
|
bodyFieldOptions: NotificationFieldOptionsPersist;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface NotificationFieldOptionsPersist {
|
||||||
|
mandatory?: string[];
|
||||||
|
optional?: NotificationFieldInfoPersist[];
|
||||||
|
formatting?: { [key: string]: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface NotificationFieldInfoPersist {
|
||||||
|
key: string;
|
||||||
|
type: NotificationDataType,
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
|
import { User } from '@app/core/model/user/user';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
import { NotificationNotifyState } from '@notification-service/core/enum/notification-notify-state.enum';
|
import { NotificationNotifyState } from '@notification-service/core/enum/notification-notify-state.enum';
|
||||||
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
||||||
import { NotificationTrackingState } from '@notification-service/core/enum/notification-tracking-state.enum';
|
import { NotificationTrackingState } from '@notification-service/core/enum/notification-tracking-state.enum';
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
import { NotificationServiceUser } from '@notification-service/core/model/user.model';
|
import { NotificationContactType } from '../enum/notification-contact-type';
|
||||||
|
|
||||||
export interface Notification {
|
export interface Notification {
|
||||||
id: Guid;
|
id?: Guid;
|
||||||
user: NotificationServiceUser;
|
user: User;
|
||||||
isActive: IsActive;
|
|
||||||
type: NotificationType;
|
type: NotificationType;
|
||||||
contactType: ContactType;
|
contactTypeHint: NotificationContactType;
|
||||||
contactHint: string;
|
contactHint: string;
|
||||||
data: string;
|
data: string;
|
||||||
notifyState: NotificationNotifyState;
|
notifyState: NotificationNotifyState;
|
||||||
notifiedWith: ContactType;
|
notifiedWith: NotificationContactType;
|
||||||
notifiedAt: Date;
|
notifiedAt: Date;
|
||||||
retryCount: number;
|
retryCount: number;
|
||||||
trackingState: NotificationTrackingState;
|
trackingState: NotificationTrackingState;
|
||||||
trackingProcess: NotificationTrackingProcess;
|
trackingProcess: NotificationTrackingProcess;
|
||||||
trackingData: string;
|
trackingData: string;
|
||||||
provenanceType: NotificationType;
|
isActive?: IsActive;
|
||||||
provenanceRef: string;
|
createdAt?: Date;
|
||||||
createdAt: Date;
|
updatedAt?: Date;
|
||||||
updatedAt: Date;
|
hash?: string;
|
||||||
hash: string;
|
belongsToCurrentTenant?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { NotificationContactType } from '@notification-service/core/enum/notification-contact-type';
|
||||||
|
|
||||||
|
export interface NotifierListConfigurationDataContainer {
|
||||||
|
notifiers: { [key: string]: NotificationContactType[] };
|
||||||
|
}
|
|
@ -1,92 +0,0 @@
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { TenantConfigurationType } from '@notification-service/core/enum/tenant-configuration-type.enum';
|
|
||||||
|
|
||||||
export interface TenantConfiguration {
|
|
||||||
id?: Guid;
|
|
||||||
type: TenantConfigurationType;
|
|
||||||
value: string;
|
|
||||||
slackBroadcastData: SlackBroadcastDataContainer;
|
|
||||||
emailClientData: EmailClientConfigurationDataContainer;
|
|
||||||
smsClientData: SmsClientConfigurationDataContainer;
|
|
||||||
notifierListData: NotifierListConfigurationDataContainer;
|
|
||||||
createdAt?: Date;
|
|
||||||
updatedAt?: Date;
|
|
||||||
hash: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Slack Broadcast
|
|
||||||
//
|
|
||||||
export interface SlackBroadcastDataContainer {
|
|
||||||
webhooks: SlackBroadcastWebhookInfo[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantConfigurationSlackBroadcastPersist {
|
|
||||||
id?: Guid;
|
|
||||||
hash?: string;
|
|
||||||
webhooks: SlackBroadcastWebhookInfo[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SlackBroadcastWebhookInfo {
|
|
||||||
id: Guid;
|
|
||||||
name: string;
|
|
||||||
webhook: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Email Client Configuration
|
|
||||||
//
|
|
||||||
export interface EmailClientConfigurationDataContainer {
|
|
||||||
requiresCredentials: boolean;
|
|
||||||
enableSSL: boolean;
|
|
||||||
hostServer: string;
|
|
||||||
hostPortNo: number;
|
|
||||||
emailAddress: string;
|
|
||||||
emailUsername: string;
|
|
||||||
emailPassword: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantConfigurationEmailClientPersist {
|
|
||||||
id?: Guid;
|
|
||||||
hash?: string;
|
|
||||||
requiresCredentials: boolean;
|
|
||||||
enableSSL: boolean;
|
|
||||||
hostServer: string;
|
|
||||||
hostPortNo: number;
|
|
||||||
emailAddress: string;
|
|
||||||
emailUsername: string;
|
|
||||||
emailPassword: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Sms Client
|
|
||||||
//
|
|
||||||
export interface SmsClientConfigurationDataContainer {
|
|
||||||
applicationId: string;
|
|
||||||
applicationSecret: string;
|
|
||||||
sendAsName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantConfigurationSmsClientPersist {
|
|
||||||
id?: Guid;
|
|
||||||
hash?: string;
|
|
||||||
applicationId: string;
|
|
||||||
applicationSecret: string;
|
|
||||||
sendAsName: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Notifier List
|
|
||||||
//
|
|
||||||
export interface NotifierListConfigurationDataContainer {
|
|
||||||
notifiers: { [key: string]: ContactType[] };
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantConfigurationNotifierListPersist {
|
|
||||||
id?: Guid;
|
|
||||||
hash?: string;
|
|
||||||
notifiers: { [key: string]: ContactType[] };
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { NotificationContactType } from '../enum/notification-contact-type';
|
||||||
|
|
||||||
export interface UserNotificationPreference {
|
export interface UserNotificationPreference {
|
||||||
userId?: Guid;
|
userId?: Guid;
|
||||||
type: NotificationType;
|
type: NotificationType;
|
||||||
channel: ContactType;
|
channel: NotificationContactType;
|
||||||
ordinal: number;
|
ordinal: number;
|
||||||
createdAt?: Date;
|
createdAt?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserNotificationPreferencePersist {
|
export interface UserNotificationPreferencePersist {
|
||||||
userId?: Guid;
|
userId?: Guid;
|
||||||
notificationPreferences: { [key: string]: ContactType[] };
|
notificationPreferences: { [key: string]: NotificationContactType[] };
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { ContactInfoType } from '@notification-service/core/enum/contact-info-type.enum';
|
|
||||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
|
||||||
|
|
||||||
export interface NotificationServiceUser {
|
|
||||||
id: Guid;
|
|
||||||
isActive?: IsActive;
|
|
||||||
createdAt?: Date;
|
|
||||||
updatedAt?: Date;
|
|
||||||
hash: string;
|
|
||||||
contacts: NotificationServiceContactInfo[];
|
|
||||||
profile: NotificationServiceUserProfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationServiceContactInfo {
|
|
||||||
id: Guid;
|
|
||||||
user: NotificationServiceUser;
|
|
||||||
type?: ContactInfoType;
|
|
||||||
isActive?: IsActive;
|
|
||||||
value: string;
|
|
||||||
ordinal: number;
|
|
||||||
createdAt?: Date;
|
|
||||||
updatedAt?: Date;
|
|
||||||
hash: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NotificationServiceUserProfile {
|
|
||||||
id: Guid;
|
|
||||||
timezone: string;
|
|
||||||
culture?: string;
|
|
||||||
language: string;
|
|
||||||
createdAt?: Date;
|
|
||||||
updatedAt?: Date;
|
|
||||||
hash: string;
|
|
||||||
users: NotificationServiceUser[];
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Lookup } from '@common/model/lookup';
|
import { Lookup } from '@common/model/lookup';
|
||||||
import { NotificationType } from '../common/enum/notification-type';
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
import { NotificationInAppTracking } from '../common/enum/notification-inapp-tracking.enum';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
import { IsActive } from '../common/enum/is-active.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
|
||||||
export class InAppNotificationLookup extends Lookup implements InAppNotificationFilter {
|
export class InAppNotificationLookup extends Lookup implements InAppNotificationFilter {
|
||||||
like: string;
|
like: string;
|
|
@ -1,9 +1,9 @@
|
||||||
import { Lookup } from "@common/model/lookup";
|
import { Lookup } from "@common/model/lookup";
|
||||||
import { Guid } from "@common/types/guid";
|
import { Guid } from "@common/types/guid";
|
||||||
import { IsActive } from "../common/enum/is-active.enum";
|
import { IsActive } from "@notification-service/core/enum/is-active.enum";
|
||||||
import { NotificationTemplateKind } from "../common/enum/notification-template-kind";
|
import { NotificationTemplateChannel } from "@notification-service/core/enum/notification-template-channel.enum";
|
||||||
import { NotificationTemplateChannel } from "../common/enum/notification-template-channel";
|
import { NotificationTemplateKind } from "@notification-service/core/enum/notification-template-kind.enum";
|
||||||
import { NotificationType } from "../common/enum/notification-type";
|
import { NotificationType } from "@notification-service/core/enum/notification-type.enum";
|
||||||
|
|
||||||
export class NotificationTemplateLookup extends Lookup implements NotificationTemplateFilter {
|
export class NotificationTemplateLookup extends Lookup implements NotificationTemplateFilter {
|
||||||
ids: Guid[];
|
ids: Guid[];
|
|
@ -1,11 +1,11 @@
|
||||||
import { Lookup } from "@common/model/lookup";
|
import { Lookup } from "@common/model/lookup";
|
||||||
import { Guid } from "@common/types/guid";
|
import { Guid } from "@common/types/guid";
|
||||||
import { IsActive } from "../common/enum/is-active.enum";
|
import { IsActive } from "@notification-service/core/enum/is-active.enum";
|
||||||
import { NotificationType } from "../common/enum/notification-type";
|
import { NotificationContactType } from "@notification-service/core/enum/notification-contact-type";
|
||||||
import { NotificationNotifyState } from "../common/enum/notification-notify-state";
|
import { NotificationNotifyState } from "@notification-service/core/enum/notification-notify-state.enum";
|
||||||
import { NotificationContactType } from "../common/enum/notification-contact-type";
|
import { NotificationTrackingProcess } from "@notification-service/core/enum/notification-tracking-process.enum";
|
||||||
import { NotificationTrackingState } from "../common/enum/notification-tracking-state";
|
import { NotificationTrackingState } from "@notification-service/core/enum/notification-tracking-state.enum";
|
||||||
import { NotificationTrackingProcess } from "../common/enum/notification-tracking-process";
|
import { NotificationType } from "@notification-service/core/enum/notification-type.enum";
|
||||||
|
|
||||||
export class NotificationLookup extends Lookup implements NotificationFilter {
|
export class NotificationLookup extends Lookup implements NotificationFilter {
|
||||||
ids: Guid[];
|
ids: Guid[];
|
|
@ -1,22 +0,0 @@
|
||||||
import { Lookup } from '@common/model/lookup';
|
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
|
||||||
import { TenantConfigurationType } from '@notification-service/core/enum/tenant-configuration-type.enum';
|
|
||||||
|
|
||||||
export class TenantConfigurationLookup extends Lookup implements TenantConfigurationFilter {
|
|
||||||
ids?: Guid[];
|
|
||||||
excludedIds?: Guid[];
|
|
||||||
isActive?: IsActive[];
|
|
||||||
type?: TenantConfigurationType[];
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TenantConfigurationFilter {
|
|
||||||
ids?: Guid[];
|
|
||||||
excludedIds?: Guid[];
|
|
||||||
isActive?: IsActive[];
|
|
||||||
type?: TenantConfigurationType[];
|
|
||||||
}
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { Lookup } from '@common/model/lookup';
|
import { Lookup } from '@common/model/lookup';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { NotificationContactType } from '../enum/notification-contact-type';
|
||||||
|
|
||||||
export class UserNotificationPreferenceLookup extends Lookup implements UserNotificationPreferenceFilter {
|
export class UserNotificationPreferenceLookup extends Lookup implements UserNotificationPreferenceFilter {
|
||||||
userIds?: Guid[];
|
userIds?: Guid[];
|
||||||
type?: NotificationType[];
|
type?: NotificationType[];
|
||||||
channel?: ContactType[];
|
channel?: NotificationContactType[];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -16,5 +16,5 @@ export class UserNotificationPreferenceLookup extends Lookup implements UserNoti
|
||||||
export interface UserNotificationPreferenceFilter {
|
export interface UserNotificationPreferenceFilter {
|
||||||
userIds?: Guid[];
|
userIds?: Guid[];
|
||||||
type?: NotificationType[];
|
type?: NotificationType[];
|
||||||
channel?: ContactType[];
|
channel?: NotificationContactType[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@ import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
import { FilterService } from '@common/modules/text-filter/filter-service';
|
import { FilterService } from '@common/modules/text-filter/filter-service';
|
||||||
import { PrincipalService } from '@app/core/services/http/principal.service';
|
import { PrincipalService } from '@app/core/services/http/principal.service';
|
||||||
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
|
import { InAppNotificationService } from './http/inapp-notification.service';
|
||||||
|
import { NotificationService } from './http/notification-service';
|
||||||
|
import { NotificationTemplateService } from './http/notification-template.service';
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -32,6 +35,9 @@ export class CoreNotificationServiceModule {
|
||||||
FilterService,
|
FilterService,
|
||||||
LoggingService,
|
LoggingService,
|
||||||
PrincipalService,
|
PrincipalService,
|
||||||
|
NotificationService,
|
||||||
|
InAppNotificationService,
|
||||||
|
NotificationTemplateService,
|
||||||
UserNotificationPreferenceService
|
UserNotificationPreferenceService
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { InAppNotification } from '@app/core/model/inapp-notification/inapp-notification.model';
|
import { catchError } from 'rxjs/operators';
|
||||||
import { InAppNotificationLookup } from '@app/core/query/inapp-notification.lookup';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { BaseHttpParams } from '@common/http/base-http-params';
|
import { BaseHttpParams } from '@common/http/base-http-params';
|
||||||
import { InterceptorType } from '@common/http/interceptors/interceptor-type';
|
import { InterceptorType } from '@common/http/interceptors/interceptor-type';
|
||||||
import { QueryResult } from '@common/model/query-result';
|
import { QueryResult } from '@common/model/query-result';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
||||||
import { catchError } from 'rxjs/operators';
|
import { InAppNotificationLookup } from '@notification-service/core/query/inapp-notification.lookup';
|
||||||
import { BaseHttpV2Service } from '../http/base-http-v2.service';
|
import { BaseHttpV2Service } from '@app/core/services/http/base-http-v2.service';
|
||||||
import { ConfigurationService } from '../configuration/configuration.service';
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class InAppNotificationService {
|
export class InAppNotificationService {
|
|
@ -1,12 +1,12 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { QueryResult } from '@common/model/query-result';
|
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { NotificationLookup } from '@app/core/query/notification.lookup';
|
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError } from 'rxjs/operators';
|
import { catchError } from 'rxjs/operators';
|
||||||
import { Notification } from '@app/core/model/notification/notification.model';
|
import { Guid } from '@common/types/guid';
|
||||||
import { BaseHttpV2Service } from '../http/base-http-v2.service';
|
import { QueryResult } from '@common/model/query-result';
|
||||||
import { ConfigurationService } from '../configuration/configuration.service';
|
import { NotificationLookup } from '@notification-service/core/query/notification.lookup';
|
||||||
|
import { Notification } from '@notification-service/core/model/notification.model';
|
||||||
|
import { BaseHttpV2Service } from '@app/core/services/http/base-http-v2.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NotificationService {
|
export class NotificationService {
|
|
@ -1,13 +1,13 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { QueryResult } from '@common/model/query-result';
|
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { NotificationTemplateKind } from '@app/core/common/enum/notification-template-kind';
|
|
||||||
import { NotificationTemplateLookup } from '@app/core/query/notification-template.lookup';
|
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError } from 'rxjs/operators';
|
import { catchError } from 'rxjs/operators';
|
||||||
import { NotificationTemplate, NotificationTemplatePersist } from '@app/core/model/notification-template/notification-template';
|
import { QueryResult } from '@common/model/query-result';
|
||||||
import { BaseHttpV2Service } from '../http/base-http-v2.service';
|
import { Guid } from '@common/types/guid';
|
||||||
import { ConfigurationService } from '../configuration/configuration.service';
|
import { NotificationTemplateLookup } from '@notification-service/core/query/notification-template.lookup';
|
||||||
|
import { NotificationTemplate, NotificationTemplatePersist } from '@notification-service/core/model/notification-template.model';
|
||||||
|
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
||||||
|
import { BaseHttpV2Service } from '@app/core/services/http/base-http-v2.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NotificationTemplateService {
|
export class NotificationTemplateService {
|
|
@ -1,15 +1,12 @@
|
||||||
import { HttpHeaders } from '@angular/common/http';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { BaseHttpV2Service } from '@app/core/services/http/base-http-v2.service';
|
|
||||||
import { QueryResult } from '@common/model/query-result';
|
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { NotifierListConfigurationDataContainer } from '@notification-service/core/model/tenant-configuration.model';
|
|
||||||
import { UserNotificationPreference, UserNotificationPreferencePersist } from '@notification-service/core/model/user-notification-preference.model';
|
|
||||||
import { NotifierListLookup } from '@notification-service/core/query/notifier-list.lookup';
|
|
||||||
import { UserNotificationPreferenceLookup } from '@notification-service/core/query/user-notification-preference.lookup';
|
|
||||||
import { Observable, throwError } from 'rxjs';
|
import { Observable, throwError } from 'rxjs';
|
||||||
import { catchError } from 'rxjs/operators';
|
import { catchError } from 'rxjs/operators';
|
||||||
|
import { Guid } from '@common/types/guid';
|
||||||
|
import { NotifierListLookup } from '@notification-service/core/query/notifier-list.lookup';
|
||||||
|
import { NotifierListConfigurationDataContainer } from '@notification-service/core/model/notifier-configuration.model';
|
||||||
|
import { UserNotificationPreference, UserNotificationPreferencePersist } from '@notification-service/core/model/user-notification-preference.model';
|
||||||
|
import { BaseHttpV2Service } from '@app/core/services/http/base-http-v2.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UserNotificationPreferenceService {
|
export class UserNotificationPreferenceService {
|
||||||
|
@ -21,13 +18,6 @@ export class UserNotificationPreferenceService {
|
||||||
private http: BaseHttpV2Service
|
private http: BaseHttpV2Service
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
query(q: UserNotificationPreferenceLookup): Observable<QueryResult<UserNotificationPreference>> {
|
|
||||||
const url = `${this.apiBase}/query`;
|
|
||||||
return this.http
|
|
||||||
.post<QueryResult<UserNotificationPreference>>(url, q).pipe(
|
|
||||||
catchError((error: any) => throwError(error)));
|
|
||||||
}
|
|
||||||
|
|
||||||
current(id: Guid, reqFields: string[] = []): Observable<UserNotificationPreference[]> {
|
current(id: Guid, reqFields: string[] = []): Observable<UserNotificationPreference[]> {
|
||||||
const url = `${this.apiBase}/user/${id}/current`;
|
const url = `${this.apiBase}/user/${id}/current`;
|
||||||
const options = { params: { f: reqFields } };
|
const options = { params: { f: reqFields } };
|
||||||
|
@ -47,11 +37,9 @@ export class UserNotificationPreferenceService {
|
||||||
|
|
||||||
persist(item: UserNotificationPreferencePersist, totp?: string): Observable<UserNotificationPreference> {
|
persist(item: UserNotificationPreferencePersist, totp?: string): Observable<UserNotificationPreference> {
|
||||||
const url = `${this.apiBase}/persist`;
|
const url = `${this.apiBase}/persist`;
|
||||||
let headers = new HttpHeaders();
|
|
||||||
// if (totp) { headers = headers.set(this.configurationService.authTotpHeader, totp); }
|
|
||||||
|
|
||||||
return this.http
|
return this.http
|
||||||
.post<UserNotificationPreference>(url, item, headers ? { headers: headers } : undefined).pipe(
|
.post<UserNotificationPreference>(url, item).pipe(
|
||||||
catchError((error: any) => throwError(error)));
|
catchError((error: any) => throwError(error)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { UntypedFormArray } from '@angular/forms';
|
import { UntypedFormArray } from '@angular/forms';
|
||||||
import { NotificationDataType } from '@app/core/common/enum/notification-data-type';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
|
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
|
||||||
import { NotificationFieldInfoEditorModel, NotificationFieldOptionsEditorModel } from '../notification-template-editor.model';
|
import { NotificationFieldInfoEditorModel, NotificationFieldOptionsEditorModel } from '../notification-template-editor.model';
|
||||||
import { MatChipEditedEvent, MatChipInputEvent } from '@angular/material/chips';
|
import { MatChipEditedEvent, MatChipInputEvent } from '@angular/material/chips';
|
||||||
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
||||||
|
import { NotificationDataType } from '@notification-service/core/enum/notification-data-type';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-notification-template-field-options-component',
|
selector: 'app-notification-template-field-options-component',
|
|
@ -7,10 +7,9 @@ import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { NotificationTemplateKind } from '@app/core/common/enum/notification-template-kind';
|
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { NotificationTemplate, NotificationTemplatePersist } from '@app/core/model/notification-template/notification-template';
|
import { NotificationTemplate, NotificationTemplatePersist } from '@notification-service/core/model/notification-template.model';
|
||||||
import { NotificationTemplateService } from '@app/core/services/notification-template/notification-template.service';
|
import { NotificationTemplateService } from '@notification-service/services/http/notification-template.service';
|
||||||
import { NotificationFieldInfoEditorModel, NotificationFieldOptionsEditorModel, NotificationTemplateEditorModel } from './notification-template-editor.model';
|
import { NotificationFieldInfoEditorModel, NotificationFieldOptionsEditorModel, NotificationTemplateEditorModel } from './notification-template-editor.model';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
|
@ -18,24 +17,25 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { FilterService } from '@common/modules/text-filter/filter-service';
|
import { FilterService } from '@common/modules/text-filter/filter-service';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { MatomoService } from '@app/core/services/matomo/matomo-service';
|
import { MatomoService } from '@app/core/services/matomo/matomo-service';
|
||||||
import { NotificationTemplateEditorService } from './notification-template-editor.service';
|
import { NotificationTemplateEditorService } from './notification-template-editor.service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { NotificationTemplateEditorResolver } from './notification-template-editor.resolver';
|
import { NotificationTemplateEditorResolver } from './notification-template-editor.resolver';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
import { LanguageHttpService } from '@app/core/services/language/language.http.service';
|
import { LanguageHttpService } from '@app/core/services/language/language.http.service';
|
||||||
import { Language } from '@app/core/model/language/language';
|
import { Language } from '@app/core/model/language/language';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { NotificationTemplateChannel } from '@app/core/common/enum/notification-template-channel';
|
|
||||||
import { MatChipEditedEvent, MatChipInputEvent } from '@angular/material/chips';
|
import { MatChipEditedEvent, MatChipInputEvent } from '@angular/material/chips';
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||||
import { NotificationDataType } from '@app/core/common/enum/notification-data-type';
|
|
||||||
import { EmailOverrideMode } from '@app/core/common/enum/email-override-mode';
|
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
import { NotificationTemplateChannel } from '@notification-service/core/enum/notification-template-channel.enum';
|
||||||
|
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
||||||
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { EmailOverrideMode } from '@notification-service/core/enum/email-override-mode';
|
||||||
|
import { NotificationDataType } from '@notification-service/core/enum/notification-data-type';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-notification-template-editor',
|
selector: 'app-notification-template-editor',
|
||||||
|
@ -93,7 +93,7 @@ export class NotificationTemplateEditorComponent extends BaseEditor<Notification
|
||||||
protected authService: AuthService,
|
protected authService: AuthService,
|
||||||
protected configurationService: ConfigurationService,
|
protected configurationService: ConfigurationService,
|
||||||
// Rest dependencies. Inject any other needed deps here:
|
// Rest dependencies. Inject any other needed deps here:
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: NotificationServiceEnumUtils,
|
||||||
private languageHttpService: LanguageHttpService,
|
private languageHttpService: LanguageHttpService,
|
||||||
private notificationTemplateService: NotificationTemplateService,
|
private notificationTemplateService: NotificationTemplateService,
|
||||||
private notificationTemplateEditorService: NotificationTemplateEditorService,
|
private notificationTemplateEditorService: NotificationTemplateEditorService,
|
|
@ -1,15 +1,15 @@
|
||||||
import { FormArray, FormControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
import { FormArray, FormControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||||
import { NotificationFieldInfo, NotificationFieldInfoPersist, NotificationFieldOptions, NotificationFieldOptionsPersist, NotificationTemplate, NotificationTemplatePersist, NotificationTemplateValue, NotificationTemplateValuePersist } from '@app/core/model/notification-template/notification-template';
|
import { NotificationFieldInfo, NotificationFieldInfoPersist, NotificationFieldOptions, NotificationFieldOptionsPersist, NotificationTemplate, NotificationTemplatePersist, NotificationTemplateValue, NotificationTemplateValuePersist } from '@notification-service/core/model/notification-template.model';
|
||||||
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
|
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
|
||||||
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
|
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
|
||||||
import { Validation, ValidationContext } from '@common/forms/validation/validation-context';
|
import { Validation, ValidationContext } from '@common/forms/validation/validation-context';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { NotificationTemplateChannel } from '@app/core/common/enum/notification-template-channel';
|
|
||||||
import { NotificationTemplateKind } from '@app/core/common/enum/notification-template-kind';
|
|
||||||
import { NotificationDataType } from '@app/core/common/enum/notification-data-type';
|
|
||||||
import { EmailOverrideMode } from '@app/core/common/enum/email-override-mode';
|
|
||||||
import { BaseEditorModel } from '@common/base/base-form-editor-model';
|
import { BaseEditorModel } from '@common/base/base-form-editor-model';
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
import { NotificationTemplateChannel } from '@notification-service/core/enum/notification-template-channel.enum';
|
||||||
|
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
||||||
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
|
import { EmailOverrideMode } from '@notification-service/core/enum/email-override-mode';
|
||||||
|
import { NotificationDataType } from '@notification-service/core/enum/notification-data-type';
|
||||||
|
|
||||||
export class NotificationTemplateEditorModel extends BaseEditorModel implements NotificationTemplatePersist {
|
export class NotificationTemplateEditorModel extends BaseEditorModel implements NotificationTemplatePersist {
|
||||||
channel: NotificationTemplateChannel;
|
channel: NotificationTemplateChannel;
|
|
@ -1,8 +1,8 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
import { Language } from '@app/core/model/language/language';
|
import { Language } from '@app/core/model/language/language';
|
||||||
import { NotificationFieldInfo, NotificationFieldOptions, NotificationTemplate, NotificationTemplateValue } from '@app/core/model/notification-template/notification-template';
|
import { NotificationFieldInfo, NotificationFieldOptions, NotificationTemplate, NotificationTemplateValue } from '@notification-service/core/model/notification-template.model';
|
||||||
import { NotificationTemplateService } from '@app/core/services/notification-template/notification-template.service';
|
import { NotificationTemplateService } from '@notification-service/services/http/notification-template.service';
|
||||||
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
||||||
import { BaseEditorResolver } from '@common/base/base-editor.resolver';
|
import { BaseEditorResolver } from '@common/base/base-editor.resolver';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
|
@ -1,11 +1,11 @@
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { NotificationTemplateFilter } from '@notification-service/core/query/notification-template.lookup';
|
||||||
import { NotificationTemplateChannel } from '@app/core/common/enum/notification-template-channel';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { NotificationTemplateKind } from '@app/core/common/enum/notification-template-kind';
|
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
|
||||||
import { NotificationTemplateFilter } from '@app/core/query/notification-template.lookup';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
import { NotificationTemplateChannel } from '@notification-service/core/enum/notification-template-channel.enum';
|
||||||
|
import { NotificationTemplateKind } from '@notification-service/core/enum/notification-template-kind.enum';
|
||||||
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -26,7 +26,7 @@ export class NotificationTemplateListingFiltersComponent extends BaseComponent i
|
||||||
|
|
||||||
protected appliedFilterCount: number = 0;
|
protected appliedFilterCount: number = 0;
|
||||||
constructor(
|
constructor(
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: NotificationServiceEnumUtils,
|
||||||
) { super(); }
|
) { super(); }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
|
@ -1,10 +1,9 @@
|
||||||
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
import { BaseListingComponent } from '@common/base/base-listing-component';
|
import { BaseListingComponent } from '@common/base/base-listing-component';
|
||||||
import { PipeService } from '@common/formatting/pipe.service';
|
import { PipeService } from '@common/formatting/pipe.service';
|
||||||
|
@ -19,13 +18,14 @@ import { Observable } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
|
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
|
||||||
import { NotificationTemplate } from '@app/core/model/notification-template/notification-template';
|
import { NotificationTemplate } from '@notification-service/core/model/notification-template.model';
|
||||||
import { NotificationTemplateLookup } from '@app/core/query/notification-template.lookup';
|
import { NotificationTemplateLookup } from '@notification-service/core/query/notification-template.lookup';
|
||||||
import { NotificationTemplateService } from '@app/core/services/notification-template/notification-template.service';
|
import { NotificationTemplateService } from '@notification-service/services/http/notification-template.service';
|
||||||
import { NotificationTemplateChannelPipe } from '@common/formatting/pipes/notification-template-channel.pipe';
|
import { NotificationTemplateChannelPipe } from '@common/formatting/pipes/notification-template-channel.pipe';
|
||||||
import { NotificationTemplateKindPipe } from '@common/formatting/pipes/notification-template-kind.pipe';
|
import { NotificationTemplateKindPipe } from '@common/formatting/pipes/notification-template-kind.pipe';
|
||||||
import { Language } from '@app/core/model/language/language';
|
import { Language } from '@app/core/model/language/language';
|
||||||
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
||||||
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './notification-template-listing.component.html',
|
templateUrl: './notification-template-listing.component.html',
|
||||||
|
@ -61,7 +61,7 @@ export class NotificationTemplateListingComponent extends BaseListingComponent<N
|
||||||
private notificationTemplateService: NotificationTemplateService,
|
private notificationTemplateService: NotificationTemplateService,
|
||||||
public authService: AuthService,
|
public authService: AuthService,
|
||||||
private pipeService: PipeService,
|
private pipeService: PipeService,
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: NotificationServiceEnumUtils,
|
||||||
private language: TranslateService,
|
private language: TranslateService,
|
||||||
private dialog: MatDialog
|
private dialog: MatDialog
|
||||||
) {
|
) {
|
|
@ -17,6 +17,7 @@ import { NotificationTemplateListingFiltersComponent } from './listing/filters/n
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { EditorModule } from '@tinymce/tinymce-angular';
|
import { EditorModule } from '@tinymce/tinymce-angular';
|
||||||
import { NotificationTemplateFieldOptionsComponent } from './editor/field-options/notification-template-field-options.component';
|
import { NotificationTemplateFieldOptionsComponent } from './editor/field-options/notification-template-field-options.component';
|
||||||
|
import { NotificationServiceFormattingModule } from '@notification-service/core/formatting/formatting.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -33,7 +34,8 @@ import { NotificationTemplateFieldOptionsComponent } from './editor/field-option
|
||||||
CommonFormattingModule,
|
CommonFormattingModule,
|
||||||
RichTextEditorModule,
|
RichTextEditorModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
EditorModule
|
EditorModule,
|
||||||
|
NotificationServiceFormattingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
NotificationTemplateEditorComponent,
|
NotificationTemplateEditorComponent,
|
|
@ -0,0 +1,21 @@
|
||||||
|
// ::ng-deep.mat-mdc-menu-panel {
|
||||||
|
// max-width: 100% !important;
|
||||||
|
// height: 100% !important;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// :host::ng-deep.mat-mdc-menu-content:not(:empty) {
|
||||||
|
// padding-top: 0 !important;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
.filter-button{
|
||||||
|
padding-top: .6rem;
|
||||||
|
padding-bottom: .6rem;
|
||||||
|
// .mat-icon{
|
||||||
|
// font-size: 1.5em;
|
||||||
|
// width: 1.2em;
|
||||||
|
// height: 1.2em;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
import { COMMA, ENTER } from '@angular/cdk/keycodes';
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { NotificationFilter } from '@notification-service/core/query/notification.lookup';
|
||||||
import { NotificationContactType } from '@app/core/common/enum/notification-contact-type';
|
|
||||||
import { NotificationNotifyState } from '@app/core/common/enum/notification-notify-state';
|
|
||||||
import { NotificationTrackingProcess } from '@app/core/common/enum/notification-tracking-process';
|
|
||||||
import { NotificationTrackingState } from '@app/core/common/enum/notification-tracking-state';
|
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
|
||||||
import { NotificationFilter } from '@app/core/query/notification.lookup';
|
|
||||||
import { UserService } from '@app/core/services/user/user.service';
|
import { UserService } from '@app/core/services/user/user.service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
|
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
import { NotificationContactType } from '@notification-service/core/enum/notification-contact-type';
|
||||||
|
import { NotificationNotifyState } from '@notification-service/core/enum/notification-notify-state.enum';
|
||||||
|
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
||||||
|
import { NotificationTrackingState } from '@notification-service/core/enum/notification-tracking-state.enum';
|
||||||
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
|
@ -1,7 +1,6 @@
|
||||||
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
|
@ -19,14 +18,15 @@ import { Observable } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
|
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
|
||||||
import { Notification } from '@app/core/model/notification/notification.model';
|
import { Notification } from '@notification-service/core/model/notification.model';
|
||||||
import { NotificationLookup } from '@app/core/query/notification.lookup';
|
import { NotificationLookup } from '@notification-service/core/query/notification.lookup';
|
||||||
import { NotificationService } from '@app/core/services/notification/notification-service';
|
import { NotificationService } from '@notification-service/services/http/notification-service';
|
||||||
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
||||||
import { NotificationContactTypePipe } from '@common/formatting/pipes/notification-contact-type.pipe';
|
import { NotificationContactTypePipe } from '@common/formatting/pipes/notification-contact-type.pipe';
|
||||||
import { NotificationNotifyStatePipe } from '@common/formatting/pipes/notification-notify-state.pipe';
|
import { NotificationNotifyStatePipe } from '@common/formatting/pipes/notification-notify-state.pipe';
|
||||||
import { NotificationTrackingStatePipe } from '@common/formatting/pipes/notification-tracking-state.pipe';
|
import { NotificationTrackingStatePipe } from '@common/formatting/pipes/notification-tracking-state.pipe';
|
||||||
import { NotificationTrackingProcessPipe } from '@common/formatting/pipes/notification-tracking-process.pipe';
|
import { NotificationTrackingProcessPipe } from '@common/formatting/pipes/notification-tracking-process.pipe';
|
||||||
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './notification-listing.component.html',
|
templateUrl: './notification-listing.component.html',
|
|
@ -15,6 +15,7 @@ import { NotificationRoutingModule } from './notification.routing';
|
||||||
import { NotificationListingFiltersComponent } from './filters/notification-listing-filters.component';
|
import { NotificationListingFiltersComponent } from './filters/notification-listing-filters.component';
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
import { EditorModule } from '@tinymce/tinymce-angular';
|
import { EditorModule } from '@tinymce/tinymce-angular';
|
||||||
|
import { NotificationServiceFormattingModule } from '@notification-service/core/formatting/formatting.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -22,16 +23,14 @@ import { EditorModule } from '@tinymce/tinymce-angular';
|
||||||
CommonFormsModule,
|
CommonFormsModule,
|
||||||
ConfirmationDialogModule,
|
ConfirmationDialogModule,
|
||||||
NotificationRoutingModule,
|
NotificationRoutingModule,
|
||||||
NgxDropzoneModule,
|
|
||||||
DragDropModule,
|
|
||||||
AutoCompleteModule,
|
AutoCompleteModule,
|
||||||
HybridListingModule,
|
HybridListingModule,
|
||||||
TextFilterModule,
|
TextFilterModule,
|
||||||
UserSettingsModule,
|
UserSettingsModule,
|
||||||
CommonFormattingModule,
|
CommonFormattingModule,
|
||||||
RichTextEditorModule,
|
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
EditorModule
|
EditorModule,
|
||||||
|
NotificationServiceFormattingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
NotificationListingComponent,
|
NotificationListingComponent,
|
|
@ -14,10 +14,10 @@ import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { InAppNotification } from '@app/core/model/inapp-notification/inapp-notification.model';
|
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
||||||
import { InAppNotificationService } from '@app/core/services/inapp-notification/inapp-notification.service';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
|
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-inapp-notification-editor',
|
selector: 'app-inapp-notification-editor',
|
|
@ -7,13 +7,13 @@ import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
import { InAppNotificationLookup } from '@notification-service/core/query/inapp-notification.lookup';
|
||||||
import { InAppNotification } from '@app/core/model/inapp-notification/inapp-notification.model';
|
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
||||||
import { InAppNotificationLookup } from '@app/core/query/inapp-notification.lookup';
|
|
||||||
import { InAppNotificationService } from '@app/core/services/inapp-notification/inapp-notification.service';
|
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@notification-service/core/enum/is-active.enum';
|
||||||
|
import { NotificationInAppTracking } from "@notification-service/core/enum/notification-inapp-tracking.enum";
|
||||||
|
import { InAppNotification } from "@notification-service/core/model/inapp-notification.model";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-mine-inapp-notification-listing-dialog',
|
selector: 'app-mine-inapp-notification-listing-dialog',
|
|
@ -1,11 +1,10 @@
|
||||||
import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, OnChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges, OnChanges } from '@angular/core';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
import { InAppNotificationFilter } from '@notification-service/core/query/inapp-notification.lookup';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
import { InAppNotificationFilter } from '@app/core/query/inapp-notification.lookup';
|
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { NotificationType } from '@app/core/common/enum/notification-type';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-mine-inapp-notification-listing-filters',
|
selector: 'app-mine-inapp-notification-listing-filters',
|
||||||
templateUrl: './mine-inapp-notification-listing-filters.component.html',
|
templateUrl: './mine-inapp-notification-listing-filters.component.html',
|
||||||
|
@ -24,7 +23,7 @@ export class MineInAppNotificationListingFiltersComponent extends BaseComponent
|
||||||
|
|
||||||
protected appliedFilterCount: number = 0;
|
protected appliedFilterCount: number = 0;
|
||||||
constructor(
|
constructor(
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: NotificationServiceEnumUtils,
|
||||||
) { super(); }
|
) { super(); }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
<ng-template #listItemTemplate let-item="item" let-isColumnSelected="isColumnSelected">
|
<ng-template #listItemTemplate let-item="item" let-isColumnSelected="isColumnSelected">
|
||||||
|
|
||||||
|
|
||||||
<div class="d-flex align-items-center p-3 gap-1-rem">
|
<div class="d-flex align-items-center p-3 gap-1-rem">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ng-container *ngIf="isColumnSelected('trackingState')">
|
<ng-container *ngIf="isColumnSelected('trackingState')">
|
|
@ -8,21 +8,21 @@ import { DataTableDateTimeFormatPipe } from '@common/formatting/pipes/date-time-
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { ColumnDefinition, ColumnsChangedEvent, HybridListingComponent, PageLoadEvent } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
import { ColumnDefinition, ColumnsChangedEvent, HybridListingComponent, PageLoadEvent } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { InAppNotification } from '@app/core/model/inapp-notification/inapp-notification.model';
|
import { InAppNotificationLookup } from '@notification-service/core/query/inapp-notification.lookup';
|
||||||
import { InAppNotificationLookup } from '@app/core/query/inapp-notification.lookup';
|
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
||||||
import { InAppNotificationService } from '@app/core/services/inapp-notification/inapp-notification.service';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { QueryResult } from '@common/model/query-result';
|
import { QueryResult } from '@common/model/query-result';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { NotificationInAppTracking } from '@app/core/common/enum/notification-inapp-tracking.enum';
|
|
||||||
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
import { NotificationTypePipe } from '@common/formatting/pipes/notification-type.pipe';
|
||||||
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
|
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-mine-inapp-notification-listing',
|
selector: 'app-mine-inapp-notification-listing',
|
||||||
|
@ -59,7 +59,7 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
||||||
private inAppNotificationService: InAppNotificationService,
|
private inAppNotificationService: InAppNotificationService,
|
||||||
public authService: AuthService,
|
public authService: AuthService,
|
||||||
private pipeService: PipeService,
|
private pipeService: PipeService,
|
||||||
public enumUtils: EnumUtils,
|
public enumUtils: NotificationServiceEnumUtils,
|
||||||
private language: TranslateService,
|
private language: TranslateService,
|
||||||
private dialog: MatDialog
|
private dialog: MatDialog
|
||||||
) {
|
) {
|
||||||
|
@ -74,6 +74,9 @@ export class MineInAppNotificationListingComponent extends BaseListingComponent<
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initializeLookup(): InAppNotificationLookup {
|
protected initializeLookup(): InAppNotificationLookup {
|
||||||
|
console.log('this.enumUtils');
|
||||||
|
console.log(this.enumUtils);
|
||||||
|
console.log(this.inAppNotificationService);
|
||||||
const lookup = new InAppNotificationLookup();
|
const lookup = new InAppNotificationLookup();
|
||||||
lookup.metadata = { countAll: true };
|
lookup.metadata = { countAll: true };
|
||||||
lookup.page = { offset: 0, size: this.ITEMS_PER_PAGE };
|
lookup.page = { offset: 0, size: this.ITEMS_PER_PAGE };
|
|
@ -12,6 +12,7 @@ import { MineInAppNotificationListingFiltersComponent } from './listing/filters/
|
||||||
import { MineInAppNotificationListingDialogComponent } from './listing-dialog/mine-inapp-notification-listing-dialog.component';
|
import { MineInAppNotificationListingDialogComponent } from './listing-dialog/mine-inapp-notification-listing-dialog.component';
|
||||||
import { CommonFormattingModule } from '@common/formatting/common-formatting.module';
|
import { CommonFormattingModule } from '@common/formatting/common-formatting.module';
|
||||||
import { FormattingModule } from '@app/core/formatting.module';
|
import { FormattingModule } from '@app/core/formatting.module';
|
||||||
|
import { NotificationServiceFormattingModule } from '@notification-service/core/formatting/formatting.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -23,7 +24,8 @@ import { FormattingModule } from '@app/core/formatting.module';
|
||||||
MineInAppNotificationRoutingModule,
|
MineInAppNotificationRoutingModule,
|
||||||
UserSettingsModule,
|
UserSettingsModule,
|
||||||
CommonFormattingModule,
|
CommonFormattingModule,
|
||||||
FormattingModule
|
// FormattingModule,
|
||||||
|
NotificationServiceFormattingModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
MineInAppNotificationListingComponent,
|
MineInAppNotificationListingComponent,
|
|
@ -8,17 +8,15 @@ import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/serv
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
// import { TotpService } from '@idp-service/ui/totp/totp.service';
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
import { NotificationContactType } from '@notification-service/core/enum/notification-contact-type';
|
||||||
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
import { NotificationTrackingProcess } from '@notification-service/core/enum/notification-tracking-process.enum';
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
||||||
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
|
||||||
import { UserNotificationPreference } from '@notification-service/core/model/user-notification-preference.model';
|
import { UserNotificationPreference } from '@notification-service/core/model/user-notification-preference.model';
|
||||||
import { NotifierListLookup } from '@notification-service/core/query/notifier-list.lookup';
|
import { NotifierListLookup } from '@notification-service/core/query/notifier-list.lookup';
|
||||||
import { UserNotificationPreferenceService } from '@notification-service/services/http/user-notification-preference.service';
|
import { UserNotificationPreferenceService } from '@notification-service/services/http/user-notification-preference.service';
|
||||||
import { UserProfileNotifierListEditorModel } from '@notification-service/ui/user-profile/notifier-list/user-profile-notifier-list-editor.model';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { delay, takeUntil } from 'rxjs/operators';
|
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -28,12 +26,10 @@ import { nameof } from 'ts-simple-nameof';
|
||||||
})
|
})
|
||||||
export class UserProfileNotifierListEditorComponent extends BaseComponent implements OnInit {
|
export class UserProfileNotifierListEditorComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
formGroup: FormGroup;
|
availableNotifiers: { [key: string]: NotificationContactType[] } = {};
|
||||||
editorModel: UserProfileNotifierListEditorModel;
|
|
||||||
availableNotifiers: { [key: string]: ContactType[] } = {};
|
|
||||||
availableNotifiersKeys: NotificationType[];
|
availableNotifiersKeys: NotificationType[];
|
||||||
|
|
||||||
notificationTrackingProcess: NotificationTrackingProcess = NotificationTrackingProcess.Pending;
|
notificationTrackingProcess: NotificationTrackingProcess = NotificationTrackingProcess.PENDING;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private userNotificationPreferenceService: UserNotificationPreferenceService,
|
private userNotificationPreferenceService: UserNotificationPreferenceService,
|
||||||
|
@ -54,7 +50,6 @@ export class UserProfileNotifierListEditorComponent extends BaseComponent implem
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfiguration() {
|
getConfiguration() {
|
||||||
this.formGroup = null;
|
|
||||||
this.userNotificationPreferenceService.getNotifierList(new NotifierListLookup())
|
this.userNotificationPreferenceService.getNotifierList(new NotifierListLookup())
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(
|
.subscribe(
|
||||||
|
@ -64,7 +59,7 @@ export class UserProfileNotifierListEditorComponent extends BaseComponent implem
|
||||||
this.availableNotifiersKeys = Object.keys(this.availableNotifiers) as NotificationType[];
|
this.availableNotifiersKeys = Object.keys(this.availableNotifiers) as NotificationType[];
|
||||||
this.getExistingSelections();
|
this.getExistingSelections();
|
||||||
} catch {
|
} catch {
|
||||||
this.notificationTrackingProcess = NotificationTrackingProcess.Error;
|
this.notificationTrackingProcess = NotificationTrackingProcess.ERROR;
|
||||||
this.logger.error('Could not parse Dataset: ' + data);
|
this.logger.error('Could not parse Dataset: ' + data);
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error);
|
||||||
}
|
}
|
||||||
|
@ -86,9 +81,9 @@ export class UserProfileNotifierListEditorComponent extends BaseComponent implem
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
this.orderAvailableItemsbasedOnExistingSelections(data);
|
this.orderAvailableItemsbasedOnExistingSelections(data);
|
||||||
}
|
}
|
||||||
this.notificationTrackingProcess = NotificationTrackingProcess.Completed;
|
this.notificationTrackingProcess = NotificationTrackingProcess.SUCCESSFUL;
|
||||||
} catch {
|
} catch {
|
||||||
this.notificationTrackingProcess = NotificationTrackingProcess.Error;
|
this.notificationTrackingProcess = NotificationTrackingProcess.ERROR;
|
||||||
this.logger.error('Could not parse Dataset: ' + data);
|
this.logger.error('Could not parse Dataset: ' + data);
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('COMMONS.ERRORS.DEFAULT'), SnackBarNotificationLevel.Error);
|
||||||
}
|
}
|
||||||
|
@ -128,7 +123,7 @@ export class UserProfileNotifierListEditorComponent extends BaseComponent implem
|
||||||
}
|
}
|
||||||
|
|
||||||
onCallbackError(errorResponse: HttpErrorResponse) {
|
onCallbackError(errorResponse: HttpErrorResponse) {
|
||||||
this.notificationTrackingProcess = NotificationTrackingProcess.Error;
|
this.notificationTrackingProcess = NotificationTrackingProcess.ERROR;
|
||||||
|
|
||||||
const error: HttpError = this.httpErrorHandlingService.getError(errorResponse);
|
const error: HttpError = this.httpErrorHandlingService.getError(errorResponse);
|
||||||
if (error.statusCode === 400) {
|
if (error.statusCode === 400) {
|
||||||
|
@ -137,22 +132,17 @@ export class UserProfileNotifierListEditorComponent extends BaseComponent implem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clearErrorModel() {
|
|
||||||
this.editorModel.validationErrorModel.clear();
|
|
||||||
this.formService.validateAllFormFields(this.formGroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
dropped(event: CdkDragDrop<string[]>, type: NotificationType) {
|
dropped(event: CdkDragDrop<string[]>, type: NotificationType) {
|
||||||
moveItemInArray(this.availableNotifiers[type], event.previousIndex, event.currentIndex);
|
moveItemInArray(this.availableNotifiers[type], event.previousIndex, event.currentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
preferencesNotPending(): boolean {
|
preferencesNotPending(): boolean {
|
||||||
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.Pending);
|
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.PENDING);
|
||||||
}
|
}
|
||||||
preferencesNotCompleted(): boolean {
|
preferencesNotCompleted(): boolean {
|
||||||
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.Completed);
|
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.SUCCESSFUL);
|
||||||
}
|
}
|
||||||
preferencesNotWithErrors(): boolean {
|
preferencesNotWithErrors(): boolean {
|
||||||
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.Error);
|
return ! (this.notificationTrackingProcess === NotificationTrackingProcess.ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
||||||
import { BackendErrorValidator } from '@common/forms/validation/custom-validator';
|
|
||||||
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
|
|
||||||
import { Validation, ValidationContext } from '@common/forms/validation/validation-context';
|
|
||||||
import { Guid } from '@common/types/guid';
|
|
||||||
import { ContactType } from '@notification-service/core/enum/contact-type.enum';
|
|
||||||
import { NotificationType } from '@notification-service/core/enum/notification-type.enum';
|
|
||||||
import { UserNotificationPreferencePersist } from '@notification-service/core/model/user-notification-preference.model';
|
|
||||||
|
|
||||||
export class UserProfileNotifierListEditorModel implements UserNotificationPreferencePersist {
|
|
||||||
userId?: Guid;
|
|
||||||
notificationPreferences: { [key: string]: ContactType[] };
|
|
||||||
|
|
||||||
public validationErrorModel: ValidationErrorModel = new ValidationErrorModel();
|
|
||||||
protected formBuilder: FormBuilder = new FormBuilder();
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
public fromModel(userId: Guid, notificationPreferences: { [key: string]: ContactType[] }): UserProfileNotifierListEditorModel {
|
|
||||||
this.userId = userId;
|
|
||||||
this.notificationPreferences = notificationPreferences;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
buildForm(context: ValidationContext = null, disabled: boolean = false, availableNotificationTypes: NotificationType[]): FormGroup {
|
|
||||||
if (context == null) { context = this.createValidationContext(); }
|
|
||||||
|
|
||||||
const notificationPreferencesFormGroup = this.formBuilder.group({});
|
|
||||||
availableNotificationTypes.forEach(type => {
|
|
||||||
notificationPreferencesFormGroup.addControl(type, new FormControl(this.notificationPreferences ? this.notificationPreferences[type] : undefined));
|
|
||||||
});
|
|
||||||
|
|
||||||
return this.formBuilder.group({
|
|
||||||
userId: [{ value: this.userId, disabled: disabled }, context.getValidation('userId').validators],
|
|
||||||
notificationPreferences: notificationPreferencesFormGroup,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
createValidationContext(): ValidationContext {
|
|
||||||
const baseContext: ValidationContext = new ValidationContext();
|
|
||||||
const baseValidationArray: Validation[] = new Array<Validation>();
|
|
||||||
|
|
||||||
baseValidationArray.push({ key: 'userId', validators: [BackendErrorValidator(this.validationErrorModel, 'UserId')] });
|
|
||||||
|
|
||||||
baseContext.validation = baseValidationArray;
|
|
||||||
return baseContext;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -11,8 +11,6 @@ import { UserProfileNotifierListEditorComponent } from '@notification-service/ui
|
||||||
CommonUiModule,
|
CommonUiModule,
|
||||||
CommonFormsModule,
|
CommonFormsModule,
|
||||||
DragDropModule,
|
DragDropModule,
|
||||||
CoreNotificationServiceModule.forRoot(),
|
|
||||||
// TotpModule,
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
UserProfileNotifierListEditorComponent
|
UserProfileNotifierListEditorComponent
|
||||||
|
|
Loading…
Reference in New Issue