Skip to content

Commit

Permalink
feat: Production-Wide 'Super' Alerts in Booking Flow (#720)
Browse files Browse the repository at this point in the history
* Add production-level alerts to display in booking flow

* Updated schema

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
HappyNTH and github-actions[bot] committed Oct 9, 2024
1 parent 929b0af commit f926089
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
9 changes: 5 additions & 4 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ type ProductionNode implements Node {
facebookEvent: String
contactEmail: String
contentWarnings: [ProductionContentWarningNode!]
productionAlert: String
slug: String!
cast: [CastMemberNode!]
productionTeam: [ProductionTeamMemberNode!]
Expand Down Expand Up @@ -668,7 +669,7 @@ type Query {
me: ExtendedUserNode
societies(offset: Int, before: String, after: String, first: Int, last: Int, id: ID, name: String, slug: String, userHasPermission: String): SocietyNodeConnection
society(slug: String!): SocietyNode
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], productionAlert: String, slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection
performances(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, production: ID, venue: ID, doorsOpen: DateTime, start: DateTime, end: DateTime, intervalDurationMins: Int, description: String, extraInformation: String, disabled: Boolean, seatGroups: [ID], capacity: Int, id: ID, hasBoxofficePermissions: Boolean, runOn: Date, orderBy: String): PerformanceNodeConnection
warnings(offset: Int, before: String, after: String, first: Int, last: Int, id: ID): ContentWarningNodeConnection
production(id: IdInputField, slug: String): ProductionNode
Expand Down Expand Up @@ -787,7 +788,7 @@ type SocietyNode implements Node {
website: String
contact: String
members: [ExtendedUserNode!]!
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection!
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], productionAlert: String, slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection!
id: ID!
permissions: [String]
}
Expand Down Expand Up @@ -962,8 +963,8 @@ type VenueNode implements Node {
slug: String!
seatGroups(offset: Int, before: String, after: String, first: Int, last: Int): SeatGroupNodeConnection!
performances(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, production: ID, venue: ID, doorsOpen: DateTime, start: DateTime, end: DateTime, intervalDurationMins: Int, description: String, extraInformation: String, disabled: Boolean, seatGroups: [ID], capacity: Int, id: ID, hasBoxofficePermissions: Boolean, runOn: Date, orderBy: String): PerformanceNodeConnection!
productionSet(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection!
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection
productionSet(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], productionAlert: String, slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection!
productions(offset: Int, before: String, after: String, first: Int, last: Int, createdAt: DateTime, updatedAt: DateTime, name: String, subtitle: String, description: String, shortDescription: String, venues: [ID], society: ID, status: String, ageRating: Int, facebookEvent: String, contactEmail: String, contentWarnings: [ID], productionAlert: String, slug: String, id: ID, userHasPermission: String, start: DateTime, start_Gte: DateTime, start_Lte: DateTime, end: DateTime, end_Gte: DateTime, end_Lte: DateTime, search: String, orderBy: String): ProductionNodeConnection
}

type VenueNodeConnection {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.18 on 2024-04-15 15:33

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('productions', '0026_auto_20221210_2056'),
]

operations = [
migrations.AddField(
model_name='production',
name='production_alert',
field=models.TextField(blank=True, null=True),
),
]
2 changes: 2 additions & 0 deletions uobtheatre/productions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,8 @@ def PRIVATE_STATUSES(cls): # pylint: disable=invalid-name
ContentWarning, blank=True, through=ProductionContentWarning
)

production_alert = models.TextField(null=True, blank=True)

slug = AutoSlugField(populate_from="name", unique=True, blank=True, editable=True)

def __str__(self):
Expand Down

0 comments on commit f926089

Please sign in to comment.