mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 17:21:13 +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',
|
||||
'note' => 'nullable',
|
||||
'items' => 'required|array|min:1',
|
||||
'items.*' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||
'items.*.id' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||
];
|
||||
break;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class StorePackageRequest extends FormRequest
|
||||
'name' => 'required|max:250',
|
||||
'note' => 'nullable',
|
||||
'items' => 'required|array|min:1',
|
||||
'items.*' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||
'items.*.id' => ['exists:items,id','integer',new ValidateItemOwnership()],
|
||||
];
|
||||
break;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class PackageRepository implements PackageRepositoryInterface
|
||||
->whereHas('user', function ($query) use ($user) {
|
||||
$query->where('users.medical_center_id', $user->medical_center_id);
|
||||
})
|
||||
->where("status", StatusTypeEnum::APPROVED)
|
||||
// ->where("status", StatusTypeEnum::APPROVED)
|
||||
->orderByDesc('id')
|
||||
->paginate(10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user