Skip to content

Commit f96f91d

Browse files
committed
Bug: Agent modal was not showing status name in check
1 parent a8e8edc commit f96f91d

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/PanicHDServiceProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PanicHD\PanicHD\Controllers\ToolsController;
1616
use PanicHD\PanicHD\Models\Comment;
1717
use PanicHD\PanicHD\Models\Setting;
18+
use PanicHD\PanicHD\Models\Status;
1819
use PanicHD\PanicHD\Models\Ticket;
1920

2021
class PanicHDServiceProvider extends ServiceProvider
@@ -197,6 +198,12 @@ public function boot()
197198
$view->with(compact('editor_locale', 'editor_options'));
198199
});
199200

201+
// Change agent modal
202+
view()->composer('panichd::tickets.partials.modal_agent', function ($view) {
203+
$status_check_name = Setting::grab('default_reopen_status_id') == '0' ? Status::first()->name : Status::find(Setting::grab('default_reopen_status_id'))->name;
204+
$view->with(compact('status_check_name'));
205+
});
206+
200207
// Notices widget
201208
view()->composer(['panichd::notices.widget', 'panichd::notices.index'], function ($view) {
202209
if (Setting::grab('departments_notices_feature')) {

src/Views/tickets/partials/modal_agent.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@endforeach
2424

2525
@if ($setting->grab('use_default_status_id'))
26-
<label><input type="checkbox" name="status_checkbox" value="yes">{{ trans('panichd::lang.table-agent-status-check') }}</label>
26+
<label><input type="checkbox" name="status_checkbox" value="yes"> {{ trans('panichd::lang.table-agent-status-check', ['status' => $status_check_name]) }}</label>
2727
@endif
2828
</div>
2929
<div class="modal-footer">

0 commit comments

Comments
 (0)