Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - QR codes/ticket system #537

Merged
merged 24 commits into from
Oct 23, 2024
Merged

Feature - QR codes/ticket system #537

merged 24 commits into from
Oct 23, 2024

Conversation

IGORnvk
Copy link
Collaborator

@IGORnvk IGORnvk commented Sep 13, 2024

Description

Introduces ticket functionality through QR codes. It requires user to verify their email after registration on our website.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

What needs to be tested

Prerequisites:

  • composer install
  • npm install
  • migrate fresh seed (to be able to test, I reccommend commenting out email_verified_at' => now(), in UserFactory)
  • as an event organizer activate the edition.

After that:

  • Login as a random participant/company rep/speaker and verify your email. (also works with registration, but on the local environment the user is automatically verified: look at app/Actions/Fortify/CreateNewUser.php).

After that, you should log in as an event organizer and publish the programme. After you published:

  • Verify that your participant/company rep/speaker received an email with the ticket.
  • Verify that the ticket is also displayed in your participant/company rep/speaker's profile.
  • Log in as event organizer, go to /moderator/tickets and make sure that the scanner is displayed (for that you might want to modify the condition in tickets->index.blade.php cause there is no way to make edition in progress rightaway).
  • Scan the QR code (hope you have a webcam).
  • Verify that the modal displays correct info about the ticket holder.
  • Verify that after 3 seconds the scanner is available for scanning again.
  • Go to moderator/users and verify that ticket was scanned successfully.
  • Make sure that only crew members can scan the ticket. Try logging in as participant and access moderator/tickets. It should throw 403.

Additionally:

  • On the moderator/users page test the filter dropdown after you scanned some tickets and verify that the system puts first the users who have their tickets scanned.
  • On the moderator/tickets page test responsiveness of the scanner. On mobile screens there is a button to activate scanning.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@IGORnvk IGORnvk added feature New feature or request medium priority participant participant dashboard labels Sep 13, 2024
@IGORnvk IGORnvk self-assigned this Sep 13, 2024
Copy link

github-actions bot commented Sep 13, 2024

Coverage report for commit: 35334fe
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 72.3%
  10% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.7%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.8%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.7%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  50% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.4%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.3%
  80% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.4%
  90% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.7%
 100% │ █████░░░░░░░░░░░░░░░░░░ │ 13.8%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 26.58% | Methods: 22.98%
FilesLinesMethodsBranches
app/Actions/Fortify
   CreateNewUser.php90.24%25.00%100.00%
   PasswordValidationRules.php100.00%100.00%100.00%
   ResetUserPassword.php100.00%100.00%100.00%
   UpdateUserPassword.php100.00%100.00%100.00%
   UpdateUserProfileInformation.php72.73%50.00%100.00%
app/Actions/Jetstream
   DeleteUser.php100.00%100.00%100.00%
app/Actions/Log
   ApprovalHandler.php95.83%50.00%100.00%
app/Actions/Permissions
   ReadPermissionConfig.php100.00%100.00%100.00%
app/Actions/Schedule
   PresentationAllocationHelper.php--100.00%
   PresentationConflictChecker.php--100.00%
   ResetSchedule.php--100.00%
app/Actions/Users
   AddParticipantToCompanyHandler.php--100.00%
app/Console/Commands
   AddParticipantToCompany.php--100.00%
   AddSpeakerToPresentation.php--100.00%
   AddToHz.php--100.00%
   ApproveLastCreatedCompany.php--100.00%
   ConfirmAllEmails.php--100.00%
   CreateAdmin.php7.69%33.33%100.00%
   CreateTicketsForVerifiedUsers.php--100.00%
   ModifyTimeslotDuration.php--100.00%
   SyncPermissions.php96.77%85.71%100.00%
   UpsertMasterData.php73.91%40.00%100.00%
app/Events
   FinalProgrammeReleased.php--100.00%
app/Http/Controllers
   CompanyController.php--100.00%
   Controller.php100.00%100.00%100.00%
   FrequentQuestionController.php--100.00%
   HomeController.php100.00%100.00%100.00%
   InvitationController.php--100.00%
   PresentationController.php--100.00%
   ProgrammeController.php--100.00%
   RegistrationController.php25.00%-100.00%
   SpeakerController.php--100.00%
app/Http/Controllers/Crew
   BoothController.php57.78%66.67%100.00%
   CompanyController.php96.70%75.00%100.00%
   CrewController.php--100.00%
   DefaultPresentationController.php100.00%100.00%100.00%
   EditionController.php--100.00%
   FrequentQuestionController.php--100.00%
   PresentationController.php86.54%66.67%100.00%
   RoomController.php88.00%80.00%100.00%
   ScheduleController.php--100.00%
   SponsorshipController.php94.44%66.67%100.00%
   TicketController.php--100.00%
   UserController.php--100.00%
app/Http/Controllers/Hub
   CompanyController.php--100.00%
   ParticipantController.php--100.00%
app/Http/Livewire
   AuthNavigationMenu.php--100.00%
   DownloadPresentation.php--100.00%
   EmailNotificationPreference.php--100.00%
   GuestNavigationMenu.php--100.00%
   OverrideDifficulty.php--100.00%
   ReleaseFinalProgramme.php--100.00%
   RoomAndTimeslotSelector.php--100.00%
   ShowNotification.php--100.00%
app/Http/Livewire/Booths
   DeleteBoothForm.php--100.00%
   EditBoothModal.php--100.00%
app/Http/Livewire/Companies
   DeleteCompanyForm.php--100.00%
app/Http/Livewire/DefaultPresentations
   EditDefaultPresentationForm.php--100.00%
app/Http/Livewire/Presentations
   DeletePresentationForm.php--100.00%
   EditPresentationModal.php--100.00%
app/Http/Livewire/Rooms
   DeleteRoomForm.php--100.00%
app/Http/Livewire/Schedule
   AddTimeslotPadding.php--100.00%
   RemovePresentationFromSchedule.php--100.00%
   ReplacePresentation.php--100.00%
   ResetTimeslots.php--100.00%
app/Http/Livewire/Sponsorships
   CreateSponsorshipForm.php--100.00%
   DeleteSponsorshipForm.php--100.00%
app/Http/Livewire/Users
   DeleteUserForm.php--100.00%
app/Http/Middleware
   EditionMiddleware.php33.33%-100.00%
app/Http/Requests
   StorePresentationRequest.php100.00%100.00%100.00%
app/Listeners
   EmailVerifiedListener.php--100.00%
   HandleFinalProgrammeReleased.php--100.00%
app/Livewire
   AuthNavigationMenu.php100.00%100.00%100.00%
   ConfirmationModal.php--100.00%
   EmailNotificationPreference.php--100.00%
   GuestNavigationMenu.php100.00%100.00%100.00%
   NotificationsList.php--100.00%
app/Livewire/Booth
   CreateBooth.php14.63%28.57%100.00%
   DeleteBoothModal.php--100.00%
   EditBoothModal.php--100.00%
   JoinBoothOwnerModal.php--100.00%
app/Livewire/Company
   AddMember.php--100.00%
   AddParticipant.php--100.00%
   BoothRequest.php--100.00%
   DeleteCompany.php--100.00%
   DeleteCompanyModal.php--100.00%
   DetailsForm.php--100.00%
   EditCompanyModal.php--100.00%
   ManageLogo.php--100.00%
   MemberManager.php--100.00%
   RemoveMember.php--100.00%
   SponsorshipRequest.php--100.00%
   UpdateMemberRole.php--100.00%
app/Livewire/Crew
   AssignRoleToUser.php--100.00%
   RevokeRoleOfUser.php--100.00%
   RolePermissionsInfo.php--100.00%
app/Livewire/Edition
   ActivateEditionModal.php--100.00%
   AddKeynoteModal.php--100.00%
   DeleteEditionModal.php--100.00%
   EditEditionModal.php--100.00%
app/Livewire/EditionEvent
   EditEditionEventModal.php--100.00%
app/Livewire/Forms
   BoothForm.php--100.00%
   CompanyForm.php--100.00%
   DefaultPresentationForm.php--100.00%
   EditionEventForm.php--100.00%
   EditionForm.php--100.00%
   FrequentQuestionForm.php--100.00%
   KeynoteForm.php--100.00%
   PresentationForm.php--100.00%
   RoomForm.php--100.00%
app/Livewire/FrequentQuestions
   DeleteFrequentQuestionModal.php--100.00%
   EditFrequentQuestionModal.php--100.00%
app/Livewire/Presentation
   DeletePresentationModal.php--100.00%
   EditPresentationModal.php--100.00%
   JoinAsSpeakerModal.php--100.00%
   UploadPresentation.php--100.00%
app/Livewire/QrCode
   InfoModal.php--100.00%
   Scanner.php--100.00%
   Ticket.php--100.00%
app/Livewire/Registration
   CompanyBasicForm.php8.33%25.00%100.00%
   CompanyInternshipsForm.php14.29%33.33%100.00%
   CompanyLocationForm.php10.00%33.33%100.00%
   CompanyMotivationForm.php16.67%33.33%100.00%
   CompanyRepresentativeForm.php7.69%33.33%100.00%
   ParentComponent.php2.44%25.00%100.00%
   SelectCountryCode.php25.00%28.57%100.00%
app/Livewire/Room
   DeleteRoomModal.php--100.00%
   EditRoomModal.php--100.00%
app/Livewire/Schedule
   AddDefaultPresentation.php--100.00%
   Cell.php--100.00%
   ConfirmResetScheduleModal.php--100.00%
   DefaultPresentation.php--100.00%
   EditDefaultPresentationModal.php--100.00%
   GridParentComponent.php--100.00%
   Presentation.php--100.00%
   PresentationModal.php--100.00%
   PublishProgrammeButton.php--100.00%
   PublishProgrammeModal.php--100.00%
app/Livewire/Sponsorship
   DeleteSponsorshipModal.php--100.00%
app/Livewire/Users
   UserFilteringList.php--100.00%
app/Mail
   BoothApprovedMailable.php100.00%100.00%100.00%
   BoothDisapprovedMailable.php--100.00%
   CancelledPresentationMailable.php--100.00%
   CompanyApprovedMailable.php100.00%100.00%100.00%
   CompanyDisapprovedMailable.php100.00%100.00%100.00%
   CompanyRepInvitation.php100.00%100.00%100.00%
   CustomCompanyInvitation.php--100.00%
   FinalProgrammeReleasedMailable.php--100.00%
   GenericNewUpdatesMailable.php--100.00%
   PresentationApprovedMailable.php--100.00%
   PresentationDisapprovedMailable.php--100.00%
   SponsorshipApprovedMailable.php100.00%100.00%100.00%
   SponsorshipDisapprovedMailable.php100.00%100.00%100.00%
   UserInvitation.php--100.00%
app/Models
   Booth.php100.00%100.00%100.00%
   Company.php85.92%77.78%100.00%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@v-stamenova
Copy link
Collaborator

Everything that was listed works, but I'll wait up on the changes we spoke about before confirming.

@IGORnvk
Copy link
Collaborator Author

IGORnvk commented Sep 17, 2024

Ready for review ✅

@TimKardol
Copy link
Collaborator

TimKardol commented Sep 17, 2024

I am mighty impressed by this haha. Very good job Ihor! This is basically what I wanted since we started the conference.

Copy link
Collaborator

@TimKardol TimKardol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor text issues persist. I'll approve it so that it still can make production.
One question I have is, can we make it so the ticket gets send a week or so before the actual conference? I am worried that the ticket otherwise will get lost in the endless emails that some company members receive daily etc.

resources/views/emails/ticket.blade.php Outdated Show resolved Hide resolved
resources/js/qrScanner.js Show resolved Hide resolved
@IGORnvk
Copy link
Collaborator Author

IGORnvk commented Sep 17, 2024

Minor text issues persist. I'll approve it so that it still can make production. One question I have is, can we make it so the ticket gets send a week or so before the actual conference? I am worried that the ticket otherwise will get lost in the endless emails that some company members receive daily etc.

This sounds like a Scheduler stuff, but we can make it so that ticket is sent as soon as the programme gets released.

@v-stamenova
Copy link
Collaborator

Minor text issues persist. I'll approve it so that it still can make production. One question I have is, can we make it so the ticket gets send a week or so before the actual conference? I am worried that the ticket otherwise will get lost in the endless emails that some company members receive daily etc.

This sounds like a Scheduler stuff, but we can make it so that ticket is sent as soon as the programme gets released.

That's sounds like a better idea if you ask me

@IGORnvk
Copy link
Collaborator Author

IGORnvk commented Sep 17, 2024

Minor text issues persist. I'll approve it so that it still can make production. One question I have is, can we make it so the ticket gets send a week or so before the actual conference? I am worried that the ticket otherwise will get lost in the endless emails that some company members receive daily etc.

This sounds like a Scheduler stuff, but we can make it so that ticket is sent as soon as the programme gets released.

That's sounds like a better idea if you ask me

Okay then, I will do it today

@IGORnvk
Copy link
Collaborator Author

IGORnvk commented Sep 20, 2024

@v-stamenova @TimKardol I have added the command to create tickets for existing verified users. You can test it out. Also now you are receiving the mail with your ticket once programme gets released. I suggest to test everything in the list again just to make sure it works well.

@v-stamenova
Copy link
Collaborator

@v-stamenova @TimKardol I have added the command to create tickets for existing verified users. You can test it out. Also now you are receiving the mail with your ticket once programme gets released. I suggest to test everything in the list again just to make sure it works well.

So to verify the flow no longer starts like this:

  • Verify that your participant/company rep/speaker received an email with the ticket.

Now I should start with programme release?

@IGORnvk
Copy link
Collaborator Author

IGORnvk commented Oct 12, 2024

@v-stamenova @TimKardol I have added the command to create tickets for existing verified users. You can test it out. Also now you are receiving the mail with your ticket once programme gets released. I suggest to test everything in the list again just to make sure it works well.

So to verify the flow no longer starts like this:

  • Verify that your participant/company rep/speaker received an email with the ticket.

Now I should start with programme release?

"After that, you should log in as an event organizer and publish the programme. After you published:"

So, to answer your question, yes. :)

@TimKardol TimKardol merged commit 4334235 into development Oct 23, 2024
2 checks passed
@TimKardol TimKardol deleted the feature/qr-codes branch October 31, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request medium priority participant participant dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants