Merge branch 'amir_dev_2' into 'main'
Add notification lelong online See merge request online-sistem1/lelong!229
This commit is contained in:
@@ -14,6 +14,7 @@ use App\Models\Payment;
|
||||
use App\Models\Cart;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Cawangan;
|
||||
use App\Models\FileMarhun;
|
||||
use App\Models\Resit;
|
||||
use App\Models\FileResit;
|
||||
use App\Models\Invoice;
|
||||
@@ -365,11 +366,7 @@ class LelongMobileController extends Controller
|
||||
$listLelong = [];
|
||||
foreach ($arrayDiff2 as $index => $data) {
|
||||
|
||||
$lelongbid = LelongBid::
|
||||
// join('filemarhun', 'lelongbid.id', '=', 'filemarhun.lelongbid_id')
|
||||
where('id', $data)
|
||||
// ->where('photo_type', 1)
|
||||
->first()->toArray();
|
||||
$lelongbid = LelongBid::where('id', $data)->first()->toArray();
|
||||
$lelongbidmarhun = LelongBidMarhun::where('lelongbid_id', $lelongbid['id'])->get()->toArray();
|
||||
foreach ($lelongbidmarhun as $index1 => $marhun) {
|
||||
$marhunDesc = JenisEmas::where('marhun', $marhun['marhun'])->first()->toArray();
|
||||
@@ -378,6 +375,12 @@ class LelongMobileController extends Controller
|
||||
|
||||
$lelongbid['lelongbidmarhun'] = $lelongbidmarhun;
|
||||
|
||||
$fileMarhun = FileMarhun::where('lelongbid_id', $lelongbid['id'])->get();
|
||||
|
||||
if ($fileMarhun->isNotEmpty()) {
|
||||
$lelongbid['filemarhun'] = $fileMarhun;
|
||||
}
|
||||
|
||||
array_push($listLelong, $lelongbid);
|
||||
}
|
||||
$lelong['lelongbid'] = $listLelong;
|
||||
@@ -394,6 +397,16 @@ class LelongMobileController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function lelongOnline()
|
||||
{
|
||||
$lelong = Lelong::where('sts_lelong', '=', 1)->first();
|
||||
if ($lelong) {
|
||||
return response()->json(['success' => true, 'lelong' => $lelong]);
|
||||
} else {
|
||||
return response()->json(['success' => false,]);
|
||||
}
|
||||
}
|
||||
|
||||
public function searchLelongByCawangan(Request $request){
|
||||
|
||||
$currentdate = Carbon::now();
|
||||
|
||||
@@ -57,6 +57,8 @@ Route::group(['middleware' => ['auth:sanctum']], function () {
|
||||
Route::get('/listcawlelongtodaystarted', [LelongMobileController::class, 'listCawLelongTodayStarted']);
|
||||
//list surat exclude in cart and bid-record
|
||||
Route::get('/lelongDetails/listSuratLelong', [LelongMobileController::class, 'listSuratLelong']);
|
||||
//list lelong online
|
||||
Route::get('/lelongOnline', [LelongMobileController::class, 'lelongOnline']);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user