effective_events 0.20.1 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31dd5da1350e8c47f262ae186a59758c589747ad054bb2d9c73a766aab858673
4
- data.tar.gz: 3523f02edb4b5e1e5144c4ae43686ab077a4873f0ce5346fb27429a05853e2de
3
+ metadata.gz: 28f5c7415e3b84908b2656bbd58cf74e202b924086f0c735b640063ab2bfca2d
4
+ data.tar.gz: c8cd136cfdfba553ddaf73c63d977d883486e72a775630fbcd85778baa38a4c7
5
5
  SHA512:
6
- metadata.gz: f5a012b7f897b93841d14080109278adc3d52231ffc9e0e5fc71c3379406d28cbf5ed6b11a3455eaeb8737b7065abc87ad78eea8b7441e16d34d886c919d00bd
7
- data.tar.gz: 1f21df543c199fbb5f0cfb565b928d4d29405c731dc24dd8824baeb5b83e3436f63966100af4cefac0a1700757737e5e52f982a4ddc9e0ea36055186e5dac1fc
6
+ metadata.gz: 6d515ddf50f3e622c92af47f17cb69cd4315da25001e7c236c0f98bb05b068ad3a19db2611ab66e58f461982a691ca7601cc473ad98a596fc41d07bab73ac198
7
+ data.tar.gz: 7481e857dbc9bd01a2b1b192b3115cb0e8385e93ad4e011f060311d7432ff6cd7804f788657b0525550bc4200367a1e14e31321a95aaca3b15b6028505bc8d23
@@ -133,10 +133,10 @@ module EffectiveEventsEventRegistration
133
133
 
134
134
  # Validate the same registrant user isn't being registered twice
135
135
  validate(if: -> { current_step == :details }) do
136
- present_event_registrants.group_by { |er| er.user }.each do |user, event_registrants|
136
+ present_event_registrants.group_by { |er| [er.user, er.event_ticket] }.each do |(user, event_ticket), event_registrants|
137
137
  if user.present? && event_registrants.length > 1
138
- errors.add(:base, "Unable to register #{user} more than once")
139
- event_registrants.each { |er| er.errors.add(:user_id, "cannot be registered more than once") }
138
+ errors.add(:base, "Unable to register #{user} for #{event_ticket} more than once")
139
+ event_registrants.each { |er| er.errors.add(:user_id, "cannot be registered for #{event_ticket} more than once") }
140
140
  end
141
141
  end
142
142
  end
@@ -316,6 +316,8 @@ module EffectiveEventsEventRegistration
316
316
  def tickets!
317
317
  assign_attributes(current_step: :tickets) # Ensure the unavailable tickets validations are run
318
318
 
319
+ reset_all_wizard_steps_after(:tickets) unless was_submitted?
320
+
319
321
  update_event_registrants
320
322
  select_event_registrants
321
323
  waitlist_event_registrants
@@ -115,7 +115,7 @@ module Effective
115
115
  validates :email, email: true
116
116
 
117
117
  # This works for persisted and adding a new one. But not adding two at same time in a registration
118
- validates :user_id, uniqueness: { scope: [:event_id], allow_blank: true, message: 'is already registered for this event' }
118
+ validates :user_id, uniqueness: { scope: [:event_ticket_id], allow_blank: true, message: 'is already registered for this event ticket' }
119
119
 
120
120
  # First name, last name and email are always required fields on details
121
121
  validates :first_name, presence: true, if: -> { registrant_validations_enabled? }
@@ -5,7 +5,7 @@
5
5
  - if resource.display_countdown?
6
6
  .mt-4
7
7
 
8
- = card do
9
- %p Your tickets are reserved until #{resource.selected_expires_at.strftime("%I:%M%P %Z")}
8
+ .alert.alert-warning
9
+ Your tickets are reserved until #{resource.selected_expires_at.strftime("%l:%M%P %Z")}
10
10
 
11
11
  .col-lg-9.mb-3= yield
@@ -1,3 +1,3 @@
1
1
  module EffectiveEvents
2
- VERSION = '0.20.1'.freeze
2
+ VERSION = '0.20.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-26 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails