обновлено уведомление о договоре

This commit is contained in:
developer 2026-04-24 14:08:14 +08:00
parent 0e0f256848
commit c0c1f81686
2 changed files with 8 additions and 3 deletions

View File

@ -55,9 +55,14 @@ public function toMail(object $notifiable): MailMessage
*/ */
public function toArray(object $notifiable): array public function toArray(object $notifiable): array
{ {
$clientsPhones = $this->contract->deal->clients->pluck('phone')->toArray();
$clientsNames = $this->contract->deal->clients->pluck('name')->toArray();
foreach ($clientsNames as $key=>$name) {
$clientsNames[$key] = $name . ' ' . $clientsPhones[$key] .'';
}
return [ return [
'contract' => $this->contract->id, 'contract' => $this->contract->id,
'text' => __('notifications.' . get_class($this), ['contact' => $this->contract->deal->agent->name]) 'text' => __('notifications.' . get_class($this), ['contact' => implode(', ', $clientsNames)])
]; ];
} }
} }

View File

@ -18,7 +18,7 @@
'App\Notifications\UniqueContact' => 'Контакт <b>:contact</b> был проверен, уникальность подтверждена на ЖК ":complex". С Вами свяжется ответственный менеджер.', 'App\Notifications\UniqueContact' => 'Контакт <b>:contact</b> был проверен, уникальность подтверждена на ЖК ":complex". С Вами свяжется ответственный менеджер.',
//'App\Notifications\UniqueContact' =>'Контакт :contact был проверен, уникальность подтверждена', //'App\Notifications\UniqueContact' =>'Контакт :contact был проверен, уникальность подтверждена',
'App\Notifications\NotUniqueContact' => 'Контакт :contact был проверен и является не уникальным', 'App\Notifications\NotUniqueContact' => 'Контакт :contact был проверен и является не уникальным',
'App\Notifications\ContractUpdated' => 'Информация о договоре для контакта ":contact" обновлен', 'App\Notifications\ContractUpdated' => 'Информация о договоре для контакта <b>:contact"</b> обновлен',
'App\Notifications\Deal\DealCreated' => 'Контакт создан', 'App\Notifications\Deal\DealCreated' => 'Контакт создан',
'App\Notifications\Deal\DealUnique' => 'Стутус контакта изменен на "уникальный"', 'App\Notifications\Deal\DealUnique' => 'Стутус контакта изменен на "уникальный"',