File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use Filament \Forms \Form ;
1111use Filament \Resources \Resource ;
1212use Filament \Tables ;
13- use Filament \Tables \Columns \TextColumn ;
1413use Filament \Tables \Table ;
15- use Illuminate \Database \Eloquent \Builder ;
16- use Illuminate \Database \Eloquent \SoftDeletingScope ;
1714
1815class EventResource extends Resource
1916{
@@ -38,6 +35,8 @@ public static function form(Form $form): Form
3835 Forms \Components \DateTimePicker::make ('preorder_starts_at ' )->required (),
3936 Forms \Components \DateTimePicker::make ('preorder_ends_at ' )
4037 ->required (),
38+ Forms \Components \DateTimePicker::make ('mass_printed_at ' )
39+ ->required (),
4140 Forms \Components \DateTimePicker::make ('order_ends_at ' )
4241 ->required (),
4342 ])->columns ()->columnSpanFull ()->label ('Closing Dates ' ),
@@ -67,7 +66,11 @@ public static function table(Table $table): Table
6766 ->dateTime ('d.m.Y H:i ' )
6867 ->description (fn (Event $ record ) => $ record ->preorder_ends_at ?->diffForHumans())
6968 ->sortable (),
70- TextColumn::make ('order_ends_at ' )
69+ Tables \Columns \TextColumn::make ('mass_printed_at ' )
70+ ->dateTime ('d.m.Y H:i ' )
71+ ->description (fn (Event $ record ) => $ record ->mass_printed_at ?->diffForHumans())
72+ ->sortable (),
73+ Tables \Columns \TextColumn::make ('order_ends_at ' )
7174 ->dateTime ('d.m.Y H:i ' )
7275 ->description (fn (Event $ record ) => $ record ->order_ends_at ?->diffForHumans())
7376 ->sortable (),
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ protected function casts()
2424 'preorder_starts_at ' => 'datetime ' ,
2525 'preorder_ends_at ' => 'datetime ' ,
2626 'order_ends_at ' => 'datetime ' ,
27+ 'mass_printed_at ' => 'datetime ' ,
2728 ];
2829 }
2930
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Illuminate \Database \Migrations \Migration ;
4+ use Illuminate \Database \Schema \Blueprint ;
5+ use Illuminate \Support \Facades \Schema ;
6+
7+ return new class extends Migration
8+ {
9+ /**
10+ * Run the migrations.
11+ */
12+ public function up (): void
13+ {
14+ Schema::table ('events ' , function (Blueprint $ table ) {
15+ $ table ->dateTime ('mass_printed_at ' )
16+ ->useCurrent ()
17+ ->after ("preorder_ends_at " )
18+ ->comment ('Timestamp when the event badges are being mass printed ' );
19+ });
20+ }
21+ };
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Panel from 'primevue/panel';
1313import Tag from ' primevue/tag' ;
1414import dayjs from " dayjs" ;
1515import InputError from " @/Components/InputError.vue" ;
16+ import Message from " primevue/message" ;
1617
1718defineOptions ({
1819 layout: Layout
@@ -90,6 +91,12 @@ const total = computed(() => {
9091 <h1 class =" text-xl sm:text-2xl md:text-3xl font-semibold font-main" >Eurofurence Fursuit Badge Creator</h1 >
9192 <p >Welcome to our badge configurator, please enter all the details and options you would like!</p >
9293 </div >
94+ <Message
95+ v-if =" new Date (usePage ().props .event .mass_printed_at ) < new Date ()"
96+ severity="info"
97+ :closable =" false " >
98+ {{ "Late badge orders can be picked up starting from the 2nd convention day." }}
99+ </Message >
93100 <!-- Group 1 -- Fursuit Details -->
94101 <div class =" space-y-8" >
95102 <div class =" md:border-2 md:shadow md:bg-white md:rounded-lg md:p-8" >
Original file line number Diff line number Diff line change @@ -14,15 +14,7 @@ defineOptions({
1414})
1515
1616const props = defineProps ({
17- showState: String ,
18- });
19-
20- const preorderPeriodEnded = computed (() => {
21- return dayjs ().isAfter (dayjs (' 2022-08-15' ));
22- });
23-
24- const eventEnded = computed (() => {
25- return usePage ().props .event === null ;
17+ showState: String
2618});
2719
2820const messages = computed (() => {
@@ -121,6 +113,13 @@ const messages = computed(() => {
121113 :closable =" false " >
122114 {{ messages.message.text }}
123115 </Message >
116+ <Message
117+ v-if =" new Date (usePage ().props .event .mass_printed_at ) < new Date ()"
118+ severity="info"
119+ :closable =" false "
120+ >
121+ {{ "Any fursuit badge orders placed now will be available to pick up starting from the 2nd convention day." }}
122+ </Message >
124123 <!-- End Countdown -->
125124 <PaymentInfoWidget />
126125 <h1 class =" text-2xl font-semibold font-main" >The Eurofurence Fursuit Badge</h1 >
You can’t perform that action at this time.
0 commit comments