mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Allow user account to see and use all vouchers that belongs to all employees under the same company in checkout
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Resources;
|
||||
|
||||
use ArrayObject;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class VoucherResource extends JsonResource
|
||||
{
|
||||
@@ -16,7 +17,8 @@ class VoucherResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
$filteredRedemptions = new ArrayObject([]);
|
||||
if ($request->has('filters') && str_contains($request->input('filters'), "has_active_reward")) {
|
||||
if ($request->has('filters') && (str_contains($request->input('filters'), "has_active_reward_with_user") )) {
|
||||
//|| str_contains($request->input('filters'), "has_active_reward_with_company")
|
||||
$filteredRedemptions = new ArrayObject([]);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user