@@ -110,6 +110,7 @@ class Event < ApplicationRecord
110110
111111 scope :confirmed , -> { where ( state : 'confirmed' ) }
112112 scope :unconfirmed , -> { where ( state : 'unconfirmed' ) }
113+ scope :tentatively_accepted , -> { where ( state : 'tentatively_accepted' ) }
113114 scope :canceled , -> { where ( state : 'canceled' ) }
114115 scope :withdrawn , -> { where ( state : 'withdrawn' ) }
115116 scope :highlighted , -> { where ( is_highlight : true ) }
@@ -120,6 +121,7 @@ class Event < ApplicationRecord
120121 state :new
121122 state :withdrawn
122123 state :unconfirmed
124+ state :tentatively_accepted
123125 state :confirmed
124126 state :canceled
125127 state :rejected
@@ -131,7 +133,10 @@ class Event < ApplicationRecord
131133 transitions to : :withdrawn , from : %i[ new unconfirmed confirmed ]
132134 end
133135 event :accept do
134- transitions to : :unconfirmed , from : [ :new ] , on_transition : :process_acceptance
136+ transitions to : :unconfirmed , from : %i[ new tentatively_accepted ] , on_transition : :process_acceptance
137+ end
138+ event :tentatively_accept do
139+ transitions to : :tentatively_accepted , from : [ :new ] , on_transition : :process_tentative_acceptance
135140 end
136141 event :confirm do
137142 transitions to : :confirmed , from : :unconfirmed , on_transition : :process_confirmation
@@ -140,17 +145,18 @@ class Event < ApplicationRecord
140145 transitions to : :canceled , from : %i[ unconfirmed confirmed ]
141146 end
142147 event :reject do
143- transitions to : :rejected , from : [ : new] , on_transition : :process_rejection
148+ transitions to : :rejected , from : %i[ new tentatively_accepted ] , on_transition : :process_rejection
144149 end
145150 end
146151
147152 COLORS = {
148- new : '#0000FF' , # blue
149- withdrawn : '#FF8000' , # orange
150- unconfirmed : '#FFFF00' , # yellow
151- confirmed : '#00FF00' , # green
152- canceled : '#848484' , # grey
153- rejected : '#FF0000' # red
153+ new : '#0000FF' , # blue
154+ withdrawn : '#FF8000' , # orange
155+ unconfirmed : '#FFFF00' , # yellow
156+ tentatively_accepted : '#FFA500' , # amber
157+ confirmed : '#00FF00' , # green
158+ canceled : '#848484' , # grey
159+ rejected : '#FF0000' # red
154160 } . freeze
155161
156162 ##
@@ -245,6 +251,15 @@ def process_acceptance(options)
245251 end
246252 end
247253
254+ def process_tentative_acceptance ( options )
255+ if program . conference . email_settings . send_on_tentative_accepted &&
256+ program . conference . email_settings . tentative_accepted_body &&
257+ program . conference . email_settings . tentative_accepted_subject &&
258+ options [ :send_mail ] . present?
259+ Mailbot . tentative_acceptance_mail ( self , subject : options [ :subject ] , body : options [ :body ] ) . deliver_later
260+ end
261+ end
262+
248263 def process_rejection ( options )
249264 if program . conference . email_settings . send_on_rejected &&
250265 program . conference . email_settings . rejected_body &&
0 commit comments