diff --git a/ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html b/ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html index 0f21bd0fd9..6b878f5d4d 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html @@ -26,7 +26,7 @@
- +
- - - - admin.slack-settings - - -
-
- - -
- - -
+ +
+ + + + admin.slack-settings + + +
+
+ + +
+
admin.slack-api-token - +
-
- - - - - admin.mobile-settings - - - - - -
-
-
- + + + admin.mobile-settings + + + + + +
+ + label="{{ 'admin.firebase-service-account-file' | translate }}" + accept=".json,application/json" + allowedExtensions="json" + [existingFileName]="notificationSettingsForm.get('deliveryMethodsConfigs.MOBILE.firebaseServiceAccountCredentialsFileName')?.value" + (fileNameChanged)="notificationSettingsForm?.get('deliveryMethodsConfigs.MOBILE.firebaseServiceAccountCredentialsFileName').patchValue($event)">
-
-
-
-
-
- + + +
+ + diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html index a12f70139b..5be232104b 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html @@ -39,13 +39,19 @@ {{ 'notification.compose' | translate }}
-
- - {{ 'notification.start-from-scratch' | translate }} - {{ 'notification.use-template' | translate }} - +
+ +
- +
notification.delivery-method.mobile-preview
- {{ preview.processedTemplates.MOBILE.body }} +
{{ preview.processedTemplates.MOBILE.subject }}
+
{{ preview.processedTemplates.MOBILE.body }}
diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss index 0702d6bf52..4623ab1637 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.scss @@ -17,7 +17,7 @@ @import "../../../../../../theme"; :host-context(.tb-fullscreen-dialog .mat-mdc-dialog-container) { - width: 820px; + width: 930px; height: 100%; max-width: 100%; max-height: 100vh; @@ -76,6 +76,7 @@ .delivery-method-container { display: inline-flex; flex: 1 1 calc(50% - 8px); + max-width: calc(50% - 8px); padding: 16px 12px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 6px; @@ -211,58 +212,8 @@ } } - .mat-button-toggle-group.tb-notification-use-template-toggle-group { - &.mat-button-toggle-group-appearance-standard { - border: none; - border-radius: 18px; - margin-bottom: 24px; - - .mat-button-toggle + .mat-button-toggle { - border-left: none; - } - } - - .mat-button-toggle { - background: rgba(0, 0, 0, 0.06); - height: 36px; - align-items: center; - display: flex; - - .mat-button-toggle-ripple { - top: 2px; - left: 2px; - right: 2px; - bottom: 2px; - border-radius: 18px; - } - } - - .mat-button-toggle-button { - color: #959595; - } - - .mat-button-toggle-focus-overlay { - border-radius: 18px; - margin: 2px; - } - - .mat-button-toggle-checked .mat-button-toggle-button { - background-color: $tb-primary-color; - color: #fff; - border-radius: 18px; - margin-left: 2px; - margin-right: 2px; - } - - .mat-button-toggle-appearance-standard .mat-button-toggle-label-content { - line-height: 34px; - font-size: 16px; - font-weight: 500; - } - - .mat-button-toggle-checked.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay { - opacity: .01; - } + .tb-notification-use-template-toggle-group { + margin-bottom: 24px; } .preview-group { diff --git a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts index 938ec2756f..674da8c5e8 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts +++ b/ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts @@ -90,7 +90,7 @@ export class SentNotificationDialogComponent extends protected fb: FormBuilder, private notificationService: NotificationService, private dialog: MatDialog, - private translate: TranslateService) { + public translate: TranslateService) { super(store, router, dialogRef, fb); this.notificationDeliveryMethods.forEach(method => { @@ -309,13 +309,17 @@ export class SentNotificationDialogComponent extends } allowConfigureDeliveryMethod(deliveryMethod: NotificationDeliveryMethod): boolean { + const tenantAllowConfigureDeliveryMethod = new Set([ + NotificationDeliveryMethod.SLACK, + NotificationDeliveryMethod.MOBILE + ]); if (deliveryMethod === NotificationDeliveryMethod.WEB) { return false; } if(this.isSysAdmin()) { return true; } else if (this.isTenantAdmin()) { - return deliveryMethod === NotificationDeliveryMethod.SLACK || deliveryMethod === NotificationDeliveryMethod.MOBILE; + return tenantAllowConfigureDeliveryMethod.has(deliveryMethod); } return false; } diff --git a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html index 1a623af7b9..784f36157b 100644 --- a/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html @@ -271,6 +271,13 @@ trigger-text="{{ 'notification.see-documentation' | translate }}">
+ + notification.subject + + + {{ 'notification.subject-required' | translate }} + + notification.message