Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiltri committed Sep 15, 2020
2 parents d1a3087 + 8c007e4 commit b929887
Show file tree
Hide file tree
Showing 33 changed files with 214 additions and 153 deletions.
40 changes: 20 additions & 20 deletions app/Console/Commands/UpdateEmailSeries.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,120 +20,120 @@ class UpdateEmailSeries extends Command
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => true,
],
'Save the Date 60' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => true,
],
'Save the Date 30' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => true,
],
'Affiliate Tickets on Sale/Registration Open' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => false,
'show_sustaining_fellow' => false,
'show_luminary' => false,
'show_non_member' => false,
'use_short_description' => false,
'affiliate_member_copy' => '<p>Tickets are sure to go quickly for this program—be sure to get yours today.</p>',
'member_copy' => '',
'sustaining_fellow_copy' => '',
'luminary_copy' => '',
'non_member_copy' => '',
],
'Member Tickets on Sale/Registration Open' => [
'published' => true,
'show_affiliate_member' => false,
'show_member' => true,
'show_sustaining_fellow' => false,
'show_luminary' => false,
'show_non_member' => false,
'use_short_description' => false,
'affiliate_member_copy' => '',
'member_copy' => '<p>Tickets are sure to go quickly for this program—be sure to get yours today.</p>',
'sustaining_fellow_copy' => '',
'luminary_copy' => '',
'non_member_copy' => '',
],
'Sustaining Fellow Tickets on Sale/Registration Open/RSVP' => [
'Luminary Tickets on Sale/Registration Open/RSVP' => [
'published' => true,
'show_affiliate_member' => false,
'show_member' => false,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => false,
'use_short_description' => false,
'affiliate_member_copy' => '',
'member_copy' => '',
'sustaining_fellow_copy' => '<p>Tickets are sure to go quickly for this program—be sure to get yours today.</p>',
'luminary_copy' => '<p>Tickets are sure to go quickly for this program—be sure to get yours today.</p>',
'non_member_copy' => '',
],
'Nonmember Tickets on Sale/ Registration Open' => [
'published' => true,
'show_affiliate_member' => false,
'show_member' => false,
'show_sustaining_fellow' => false,
'show_luminary' => false,
'show_non_member' => true,
'use_short_description' => false,
'affiliate_member_copy' => '',
'member_copy' => '',
'sustaining_fellow_copy' => '',
'luminary_copy' => '',
'non_member_copy' => '<p>Tickets will go fast—so grab yours today!</p>',
],
'Tickets on Sale/Registration Open Reminder' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => false,
'affiliate_member_copy' => '<p>We’d love to have you join us for this very special event—secure your tickets today.</p>',
'member_copy' => '<p>We’d love to have you join us for this very special event—secure your tickets today.</p>',
'sustaining_fellow_copy' => '<p>We’d love to have you join us for this very special event—secure your tickets today.</p>',
'luminary_copy' => '<p>We’d love to have you join us for this very special event—secure your tickets today.</p>',
'non_member_copy' => '<p>There are only a few tickets left—don’t miss out!</p>',
],
'Event Reminder' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => false,
'affiliate_member_copy' => '<p>%%FirstName%%, your event, %%EventName%%, is coming up—we look forward to seeing you there.</p>',
'member_copy' => '<p>%%FirstName%%, your event, %%EventName%%, is coming up—we look forward to seeing you there.</p>',
'sustaining_fellow_copy' => '<p>%%FirstName%%, your event, %%EventName%%, is coming up—we look forward to seeing you there.</p>',
'luminary_copy' => '<p>%%FirstName%%, your event, %%EventName%%, is coming up—we look forward to seeing you there.</p>',
'non_member_copy' => '<p>%%FirstName%%, your event, %%EventName%%, is coming up—we look forward to seeing you there.</p>',
],
'Event Thank You' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => false,
'affiliate_member_copy' => '<p>We’re so happy you were able to join us for %%EventName%% and hope you enjoyed this special program.</p><p>We are so grateful for your support as a %%AffiliateGroup%% member and would love to have you join us for %%EventName%% on %%DisplayStartDate%%.</p>',
'member_copy' => '<p>We’re so happy you were able to join us for %%EventName%% and hope you enjoyed the event.</p><p>We have a bunch of great member-exclusive programs coming up in the next couple months. Check out <a href="https://www.artic.edu/events?audience=2">our member event calendar</a> to see the full lineup.</p>',
'sustaining_fellow_copy' => '<p>We’re so happy you were able to join us for %%EventName%% and hope you enjoyed this special program.</p><p>We are so grateful for your support as a Sustaining Fellow and would love to have you join us for more events in the months to come. Check out <a href="https://www.artic.edu/events?audience=8">our calendar</a> to see what’s in store.</p>',
'luminary_copy' => '<p>We’re so happy you were able to join us for %%EventName%% and hope you enjoyed this special program.</p><p>We are so grateful for your support as a Luminary and would love to have you join us for more events in the months to come. Check out <a href="https://www.artic.edu/events?audience=8">our calendar</a> to see what’s in store.</p>',
'non_member_copy' => '<p>We’re so happy you were able to join us for %%EventName%% and hope you enjoyed the event.</p><p>We have a wide range of great programs coming up in the next couple months. Check out <a href="https://www.artic.edu/events">our calendar</a> to see the full lineup.</p>',
],
'Event Please Join Us for a Future Event' => [
'published' => true,
'show_affiliate_member' => true,
'show_member' => true,
'show_sustaining_fellow' => true,
'show_luminary' => true,
'show_non_member' => true,
'use_short_description' => false,
'affiliate_member_copy' => '<p>We’re sorry we missed you at %%EventName%%. We hope to see you for another event or simply enjoying the galleries soon.</p>',
'member_copy' => '<p>We’re sorry we missed you at %%EventName%%. We hope to see you for another event or simply enjoying the galleries soon.</p><p>We have a bunch of great member-exclusive programs coming up in the next couple months. Check out <a href="https://www.artic.edu/events?audience=2">our member event calendar</a> to see what’s in store in the coming months.</p>',
'sustaining_fellow_copy' => '<p>We’re sorry we missed you at %%EventName%%. We hope to see you for another event or simply enjoying the galleries soon.</p><p>We are so grateful for your support as a Sustaining Fellow and would love to have you join us for more events in the months to come. Check out <a href="https://www.artic.edu/events?audience=8">our calendar</a> to see what’s in store for Sustaining Fellows in the coming months.</p>',
'luminary_copy' => '<p>We’re sorry we missed you at %%EventName%%. We hope to see you for another event or simply enjoying the galleries soon.</p><p>We are so grateful for your support as a Luminary and would love to have you join us for more events in the months to come. Check out <a href="https://www.artic.edu/events?audience=8">our calendar</a> to see what’s in store for Luminaries in the coming months.</p>',
'non_member_copy' => '<p>We’re sorry we missed you at %%EventName%%. We hope to see you for another event or simply enjoying the galleries soon.</p><p>We have a wide range of great programs coming up in the next couple months. Check out <a href="https://www.artic.edu/events">our calendar</a> to see the full lineup of programs offered in the coming months.</p>',
],
];
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Api/Exhibition.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Exhibition extends BaseApiModel
protected $presenterAdmin = 'App\Presenters\Admin\ExhibitionPresenter';

// Fields used when performing a search so we avoid a double call retrieving the complete entities
const SEARCH_FIELDS = ['id', 'title', 'status', 'aic_start_at', 'aic_end_at', 'is_boosted', 'thumbnail', 'short_description', 'start_at', 'end_at', 'department_display', 'gallery_title', 'gallery_id', 'image_id', 'api_model'];
const SEARCH_FIELDS = ['id', 'title', 'status', 'aic_start_at', 'aic_end_at', 'is_boosted', 'thumbnail', 'short_description', 'department_display', 'gallery_title', 'gallery_id', 'image_id', 'api_model'];

// Generates the id-slug type of URL
public function getRouteKeyName()
Expand Down
26 changes: 13 additions & 13 deletions app/Models/EmailSeries.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmailSeries extends AbstractModel implements Sortable
public static $memberTypes = [
'affiliate' => 'affiliate',
'member' => 'member',
'sustaining_fellow' => 'sustaining fellow',
'luminary' => 'luminary',
'nonmember' => 'nonmember',
];

Expand All @@ -26,11 +26,11 @@ class EmailSeries extends AbstractModel implements Sortable
'alert_message',
'show_affiliate',
'show_member',
'show_sustaining_fellow',
'show_luminary',
'show_nonmember',
'show_affiliate_test',
'show_member_test',
'show_sustaining_fellow_test',
'show_luminary_test',
'show_nonmember_test',
'position',
'published',
Expand All @@ -39,23 +39,23 @@ class EmailSeries extends AbstractModel implements Sortable
public $checkboxes = [
'show_affiliate',
'show_member',
'show_sustaining_fellow',
'show_luminary',
'show_nonmember',
'show_affiliate_test',
'show_member_test',
'show_sustaining_fellow_test',
'show_luminary_test',
'show_nonmember_test',
'published',
];

public $casts = [
'show_affiliate' => 'boolean',
'show_member' => 'boolean',
'show_sustaining_fellow' => 'boolean',
'show_luminary' => 'boolean',
'show_nonmember' => 'boolean',
'show_affiliate_test' => 'boolean',
'show_member_test' => 'boolean',
'show_sustaining_fellow_test' => 'boolean',
'show_luminary_test' => 'boolean',
'show_nonmember_test' => 'boolean',
'published' => 'boolean',
];
Expand Down Expand Up @@ -94,10 +94,10 @@ protected function transformMappingInternal()
'value' => function () {return $this->show_member;},
],
[
"name" => 'show_sustaining_fellow',
'doc' => 'Whether to show the "Include sustaining fellow-specific copy" option',
"name" => 'show_luminary',
'doc' => 'Whether to show the "Include luminary-specific copy" option',
'type' => 'boolean',
'value' => function () {return $this->show_sustaining_fellow;},
'value' => function () {return $this->show_luminary;},
],
[
"name" => 'show_nonmember',
Expand All @@ -118,10 +118,10 @@ protected function transformMappingInternal()
'value' => function () {return $this->show_member_test;},
],
[
"name" => 'show_sustaining_fellow_test',
'doc' => 'Whether to show the "Send sustaining fellow test" option',
"name" => 'show_luminary_test',
'doc' => 'Whether to show the "Send luminary test" option',
'type' => 'boolean',
'value' => function () {return $this->show_sustaining_fellow_test;},
'value' => function () {return $this->show_luminary_test;},
],
[
"name" => 'show_nonmember_test',
Expand Down
12 changes: 6 additions & 6 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Event extends AbstractModel
const RESEARCHERS_SCHOLARS = 5;
const TEACHERS = 6;
const EVENING_ASSOCIATES = 7;
const SUSTAINING_FELLOWS = 8;
const LUMINARY = 8;

public static $eventAudiences = [
self::FAMILIES => 'Families',
Expand All @@ -134,7 +134,7 @@ class Event extends AbstractModel
self::RESEARCHERS_SCHOLARS => 'Researchers/Scholars',
self::TEACHERS => 'Teachers',
self::EVENING_ASSOCIATES => 'Evening Associates',
self::SUSTAINING_FELLOWS => 'Sustaining Fellows',
self::LUMINARY => 'Luminary',
];

const BASIC_LAYOUT = 0;
Expand Down Expand Up @@ -214,15 +214,15 @@ public function emailSeries()
->withPivot(
'send_affiliate_test',
'send_member_test',
'send_sustaining_fellow_test',
'send_luminary_test',
'send_nonmember_test',
'override_affiliate',
'override_member',
'override_sustaining_fellow',
'override_luminary',
'override_nonmember',
'affiliate_copy',
'member_copy',
'sustaining_fellow_copy',
'luminary_copy',
'nonmember_copy'
);
}
Expand Down Expand Up @@ -883,7 +883,7 @@ protected function transformMappingInternal()
foreach ([
'affiliate_copy',
'member_copy',
'sustaining_fellow_copy',
'luminary_copy',
'nonmember_copy',
] as $field) {
if (isset($item->$field)) {
Expand Down
2 changes: 1 addition & 1 deletion app/Models/EventEmailSeries.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class EventEmailSeries extends Pivot
protected $casts = [
'override_affiliate' => 'boolean',
'override_member' => 'boolean',
'override_sustaining_fellow' => 'boolean',
'override_luminary' => 'boolean',
'override_nonmember' => 'boolean',
];
}
23 changes: 16 additions & 7 deletions app/Models/Exhibition.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,25 @@ protected function transformMappingInternal()
"value" => function () {return $this->exhibition_message;},
],
[
"name" => 'exhibition_location',
"doc" => "Location",
"name" => "public_start_at",
"doc" => "Public opening at",
"type" => "string",
"value" => function () {return $this->exhibition_location;},
"value" => function () {return $this->public_start_date ? $this->public_start_date->toIso8601String() : null;},
],
[
"name" => 'cms_exhibition_type',
"doc" => "CMS Type",
"type" => "number",
"value" => function () {return $this->cms_exhibition_type;},
"name" => "public_end_at",
"doc" => "Public closing at",
"type" => "string",
"value" => function () {return $this->public_end_date ? $this->public_end_date->toIso8601String() : null;},
],
[
"name" => "date_display",
"doc" => "Formatted date with override",
"type" => "string",
"value" => function () {
// WEB-1822, WEB-1830: This causes errors when the API model isn't found, needs more work on several fronts
// return trim(html_entity_decode(strip_tags($this->getApiModelFilledCached()->present()->formattedDate()->render())));
},
],
[
"name" => 'related',
Expand Down
4 changes: 2 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ private function composeTemplatesViews()
],
[
'name' => 'Learn With Us',
'slug' => 'learn-with-us',
'slug' => '/learn-with-us',
],
[
'name' => 'Support Us',
'slug' => 'support-us',
'slug' => '/support-us',
],
],

Expand Down
2 changes: 1 addition & 1 deletion app/Repositories/EventRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function prepareFieldsBeforeSave($object, $fields)
$isOnlyOneTestAudienceFieldShown = 1 === collect([
$series->show_affiliate_test,
$series->show_member_test,
$series->show_sustaining_fellow_test,
$series->show_luminary_test,
$series->show_nonmember_test,
])->filter()->count();

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

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Models\EventProgram;

class RenameSustainingFellowsEventProgram extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$program = EventProgram::where('name', 'Sustaining Fellows')->first();
$program->name = 'Luminary';
$program->save();
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$program = EventProgram::where('name', 'Luminary')->first();
$program->name = 'Sustaining Fellows';
$program->save();
}
}
Loading

0 comments on commit b929887

Please sign in to comment.