diff --git a/app/Codes/Email.php b/app/Codes/Email.php index b0ddc8e..c737d82 100644 --- a/app/Codes/Email.php +++ b/app/Codes/Email.php @@ -10,4 +10,5 @@ enum Email: string case ENTRY_APPROVE = '申込受付'; case ENTRY_PAYMENT_COMPLETE = '申込承認'; case CHANGE_PLAN_ORDER_APPROVE = 'プラン変更完了'; + case COULD_NOT_PEY_NOTICE = '口座振替・未納者通知'; } diff --git a/app/Email/Members/CouldNotPayNotice.php b/app/Email/Members/CouldNotPayNotice.php new file mode 100644 index 0000000..dd7c1bc --- /dev/null +++ b/app/Email/Members/CouldNotPayNotice.php @@ -0,0 +1,46 @@ +getCustomer(); + } + parent::__construct($customer); + } + + public function getTemplateName(): string + { + return 'emails.members.could_not_pay_notice'; + } + + public function getSubject(): string + { + return "定期駐車場料金未納のお知らせ"; + } + + public function getMemberParams(): array + { + return [ + 'url' => $this->getAppUrl([ + 'login', + ]), + 'smbc_register_url' => $this->getAppUrl([ + 'dashboard', 'update', 'user', 'back-register', + ]), + ]; + } +} diff --git a/app/Email/Members/SelectionNotice.php b/app/Email/Members/SelectionNotice.php index 1e8d0a0..1f27dda 100644 --- a/app/Email/Members/SelectionNotice.php +++ b/app/Email/Members/SelectionNotice.php @@ -7,6 +7,9 @@ use App\Kintone\Models\SeasonTicketContractSelection; use App\Logic\SeasonTicketContractEntryManager; use App\Logic\SeasonTicketContractSelectionManager; +/** + * 定期選考_一斉通知 + */ class SelectionNotice extends Members { @@ -24,7 +27,7 @@ class SelectionNotice extends Members public function getSubject(): string { - return "##TODO## 選考通知"; + return "定期利用抽選のお知らせ"; } public function getMemberParams(): array diff --git a/app/Http/Controllers/Web/Email/EmailSendController.php b/app/Http/Controllers/Web/Email/EmailSendController.php index d4792c6..0fe4fa9 100644 --- a/app/Http/Controllers/Web/Email/EmailSendController.php +++ b/app/Http/Controllers/Web/Email/EmailSendController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Web\Email; use App\Codes\Email; use App\Email\BaseEmailer; use App\Email\Members\ChangePlanOrderApprove; +use App\Email\Members\CouldNotPayNotice; use App\Email\Members\EntryApprove; use App\Email\Members\EntryPaymentComplete; use App\Email\Members\TerminateOrderApprove; @@ -12,6 +13,7 @@ use App\Email\Members\UserInfoUpdateOrderApprove; use App\Email\Members\VehicleInfoUpdateOrderApprove; use App\Http\Controllers\Web\FromKintoneController; use App\Kintone\Models\ChangePlanApplication; +use App\Kintone\Models\PaymentPlan; use App\Kintone\Models\SeasonTicketContract; use App\Kintone\Models\SeasonTicketContractEntry; use App\Kintone\Models\TerminateApplication; @@ -112,6 +114,12 @@ class EmailSendController extends FromKintoneController $this->setEmail(new ChangePlanOrderApprove($seasonTicketContract, $application)); return; } + if ($emailId === Email::COULD_NOT_PEY_NOTICE) { + $seasonTicketContract = SeasonTicketContract::find($this->param->seasonTicketContractRecordNo); + $paymentPlan = PaymentPlan::find($this->param->paymentPlanRecordNo); + $this->setEmail(new CouldNotPayNotice($seasonTicketContract, $paymentPlan)); + return; + } if ($this->email === null || $this->emailManager === null) { diff --git a/app/Http/Controllers/Web/Email/EmailSendParam.php b/app/Http/Controllers/Web/Email/EmailSendParam.php index 43b8e48..e98c1b7 100644 --- a/app/Http/Controllers/Web/Email/EmailSendParam.php +++ b/app/Http/Controllers/Web/Email/EmailSendParam.php @@ -8,7 +8,9 @@ use Illuminate\Validation\Rules\Enum; /** * @property Email emailId + * @property ?int seasonTicketContractRecordNo * @property ?int seasonTicketContractEntryRecordNo + * @property ?int paymentPlanRecordNo * @property ?string applicationNo */ class EmailSendParam extends BaseParam @@ -17,7 +19,9 @@ class EmailSendParam extends BaseParam { return [ 'email_id' => $this->enum([new Enum(Email::class)]), + 'season_ticket_contract_record_no' => $this->numeric(true), 'season_ticket_contract_entry_record_no' => $this->numeric(true), + 'payment_plan_record_no' => $this->numeric(true), 'application_no' => $this->str(true), ]; } diff --git a/app/Kintone/Models/KintoneModel.php b/app/Kintone/Models/KintoneModel.php index 210fb03..23e19e9 100644 --- a/app/Kintone/Models/KintoneModel.php +++ b/app/Kintone/Models/KintoneModel.php @@ -88,7 +88,7 @@ abstract class KintoneModel /** * @return static */ - public static function find(string $recordId) + public static function find(int $recordId) { return static::getAccess()->find($recordId); } diff --git a/resources/views/emails/members/could_not_pay_notice.blade.php b/resources/views/emails/members/could_not_pay_notice.blade.php new file mode 100644 index 0000000..6189d1f --- /dev/null +++ b/resources/views/emails/members/could_not_pay_notice.blade.php @@ -0,0 +1,20 @@ +@extends('emails.layouts.member') + +@section('contents') +駐車料金口座引落にて(資金不足or口座未登録)のため、未納となっております。 +前月までに(翌月分or翌年分)を前納によりお支払い頂くため、次回口座引落にて合算にて引落しさせて +頂きます。 +27日(土日祝の場合、翌営業日)の前日には、口座に駐車料金を必ずご用意下さいますようお願い致します。 + +なお、本メールと行き違いで、既にご対応頂いている場合は何卒ご容赦頂けますと幸いです。 +ご確認のほど何卒宜しくお願い申し上げます。 + +※お支払い状況、お問い合わせ、その他各種お手続きはマイページから確認・申請頂けます。 +(初回のみ新規登録済のメールアドレスにてパスワード設定が必要となります。) +{{ $url }} + +※振替口座登録がお済みでない方は、下記URLから速やかに振替口座登録を行って下さい。 +(登録の際は、金融機関での登録完了画面までお進み頂いている事をご確認下さい。) +(金融機関登録の進捗状況により、合算での振替となります。) +{{ $smbc_register_url }} +@endsection \ No newline at end of file diff --git a/設計書/メール一覧.xlsx b/設計書/メール一覧.xlsx index 093535b..940ce9d 100644 Binary files a/設計書/メール一覧.xlsx and b/設計書/メール一覧.xlsx differ