Moved ShortCodes to a new controller, added Tabulator, bug fixes
This commit is contained in:
@@ -854,21 +854,22 @@ class ClientsController extends Controller
|
||||
public function getShortCodes($type){
|
||||
//$auth_users = Models\SystemUser::pluck('name', 'id');
|
||||
//todo : separate the short codes into individual pages
|
||||
// dd(session('current_user.designation'));
|
||||
switch ($type) {
|
||||
case 'sms':
|
||||
$codes_data = Models\ClientShortCode::with('client_info','client_info', 'update_info')->where('code_type', 'sms')->get();
|
||||
$codes_data = Models\ClientShortCode::with('client_info','client_info', 'update_info')->where('code_type', 'sms')->orderBy('id', 'DESC')->get();
|
||||
break;
|
||||
case 'ussd':
|
||||
$codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'ussd')->get();
|
||||
$codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'ussd')->orderBy('id', 'DESC')->get();
|
||||
break;
|
||||
case 'voice':
|
||||
$codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'voice')->get();
|
||||
$codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'voice')->orderBy('id', 'DESC')->get();
|
||||
break;
|
||||
default:
|
||||
// code... show 404
|
||||
break;
|
||||
}
|
||||
$codes = Models\ClientShortCode::with('update_info')->get();
|
||||
// $codes = Models\ClientShortCode::with('update_info')->get();
|
||||
|
||||
$data = [
|
||||
'page_title' => 'Client Short Codes',
|
||||
|
||||
Reference in New Issue
Block a user