mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 21:01:06 +03:30
remove status approved condition from index items for users and fix the issue with validating store package request.
This commit is contained in:
@@ -25,7 +25,7 @@ class StorePackageRequest extends FormRequest
|
|||||||
'name' => 'required|max:250',
|
'name' => 'required|max:250',
|
||||||
'note' => 'nullable',
|
'note' => 'nullable',
|
||||||
'items' => 'required|array|min:1',
|
'items' => 'required|array|min:1',
|
||||||
'items.*' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
'items.*.id' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ class StorePackageRequest extends FormRequest
|
|||||||
'name' => 'required|max:250',
|
'name' => 'required|max:250',
|
||||||
'note' => 'nullable',
|
'note' => 'nullable',
|
||||||
'items' => 'required|array|min:1',
|
'items' => 'required|array|min:1',
|
||||||
'items.*' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
'items.*.id' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class PackageRepository implements PackageRepositoryInterface
|
|||||||
->whereHas('user', function ($query) use ($user) {
|
->whereHas('user', function ($query) use ($user) {
|
||||||
$query->where('users.medical_center_id', $user->medical_center_id);
|
$query->where('users.medical_center_id', $user->medical_center_id);
|
||||||
})
|
})
|
||||||
->where("status", StatusTypeEnum::APPROVED)
|
// ->where("status", StatusTypeEnum::APPROVED)
|
||||||
->orderByDesc('id')
|
->orderByDesc('id')
|
||||||
->paginate(10);
|
->paginate(10);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user