From 05a30fc49a0e99095857f712367d1563560604d5 Mon Sep 17 00:00:00 2001 From: wokeGit Date: Wed, 11 Oct 2017 11:58:55 +0200 Subject: [PATCH] #46 Open side panels if checkbox changed to true. --- .../setup-job-notifications.component.ts | 8 ++++++-- .../setup-job-notifications/setup-job-notifications.html | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.component.ts b/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.component.ts index f95e3c790b6a..092783e59c3c 100644 --- a/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.component.ts +++ b/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.component.ts @@ -155,10 +155,12 @@ export class SetupJobNotificationsComponent implements OnInit { this.notificationsList[index].validationMessages.missingRecipients.show = false; } - public argoUsersAndGroupsCheckboxChange(notification) { + public argoUsersAndGroupsCheckboxChange(notification, index) { notification.isArgoUsersAndGroupsVisible = !notification.isArgoUsersAndGroupsVisible; if (!notification.isArgoUsersAndGroupsVisible) { notification.rules.whom = notification.rules.whom.filter(recipient => (recipient.indexOf('@slack') !== -1 || recipient.indexOf('@user') !== -1)).sort(); + } else { + this.openUserSelectorPanel(index); } } @@ -171,10 +173,12 @@ export class SetupJobNotificationsComponent implements OnInit { } } - public slackChannelsCheckboxChange(notification) { + public slackChannelsCheckboxChange(notification, index) { notification.isSlackChannelsVisible = !notification.isSlackChannelsVisible; if (!notification.isSlackChannelsVisible) { notification.rules.whom = notification.rules.whom.filter(recipient => (recipient.indexOf('@slack') === -1)).sort(); + } else { + this.openSlackChannelPanel(index); } } diff --git a/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.html b/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.html index e603d067f2a8..4dd8907e1d86 100644 --- a/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.html +++ b/saas/axops/src/ui/src/app/common/multiple-service-launch-panel/setup-job-notifications/setup-job-notifications.html @@ -43,7 +43,7 @@
{{ 'Select Recipients:' | uppercase }}
type="checkbox" id="users_and_groups_{{ i }}" [checked]="notification.isArgoUsersAndGroupsVisible" - (change)="argoUsersAndGroupsCheckboxChange(notification)"> + (change)="argoUsersAndGroupsCheckboxChange(notification, i)"> @@ -93,7 +93,7 @@
{{ 'Select Recipients:' | uppercase }}
- +