enable/disable Ticketsystem
This commit is contained in:
parent
c823a03466
commit
20f9331fda
4 changed files with 29 additions and 8 deletions
|
@ -42,6 +42,7 @@ class Misc
|
|||
'referral_allowed' => 'nullable|string',
|
||||
'referral_percentage' => 'nullable|numeric',
|
||||
'referral_mode' => 'nullable|string',
|
||||
'ticket_enabled' => 'nullable|string',
|
||||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
@ -78,7 +79,8 @@ class Misc
|
|||
"SETTINGS::REFERRAL::REWARD" => "referral_reward",
|
||||
"SETTINGS::REFERRAL::ALLOWED" => "referral_allowed",
|
||||
"SETTINGS::REFERRAL:MODE" => "referral_mode",
|
||||
"SETTINGS::REFERRAL:PERCENTAGE" => "referral_percentage"
|
||||
"SETTINGS::REFERRAL:PERCENTAGE" => "referral_percentage",
|
||||
"SETTINGS::TICKET:ENABLED" => "ticket_enabled"
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<div class="col-md-3 px-3">
|
||||
<div class="row mb-2">
|
||||
<div class="col text-center">
|
||||
<h1>Referral</h1>
|
||||
<h1>Referral System</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -249,6 +249,21 @@
|
|||
@endif>{{ __("Clients") }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col text-center">
|
||||
<h1>Ticket System</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<div class="col m-0 p-0 d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<input value="true" id="ticket_enabled" name="ticket_enabled"
|
||||
{{ config('SETTINGS::TICKET:ENABLED') == 'true' ? 'checked' : '' }}
|
||||
type="checkbox">
|
||||
<label for="ticket_enabled">{{ __('Enable Ticketsystem') }} </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -225,14 +225,16 @@
|
|||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if(config("SETTINGS::TICKET:ENABLED"))
|
||||
<li class="nav-item">
|
||||
<a href="{{ route('ticket.index') }}" class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
|
||||
<i class="nav-icon fas fas fa-ticket-alt"></i>
|
||||
<p>{{ __('Support Ticket') }}</p>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Auth::user()->role == 'admin' || Auth::user()->role == 'moderator')
|
||||
@if ((Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') && config("SETTINGS::TICKET:ENABLED"))
|
||||
<li class="nav-header">{{ __('Moderation') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
|
|
|
@ -93,11 +93,13 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::post('changelocale', [TranslationController::class, 'changeLocale'])->name('changeLocale');
|
||||
|
||||
#ticket user
|
||||
Route::get('ticket', [TicketsController::class, 'index'])->name('ticket.index');
|
||||
Route::get('ticket/new', [TicketsController::class, 'create'])->name('ticket.new');
|
||||
Route::post('ticket/new', [TicketsController::class, 'store'])->name('ticket.new.store');
|
||||
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [TicketsController::class, 'reply'])->name('ticket.reply');
|
||||
if(config("SETTINGS::TICKET:ENABLED")) {
|
||||
Route::get('ticket', [TicketsController::class, 'index'])->name('ticket.index');
|
||||
Route::get('ticket/new', [TicketsController::class, 'create'])->name('ticket.new');
|
||||
Route::post('ticket/new', [TicketsController::class, 'store'])->name('ticket.new.store');
|
||||
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
||||
Route::post('ticket/reply', [TicketsController::class, 'reply'])->name('ticket.reply');
|
||||
}
|
||||
|
||||
#admin
|
||||
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
|
||||
|
|
Loading…
Reference in a new issue