Skip to content

Conversation

@tarynblakemiller
Copy link
Collaborator

@tarynblakemiller tarynblakemiller commented Jun 19, 2025

This PR has admittedly expanded as I arrived at event creation!!

I should note that I pulled in Jack's DB models branch in order to finish this.

Description

  • RESTful ticket type management
  • Event creation and management
  • Image uploading

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Implemented

CRUD operations for ticket types

  • src/app/tickets.rs

GET /tickets - List all ticket types
GET /tickets/new - Creation form
POST /tickets/new - Create ticket
GET /tickets/{id} - View ticket (read-only)
GET /tickets/{id}/edit - Edit form
POST /tickets/{id}/edit - Update ticket
POST /tickets/{id}/delete - Delete ticket

Events can now be created with a ticket type and flyer image

  • src/app/events.rs

GET /events - List events with cover image thumbnails
GET /events/new - Creation form with ticket selection
POST /events/new - Create event with tickets and image
GET /events/{id} - View event (read-only with ticket details)
GET /events/{id}/edit - Edit form
POST /events/{id}/edit - Update event
POST /events/{id}/delete - Delete event

##Image Processing

**this was just a placeholder please feel free to critique and change!
I added an image processing module to the templates and a temporary storage path for images.

This added base64 and uuid dependencies.

Storage path: frontend/static/uploads/images/events/
Web path: /static/uploads/images/events/

  • the DB stores the web path for template rendering

Testing

  • make a directory for image uploads at frontend/static/uploads/images/events

Ticket Types

  • Visit /tickets to create a new ticket type
  • click on ticket name to view read-only details
  • Edit, modify, and save --> should redirect to view

Event Creation

  • create a ticket type first because as of now they're required for events
  • Visit /events/new to create an event with a cover image
  • Test with different formats - restricted to JPEG, PNG, GIF, WebP at the moment
  • Click on an event from the list -- should take you to the view page with details
  • Edit, modify and save the changes
  • Test event deletion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants