enable/disable Ticketsystem
This commit is contained in:
parent
c823a03466
commit
20f9331fda
|
@ -42,6 +42,7 @@ class Misc
|
||||||
'referral_allowed' => 'nullable|string',
|
'referral_allowed' => 'nullable|string',
|
||||||
'referral_percentage' => 'nullable|numeric',
|
'referral_percentage' => 'nullable|numeric',
|
||||||
'referral_mode' => 'nullable|string',
|
'referral_mode' => 'nullable|string',
|
||||||
|
'ticket_enabled' => 'nullable|string',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
|
@ -78,7 +79,8 @@ class Misc
|
||||||
"SETTINGS::REFERRAL::REWARD" => "referral_reward",
|
"SETTINGS::REFERRAL::REWARD" => "referral_reward",
|
||||||
"SETTINGS::REFERRAL::ALLOWED" => "referral_allowed",
|
"SETTINGS::REFERRAL::ALLOWED" => "referral_allowed",
|
||||||
"SETTINGS::REFERRAL:MODE" => "referral_mode",
|
"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="col-md-3 px-3">
|
||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<h1>Referral</h1>
|
<h1>Referral System</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -249,6 +249,21 @@
|
||||||
@endif>{{ __("Clients") }}</option>
|
@endif>{{ __("Clients") }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -225,14 +225,16 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
@if(config("SETTINGS::TICKET:ENABLED"))
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('ticket.index') }}" class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
|
<a href="{{ route('ticket.index') }}" class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
|
||||||
<i class="nav-icon fas fas fa-ticket-alt"></i>
|
<i class="nav-icon fas fas fa-ticket-alt"></i>
|
||||||
<p>{{ __('Support Ticket') }}</p>
|
<p>{{ __('Support Ticket') }}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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-header">{{ __('Moderation') }}</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
|
@ -93,11 +93,13 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
||||||
Route::post('changelocale', [TranslationController::class, 'changeLocale'])->name('changeLocale');
|
Route::post('changelocale', [TranslationController::class, 'changeLocale'])->name('changeLocale');
|
||||||
|
|
||||||
#ticket user
|
#ticket user
|
||||||
Route::get('ticket', [TicketsController::class, 'index'])->name('ticket.index');
|
if(config("SETTINGS::TICKET:ENABLED")) {
|
||||||
Route::get('ticket/new', [TicketsController::class, 'create'])->name('ticket.new');
|
Route::get('ticket', [TicketsController::class, 'index'])->name('ticket.index');
|
||||||
Route::post('ticket/new', [TicketsController::class, 'store'])->name('ticket.new.store');
|
Route::get('ticket/new', [TicketsController::class, 'create'])->name('ticket.new');
|
||||||
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
Route::post('ticket/new', [TicketsController::class, 'store'])->name('ticket.new.store');
|
||||||
Route::post('ticket/reply', [TicketsController::class, 'reply'])->name('ticket.reply');
|
Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show');
|
||||||
|
Route::post('ticket/reply', [TicketsController::class, 'reply'])->name('ticket.reply');
|
||||||
|
}
|
||||||
|
|
||||||
#admin
|
#admin
|
||||||
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
|
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
|
||||||
|
|
Loading…
Reference in a new issue