This commit is contained in:
ilmedova 2022-11-23 16:56:50 +05:00
commit eea5945ec9
4 changed files with 27 additions and 19 deletions

View File

@ -23,6 +23,7 @@ class TicketController extends Controller
public function chat(Request $request)
{
$ticket = Ticket::with(['account','category'])->find($request->ticket_id);
//todo send email to admin
return view('admin.messages',[
'ticket' => $ticket
]);
@ -59,6 +60,7 @@ public function postMessage(MessageRequest $request)
$ticket['last_sender'] = 'client';
$ticket->save();
//todo send notification email to admin
return MessageResource::make($message);
}
catch(\Exception $e){

View File

@ -99,7 +99,7 @@ protected function setupListOperation()
'name' => 'account_type',
'entity' => 'account',
'model' => "App\Models\Account",
'attribute' => 'type',
'attribute' => 'account_type',
],
[
'label' => trans('app.application.leg_number'),
@ -143,6 +143,8 @@ public function accept($id){
$entry->state = 'accepted';
$entry->accepted_date = Carbon::now();
$entry->save();
//todo fix alert
\Alert::add('success', '<strong>Success!</strong><br>Application is accepted');
return redirect()->back();
}
@ -152,6 +154,9 @@ public function refine($id){
$entry->state = 'refine';
$entry->refine_note = request()->get('note');
$entry->save();
//todo fix alert
//todo send email to account clients where not suspended {note, application status message}
\Alert::add('success', '<strong>Success!</strong><br>Application is refined');
return redirect()->back();
}
@ -165,6 +170,9 @@ public function approveApplication(Request $request){
$account->legalization_number = $request->legalization_number;
$account->expires_at = $request->expires_at;
$account->save();
//todo fix alert
//todo send email to account clients where not suspended {note, application status message}
\Alert::add('success', '<strong>Success!</strong><br>Application is approved');
return redirect()->back();
}

View File

@ -127,17 +127,17 @@
'ticket' => [
'title' => 'Ticket',
'list_title' => 'tickets',
'statuses' => 'statuses',
'categories' => 'categories',
'not_found' => "There is no ticket id with value: :id",
'status' => 'Status',
'content' => 'Content',
'ticket_title' => 'Title',
'account' => 'Account',
'list_title' => 'tickets',
'statuses' => 'statuses',
'categories' => 'categories',
'not_found' => "There is no ticket id with value: :id",
'status' => 'Status',
'content' => 'Content',
'ticket_title' => 'Title',
'account' => 'Account',
'application_id' => 'Application id',
'category' => 'Category',
'last_sender' => 'Last sender',
'category' => 'Category',
'last_sender' => 'Last sender',
'create' => 'Create ticket'
],
@ -185,13 +185,11 @@
'logs' => 'logs',
'settings' => 'settings',
'last_updates' => [
'accepted_by' => 'Accepted by',
'preview' => 'Preview',
'accept' => 'Accept',
'accepted_applications' => 'Accepted applications',
'accepted' => 'Accepted',
'accepted_by' => 'Accepted by',
'preview' => 'Preview',
'accept' => 'Accept',
'accepted_applications' => 'Accepted applications',
'accepted' => 'Accepted',
'enterpreneur' => 'Entrepreneur',
'fond_capital' => 'Fond capital',
'management_types' => 'Management types',
@ -205,6 +203,7 @@
'open' => 'Open',
'add_new_user' => 'Add new user',
'fullname' => 'Full Name',
'fill_the_form' => 'Fill the form',
'go_to_ticket' => 'Go to ticket',
'close' => 'Close',

View File

@ -262,7 +262,6 @@ class="bi bi-ticket-perforated" viewBox="0 0 16 16">
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
</svg>&nbsp;
@lang('app.application.attachments')
<span class="badge badge-pill badge-secondary">{{ count($application->attachments) }}</span>
</a>
</li>
</ul>