добавлены новые сообщения в историю изменения контактов и сделок

This commit is contained in:
Thekindbull 2025-05-27 09:58:04 +08:00
parent b9dc42166e
commit 8454478df9
3 changed files with 24 additions and 14 deletions

View File

@ -10,10 +10,9 @@
use App\Models\Deal\Deal; use App\Models\Deal\Deal;
use App\Models\Deal\DealStatus; use App\Models\Deal\DealStatus;
class DealCreated extends Notification class DealUnique extends Notification
{ {
use Queueable; use Queueable;
private $deal;
/** /**
* Create a new notification instance. * Create a new notification instance.
*/ */

View File

@ -13,6 +13,8 @@
| |
*/ */
'has no notifications' => 'Список уведомлений пуст', 'has no notifications' => 'Список уведомлений пуст',
'has no history' => 'История изменений отсутствует',
'App\Notifications\UniqueContact' => 'Контакт :contact был проверен, уникальность подтверждена', 'App\Notifications\UniqueContact' => 'Контакт :contact был проверен, уникальность подтверждена',
'App\Notifications\NotUniqueContact' => 'Контакт :contact был проверен и является не уникальным', 'App\Notifications\NotUniqueContact' => 'Контакт :contact был проверен и является не уникальным',
'App\Notifications\ContractUpdated' => 'Информация о договоре для контакта ":contact" обновлен', 'App\Notifications\ContractUpdated' => 'Информация о договоре для контакта ":contact" обновлен',

View File

@ -91,20 +91,29 @@ class="bi bi-pen" viewBox="0 0 16 16">
</div> </div>
<div class="col-12 col-lg-4 py-3 text-dark" style="background-color:#eef5fb"> <div class="col-12 col-lg-4 py-3 text-dark" style="background-color:#eef5fb">
<div class="fw-bold fs-5 mb-3">История договора</div> <div class="fw-bold fs-5 mb-3">История договора</div>
@for ($i = 0; $i <= 4; $i++) @if ($contract->notifications->count() == 0)
<div class="d-flex flex-row mb-3"> <div class="d-flex justify-content-center align-items-center">
<div class="pe-2"> <div class="d-grid gap-1 p-3">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor" <i class="bi bi-inbox display-5 text-center"></i>
class="bi bi-record-circle-fill align-middle" viewBox="0 0 16 16"> <span class="fs-6 fw-semibold">{{ __('notifications.has no history') }}</span>
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6" />
</svg>
</div>
<div class="">
<div class="text-secondary">05.03.25</div>
<div class="fw-bold text-dark-emphasis">Запланирована встреча с клиентом</div>
</div> </div>
</div> </div>
@endfor @else
@foreach ($contract->notifications as $notification)
<div class="d-flex flex-row mb-3">
<div class="pe-2">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="currentColor"
class="bi bi-record-circle-fill align-middle" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6" />
</svg>
</div>
<div class="">
<div class="text-secondary">{{ $notification->created_at }}</div>
<div class="fw-bold text-dark-emphasis">{{ $notification->data['text'] }}</div>
</div>
</div>
@endfor
@endif
</div> </div>
</div> </div>
@endsection @endsection