mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 05:23:58 +00:00
Merge branch 'dillon/63.7-company-with-multiple-employees' into development
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ namespace App\Classes\General\Eloquent\Filters;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class HasActiveRewardWithUser implements Filter
|
||||
class HasActiveReward implements Filter
|
||||
{
|
||||
|
||||
/**
|
||||
+1
-1
@@ -7,7 +7,7 @@ use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class HasActiveRewardWithCompany implements Filter
|
||||
class HasVouchersAllWithCompany implements Filter
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -17,7 +17,8 @@ class VoucherResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
$filteredRedemptions = new ArrayObject([]);
|
||||
if ($request->has('filters') && str_contains($request->input('filters'), "has_vouchers_all_with_user")) {
|
||||
if ($request->has('filters') && (str_contains($request->input('filters'), "has_vouchers_all_with_user") )) {
|
||||
//|| str_contains($request->input('filters'), "has_vouchers_all_with_company")
|
||||
$filteredRedemptions = new ArrayObject([]);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
fetchVouchers(){
|
||||
this.isLoading = true;
|
||||
if(this.employee){
|
||||
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': this.employee.id} ), 'get', this.section, false, false);
|
||||
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_company': this.employee.id} ), 'get', this.section, false, false);
|
||||
}
|
||||
},
|
||||
successHandler(response){
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
fetchVouchers(){
|
||||
this.isLoading = true;
|
||||
if(this.employee){
|
||||
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': this.employee.id} ), 'get', this.section, false, false);
|
||||
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_company': this.employee.id} ), 'get', this.section, false, false);
|
||||
}
|
||||
},
|
||||
successHandler(response){
|
||||
|
||||
Reference in New Issue
Block a user