From a8301660fc4efc117515d91f2fdf3491d889a54f Mon Sep 17 00:00:00 2001 From: Kwesi Banson Date: Mon, 6 Mar 2023 15:14:53 +0000 Subject: [PATCH] note highlights, Notes Emails, client edit --- app/Http/Controllers/ClientsController.php | 98 +++++++-- app/Jobs/SendNewNotesEmailAlert.php | 50 +++++ resources/views/client/create.blade.php | 7 + .../views/client/edit-modified.blade.php | 199 ++++++++++++++++++ resources/views/client/edit.blade.php | 196 +++++++++++------ resources/views/client/edit.blade.php.bak | 151 +++++++++++++ resources/views/client/new_notes.blade.php | 14 ++ resources/views/client/show.blade.php | 122 ++++++----- resources/views/emails/new-notes.blade.php | 27 +++ 9 files changed, 735 insertions(+), 129 deletions(-) create mode 100644 app/Jobs/SendNewNotesEmailAlert.php create mode 100644 resources/views/client/edit-modified.blade.php create mode 100644 resources/views/client/edit.blade.php.bak create mode 100644 resources/views/emails/new-notes.blade.php diff --git a/app/Http/Controllers/ClientsController.php b/app/Http/Controllers/ClientsController.php index 4c89f0e..494dacc 100755 --- a/app/Http/Controllers/ClientsController.php +++ b/app/Http/Controllers/ClientsController.php @@ -8,6 +8,7 @@ use Session; use Illuminate\Support\Arr; use App\Jobs\SendNewUssdClientEmail; use App\Jobs\SendUssdClientActiveEmail; +use App\Jobs\SendNewNotesEmailAlert; class ClientsController extends Controller @@ -236,10 +237,18 @@ class ClientsController extends Controller 'auth_user_id' => $auth_user['id'], 'client_id' => $request->client_id ]; + if ($request->has('highlight')) { + $notes_arr['highlight'] = 'YES'; + } + - //todo : send emails //dd($notes_arr); $result = Models\ClientNote::create($notes_arr); + + $notes = Models\ClientNote::with('client_info', 'created_by_info')->find($result->id); + //todo : send emails + //dispatch(new SendNewNotesEmailAlert($notes)); + if ($result) { $data = ['code' => 1, 'msg' => 'Notes successfully added']; } @@ -262,16 +271,29 @@ class ClientsController extends Controller $service_type = Models\Service::pluck('name', 'id'); $service_type_names = Models\Service::pluck('name', 'name'); $show_services = Models\ClientCategory::where('client_id', $id)->get(); + //->where('highlight', 'NO') $show_notes = Models\ClientNote::with('created_by_info', 'client_info')->where('client_id', $id)->orderBy('id', 'DESC')->get()->take(20); - + + if ($showclient->status == 'Live') { + $status_bg = "info"; + } + elseif ($showclient->status == 'Prospective') { + $status_bg = "warning"; + } + else{ + $status_bg = "danger"; + } + + //dd($showclient->sender_ids); $data = [ - 'page_title' => 'Show Client', + 'page_title' => 'Client Profile', 'showclient' => $showclient, 'show_services' => $show_services, 'service_type' => $service_type, 'service_type_names' => $service_type_names, - 'show_notes' => $show_notes + 'show_notes' => $show_notes, + 'status_bg' => $status_bg ]; return view('client.show', $data); @@ -307,19 +329,40 @@ class ClientsController extends Controller { $client = Models\Client::find($id); - $service_type = Models\Service::pluck('name', 'id'); - // $payment_type = Models\PaymentType::pluck('name', 'id'); + $countries = Models\Country::pluck('en_short_name','en_short_name'); - $countries = Models\Country::pluck('en_short_name','alpha_2_code'); - - $payment_type = [1 => 'Prepaid', 2 => 'Postpaid']; // Models\PaymentType::pluck('name', 'id')->toArray(); + $payment_type = ['Prepaid' => 'Prepaid', 'Postpaid' => 'Postpaid']; // Models\PaymentType::pluck('name', 'id')->toArray(); $status = ['Live' => 'Live', 'inactive' => 'Inactive', 'Prospective' => 'Prospective']; $currency = Models\Currency::pluck('name', 'name'); // - // dd($currency); - $auth_users = Models\Account::pluck('name', 'id'); - // dump(array_flatten($client->client_services)); + $company_types = ['A2P Supplier' => 'A2P Supplier', 'A2P Consumer' => 'A2P Consumer', 'Hybrid' => 'Hybrid']; + $auth_users = Models\Account::pluck('name', 'id'); + // dd($client->sender_ids); + if ($client->sender_ids) { + $sender_ids = json_decode($client->sender_ids, true); + $sender_ids = array_combine($sender_ids, $sender_ids); + $old_sender_ids = json_decode($client->sender_ids, true); + } + else{ + $sender_ids = ['click' => 'click']; + $old_sender_ids = []; + } + + + if ($client->status == 'Live') { + $status_bg = "info"; + } + elseif ($client->status == 'Prospective') { + $status_bg = "warning"; + } + else{ + $status_bg = "danger"; + } + + $contract_types = ['bilateral' => 'bilateral', 'unilateral' => 'unilateral']; + $connections = ['SMPP' => 'SMPP', 'HTTP' => 'HTTP']; + $data = [ 'client' => $client, 'countries' => $countries, @@ -327,7 +370,14 @@ class ClientsController extends Controller 'payment_type' => $payment_type, 'status' => $status, 'auth_users' => $auth_users, - 'currency' => $currency + 'currency' => $currency, + 'page_title' => 'Update Client Details', + 'connections_arr' => $connections, + 'status_bg' => $status_bg, + 'sender_ids' => $sender_ids, + 'company_types' => $company_types, + 'old_sender_ids' => $old_sender_ids, + 'contract_types' => $contract_types ]; // dd($service_type->toArray()); return view('client.edit', $data); @@ -342,21 +392,24 @@ class ClientsController extends Controller */ public function update(Request $request, $id) { - + //Todo : work on the services and the sender IDs $request->validate([ 'name' => 'required', - // 'email' => 'required|email', - // 'services' => 'required', + 'email' => 'required|email', 'country' => 'required', 'status' => 'required', - // 'payment_mode' => 'required', 'currency' => 'required', + 'auth_user_id' => 'required' ]); $client_update = Models\Client::find($id); + //dump($request->status); + //dump(($request->sender_ids) ? json_encode($request->sender_ids) : ""); //dd($request->all()); + $client_update->name = $request->name; $client_update->email = $request->email; + $client_update->phone = $request->phone ?? ""; $client_update->contact_person = $request->contact_person; $client_update->status = $request->status; $client_update->pay_mode = $request->payment_mode; @@ -365,6 +418,15 @@ class ClientsController extends Controller $client_update->notes = $request->notes; $client_update->skype_name = $request->skype_name; $client_update->linkedin_name = $request->linkedin_name; + + $client_update->company_type = $request->company_type ?? ""; + $client_update->auth_user_id = $request->auth_user_id ?? ""; + $client_update->contract_type = $request->contract_type ?? ""; + $client_update->contract_validity = $request->contract_validity ?? ""; + $client_update->smpp_details = $request->smpp_details ?? ""; + $client_update->sender_ids = ($request->sender_ids) ? json_encode($request->sender_ids) : ""; + $client_update->connections = ($request->connections) ? json_encode($request->connections) : ""; + $client_update->created_by = session('current_user.id'); $client_update->last_modified_by = session('current_user.id'); @@ -395,7 +457,7 @@ class ClientsController extends Controller Session::flash('success_message', 'Client successfully Updated'); - return redirect(url('clients')); + return redirect(url('clients', $id)); } /** diff --git a/app/Jobs/SendNewNotesEmailAlert.php b/app/Jobs/SendNewNotesEmailAlert.php new file mode 100644 index 0000000..6b8e99b --- /dev/null +++ b/app/Jobs/SendNewNotesEmailAlert.php @@ -0,0 +1,50 @@ +note = $note; + } + + /** + * Execute the job. + * + * @return void + */ + public function handle(Mailer $mailer) + { + $note = $this->note; + $emails = ['samuel@click-mobile.com']; + + //$note_body = $note->notes_body; + + + $data = [ + 'client' => $note->client_info->name, + 'created_by' => $note->created_by_info->name, + 'services' => $note->services, + 'notes_body' => $note->notes_body + ]; + $mailer->send('emails.new-notes', $data, function ($message) use ($data, $emails) { + $message->from('support@click-mobile.com', 'Click Mobile ERP'); + $message->to($emails)->subject('New Notes'); + }); + } +} diff --git a/resources/views/client/create.blade.php b/resources/views/client/create.blade.php index 4b20d66..d02fa65 100755 --- a/resources/views/client/create.blade.php +++ b/resources/views/client/create.blade.php @@ -44,6 +44,13 @@ {!! $errors->first('contact_person', '

:message

') !!} +
+ +
+ {!! Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder'=>'Enter Phone Number' , 'id' => 'phone']) !!} + {!! $errors->first('phone', '

:message

') !!} +
+
diff --git a/resources/views/client/edit-modified.blade.php b/resources/views/client/edit-modified.blade.php new file mode 100644 index 0000000..deb20df --- /dev/null +++ b/resources/views/client/edit-modified.blade.php @@ -0,0 +1,199 @@ +@extends('layouts.master') +@section('page_title') + @if(isset($page_title)) + {{ $page_title }} + @endif +@endsection +@section('content') +
+
+
+ +
+
+
+
+
+
+
+ Update Client Details + @include('commons.notifications') +
+
+ {{-- start of content --}} +
+
+ {!! Form::model($client, [ + 'method' => 'PATCH', + 'url' => ['clients', $client], + 'class' => 'form-horizontal form-label-left' + ]) !!} +
+
+
+ +
+ {!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter client name' , 'id' => 'name']) !!} + {!! $errors->first('name', '

:message

') !!} + + + +
+
+
+ +
+ {!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!} + {!! $errors->first('contact_person', '

:message

') !!} +
+
+ +
+ +
+ {!! Form::text('email', old('email'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter email' , 'id' => 'email']) !!} + {!! $errors->first('email', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!} + {!! $errors->first('skype_name', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!} + {!! $errors->first('linkedin_name', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!} + {!! $errors->first('country', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'currency']) !!} + {!! $errors->first('currency', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('status', $status ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Status ' , 'id' => 'status']) !!} + {!! $errors->first('status', '

:message

') !!} +
+
+ +
+ +
+
+ +
+ {!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!} + {!! $errors->first('auth_user_id', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('services[]', $service_type, ['1' => 'A2P', '2' => 'USSD'], ['class' => 'form-control col-md-7 col-xs-12 typeServices' , 'id' => 'services', 'multiple'=> 'true']) !!} + {!! $errors->first('services', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('contract_type', ['bilateral', 'unilateral'], old('contract_type'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Contract type' , 'id' => 'contractType']) !!} + {!! $errors->first('contract_type', '

:message

') !!} +
+
+
+ +
+ {!! Form::number('contract_validity', old('contract_validity'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contract Validity Period' , 'id' => 'contractValidity']) !!} + {!! $errors->first('contract_validity', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('connections[]', $connections, null, ['class' => 'form-control col-md-7 col-xs-12 ' , 'id' => 'services', 'multiple'=> 'true']) !!} + {!! $errors->first('connections', '

:message

') !!} +
+
+
+ +
+ {!! Form::textarea('smpp_details', null, ['class' => 'form-control col-md-7 col-xs-12 ' , 'id' => 'smppDetails']) !!} + {!! $errors->first('smpp_details', '

:message

') !!} +
+
+
+
+
+ +
+ {!! Form::select('payment_mode', $payment_type, old('pay_mode'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'payment_mode']) !!} + {!! $errors->first('payment_mode', '

:message

') !!} +
+
+
+ +

+ Live: + + Prospective: + + Inactive + +

+
+
+
+
+ {"protocol" : "SMPP", "version" : "3.4", "IP Address" : "Port" : "8999", "password" : "password", "system_type" : "SMPP", "Bind_mode" : "TRX", "TPS":"50"} +
+ + +
+
+
+ +
+
+ {!! Form::close() !!} +
+ {{-- end of x_content --}} +
+ {{-- end of x_panel --}} +
+
+ +
+ +@endsection + +@section('javascript') + +@endsection diff --git a/resources/views/client/edit.blade.php b/resources/views/client/edit.blade.php index a7d65c5..277c034 100755 --- a/resources/views/client/edit.blade.php +++ b/resources/views/client/edit.blade.php @@ -32,96 +32,165 @@ 'class' => 'form-horizontal form-label-left' ]) !!}
+
- -
- {!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter client name' , 'id' => 'name']) !!} +
+ + {!! Form::text('name', old('name'), ['class' => 'form-control ', 'placeholder'=>'Enter client name' , 'id' => 'name']) !!} {!! $errors->first('name', '

:message

') !!}
- -
- {!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!} +
+ + {!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!} {!! $errors->first('contact_person', '

:message

') !!}
- -
- {!! Form::text('email', old('email'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter email' , 'id' => 'email']) !!} +
+ + {!! Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder'=>'Enter Phone Number' , 'id' => 'phone']) !!} + {!! $errors->first('phone', '

:message

') !!} +
+
+ +
+
+ + {!! Form::text('email', old('email'), ['class' => 'form-control ', 'placeholder'=>'Enter email' , 'id' => 'email']) !!} {!! $errors->first('email', '

:message

') !!}
- -
- {!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!} +
+ + {!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!} {!! $errors->first('skype_name', '

:message

') !!}
-
- -
- {!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!} +
+
+ + {!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control ', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!} {!! $errors->first('linkedin_name', '

:message

') !!}
-
- -
- {!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!} - {!! $errors->first('auth_user_id', '

:message

') !!} -
-
- -
- -
- {!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!} +
+
+ + {!! Form::select('country', $countries, old('country'), ['class' => 'form-control ', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!} {!! $errors->first('country', '

:message

') !!}
-
- -
- {!! Form::select('status', $status ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Status ' , 'id' => 'status']) !!} - {!! $errors->first('status', '

:message

') !!} -
-
-
- -
- {!! Form::select('payment_mode', $payment_type, old('pay_mode'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'payment_mode']) !!} - {!! $errors->first('payment_mode', '

:message

') !!} -
-
-
- -
- {!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'currency']) !!} +
+
+ + {!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control ' , 'id' => 'currency']) !!} {!! $errors->first('currency', '

:message

') !!}
- -
- -
- {!! Form::textarea('notes', old('notes'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter additional information here', 'rows' => '5', 'id' => 'clientNotes']) !!} - {!! $errors->first('notes', '

:message

') !!} + + +
+
+
+
+ + {!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control ', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!} + {!! $errors->first('auth_user_id', '

:message

') !!}
+
+
+
+ + {!! Form::select('services[]', $service_type, ['1' => 'A2P', '2' => 'USSD'], ['class' => 'form-control typeServices' , 'id' => 'services', 'multiple'=> 'true']) !!} + {!! $errors->first('services', '

:message

') !!} +
+
+
+
+ + {!! Form::select('company_type', $company_types, old('company_type'), ['class' => 'form-control', 'placeholder'=>'Enter Company Type' , 'id' => 'companyType']) !!} + {!! $errors->first('company_type', '

:message

') !!} +
+
+ +
+ {!! Form::select('contract_type', $contract_types, old('contract_type'), ['class' => 'form-control ', 'placeholder'=>'Select Contract type' , 'id' => 'contractType']) !!} + {!! $errors->first('contract_type', '

:message

') !!} +
+
+
+ +
+ {!! Form::number('contract_validity', old('contract_validity'), ['class' => 'form-control', 'placeholder'=>'Enter Contract Validity Period' , 'id' => 'contractValidity']) !!} + {!! $errors->first('contract_validity', '

:message

') !!} +
+
+
+
+ + {!! Form::select('connections[]', $connections_arr, json_decode($client->connections, true), ['class' => 'form-control ' , 'id' => 'connections', 'placeholder'=> 'Select Connection Type', 'multiple' => 'true' ]) !!} + {!! $errors->first('connections', '

:message

') !!} +
+
+
+
+ + {!! Form::textarea('smpp_details', old('smpp_details'), ['class' => 'form-control' , 'id' => 'smppDetails', 'placeholder' => 'SMPP Details in JSON Format here', 'rows' => '4']) !!} + {!! $errors->first('smpp_details', '

:message

') !!} +
+
+
+
+
+
+ + {!! Form::select('payment_mode', $payment_type, old('pay_mode'), ['class' => 'form-control' , 'id' => 'payment_mode']) !!} + {!! $errors->first('payment_mode', '

:message

') !!} +
+
+
+
+ + {!! Form::select('sender_ids[]', $sender_ids, $old_sender_ids, ['class' => 'form-control senderIds' , 'id' => 'senderIds', 'multiple' => 'true' ]) !!} + {!! $errors->first('sender_ids', '

:message

') !!} +
+
+
+
+ + {!! Form::textarea('notes', old('notes'), ['class' => 'form-control ', 'placeholder'=>'Enter additional information here', 'rows' => '5', 'id' => 'clientNotes']) !!} + {!! $errors->first('notes', '

:message

') !!} +
+
+
+ + +
+

+ Live: + status == 'Live') ? "checked" : ""; ?> /> +

+

+ Prospective: + status == 'Prospective') ? "checked" : ""; ?> /> +

+

+ Inactive + status == 'Inactive') ? "checked" : ""; ?> /> +

+
+
+ +
-
- +
+
{!! Form::close() !!} @@ -143,9 +212,12 @@ // var PRESELECTED_FRUITS = ['A2P','USSD']; // $('.typeServices').select2({}).select2('val', PRESELECTED_FRUITS); - $('.typeServices').select2({ + + $('.senderIds').select2({ tags : true - }); + }); + // + // }); @endsection diff --git a/resources/views/client/edit.blade.php.bak b/resources/views/client/edit.blade.php.bak new file mode 100644 index 0000000..a7d65c5 --- /dev/null +++ b/resources/views/client/edit.blade.php.bak @@ -0,0 +1,151 @@ +@extends('layouts.master') +@section('page_title') + @if(isset($page_title)) + {{ $page_title }} + @endif +@endsection +@section('content') +
+
+
+ +
+
+
+
+
+
+
+ Update Client Details + @include('commons.notifications') +
+
+ {{-- start of content --}} +
+
+ {!! Form::model($client, [ + 'method' => 'PATCH', + 'url' => ['clients', $client], + 'class' => 'form-horizontal form-label-left' + ]) !!} +
+
+ +
+ {!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter client name' , 'id' => 'name']) !!} + {!! $errors->first('name', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!} + {!! $errors->first('contact_person', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('email', old('email'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter email' , 'id' => 'email']) !!} + {!! $errors->first('email', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!} + {!! $errors->first('skype_name', '

:message

') !!} +
+
+
+ +
+ {!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!} + {!! $errors->first('linkedin_name', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!} + {!! $errors->first('auth_user_id', '

:message

') !!} +
+
+ +
+ +
+ {!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!} + {!! $errors->first('country', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('status', $status ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Status ' , 'id' => 'status']) !!} + {!! $errors->first('status', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('payment_mode', $payment_type, old('pay_mode'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'payment_mode']) !!} + {!! $errors->first('payment_mode', '

:message

') !!} +
+
+
+ +
+ {!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'currency']) !!} + {!! $errors->first('currency', '

:message

') !!} +
+
+ +
+ +
+ {!! Form::textarea('notes', old('notes'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter additional information here', 'rows' => '5', 'id' => 'clientNotes']) !!} + {!! $errors->first('notes', '

:message

') !!} +
+
+
+
+
+
+ +
+
+ {!! Form::close() !!} +
+ {{-- end of x_content --}} +
+ {{-- end of x_panel --}} +
+
+ +
+ +@endsection + +@section('javascript') + +@endsection diff --git a/resources/views/client/new_notes.blade.php b/resources/views/client/new_notes.blade.php index e91e7ce..b0bf456 100644 --- a/resources/views/client/new_notes.blade.php +++ b/resources/views/client/new_notes.blade.php @@ -26,6 +26,20 @@
+
+
+ +
+
+ +
+
+
+
+ +
diff --git a/resources/views/client/show.blade.php b/resources/views/client/show.blade.php index 028205c..0468be6 100755 --- a/resources/views/client/show.blade.php +++ b/resources/views/client/show.blade.php @@ -14,7 +14,7 @@
@@ -27,6 +27,7 @@

Client Details

+ @include('commons.notifications')
@@ -41,7 +42,7 @@ Click Account Manager
auth_user_info->name ?? 'N/A' ?>
-

Client Name Account Manager

+

Status : {{ $showclient->status }}

  • phone ?? "N/A"; ?>
  • email ?? "N/A"; ?>
  • @@ -49,16 +50,34 @@
  • linkedin_name ?? "N/A"; ?>
- +
Highlights
+ @if(!$show_notes->isEmpty()) +
    +
  • +

    + + count(); $i++) { ?> + + highlight == 'NO'): continue; endif; ?> + {{ $i+1 . "." }} {{ $show_notes[$i]->notes_body }} + + +

    +
  • +
+ @endif + Edit Client +
+ -

Finance

+
@@ -72,78 +91,83 @@
- Company Details -

Country :

-

Company Type :

-

Products

-

Products Description

-

Product Specification

-

Networks

-

Requested Sender IDs

- +

Company Details

+ +
+

Country : {{ $showclient->country or "N/A" }}

+

Company Type : {{ $showclient->company_type or "N/A" }}

+ + + + +

Requested Sender IDs : sender_ids) { echo implode(", ", json_decode($showclient->sender_ids, true)); } else {echo "N/A"; } ?>

+
- Connection Details - Click Mobile SMPP Details
- SMPP Categorisation
- SMPP Account Name
+

Connection Details

+
+

Connection Types : connections) { echo implode(", ", json_decode($showclient->connections, true)); } else {echo "N/A"; } ?>


- Partner SMPP Details
- SMPP Categorisation
- SMPP Account Name
+

Partner SMPP Details
+ smpp_details) { echo $showclient->smpp_details; } else {echo "N/A"; } ?>

+
- Contract Details - Contract Type : Bilateral
+

Contract Details

+
+

Contract Type : {{ ucfirst($showclient->contract_type) ?? 'N/A'}}

- Contract Validity : [------] - +

Contract Validity (years) : {{ $showclient->contract_validity or 'N/A'}}

+
- Finance Details - Last Invoice Sent : YES (2023-01-12)
+

Finance Details

+
+

Last Invoice Sent : "N/A"


- Payment Status : Paid (2023-01-15) +

Payment Status : N/A

+
-

Notes

+

Notes

- +
-
+
diff --git a/resources/views/emails/new-notes.blade.php b/resources/views/emails/new-notes.blade.php new file mode 100644 index 0000000..dad3aa1 --- /dev/null +++ b/resources/views/emails/new-notes.blade.php @@ -0,0 +1,27 @@ + + + + + + +
+ Click Mobile Banner Logo +
+

New Notes Alert

+ {{ date('F d, Y') }}
+ + Hello Sam,
+ +

+ {{ $created_by }} has added a new note entry to the client details of {{ $client }}. +

+ + Notes Details +

{{ $notes_body }}

+ +

+ Sincerely,
+ Click Mobile ERP +

+ +