Skip to content

Commit

Permalink
Merge pull request #83 from art-institute-of-chicago/feature/add-is-s…
Browse files Browse the repository at this point in the history
…ales-button-hidden-to-events

Add `is_sales_button_hidden` to events [API-408]
  • Loading branch information
nikhiltri authored Jun 12, 2024
2 parents c0a6a98 + c26cc61 commit aca57cb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Models/Web/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Event extends WebModel
'alt_event_types' => 'array',
'alt_audiences' => 'array',
'programs' => 'array',
'is_sales_button_hidden' => 'boolean',
];

public function ticketedEvent()
Expand Down
5 changes: 5 additions & 0 deletions app/Transformers/Outbound/Web/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ protected function getFields()
'type' => 'boolean',
'elasticsearch' => 'boolean',
],
'is_sales_button_hidden' => [
'doc' => 'Whether the buy tickets button is hidden on the website event page',
'type' => 'boolean',
'elasticsearch' => 'boolean',
],
'is_virtual_event' => [
'doc' => 'Whether the event is being held virtually',
'type' => 'boolean',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

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

return new class extends Migration
{
public function up(): void
{
Schema::table('events', function (Blueprint $table) {
$table->boolean('is_sales_button_hidden')->default(false)->nullable();
});
}

public function down(): void
{
Schema::table('events', function (Blueprint $table) {
$table->dropColumn('is_sales_button_hidden');
});
}
};

0 comments on commit aca57cb

Please sign in to comment.