update
This commit is contained in:
@@ -49,10 +49,11 @@ class DoctorRatingController extends Controller
|
||||
$limit = $request->has('per_page') ? $request->input('per_page') : 50;
|
||||
$results = DB::connection('oldlms')->table('tx_dokter_rating')
|
||||
->leftJoin('tm_users', 'tx_dokter_rating.nIDUser', '=', 'tm_users.nID')
|
||||
->leftJoin('tm_dokter', 'tx_dokter_rating.nIDDokter', '=', 'tm_dokter.nID')
|
||||
->leftJoin('tm_dokter', 'tx_dokter_rating.nIDDokter', '=', 'tm_dokter.nIDUser')
|
||||
->when($request->input('search'), function ($query, $search) {
|
||||
$query->where(function ($query) use ($search) {
|
||||
$query->orWhere('tm_users.sFirstname', 'like', "%" . $search . "%");
|
||||
$query->orWhere('tm_users.sFirstName', 'like', "%" . $search . "%");
|
||||
$query->orWhere('tm_users.sLastName', 'like', "%" . $search . "%");
|
||||
$query->orWhere('tx_dokter_rating.sNotes', 'like', "%" . $search . "%");
|
||||
});
|
||||
})
|
||||
@@ -72,6 +73,7 @@ class DoctorRatingController extends Controller
|
||||
$query->where('tx_dokter_rating.dCreateOn', '<=', $end_date. ' 23:59:59');
|
||||
});
|
||||
})
|
||||
|
||||
// ->when($request->input('provider') , function ($query, $provider) {
|
||||
// $query->where(function ($query) use ($provider) {
|
||||
// $query->where('request_logs.organization_id', '=', $provider);
|
||||
@@ -85,6 +87,7 @@ class DoctorRatingController extends Controller
|
||||
'tx_dokter_rating.nRating as rating',
|
||||
'tx_dokter_rating.sNotes',
|
||||
'tx_dokter_rating.dCreateOn',
|
||||
'tx_dokter_rating.nIDLivechat',
|
||||
DB::connection('oldlms')->raw("
|
||||
(SELECT CONCAT(tm_users.sFirstName, ' ', IFNULL(tm_users.sMiddleName, ''), ' ', IFNULL(tm_users.sLastName, '')) FROM tm_users WHERE tm_users.nID = tm_dokter.nIDUser LIMIT 1) AS nama_dokter
|
||||
")
|
||||
@@ -109,6 +112,7 @@ class DoctorRatingController extends Controller
|
||||
'Rating',
|
||||
'Review',
|
||||
'Tanggal Konsultasi',
|
||||
'ID Livechat',
|
||||
];
|
||||
$style = (new StyleBuilder())
|
||||
->setFontBold()
|
||||
@@ -124,7 +128,7 @@ class DoctorRatingController extends Controller
|
||||
// ============================
|
||||
$results = DB::connection('oldlms')->table('tx_dokter_rating')
|
||||
->leftJoin('tm_users', 'tx_dokter_rating.nIDUser', '=', 'tm_users.nID')
|
||||
->leftJoin('tm_dokter', 'tx_dokter_rating.nIDDokter', '=', 'tm_dokter.nID')
|
||||
->leftJoin('tm_dokter', 'tx_dokter_rating.nIDDokter', '=', 'tm_dokter.nIDUser')
|
||||
->when($request->input('search'), function ($query, $search) {
|
||||
$query->where(function ($query) use ($search) {
|
||||
$query->orWhere('tm_users.sFirstname', 'like', "%" . $search . "%");
|
||||
@@ -162,7 +166,8 @@ class DoctorRatingController extends Controller
|
||||
'tx_dokter_rating.dCreateOn',
|
||||
DB::connection('oldlms')->raw("
|
||||
(SELECT CONCAT(tm_users.sFirstName, ' ', IFNULL(tm_users.sMiddleName, ''), ' ', IFNULL(tm_users.sLastName, '')) FROM tm_users WHERE tm_users.nID = tm_dokter.nIDUser LIMIT 1) AS nama_dokter
|
||||
")
|
||||
"),
|
||||
'tx_dokter_rating.nIDLivechat'
|
||||
)
|
||||
->get();
|
||||
$no=0;
|
||||
@@ -176,6 +181,7 @@ class DoctorRatingController extends Controller
|
||||
$item->nRating,
|
||||
$item->sNotes,
|
||||
$item->dCreateOn,
|
||||
$item->nIDLivechat,
|
||||
];
|
||||
$style = (new StyleBuilder())
|
||||
//->setFontBold()
|
||||
@@ -194,7 +200,8 @@ class DoctorRatingController extends Controller
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
''
|
||||
'',
|
||||
'',
|
||||
];
|
||||
$style = (new StyleBuilder())
|
||||
->setFontBold()
|
||||
|
||||
Reference in New Issue
Block a user