Updated bookable rooms emails
Change-Id: I799ea6c130d54e0172b93c88282a1ee3541319b4
This commit is contained in:
parent
4203b47250
commit
835f32ea2a
@ -14,7 +14,6 @@
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use models\summit\SummitRoomReservation;
|
||||
/**
|
||||
* Class AbstractBookableRoomReservationEmailextends
|
||||
@ -25,18 +24,83 @@ abstract class AbstractBookableRoomReservationEmail extends Mailable
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var SummitRoomReservation
|
||||
* @var string
|
||||
*/
|
||||
public $reservation;
|
||||
public $owner_fullname;
|
||||
|
||||
/**
|
||||
* AbstractBookableRoomReservationEmailextends constructor.
|
||||
* @var string
|
||||
*/
|
||||
public $owner_email;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $room_complete_name;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $room_capacity;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reservation_start_datetime;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reservation_end_datetime;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reservation_created_datetime;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $reservation_amount;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $reservation_id;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $reservation_refunded_amount;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $reservation_currency;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $summit_name;
|
||||
|
||||
/**
|
||||
* AbstractBookableRoomReservationEmail constructor.
|
||||
* @param SummitRoomReservation $reservation
|
||||
*/
|
||||
public function __construct(SummitRoomReservation $reservation)
|
||||
{
|
||||
$this->reservation = $reservation;
|
||||
$this->owner_fullname = $reservation->getOwner()->getFullName();
|
||||
$this->owner_email = $reservation->getOwner()->getEmail();
|
||||
$this->room_complete_name = $reservation->getRoom()->getCompleteName();
|
||||
$this->reservation_start_datetime = $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s");
|
||||
$this->reservation_end_datetime = $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s");
|
||||
$this->reservation_created_datetime = $reservation->getCreated()->format("Y-m-d H:i:s");
|
||||
$this->reservation_amount = $reservation->getAmount();
|
||||
$this->reservation_currency = $reservation->getCurrency();
|
||||
$this->reservation_id = $reservation->getId();
|
||||
$this->room_capacity = $reservation->getRoom()->getCapacity();
|
||||
$this->summit_name = $reservation->getRoom()->getSummit()->getName();
|
||||
$this->reservation_refunded_amount = $reservation->getRefundedAmount();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ use Illuminate\Support\Facades\Config;
|
||||
*/
|
||||
final class BookableRoomReservationCanceledEmail extends AbstractBookableRoomReservationEmail
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
@ -25,12 +27,13 @@ final class BookableRoomReservationCanceledEmail extends AbstractBookableRoomRes
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = Config::get("mail.bookable_room_reservation_canceled_email_subject");
|
||||
if(empty($subject))
|
||||
$subject = sprintf("[%s] Your Room Reservation had been canceled", Config::get('app.app_name'));
|
||||
|
||||
return $this->from(Config::get("mail.from"))
|
||||
->to($this->reservation->getOwner()->getEmail())
|
||||
$subject = sprintf("[%s] Your Room Reservation had been canceled", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to($this->owner_email)
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_canceled');
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ use Illuminate\Support\Facades\Config;
|
||||
*/
|
||||
final class BookableRoomReservationCreatedEmail extends AbstractBookableRoomReservationEmail
|
||||
{
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
@ -25,12 +26,13 @@ final class BookableRoomReservationCreatedEmail extends AbstractBookableRoomRese
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = Config::get("mail.bookable_room_reservation_created_email_subject");
|
||||
if(empty($subject))
|
||||
$subject = sprintf("[%s] Room Reservation Created", Config::get('app.app_name'));
|
||||
|
||||
return $this->from(Config::get("mail.from"))
|
||||
->to($this->reservation->getOwner()->getEmail())
|
||||
$subject = sprintf("[%s] Room Reservation Created", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to($this->owner_email)
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_created');
|
||||
}
|
||||
|
@ -26,12 +26,13 @@ final class BookableRoomReservationPaymentConfirmedEmail extends AbstractBookabl
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = Config::get("mail.bookable_room_reservation_payment_confirmed_email_subject");
|
||||
if(empty($subject))
|
||||
$subject = sprintf("[%s] Your Room Reservation is confirmed!", Config::get('app.app_name'));
|
||||
|
||||
return $this->from(Config::get("mail.from"))
|
||||
->to($this->reservation->getOwner()->getEmail())
|
||||
$subject = sprintf("[%s] Your Room Reservation is confirmed!", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to($this->owner_email)
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_payment_confirmed');
|
||||
}
|
||||
|
@ -26,12 +26,13 @@ final class BookableRoomReservationRefundAcceptedEmail extends AbstractBookableR
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = Config::get("mail.bookable_room_reservation_refund_accepted_email_subject");
|
||||
if(empty($subject))
|
||||
$subject = sprintf("[%s] Your Room Reservation Refund is Accepted!", Config::get('app.app_name'));
|
||||
|
||||
return $this->from(Config::get("mail.from"))
|
||||
->to($this->reservation->getOwner()->getEmail())
|
||||
$subject = sprintf("[%s] Your Room Reservation Refund is Accepted!", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to($this->owner_email)
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_refund_accepted');
|
||||
}
|
||||
|
@ -26,11 +26,12 @@ final class BookableRoomReservationRefundRequestedAdminEmail extends AbstractBoo
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$subject = Config::get("mail.bookable_room_reservation_refund_requeted_admin_email_subject");
|
||||
if(empty($subject))
|
||||
$subject = sprintf("[%s] There is a new reservation refund request available!", Config::get('app.app_name'));
|
||||
|
||||
return $this->from(Config::get("mail.from"))
|
||||
$subject = sprintf("[%s] There is a new reservation refund request available!", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to(Config::get("bookable_rooms.admin_email"))
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_refund_requested_admin');
|
||||
|
@ -25,6 +25,15 @@ final class BookableRoomReservationRefundRequestedOwnerEmail extends AbstractBoo
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->view('view.name');
|
||||
|
||||
$subject = sprintf("[%s] Your Room Reservation Refund is requested!", $this->summit_name);
|
||||
$from = Config::get("mail.from");
|
||||
if(empty($from)){
|
||||
throw new \InvalidArgumentException("mail.from is not set");
|
||||
}
|
||||
return $this->from($from)
|
||||
->to($this->owner_email)
|
||||
->subject($subject)
|
||||
->view('emails.bookable_rooms.reservation_refund_requested_owner');
|
||||
}
|
||||
}
|
||||
|
@ -5,21 +5,22 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Dear {!! $reservation->getOwner()->getFullName() !!},
|
||||
Dear {!! $owner_fullname !!}
|
||||
</p>
|
||||
<p>
|
||||
Your Reservation for room {!! $reservation->getRoom()->getCompleteName() !!} got canceled because you did not take any action to pay it.
|
||||
Your Reservation for room {!! $room_complete_name !!} got canceled because you did not take any action to pay it.
|
||||
</p>
|
||||
<p>
|
||||
Id {!! $reservation->getId()!!}
|
||||
Owner {!! $reservation->getOwner()->getFullName()!!}
|
||||
Email {!! $reservation->getOwner()->getEmail()!!}
|
||||
From {!! $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s") !!}
|
||||
To {!! $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s") !!}
|
||||
Created {!! $reservation->getCreated()->format("Y-m-d H:i:s") !!}
|
||||
Amount {!! $reservation->getAmount() !!}
|
||||
Currency {!! $reservation->getCurrency() !!}
|
||||
<ul>
|
||||
<li>Id {!! $reservation_id !!}</li>
|
||||
<li>Owner {!! $owner_fullname!!}</li>
|
||||
<li>Email {!! $owner_email!!}</li>
|
||||
<li>From {!! $reservation_start_datetime !!}</li>
|
||||
<li>To {!! $reservation_end_datetime !!}</li>
|
||||
<li>Created {!!$reservation_created_datetime !!}</li>
|
||||
<li>Amount {!! $reservation_currency !!} {!! $reservation_amount !!}</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -5,11 +5,11 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Dear {!! $reservation->getOwner()->getFullName() !!},
|
||||
Dear {!! $owner_fullname !!}
|
||||
</p>
|
||||
<p>
|
||||
Your Reservation for room {!! $reservation->getRoom()->getCompleteName() !!} has been created successfully.
|
||||
Your Reservation for room {!! $room_complete_name !!} has been created successfully.
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -5,20 +5,22 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Dear {!! $reservation->getOwner()->getFullName() !!},
|
||||
Dear {!! $owner_fullname !!}
|
||||
</p>
|
||||
<p>
|
||||
Your Reservation for room {!! $reservation->getRoom()->getCompleteName() !!} has been confirmed.
|
||||
Your Reservation for room {!! $room_complete_name !!} has been confirmed.
|
||||
</p>
|
||||
<p>
|
||||
Please take note of the reservation info bellow:
|
||||
</p>
|
||||
<p>
|
||||
From {!! $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s") !!}
|
||||
To {!! $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s") !!}
|
||||
Room Capacity {!! $reservation->getRoom()->getCapacity() !!}
|
||||
Amount {!! $reservation->getAmount() !!}
|
||||
Currency {!! $reservation->getCurrency() !!}
|
||||
<ul>
|
||||
<li>{!! $room_complete_name !!}</li>
|
||||
<li>From {!! $reservation_start_datetime !!}</li>
|
||||
<li>To {!! $reservation_end_datetime !!}</li>
|
||||
<li>Room Capacity {!! $room_capacity !!}</li>
|
||||
<li>Amount {!! $reservation_currency !!} {!! $reservation_amount !!}</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
|
@ -5,21 +5,23 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Dear {!! $reservation->getOwner()->getFullName() !!},
|
||||
Dear {!! $owner_fullname!!}
|
||||
</p>
|
||||
<p>
|
||||
Your Refund Request Reservation for room {!! $reservation->getRoom()->getCompleteName() !!} has been confirmed.
|
||||
Your Refund Request Reservation for room {!! $room_complete_name !!} is confirmed.
|
||||
</p>
|
||||
<p>
|
||||
Please take note of the reservation info bellow:
|
||||
Please take note of the reservation info below:
|
||||
</p>
|
||||
<p>
|
||||
From {!! $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s") !!}
|
||||
To {!! $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s") !!}
|
||||
Room Capacity {!! $reservation->getRoom()->getCapacity() !!}
|
||||
Amount {!! $reservation->getRefundedAmount() !!}
|
||||
Currency {!! $reservation->getCurrency() !!}
|
||||
<ul>
|
||||
<li>{!! $room_complete_name !!}</li>
|
||||
<li>From {!! $reservation_start_datetime !!}</li>
|
||||
<li>To {!! $reservation_end_datetime !!}</li>
|
||||
<li>Room Capacity {!! $room_capacity !!}</li>
|
||||
<li>Amount {!! $reservation_currency !!} {!! $reservation_refunded_amount !!}</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -8,18 +8,20 @@
|
||||
There is a new reservation refund request available to process
|
||||
</p>
|
||||
<p>
|
||||
Please take note of the reservation info bellow:
|
||||
Please take note of the reservation info below:
|
||||
</p>
|
||||
<p>
|
||||
Id {!! $reservation->getId()!!}
|
||||
Owner {!! $reservation->getOwner()->getFullName()!!}
|
||||
Email {!! $reservation->getOwner()->getEmail()!!}
|
||||
From {!! $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s") !!}
|
||||
To {!! $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s") !!}
|
||||
Created {!! $reservation->getCreated()->format("Y-m-d H:i:s") !!}
|
||||
Amount {!! $reservation->getAmount() !!}
|
||||
Currency {!! $reservation->getCurrency() !!}
|
||||
<ul>
|
||||
<li>Id {!! $reservation_id!!}</li>
|
||||
<li>{!! $room_complete_name !!}</li>
|
||||
<li>Owner {!! $owner_fullname!!}</li>
|
||||
<li>Email {!! $owner_email !!}</li>
|
||||
<li>From {!! $reservation_start_datetime !!}</li>
|
||||
<li>To {!! $reservation_end_datetime !!}</li>
|
||||
<li>Created {!! $reservation_created_datetime !!}</li>
|
||||
<li>Amount {!! $reservation_currency !!} {!! $reservation_amount !!}</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -5,23 +5,24 @@
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Dear {!! $reservation->getOwner()->getFullName() !!},
|
||||
Dear {!! $owner_fullname !!}
|
||||
</p>
|
||||
<p>
|
||||
You had requested a refund for your reservation.
|
||||
</p>
|
||||
<p>
|
||||
Please take note of the reservation info bellow:
|
||||
Please take note of the reservation info below:
|
||||
</p>
|
||||
<p>
|
||||
Id {!! $reservation->getId()!!}
|
||||
Owner {!! $reservation->getOwner()->getFullName()!!}
|
||||
Email {!! $reservation->getOwner()->getEmail()!!}
|
||||
From {!! $reservation->getLocalStartDatetime()->format("Y-m-d H:i:s") !!}
|
||||
To {!! $reservation->getLocalEndDatetime()->format("Y-m-d H:i:s") !!}
|
||||
Created {!! $reservation->getCreated()->format("Y-m-d H:i:s") !!}
|
||||
Amount {!! $reservation->getAmount() !!}
|
||||
Currency {!! $reservation->getCurrency() !!}
|
||||
<ul>
|
||||
<li>Id {!! $reservation_id!!}</li>
|
||||
<li>Owner {!! $owner_fullname!!}</li>
|
||||
<li>Email {!! $owner_email!!}</li>
|
||||
<li>From {!! $reservation_start_datetime !!}</li>
|
||||
<li>To {!! $reservation_end_datetime !!}</li>
|
||||
<li>Created {!! $reservation_created_datetime !!}</li>
|
||||
<li>Amount {!! $reservation_currency !!} {!! $reservation_amount !!}</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>Cheers,<br/>{!! Config::get('app.tenant_name') !!} Support Team</p>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user