feat: add none in feed channel
This commit is contained in:
parent
e4eee420ea
commit
73dd8c25b7
@ -28,7 +28,7 @@ import { NotificationPicker } from '../notification/NotificationPicker';
|
|||||||
const addFormSchema = z.object({
|
const addFormSchema = z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
notificationIds: z.array(z.string()).default([]),
|
notificationIds: z.array(z.string()).default([]),
|
||||||
notifyFrequency: z.enum(['event', 'day', 'week', 'month']),
|
notifyFrequency: z.enum(['none', 'event', 'day', 'week', 'month']),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type FeedChannelEditFormValues = z.infer<typeof addFormSchema>;
|
export type FeedChannelEditFormValues = z.infer<typeof addFormSchema>;
|
||||||
@ -46,7 +46,7 @@ export const FeedChannelEditForm: React.FC<FeedChannelEditFormProps> =
|
|||||||
defaultValues: props.defaultValues ?? {
|
defaultValues: props.defaultValues ?? {
|
||||||
name: 'New Channel',
|
name: 'New Channel',
|
||||||
notificationIds: [],
|
notificationIds: [],
|
||||||
notifyFrequency: 'day',
|
notifyFrequency: 'none',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -116,6 +116,7 @@ export const FeedChannelEditForm: React.FC<FeedChannelEditFormProps> =
|
|||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
|
<SelectItem value="none">{t('None')}</SelectItem>
|
||||||
<SelectItem value="event">
|
<SelectItem value="event">
|
||||||
{t('Every Event')}
|
{t('Every Event')}
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterEnum
|
||||||
|
ALTER TYPE "FeedChannelNotifyFrequency" ADD VALUE 'none';
|
@ -447,6 +447,7 @@ model SurveyResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum FeedChannelNotifyFrequency {
|
enum FeedChannelNotifyFrequency {
|
||||||
|
none
|
||||||
event
|
event
|
||||||
day
|
day
|
||||||
week
|
week
|
||||||
|
Loading…
Reference in New Issue
Block a user