-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INT-93] Different colours for event types #189
[INT-93] Different colours for event types #189
Conversation
@@ -381,7 +389,7 @@ export default function YSTVCalendar() { | |||
); | |||
} | |||
|
|||
type EventType = "show" | "meeting" | "social" | "other"; | |||
//type EventType = "show" | "meeting" | "social" | "other"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this if it isn't used?
@@ -52,7 +52,7 @@ export default async function NewEventPage() { | |||
); | |||
if (permittedEventTypes.length === 0) { | |||
throw new Forbidden([ | |||
"Calendar.Admin or Calendar.{Show,Meeting,Social}.{Creator,Admin}" as any, | |||
"Calendar.Admin or Calendar.{Show,Meeting,Social,Workshop}.{Creator,Admin}" as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Calendar.Admin or Calendar.{Show,Meeting,Social,Workshop}.{Creator,Admin}" as any, | |
"Calendar.Admin or Calendar.{Show,Meeting,Workshop,Social}.{Creator,Admin}" as any, |
Very much a nitpick but just to have these in the same order as elsewhere 😂
features/calendar/permissions.ts
Outdated
@@ -30,6 +37,9 @@ export function adminEventTypes(userPermissions: Permission[]): EventType[] { | |||
if (userPermissions.includes("Calendar.Public.Admin")) { | |||
permittedEventTypes.push("public"); | |||
} | |||
if (userPermissions.includes("Calendar.Workshop.Admin")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick again, reorder this to the same order as EventTypes
features/calendar/permissions.ts
Outdated
@@ -54,6 +64,9 @@ export function creatableEventTypes( | |||
if (userPermissions.includes("Calendar.Public.Creator")) { | |||
base.push("public"); | |||
} | |||
if (userPermissions.includes("Calendar.Workshop.Creator")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ Reorder
Attempted to deploy a preview of this PR, but ran into an error. See the Jenkins output for details. |
Added new workshop type and permissions for it.
Added new component for colour types key on the calendar page.
Added workshop to event type selector when creating new event.
Testing: