From 681b851c35f434fca94fa5e5594a4fa6ea7602c7 Mon Sep 17 00:00:00 2001 From: TLTimeplex Date: Sat, 12 Jul 2025 22:23:39 +0200 Subject: [PATCH 1/3] Added field for date of mass printing and edited CMS to display/edit it --- app/Filament/Resources/EventResource.php | 11 ++++++---- app/Models/Event.php | 1 + ...13_add_mass_printed_at_to_events_table.php | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 database/migrations/2025_07_12_220613_add_mass_printed_at_to_events_table.php diff --git a/app/Filament/Resources/EventResource.php b/app/Filament/Resources/EventResource.php index 0900caf0..fde79250 100644 --- a/app/Filament/Resources/EventResource.php +++ b/app/Filament/Resources/EventResource.php @@ -10,10 +10,7 @@ use Filament\Forms\Form; use Filament\Resources\Resource; use Filament\Tables; -use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\SoftDeletingScope; class EventResource extends Resource { @@ -38,6 +35,8 @@ public static function form(Form $form): Form Forms\Components\DateTimePicker::make('preorder_starts_at')->required(), Forms\Components\DateTimePicker::make('preorder_ends_at') ->required(), + Forms\Components\DateTimePicker::make('mass_printed_at') + ->required(), Forms\Components\DateTimePicker::make('order_ends_at') ->required(), ])->columns()->columnSpanFull()->label('Closing Dates'), @@ -67,7 +66,11 @@ public static function table(Table $table): Table ->dateTime('d.m.Y H:i') ->description(fn (Event $record) => $record->preorder_ends_at?->diffForHumans()) ->sortable(), - TextColumn::make('order_ends_at') + Tables\Columns\TextColumn::make('mass_printed_at') + ->dateTime('d.m.Y H:i') + ->description(fn (Event $record) => $record->mass_printed_at?->diffForHumans()) + ->sortable(), + Tables\Columns\TextColumn::make('order_ends_at') ->dateTime('d.m.Y H:i') ->description(fn (Event $record) => $record->order_ends_at?->diffForHumans()) ->sortable(), diff --git a/app/Models/Event.php b/app/Models/Event.php index 6f12c17a..02645963 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -24,6 +24,7 @@ protected function casts() 'preorder_starts_at' => 'datetime', 'preorder_ends_at' => 'datetime', 'order_ends_at' => 'datetime', + 'mass_printed_at' => 'datetime', ]; } diff --git a/database/migrations/2025_07_12_220613_add_mass_printed_at_to_events_table.php b/database/migrations/2025_07_12_220613_add_mass_printed_at_to_events_table.php new file mode 100644 index 00000000..ff61cf0f --- /dev/null +++ b/database/migrations/2025_07_12_220613_add_mass_printed_at_to_events_table.php @@ -0,0 +1,21 @@ +dateTime('mass_printed_at') + ->useCurrent() + ->after("preorder_ends_at") + ->comment('Timestamp when the event badges are being mass printed'); + }); + } +}; From d65a2c1adba1e2cb3e66514f3fa5441f4a433495 Mon Sep 17 00:00:00 2001 From: TLTimeplex Date: Sat, 12 Jul 2025 22:58:27 +0200 Subject: [PATCH 2/3] Added notifications to let users know, when their badge is available to pick up --- resources/js/Pages/Badges/BadgesCreate.vue | 7 +++++++ resources/js/Pages/Welcome.vue | 16 +++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/resources/js/Pages/Badges/BadgesCreate.vue b/resources/js/Pages/Badges/BadgesCreate.vue index 282e70c5..de0d9b3c 100644 --- a/resources/js/Pages/Badges/BadgesCreate.vue +++ b/resources/js/Pages/Badges/BadgesCreate.vue @@ -15,6 +15,7 @@ import Panel from 'primevue/panel'; import Tag from 'primevue/tag'; import dayjs from "dayjs"; import InputError from "@/Components/InputError.vue"; +import Message from "primevue/message"; defineOptions({ layout: Layout @@ -96,6 +97,12 @@ const total = computed(() => {

Eurofurence Fursuit Badge Creator

Welcome to our badge configurator, please enter all the details and options you would like!

+ + {{ "Your badge will be available to pick up on the 2nd convention day." }} +
diff --git a/resources/js/Pages/Welcome.vue b/resources/js/Pages/Welcome.vue index 003d4200..a13ef5c3 100644 --- a/resources/js/Pages/Welcome.vue +++ b/resources/js/Pages/Welcome.vue @@ -14,15 +14,7 @@ defineOptions({ }) const props = defineProps({ - showState: String, -}); - -const preorderPeriodEnded = computed(() => { - return dayjs().isAfter(dayjs('2022-08-15')); -}); - -const eventEnded = computed(() => { - return usePage().props.event === null; + showState: String }); const messages = computed(() => { @@ -121,6 +113,12 @@ const messages = computed(() => { :closable="false"> {{ messages.message.text }} + + {{ "Every badge orders placed now will be available to pick up on the 2nd convention day." }} +

The Eurofurence Fursuit Badge

From e12a30bdf6fe1d3bc8c498b7468a81b6b88ec0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20G=C3=B6tzelmann?= <72736935+TLTimeplex@users.noreply.github.com> Date: Tue, 15 Jul 2025 18:40:37 +0200 Subject: [PATCH 3/3] Update badge pickup messages for clarity and consistency --- resources/js/Pages/Badges/BadgesCreate.vue | 2 +- resources/js/Pages/Welcome.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/js/Pages/Badges/BadgesCreate.vue b/resources/js/Pages/Badges/BadgesCreate.vue index de0d9b3c..7d658fa0 100644 --- a/resources/js/Pages/Badges/BadgesCreate.vue +++ b/resources/js/Pages/Badges/BadgesCreate.vue @@ -101,7 +101,7 @@ const total = computed(() => { v-if="new Date(usePage().props.event.mass_printed_at) < new Date()" severity="info" :closable="false"> - {{ "Your badge will be available to pick up on the 2nd convention day." }} + {{ "Late badge orders can be picked up starting from the 2nd convention day." }}
diff --git a/resources/js/Pages/Welcome.vue b/resources/js/Pages/Welcome.vue index a13ef5c3..aeedbebd 100644 --- a/resources/js/Pages/Welcome.vue +++ b/resources/js/Pages/Welcome.vue @@ -116,8 +116,9 @@ const messages = computed(() => { - {{ "Every badge orders placed now will be available to pick up on the 2nd convention day." }} + :closable="false" + > + {{ "Any fursuit badge orders placed now will be available to pick up starting from the 2nd convention day." }}