artfully_ose 1.3.0.pre3 → 1.3.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/loading-white.gif +0 -0
- data/app/assets/images/seating_temp/1.jpg +0 -0
- data/app/assets/images/seating_temp/10.jpg +0 -0
- data/app/assets/images/seating_temp/11.jpg +0 -0
- data/app/assets/images/seating_temp/2.jpg +0 -0
- data/app/assets/images/seating_temp/3.jpg +0 -0
- data/app/assets/images/seating_temp/4.jpg +0 -0
- data/app/assets/images/seating_temp/5.jpg +0 -0
- data/app/assets/images/seating_temp/6.jpg +0 -0
- data/app/assets/images/seating_temp/7.jpg +0 -0
- data/app/assets/images/seating_temp/8.jpg +0 -0
- data/app/assets/images/seating_temp/9.jpg +0 -0
- data/app/assets/images/seating_temp/icon_43405.png +0 -0
- data/app/assets/images/seating_temp/icon_43405.svg +3 -0
- data/app/assets/images/seating_temp/icon_43405_plus.png +0 -0
- data/app/assets/images/seating_temp/license.txt +8 -0
- data/app/assets/javascripts/application.js +1 -0
- data/app/assets/javascripts/custom/cookies.js +27 -0
- data/app/assets/javascripts/custom/inline-people-search.js +4 -0
- data/app/assets/javascripts/custom/job-monitor.js +0 -1
- data/app/assets/javascripts/exchange-seat-chart.js +5 -0
- data/app/assets/javascripts/seat-chart.js +606 -0
- data/app/assets/javascripts/show-seat-chart.js +17 -0
- data/app/assets/javascripts/store/store-seat-chart.js +76 -0
- data/app/assets/javascripts/store/store.js +14 -39
- data/app/assets/stylesheets/application.sass +49 -1
- data/app/assets/stylesheets/bootstrap-overrides.css +11 -3
- data/app/assets/stylesheets/sass/seat-chart.sass +311 -0
- data/app/assets/stylesheets/sass/store.sass +73 -19
- data/app/assets/stylesheets/storefront.css +2 -0
- data/app/concerns/pdf_generation.rb +1 -15
- data/app/controllers/advanced_searches_controller.rb +1 -3
- data/app/controllers/charts_controller.rb +14 -12
- data/app/controllers/console_sales_controller.rb +55 -0
- data/app/controllers/event_calendars_controller.rb +15 -0
- data/app/controllers/events_controller.rb +16 -5
- data/app/controllers/exchanges_controller.rb +32 -9
- data/app/controllers/export_controller.rb +8 -0
- data/app/controllers/members/sessions_controller.rb +0 -2
- data/app/controllers/membership_comps_controller.rb +2 -1
- data/app/controllers/prices_controller.rb +20 -0
- data/app/controllers/shows_controller.rb +3 -1
- data/app/controllers/store/events_controller.rb +6 -5
- data/app/controllers/store/orders_controller.rb +11 -13
- data/app/controllers/store/shows_controller.rb +1 -0
- data/app/controllers/store/store_controller.rb +11 -0
- data/app/controllers/tickets_controller.rb +0 -28
- data/app/controllers/user_memberships_controller.rb +7 -2
- data/app/controllers/venues_controller.rb +9 -0
- data/app/helpers/artfully_ose_helper.rb +18 -4
- data/app/helpers/seating_helper.rb +157 -0
- data/app/models/assigned_chart.rb +220 -0
- data/app/models/cart.rb +6 -1
- data/app/models/chart.rb +28 -17
- data/app/models/database_views/item_view.rb +76 -5
- data/app/models/discount.rb +4 -0
- data/app/models/discounts/buy_one_get_one_free_discount_type.rb +1 -1
- data/app/models/discounts/dollars_off_tickets_discount_type.rb +5 -1
- data/app/models/discounts/percentage_off_tickets_discount_type.rb +8 -4
- data/app/models/event.rb +86 -12
- data/app/models/general_admission_chart.rb +51 -0
- data/app/models/imports/events_import.rb +1 -1
- data/app/models/job/show_creator.rb +3 -10
- data/app/models/kit.rb +11 -1
- data/app/models/kits/assigned_seating_kit.rb +23 -0
- data/app/models/member_walkup.rb +1 -1
- data/app/models/order_handler.rb +22 -6
- data/app/models/organization.rb +4 -5
- data/app/models/person.rb +3 -1
- data/app/models/sale.rb +1 -1
- data/app/models/seat.rb +96 -0
- data/app/models/section.rb +1 -3
- data/app/models/show.rb +10 -17
- data/app/models/ticket.rb +30 -6
- data/app/models/ticket/locker.rb +3 -2
- data/app/models/ticket_type.rb +12 -6
- data/app/models/ticket_types_seat.rb +4 -0
- data/app/models/venue.rb +23 -0
- data/app/views/advanced_searches/filters/_birthday.html.haml +1 -0
- data/app/views/assigned_charts/_show.html.haml +12 -0
- data/app/views/console_sales/_aloha.html.haml +5 -4
- data/app/views/console_sales/new.html.haml +9 -0
- data/app/views/event_calendars/index.html.haml +34 -0
- data/app/views/events/_menu.html.haml +2 -1
- data/app/views/events/_section_fields.html.haml +13 -8
- data/app/views/events/new.html.haml +34 -4
- data/app/views/events/prices.html.haml +3 -4
- data/app/views/events/seating.html.haml +131 -0
- data/app/views/exchanges/_assigned_chart.html.haml +108 -0
- data/app/views/exchanges/_general_admission_chart.html.haml +55 -0
- data/app/views/exchanges/new.html.haml +1 -55
- data/app/views/general_admission_charts/_show.html.haml +2 -0
- data/app/views/layouts/_menu.html.haml +44 -31
- data/app/views/layouts/storefront.html.haml +72 -30
- data/app/views/membership_comps/new.html.haml +1 -0
- data/app/views/order_mailer/confirmation_for.html.haml +5 -3
- data/app/views/order_mailer/confirmation_for.text.haml +1 -2
- data/app/views/pdfs/order.html.haml +20 -6
- data/app/views/seating/_actions_menu.html.haml +10 -0
- data/app/views/seating/_chart.html.haml +15 -0
- data/app/views/seating/_chart_container.html.haml +2 -0
- data/app/views/seating/_chart_note_display.html.haml +7 -0
- data/app/views/seating/_hold_seats_modal.html.haml +39 -0
- data/app/views/seating/_layer_menu.html.haml +23 -0
- data/app/views/seating/_legend.html.haml +52 -0
- data/app/views/seating/_modify_seats_modal.html.haml +29 -0
- data/app/views/seating/_ticket_type_modals.html.haml +41 -0
- data/app/views/shows/_seat_chart.html.haml +122 -0
- data/app/views/shows/_sections_table.html.haml +3 -24
- data/app/views/shows/_ticket_table.html.haml +4 -2
- data/app/views/shows/_work_with.html.haml +4 -0
- data/app/views/shows/new.html.haml +2 -2
- data/app/views/shows/show.html.haml +93 -14
- data/app/views/store/assigned_charts/_show.html.haml +54 -0
- data/app/views/store/checkouts/shopping_cart_display/_tickets.haml +13 -0
- data/app/views/store/donations/index.html.haml +1 -1
- data/app/views/store/events/calendar.html.haml +94 -11
- data/app/views/store/events/index.html.haml +1 -1
- data/app/views/store/events/show.html.haml +36 -2
- data/app/views/store/events/single_show.html.haml +5 -4
- data/app/views/store/general_admission_charts/_show.html.haml +41 -0
- data/app/views/store/orders/show.html.haml +17 -4
- data/app/views/store/shared/_donate_form.html.haml +2 -1
- data/app/views/store/shared/_small_donate_form.html.haml +1 -1
- data/app/views/store/shows/_show.html.haml +1 -39
- data/app/views/ticket_types/edit.html.haml +1 -1
- data/app/views/user_memberships/_list.html.haml +1 -1
- data/app/views/venues/edit.html.haml +1 -1
- data/app/views/venues/show.html.haml +11 -0
- data/config/routes.rb +27 -10
- data/db/migrate/20140828174357_add_type_to_chart.rb +7 -0
- data/db/migrate/20140828195617_create_seats.rb +16 -0
- data/db/migrate/20140829135426_add_venue_to_chart.rb +5 -0
- data/db/migrate/20140829143520_add_assigned_to_event.rb +5 -0
- data/db/migrate/20140904164927_add_fields_to_seat.rb +14 -0
- data/db/migrate/20140912170010_add_note_to_seat.rb +6 -0
- data/db/migrate/20140919152307_add_seats_to_ticket.rb +5 -0
- data/db/migrate/20140930224543_add_public_note_to_chart.rb +5 -0
- data/db/migrate/20141001140737_add_seat_id_index_to_tickets.rb +5 -0
- data/db/migrate/20141001193242_associate_hold_with_person.rb +6 -0
- data/db/migrate/20141021175311_create_ticket_types_seats.rb +11 -0
- data/db/migrate/20150106161744_migrate_charts_back_to_venues.rb +18 -0
- data/db/migrate/20151105085424_add_creator_to_items_view.rb +40 -0
- data/lib/artfully_ose/version.rb +1 -1
- data/spec/factories/assigned_chart_factories.rb +18 -0
- data/spec/factories/chart_factories.rb +4 -8
- data/spec/factories/kit_factories.rb +4 -0
- data/spec/factories/seat_factories.rb +4 -0
- data/spec/factories/show_factories.rb +1 -1
- metadata +66 -5
- data/app/models/ticket/foundry.rb +0 -48
- data/app/models/ticket/template.rb +0 -40
- data/app/views/store/events/_calendar.html.haml +0 -13
@@ -0,0 +1,41 @@
|
|
1
|
+
.sections{:style => "#{'display:none' if collapsed}"}
|
2
|
+
- if show.chart.sections.storefront.empty?
|
3
|
+
No tickets are available for this show
|
4
|
+
- else
|
5
|
+
%table.table.available-ticket-type-table
|
6
|
+
- show.sections_for(current_member).each do |section|
|
7
|
+
-section.ticket_types_for(current_member).each do |ticket_type|
|
8
|
+
%tr
|
9
|
+
%td.ticket-type-name
|
10
|
+
= ticket_type.name
|
11
|
+
%td.right.span2.ticket-type-price
|
12
|
+
%span{:class => 'price'}= number_as_cents(ticket_type.price)
|
13
|
+
%td.right.span4.controls
|
14
|
+
= form_tag store_order_path(@store_organization.cached_slug), :class => 'add-tickets-to-cart', :id => "add-tickets-to-cart-#{ticket_type.id}" do
|
15
|
+
= hidden_field_tag :on_error, store_event_path(@store_organization, show.event)
|
16
|
+
= hidden_field_tag :on_success, store_order_path(@store_organization)
|
17
|
+
= hidden_field_tag :show_id, show.id
|
18
|
+
= hidden_field_tag :ticket_type_id, ticket_type.id
|
19
|
+
= hidden_field_tag :section_name, ticket_type.name
|
20
|
+
= hidden_field_tag :ticket_price, ticket_type.price
|
21
|
+
|
22
|
+
- available = ticket_type.available("storefront", current_member)
|
23
|
+
- if available == 0
|
24
|
+
%select{:style => "width:140px", :class => 'ticket-type-quantity', :id => 'quantity', :name => 'quantity'}
|
25
|
+
%option SOLD OUT
|
26
|
+
- else
|
27
|
+
= select_tag :quantity, options_for_select((1..[10, available].min).to_a.map {|i| [pluralize(i, 'Ticket'), i]}), :style => "width:140px", :class => 'ticket-type-quantity'
|
28
|
+
|
29
|
+
= submit_tag 'Add to cart', :class => 'add-to-cart btn btn-primary'
|
30
|
+
%tr.no-border
|
31
|
+
%td.ticket-type-description{:colspan => "4"}
|
32
|
+
-unless ticket_type.description.nil?
|
33
|
+
-description = ticket_type.description
|
34
|
+
-if description.length > 150
|
35
|
+
.toggle-truncated
|
36
|
+
.truncated
|
37
|
+
= simple_format "#{truncate(description, :length => 150)} (#{link_to 'more','#', :class => 'toggle'})"
|
38
|
+
.not-truncated{:style => 'display:none;'}
|
39
|
+
=simple_format "#{description} (#{link_to 'less','#', :class => 'toggle'})"
|
40
|
+
- else
|
41
|
+
=simple_format description
|
@@ -10,12 +10,25 @@
|
|
10
10
|
-unless current_cart.tickets.empty?
|
11
11
|
%h4 Tickets
|
12
12
|
%table.table#tickets-table
|
13
|
-
-current_cart.tickets.
|
13
|
+
-current_cart.tickets.each_with_index do |ticket, index|
|
14
14
|
%tr.ticket-row
|
15
15
|
%td
|
16
16
|
=ticket.event.name
|
17
17
|
%br
|
18
|
+
=ticket.ticket_type.name
|
19
|
+
%br
|
18
20
|
=ticket.show
|
21
|
+
-if ticket.seat
|
22
|
+
%br
|
23
|
+
="Row #{ticket.seat.row_label}"
|
24
|
+
%br
|
25
|
+
="Seat #{ticket.seat.col_label}"
|
26
|
+
-if ticket.seat.qualifier.present?
|
27
|
+
%br
|
28
|
+
=ticket.seat.qualifier
|
29
|
+
-if ticket.seat.seat_note.present?
|
30
|
+
%br
|
31
|
+
=ticket.seat.seat_note
|
19
32
|
%td.right=number_as_cents ticket.price
|
20
33
|
|
21
34
|
-unless current_cart.memberships.empty?
|
@@ -43,7 +56,7 @@
|
|
43
56
|
%td.right=number_as_cents donation.price
|
44
57
|
|
45
58
|
= form_tag store_order_path(@store_organization.cached_slug) do
|
46
|
-
%table.table
|
59
|
+
%table.table.no-border
|
47
60
|
%tr#discount-input{:style => 'display:none'}
|
48
61
|
%td
|
49
62
|
= text_field_tag 'discount_or_pass_code', params[:discount_or_pass_code], :placeholder => @enter_code_string, :style => "margin-bottom:0px"
|
@@ -60,7 +73,7 @@
|
|
60
73
|
=number_as_cents current_cart.discount_amount
|
61
74
|
-else
|
62
75
|
%tr#discount-link
|
63
|
-
%td= link_to
|
76
|
+
%td= link_to enter_code_string, "#"
|
64
77
|
|
65
78
|
%table.table#totals-table
|
66
79
|
-unless current_cart.fee_in_cents == 0
|
@@ -165,7 +178,7 @@
|
|
165
178
|
-unless @special_instructions_hash.empty?
|
166
179
|
.navbar.clean
|
167
180
|
.navbar-inner
|
168
|
-
.brand.brand-lite Special
|
181
|
+
.brand.brand-lite Special Instructions
|
169
182
|
|
170
183
|
#special-instructions
|
171
184
|
- @special_instructions_hash.each do |event_id, caption|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
- donation_kit = @donation_kit || @store_organization.kit(:regular_donation)
|
2
2
|
= form_tag store_order_path(@store_organization.cached_slug), :method => :post, :class => 'add-donation-to-cart form-inline' do
|
3
|
-
= hidden_field_tag :
|
3
|
+
= hidden_field_tag :on_error, store_donate_path(@store_organization)
|
4
|
+
= hidden_field_tag :on_success, store_order_path(@store_organization)
|
4
5
|
|
5
6
|
- if donation_kit.suggested_gifts.present? && donation_kit.suggested_gifts.any?
|
6
7
|
- donation_kit.suggested_gifts.each_with_index do |suggested_gift, index|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
%p= "#{@store_organization.authorization_hash[:fsp_name]} is a fiscally sponsored project of Fractured Atlas, a non-profit arts service organization. Donations for the purposes of #{@store_organization.authorization_hash[:fsp_name]} must be made payable to Fractured Atlas and are tax-deductible to the extent permitted by law."
|
17
17
|
|
18
18
|
= form_tag store_order_path(@store_organization.cached_slug), :method => :post, :class => 'add-donation-to-cart form-inline' do
|
19
|
-
= hidden_field_tag :
|
19
|
+
= hidden_field_tag :return_to, store_order_path(@store_organization)
|
20
20
|
.preset-amount.last
|
21
21
|
.input-prepend
|
22
22
|
%span.add-on $
|
@@ -9,42 +9,4 @@
|
|
9
9
|
|
10
10
|
= show.datetime_local_to_event.strftime("%l:%M %p")
|
11
11
|
|
12
|
-
|
13
|
-
- if show.chart.sections.storefront.empty?
|
14
|
-
No tickets are available for this show
|
15
|
-
- else
|
16
|
-
%table.table.available-ticket-type-table
|
17
|
-
- show.sections_for(current_member).each do |section|
|
18
|
-
-section.ticket_types_for(current_member).each do |ticket_type|
|
19
|
-
%tr
|
20
|
-
%td.ticket-type-name
|
21
|
-
= ticket_type.name
|
22
|
-
%td.right.span2.ticket-type-price
|
23
|
-
%span{:class => 'price'}= number_as_cents(ticket_type.price)
|
24
|
-
%td.right.span4.controls
|
25
|
-
= form_tag store_order_path(@store_organization.cached_slug), :class => 'add-tickets-to-cart', :id => "add-tickets-to-cart-#{ticket_type.id}" do
|
26
|
-
= hidden_field_tag :show_id, show.id
|
27
|
-
= hidden_field_tag :ticket_type_id, ticket_type.id
|
28
|
-
= hidden_field_tag :section_name, ticket_type.name
|
29
|
-
= hidden_field_tag :ticket_price, ticket_type.price
|
30
|
-
|
31
|
-
- available = ticket_type.available("storefront", current_member)
|
32
|
-
- if available == 0
|
33
|
-
%select{:style => "width:140px", :class => 'ticket-type-quantity', :id => 'quantity', :name => 'quantity'}
|
34
|
-
%option SOLD OUT
|
35
|
-
- else
|
36
|
-
= select_tag :quantity, options_for_select((1..[10, available].min).to_a.map {|i| [pluralize(i, 'Ticket'), i]}), :style => "width:140px", :class => 'ticket-type-quantity'
|
37
|
-
|
38
|
-
= submit_tag 'Add to cart', :class => 'add-to-cart btn btn-primary'
|
39
|
-
%tr.no-border
|
40
|
-
%td.ticket-type-description{:colspan => "4"}
|
41
|
-
-unless ticket_type.description.nil?
|
42
|
-
-description = ticket_type.description
|
43
|
-
-if description.length > 150
|
44
|
-
.toggle-truncated
|
45
|
-
.truncated
|
46
|
-
= simple_format "#{truncate(description, :length => 150)} (#{link_to 'more','#', :class => 'toggle'})"
|
47
|
-
.not-truncated{:style => 'display:none;'}
|
48
|
-
=simple_format "#{description} (#{link_to 'less','#', :class => 'toggle'})"
|
49
|
-
- else
|
50
|
-
=simple_format description
|
12
|
+
=render :partial => "store/#{show.chart.class.name.underscore.pluralize}/show", :locals => {:show => show, :collapsed => collapsed}
|
@@ -25,7 +25,7 @@
|
|
25
25
|
-if user_membership.receive_daily_sales_report?
|
26
26
|
%i.icon-envelope.artfully-tooltip#daily-sales-report-icon{"data-toggle"=>"tooltip", :rel => "tooltip", "data-original-title" => "This user will receive the daily sales report.", "data-trigger" => "hover"}
|
27
27
|
.other
|
28
|
-
="#{pluralize user_membership.user.sign_in_count, 'login'}. #{last_login(user_membership
|
28
|
+
="#{pluralize user_membership.user.sign_in_count, 'login'}. #{last_login(user_membership)}.".html_safe
|
29
29
|
.span5.user-role
|
30
30
|
=user_membership.role_title
|
31
31
|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
.control-group
|
42
42
|
=form.label :time_zone, :class => 'control-label' do
|
43
|
-
|
43
|
+
Time Zone
|
44
44
|
.tip.muted Changing your time zone will change your existing show times.
|
45
45
|
.controls
|
46
46
|
= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones, {:default => current_user.current_organization.time_zone}, {:class => 'input-xlarge'}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if @venue
|
2
|
+
#venue{:style => "text-align: right"}
|
3
|
+
=link_to image_tag("https://maps.google.com/maps/api/staticmap?size=290x140&maptype=roadmap&markers=color:red|#{@venue.address_as_url_query}&sensor=false&zoom=15"), "https://maps.google.com/maps?q=#{@venue.address_as_url_query.html_safe}&z=15"
|
4
|
+
%h4{:style => "margin-bottom: 0px"}=@venue.name
|
5
|
+
%div=@venue.address1
|
6
|
+
-unless @venue.address2.blank?
|
7
|
+
%div=@venue.address2
|
8
|
+
%div=@venue.city_state_zip_as_string
|
9
|
+
%p
|
10
|
+
.tip.muted
|
11
|
+
We will re-use your prices and seating information from your most recent event this venue. You can make changes to this information in event setup.
|
data/config/routes.rb
CHANGED
@@ -84,7 +84,12 @@ Rails.application.routes.draw do
|
|
84
84
|
|
85
85
|
resources :organizations do
|
86
86
|
put :tax_info, :on => :member
|
87
|
-
resources :user_memberships
|
87
|
+
resources :user_memberships do
|
88
|
+
member do
|
89
|
+
put :reinvite
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
88
93
|
member do
|
89
94
|
post :connect
|
90
95
|
end
|
@@ -106,6 +111,7 @@ Rails.application.routes.draw do
|
|
106
111
|
post :contacts
|
107
112
|
get :donations
|
108
113
|
get :ticket_sales
|
114
|
+
get :all_sales
|
109
115
|
end
|
110
116
|
end
|
111
117
|
|
@@ -275,6 +281,7 @@ Rails.application.routes.draw do
|
|
275
281
|
get :resell
|
276
282
|
get :wp_plugin
|
277
283
|
get :prices
|
284
|
+
get :seating
|
278
285
|
get :image
|
279
286
|
get :messages
|
280
287
|
end
|
@@ -300,6 +307,11 @@ Rails.application.routes.draw do
|
|
300
307
|
end
|
301
308
|
resource :venue, :only => [:edit, :update]
|
302
309
|
end
|
310
|
+
resources :event_calendars, :only => [:index]
|
311
|
+
|
312
|
+
resources :venues, :only => [:show]
|
313
|
+
resources :charts, :only => [:show]
|
314
|
+
resources :seats, :only => [:show]
|
303
315
|
|
304
316
|
resources :shows, :only => [] do
|
305
317
|
resources :tickets, shallow: true, :only => [ :new, :create ] do
|
@@ -319,17 +331,14 @@ Rails.application.routes.draw do
|
|
319
331
|
end
|
320
332
|
end
|
321
333
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
resources :charts, :only => [:update] do
|
334
|
+
# Working under the assumption that this isn't needed
|
335
|
+
# resources :general_admission_charts, :only => [:update] do
|
336
|
+
# resources :sections
|
337
|
+
# end
|
338
|
+
resources :assigned_charts, :controller => :charts, :only => [:update, :show] do
|
331
339
|
resources :sections
|
332
340
|
end
|
341
|
+
resources :prices, :only => [:update]
|
333
342
|
|
334
343
|
resources :sections do
|
335
344
|
resources :ticket_types, :only => [:new, :create]
|
@@ -357,6 +366,14 @@ Rails.application.routes.draw do
|
|
357
366
|
end
|
358
367
|
end
|
359
368
|
|
369
|
+
resources :campaigns do
|
370
|
+
resources :appeals
|
371
|
+
resources :contributions, :only => [:new, :create]
|
372
|
+
member do
|
373
|
+
get :copy
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
360
377
|
resources :job_monitors, :only => [:show], :as => :monitors
|
361
378
|
resources :contributions
|
362
379
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateSeats < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :seats do |t|
|
4
|
+
t.integer :chart_id, :null => false
|
5
|
+
t.integer :row_index
|
6
|
+
t.integer :col_index
|
7
|
+
t.string :row_label
|
8
|
+
t.string :col_label
|
9
|
+
t.string :label
|
10
|
+
|
11
|
+
t.boolean :available
|
12
|
+
t.boolean :killed
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class AddFieldsToSeat < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :seats, :house_hold, :boolean, :default => false
|
4
|
+
add_column :seats, :development_hold, :boolean, :default => false
|
5
|
+
add_column :seats, :tech_hold, :boolean, :default => false
|
6
|
+
add_column :seats, :contractual_hold, :boolean, :default => false
|
7
|
+
add_column :seats, :person_hold, :boolean, :default => false
|
8
|
+
add_column :seats, :press_hold, :boolean, :default => false
|
9
|
+
|
10
|
+
add_column :seats, :wheelchair, :boolean, :default => false
|
11
|
+
add_column :seats, :wheelchair_companion, :boolean, :default => false
|
12
|
+
add_column :seats, :aisle, :boolean, :default => false
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateTicketTypesSeats < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :ticket_types_seats do |t|
|
4
|
+
t.belongs_to :ticket_type
|
5
|
+
t.belongs_to :seat
|
6
|
+
end
|
7
|
+
|
8
|
+
add_index :ticket_types_seats, :ticket_type_id
|
9
|
+
add_index :ticket_types_seats, :seat_id
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class MigrateChartsBackToVenues < ActiveRecord::Migration
|
2
|
+
#
|
3
|
+
# This migration is going to be slow but we can't run it in parallel after a release
|
4
|
+
#
|
5
|
+
|
6
|
+
def change
|
7
|
+
Venue.all.each do |venue|
|
8
|
+
next if venue.default_chart.present?
|
9
|
+
|
10
|
+
if venue.event.present? && venue.event.default_chart.present?
|
11
|
+
venue.update_default_chart_from(venue.event.default_chart)
|
12
|
+
else
|
13
|
+
GeneralAdmissionChart.default_chart_for(venue).save
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class AddCreatorToItemsView < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
execute "CREATE OR REPLACE VIEW items_view as " +
|
4
|
+
"select " +
|
5
|
+
"orders.id as order_id," +
|
6
|
+
"orders.type as order_type," +
|
7
|
+
"items.id as item_id," +
|
8
|
+
"items.product_type as product_type," +
|
9
|
+
"organizations.id as organization_id," +
|
10
|
+
"organizations.name as organization_name," +
|
11
|
+
"organizations.time_zone as time_zone," +
|
12
|
+
"orders.created_at," +
|
13
|
+
"orders.payment_method," +
|
14
|
+
# people and addresses got moved out into a relation
|
15
|
+
# since this export now runs in a background job, speed isn't the primary concern
|
16
|
+
"people.id as person_id," +
|
17
|
+
"shows.datetime," +
|
18
|
+
"shows.id as show_id," +
|
19
|
+
"events.id as event_id," +
|
20
|
+
"events.name as event_name," +
|
21
|
+
"items.price," +
|
22
|
+
"items.nongift_amount," +
|
23
|
+
"orders.special_instructions, " +
|
24
|
+
"orders.notes, " +
|
25
|
+
"users.email as creator " +
|
26
|
+
"from items " +
|
27
|
+
"LEFT OUTER JOIN `orders` ON `orders`.`id` = `items`.`order_id`" +
|
28
|
+
"LEFT OUTER JOIN `people` ON `people`.`id` = `orders`.`person_id` " +
|
29
|
+
"LEFT OUTER JOIN `organizations` ON `organizations`.`id` = `orders`.`organization_id`" +
|
30
|
+
"LEFT OUTER JOIN `shows` ON `shows`.`id` = `items`.`show_id` " +
|
31
|
+
"LEFT OUTER JOIN `events` ON `events`.`id` = `shows`.`event_id` " +
|
32
|
+
"LEFT OUTER JOIN `venues` ON `venues`.`id` = `events`.`venue_id`" +
|
33
|
+
"LEFT OUTER JOIN `users` ON `users`.`id` = `orders`.`creator_id`" +
|
34
|
+
"WHERE `items`.`deleted_at` IS NULL "
|
35
|
+
end
|
36
|
+
|
37
|
+
def down
|
38
|
+
execute "drop view items_view"
|
39
|
+
end
|
40
|
+
end
|