Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions app/Filament/Resources/EventResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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'),
Expand Down Expand Up @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ protected function casts()
'preorder_starts_at' => 'datetime',
'preorder_ends_at' => 'datetime',
'order_ends_at' => 'datetime',
'mass_printed_at' => 'datetime',
];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('events', function (Blueprint $table) {
$table->dateTime('mass_printed_at')
->useCurrent()
->after("preorder_ends_at")
->comment('Timestamp when the event badges are being mass printed');
});
}
};
7 changes: 7 additions & 0 deletions resources/js/Pages/Badges/BadgesCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -96,6 +97,12 @@ const total = computed(() => {
<h1 class="text-xl sm:text-2xl md:text-3xl font-semibold font-main">Eurofurence Fursuit Badge Creator</h1>
<p>Welcome to our badge configurator, please enter all the details and options you would like!</p>
</div>
<Message
v-if="new Date(usePage().props.event.mass_printed_at) < new Date()"
severity="info"
:closable="false">
{{ "Late badge orders can be picked up starting from the 2nd convention day." }}
</Message>
<!-- Group 1 -- Fursuit Details -->
<div class="space-y-8">
<div class="md:border-2 md:shadow md:bg-white md:rounded-lg md:p-8">
Expand Down
17 changes: 8 additions & 9 deletions resources/js/Pages/Welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -121,6 +113,13 @@ const messages = computed(() => {
:closable="false">
{{ messages.message.text }}
</Message>
<Message
v-if="new Date(usePage().props.event.mass_printed_at) < new Date()"
severity="info"
:closable="false"
>
{{ "Any fursuit badge orders placed now will be available to pick up starting from the 2nd convention day." }}
</Message>
<!-- End Countdown -->
<PaymentInfoWidget />
<h1 class="text-2xl font-semibold font-main">The Eurofurence Fursuit Badge</h1>
Expand Down