Commit 5d6e2f2f516355c46c65aab45480f49e8f949eaf

Authored by Fedor
1 parent 7d97dde354
Exists in master

task-132985 minor fixes

Showing 5 changed files with 6 additions and 6 deletions Side-by-side Diff

app/Listeners/MessageAutoresponder.php
... ... @@ -43,7 +43,7 @@ class MessageAutoresponder
43 43 ->where('user_id', $message->to_user_id)
44 44 ->where('to_user_id', $message->user_id)
45 45 ->where('text', $user->autoresponder_message)
46   - ->where('created_at', '>', now()->subDays(4))
  46 + ->where('created_at', '>', now()->subDay())
47 47 ->orWhereExists(function (Builder $query) use ($message) {
48 48 $query->from('messages', 'm2')
49 49 ->where('m2.created_at', '>', now()->subMinutes(5))
resources/views/employers/dialog.blade.php
... ... @@ -243,7 +243,7 @@
243 243 <div class="chatbox__item-body">
244 244 @if($it->text)
245 245 <div class="chatbox__item-text">
246   - @if($it->ad_employer_id > 0)
  246 + @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())
247 247 <b>Отклик на вакансию</b> "{{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}"<br>
248 248 @if($it->text)
249 249 <b>Комментарий:</b> {{ $it->text }}
resources/views/employers/vacancy_autolift.blade.php
... ... @@ -3,7 +3,7 @@
3 3 <script>
4 4 $(document).on('click', '#submit', function () {
5 5 let data = {};
6   - data.is_enabled = $('[name="is_enabled"]').val();
  6 + data.is_enabled = document.querySelector('.js_autoraise_toggle').checked;
7 7 data.times_per_day = $('[name="times_per_day"]').chosen().val();
8 8 data.days_repeat = $('[name="days_repeat"]').chosen().val();
9 9 data.time_send_first = $('[name="time_send_first"]').val();
... ... @@ -63,7 +63,7 @@
63 63 $diff = $createdAtClone->addDays($options->days_repeat)->diffInDays($options->created_at);
64 64 ?>
65 65 <label class="toggle">
66   - <input type="checkbox" @if($options->is_enabled) checked disabled @endif class="toggle__input js_autoraise_toggle">
  66 + <input name="is_enabled" type="checkbox" @if($options->is_enabled) checked disabled @endif class="toggle__input js_autoraise_toggle">
67 67 <span class="toggle__icon"></span>
68 68 <span class="toggle__text">Деактивировано</span>
69 69 <span class="toggle__text">Активировано</span>
resources/views/workers/dialog.blade.php
... ... @@ -187,7 +187,7 @@
187 187 @endif
188 188 </div>
189 189 <div class="chatbox__item-body">
190   - @if($it->ad_employer_id > 0)
  190 + @if(\App\Models\Ad_employer::where('id', $it->ad_employer_id)->exists())
191 191 <div class="chatbox__item-text">
192 192 Отклик на вакансию {{ \App\Models\Ad_employer::find($it->ad_employer_id)->name }}
193 193 @if($it->text)
resources/views/workers/resume_autolift.blade.php
... ... @@ -3,7 +3,7 @@
3 3 <script>
4 4 $(document).on('click', '#submit', function () {
5 5 let data = {};
6   - data.is_enabled = $('[name="is_enabled"]').val();
  6 + data.is_enabled = document.querySelector('.js_autoraise_toggle').checked;
7 7 data.times_per_day = $('[name="times_per_day"]').chosen().val();
8 8 data.days_repeat = $('[name="days_repeat"]').chosen().val();
9 9 data.time_send_first = $('[name="time_send_first"]').val();