Amendment meant to resolve merge conflict in development branch from branch dillon/63.6-company-with-multiple-employees

This commit is contained in:
Dillon Ngo
2024-08-21 22:00:46 +08:00
parent 83bff8c9ad
commit d8c53d11d7
8 changed files with 8 additions and 8 deletions
@@ -6,7 +6,7 @@ use App\Classes\ValueObjects\Constants\RoleTypes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Auth;
class HasVouchersAll implements Filter
class HasVouchersAllWithUser implements Filter
{
/**
+1 -1
View File
@@ -16,7 +16,7 @@ class VoucherResource extends JsonResource
public function toArray($request)
{
$filteredRedemptions = new ArrayObject([]);
if ($request->has('filters') && str_contains($request->input('filters'), "has_vouchers_all")) {
if ($request->has('filters') && str_contains($request->input('filters'), "has_vouchers_all_with_user")) {
$filteredRedemptions = new ArrayObject([]);
}
else{
@@ -16,7 +16,7 @@
}
},
created(){
this.submit(this.route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all': true, order_by:{ column:'id', DESC:true }} ), 'get', 'voucherNavigationSection', false, false);
this.submit(this.route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': true, order_by:{ column:'id', DESC:true }} ), 'get', 'voucherNavigationSection', false, false);
},
methods: {
successHandler(response){
@@ -65,7 +65,7 @@
fetchVouchers(){
this.isLoading = true;
if(this.employee){
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all': this.employee.id} ), 'get', this.section, false, false);
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': 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': this.employee.id} ), 'get', this.section, false, false);
this.submit(route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': this.employee.id} ), 'get', this.section, false, false);
}
},
successHandler(response){
@@ -52,7 +52,7 @@
<div class="col">
<div class="row">
<div class="col" v-if="this.$store.getters.getUserId">
<list-component section="customerVouchersListSection" :endpoint="route('api.voucher.user.list')" :options="{ 'has_vouchers_all': id }">
<list-component section="customerVouchersListSection" :endpoint="route('api.voucher.user.list')" :options="{ 'has_vouchers_all_with_user': id }">
<template slot="list" slot-scope="{data}">
<single-user-reward-item-component :data="data"></single-user-reward-item-component>
</template>
@@ -52,7 +52,7 @@
<div class="col">
<div class="row">
<div class="col" v-if="this.$store.getters.getUserId">
<list-component section="customerVouchersListSection" :endpoint="route('api.voucher.user.list')" :options="{ 'has_vouchers_all': true }">
<list-component section="customerVouchersListSection" :endpoint="route('api.voucher.user.list')" :options="{ 'has_vouchers_all_with_user': true }">
<template slot="list" slot-scope="{data}">
<single-user-reward-item-component :data="data"></single-user-reward-item-component>
</template>
@@ -30,7 +30,7 @@
}
},
created(){
this.submit(this.route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all': this.company.employee.id, order_by:{ column:'id', DESC:true }} ), 'get', this.section, false, false);
this.submit(this.route('api.voucher.user.list') + '?filters=' + JSON.stringify( { 'has_vouchers_all_with_user': this.company.employee.id, order_by:{ column:'id', DESC:true }} ), 'get', this.section, false, false);
},
methods: {
successHandler(response){