|
@@ -1,10 +1,11 @@
|
|
|
import {t} from 'app/locale';
|
|
|
+import {SelectValue} from 'app/types';
|
|
|
|
|
|
export type FineTuneField = {
|
|
|
title: string;
|
|
|
description: string;
|
|
|
type: 'select';
|
|
|
- choices?: string[][];
|
|
|
+ options?: SelectValue<string>[];
|
|
|
defaultValue?: string;
|
|
|
defaultFieldName?: string;
|
|
|
};
|
|
@@ -16,10 +17,10 @@ export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = {
|
|
|
'Notifications from Alert Rules that your team has setup. You’ll always receive notifications from Alerts configured to be sent directly to you.'
|
|
|
),
|
|
|
type: 'select',
|
|
|
- choices: [
|
|
|
- ['-1', t('Default')],
|
|
|
- ['1', t('On')],
|
|
|
- ['0', t('Off')],
|
|
|
+ options: [
|
|
|
+ {value: '-1', label: t('Default')},
|
|
|
+ {value: '1', label: t('On')},
|
|
|
+ {value: '0', label: t('Off')},
|
|
|
],
|
|
|
defaultValue: '-1',
|
|
|
defaultFieldName: 'subscribeByDefault',
|
|
@@ -30,11 +31,11 @@ export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = {
|
|
|
'Control workflow notifications, e.g. changes in issue assignment, resolution status, and comments.'
|
|
|
),
|
|
|
type: 'select',
|
|
|
- choices: [
|
|
|
- ['-1', t('Default')],
|
|
|
- ['0', t('Always')],
|
|
|
- ['1', t('Only on issues I subscribe to')],
|
|
|
- ['2', t('Never')],
|
|
|
+ options: [
|
|
|
+ {value: '-1', label: t('Default')},
|
|
|
+ {value: '0', label: t('Always')},
|
|
|
+ {value: '1', label: t('Only on issues I subscribe to')},
|
|
|
+ {value: '2', label: t('Never')},
|
|
|
],
|
|
|
defaultValue: '-1',
|
|
|
defaultFieldName: 'workflowNotifications',
|
|
@@ -45,11 +46,11 @@ export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = {
|
|
|
'Control deploy notifications that include release, environment, and commit overviews.'
|
|
|
),
|
|
|
type: 'select',
|
|
|
- choices: [
|
|
|
- ['-1', t('Default')],
|
|
|
- ['2', t('Always')],
|
|
|
- ['3', t('Only on deploys with my commits')],
|
|
|
- ['4', t('Never')],
|
|
|
+ options: [
|
|
|
+ {value: '-1', label: t('Default')},
|
|
|
+ {value: '2', label: t('Always')},
|
|
|
+ {value: '3', label: t('Only on deploys with my commits')},
|
|
|
+ {value: '4', label: t('Never')},
|
|
|
],
|
|
|
defaultValue: '-1',
|
|
|
defaultFieldName: 'deployNotifications',
|
|
@@ -62,9 +63,9 @@ export const ACCOUNT_NOTIFICATION_FIELDS: Record<string, FineTuneField> = {
|
|
|
type: 'select',
|
|
|
// API only saves organizations that have this disabled, so we should default to "On"
|
|
|
defaultValue: '1',
|
|
|
- choices: [
|
|
|
- ['1', t('On')],
|
|
|
- ['0', t('Off')],
|
|
|
+ options: [
|
|
|
+ {value: '1', label: t('On')},
|
|
|
+ {value: '0', label: t('Off')},
|
|
|
],
|
|
|
defaultFieldName: 'weeklyReports',
|
|
|
},
|