From a80a84e963c2812eeeb89ccabaa54591d2c4c2ca Mon Sep 17 00:00:00 2001 From: thiritin Date: Sun, 8 Sep 2024 23:25:10 +0200 Subject: [PATCH 01/13] fix error on null error --- app/Http/Controllers/POS/AttendeeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/POS/AttendeeController.php b/app/Http/Controllers/POS/AttendeeController.php index adeef4e..cfd3754 100644 --- a/app/Http/Controllers/POS/AttendeeController.php +++ b/app/Http/Controllers/POS/AttendeeController.php @@ -19,7 +19,7 @@ public function lookupForm(): Response public function lookupSubmit(Request $request): RedirectResponse { - $user = User::where('attendee_id', $request->get('attendeeId'))->first()->exists(); + $user = User::where('attendee_id', $request->get('attendeeId'))->first()?->exists(); if (!$user) return redirect()->back()->withErrors(['attendeeId' => 'Could not find attendee']); else return redirect()->route('pos.attendee.show', ['attendeeId' => $request->get('attendeeId')]); From 4d7d7cfdc739445337459133c9e3aeb9bf0b56a4 Mon Sep 17 00:00:00 2001 From: thiritin Date: Mon, 9 Sep 2024 00:57:18 +0200 Subject: [PATCH 02/13] add new buttons and property transfer --- .../Components/POS/Attendee/BadgesTable.vue | 15 ++++-- resources/js/Pages/POS/Attendee/Show.vue | 52 +++++++++++-------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/resources/js/Components/POS/Attendee/BadgesTable.vue b/resources/js/Components/POS/Attendee/BadgesTable.vue index 5ae724e..d12de6c 100644 --- a/resources/js/Components/POS/Attendee/BadgesTable.vue +++ b/resources/js/Components/POS/Attendee/BadgesTable.vue @@ -4,28 +4,33 @@ import Column from "primevue/column"; import DataTable from "primevue/datatable"; import Button from "primevue/button"; import dayjs from "dayjs"; -import {ref} from "vue"; +import {ref, watchEffect} from "vue"; defineProps({ attendee: Object, badges: Array }) +const emit = defineEmits(['update:selectedBadges']); + const selectedBadges = ref(); + +/** Emit update everytime the selectedBadges change */ +watchEffect(() => { + emit('update:selectedBadges', selectedBadges.value); +});