feat: add configurable ticket_must_wait_reply setting
This commit is contained in:
@@ -70,7 +70,7 @@ class TicketController extends Controller
|
|||||||
if ($ticket->status) {
|
if ($ticket->status) {
|
||||||
return $this->fail([400, __('The ticket is closed and cannot be replied')]);
|
return $this->fail([400, __('The ticket is closed and cannot be replied')]);
|
||||||
}
|
}
|
||||||
if ($request->user()->id == $this->getLastMessage($ticket->id)->user_id) {
|
if ((int) admin_setting('ticket_must_wait_reply', 0) && $request->user()->id == $this->getLastMessage($ticket->id)->user_id) {
|
||||||
return $this->fail(codeResponse: [400, __('Please wait for the technical enginneer to reply')]);
|
return $this->fail(codeResponse: [400, __('Please wait for the technical enginneer to reply')]);
|
||||||
}
|
}
|
||||||
$ticketService = new TicketService();
|
$ticketService = new TicketService();
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ class ConfigController extends Controller
|
|||||||
'tos_url' => admin_setting('tos_url'),
|
'tos_url' => admin_setting('tos_url'),
|
||||||
'currency' => admin_setting('currency', 'CNY'),
|
'currency' => admin_setting('currency', 'CNY'),
|
||||||
'currency_symbol' => admin_setting('currency_symbol', '¥'),
|
'currency_symbol' => admin_setting('currency_symbol', '¥'),
|
||||||
|
'ticket_must_wait_reply' => (bool) admin_setting('ticket_must_wait_reply', 0),
|
||||||
],
|
],
|
||||||
'subscribe' => [
|
'subscribe' => [
|
||||||
'plan_change_enable' => (bool) admin_setting('plan_change_enable', 1),
|
'plan_change_enable' => (bool) admin_setting('plan_change_enable', 1),
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class ConfigSave extends FormRequest
|
|||||||
'tos_url' => 'nullable|url',
|
'tos_url' => 'nullable|url',
|
||||||
'currency' => '',
|
'currency' => '',
|
||||||
'currency_symbol' => '',
|
'currency_symbol' => '',
|
||||||
|
'ticket_must_wait_reply' => '',
|
||||||
// subscribe
|
// subscribe
|
||||||
'plan_change_enable' => '',
|
'plan_change_enable' => '',
|
||||||
'reset_traffic_method' => 'in:0,1,2,3,4',
|
'reset_traffic_method' => 'in:0,1,2,3,4',
|
||||||
|
|||||||
+1
-1
Submodule public/assets/admin updated: 86a5f20d8a...6a48a43374
Reference in New Issue
Block a user