debug
This commit is contained in:
@@ -169,7 +169,7 @@ class RequestPortalController extends Controller
|
||||
public function destroy(Mission $mission): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($mission) {
|
||||
$mission->rahdaran()->delete();
|
||||
$mission->rahdaran()->detach();
|
||||
$mission->delete();
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\V3\Dashboard\Mission;
|
||||
|
||||
use App\Enums\CmmsMachineStatus;
|
||||
use App\Enums\MissionStates;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\V3\Mission\TransportaionUnit\AllocateRequest;
|
||||
@@ -58,7 +59,7 @@ class TransportationUnitController extends Controller
|
||||
public function deallocate(DeallocateRequest $request, Mission $mission): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($request, $mission) {
|
||||
$mission->rahdaran()->wherePivot('is_driver', '=', true)->delete();
|
||||
$mission->rahdaran()->wherePivot('is_driver', '=', true)->detach();
|
||||
|
||||
$mission->histories()->create([
|
||||
'user_id' => auth()->user()->id,
|
||||
@@ -86,7 +87,7 @@ class TransportationUnitController extends Controller
|
||||
return $this->successResponse(
|
||||
CMMSMachine::query()
|
||||
->where('car_type', '=', $mission->car_type)
|
||||
->where('status', '<>', 3)
|
||||
// ->where('status', '<>', CmmsMachineStatus::DAR_MAMORIAT->value)
|
||||
->get(['machine_code', 'id', 'plak_number', 'car_name'])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user