artfully_ose 1.0.0.rc4 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +661 -0
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +284 -0
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/chosen-sprite.png +0 -0
- data/app/assets/javascripts/application.js +88 -44
- data/app/assets/javascripts/box-office.js +7 -3
- data/app/assets/javascripts/custom/grouped-form.js +1 -1
- data/app/assets/javascripts/custom/modernizr.custom.12828.js +4 -0
- data/app/assets/javascripts/custom/people.js +30 -1
- data/app/assets/javascripts/jquery-lib/chosen.jquery.js +1026 -0
- data/app/assets/javascripts/jquery-lib/jquery.jeditable.js +1 -1
- data/app/assets/javascripts/jquery-lib/jquery.mask-money.js +90 -60
- data/app/assets/javascripts/store/store.js +112 -67
- data/app/assets/stylesheets/application.sass +174 -1
- data/app/assets/stylesheets/bootstrap-overrides.css +51 -13
- data/app/assets/stylesheets/bootstrap.css +4 -379
- data/app/assets/stylesheets/font-awesome.sass +759 -0
- data/app/assets/stylesheets/jquery/chosen.scss +397 -0
- data/app/assets/stylesheets/printing.css +5 -1
- data/app/assets/stylesheets/sass/store.sass +18 -3
- data/app/concerns/itemable.rb +11 -0
- data/app/concerns/oh_noes.rb +24 -0
- data/app/controllers/actions_controller.rb +39 -20
- data/app/controllers/addresses_controller.rb +2 -2
- data/app/controllers/artfully_ose_controller.rb +15 -1
- data/app/controllers/charts_controller.rb +6 -2
- data/app/controllers/contributions_controller.rb +28 -1
- data/app/controllers/discounts_controller.rb +65 -0
- data/app/controllers/discounts_reports_controller.rb +22 -0
- data/app/controllers/events_controller.rb +48 -45
- data/app/controllers/exchanges_controller.rb +10 -10
- data/app/controllers/imports_controller.rb +38 -20
- data/app/controllers/index_controller.rb +1 -1
- data/app/controllers/memberships_controller.rb +1 -0
- data/app/controllers/merges_controller.rb +1 -1
- data/app/controllers/orders_controller.rb +6 -12
- data/app/controllers/organizations_controller.rb +0 -1
- data/app/controllers/people_controller.rb +10 -12
- data/app/controllers/refunds_controller.rb +2 -2
- data/app/controllers/returns_controller.rb +0 -1
- data/app/controllers/sales_controller.rb +9 -6
- data/app/controllers/searches_controller.rb +53 -0
- data/app/controllers/sections_controller.rb +12 -1
- data/app/controllers/segments_controller.rb +23 -10
- data/app/controllers/shows_controller.rb +37 -28
- data/app/controllers/slices_controller.rb +37 -0
- data/app/controllers/statements_controller.rb +4 -4
- data/app/controllers/store/checkouts_controller.rb +14 -12
- data/app/controllers/store/events_controller.rb +1 -1
- data/app/controllers/store/orders_controller.rb +32 -5
- data/app/controllers/store/store_controller.rb +4 -0
- data/app/controllers/venues_controller.rb +6 -2
- data/app/helpers/artfully_ose_helper.rb +31 -5
- data/app/helpers/discounts_helper.rb +3 -0
- data/app/helpers/people_helper.rb +2 -19
- data/app/mailers/order_mailer.rb +21 -3
- data/app/mailers/producer_mailer.rb +9 -1
- data/app/mailers/reports_mailer.rb +12 -0
- data/app/models/action.rb +29 -3
- data/app/models/actions/get_action.rb +4 -0
- data/app/models/actions/go_action.rb +18 -0
- data/app/models/actions/refund_action.rb +14 -0
- data/app/models/address.rb +6 -16
- data/app/models/adjustments.rb +10 -0
- data/app/models/box_office.rb +1 -1
- data/app/models/carts/cart.rb +35 -24
- data/app/models/chart.rb +16 -8
- data/app/models/checkout.rb +32 -9
- data/app/models/comp.rb +2 -8
- data/app/models/contribution.rb +111 -25
- data/app/models/daily_donation_report.rb +45 -0
- data/app/models/daily_ticket_report.rb +51 -0
- data/app/models/discount.rb +137 -0
- data/app/models/discounts/buy_one_get_one_free_discount_type.rb +20 -0
- data/app/models/discounts/discount_type.rb +66 -0
- data/app/models/discounts/dollars_off_tickets_discount_type.rb +32 -0
- data/app/models/discounts/percentage_off_tickets_discount_type.rb +25 -0
- data/app/models/discounts_report.rb +87 -0
- data/app/models/donation.rb +2 -0
- data/app/models/door_list.rb +5 -4
- data/app/models/event.rb +45 -16
- data/app/models/exchange.rb +26 -15
- data/app/models/ext/delayed_indexing.rb +24 -0
- data/app/models/ext/due.rb +7 -0
- data/app/models/ext/ext.rb +37 -0
- data/app/models/ext/integrations.rb +30 -0
- data/app/models/ext/resellable.rb +8 -1
- data/app/models/gateway_transaction.rb +47 -0
- data/app/models/import.rb +83 -101
- data/app/models/import_error.rb +1 -1
- data/app/models/import_row.rb +1 -1
- data/app/models/imports/donations_import.rb +103 -0
- data/app/models/imports/events_import.rb +207 -0
- data/app/models/imports/people_import.rb +41 -0
- data/app/models/imports/processing.rb +53 -0
- data/app/models/imports/rollback.rb +11 -0
- data/app/models/imports/status.rb +48 -0
- data/app/models/imports/validations.rb +31 -0
- data/app/models/item.rb +112 -29
- data/app/models/job/action_job.rb +29 -0
- data/app/models/job/daily_email_report_job.rb +11 -0
- data/app/models/job/tag_job.rb +15 -0
- data/app/models/kit.rb +14 -6
- data/app/models/kits/mailchimp_kit.rb +448 -0
- data/app/models/kits/reseller_kit.rb +2 -2
- data/app/models/kits/sponsored_donation_kit.rb +2 -2
- data/app/models/orders/application_order.rb +3 -1
- data/app/models/orders/comp_order.rb +15 -2
- data/app/models/orders/exchange_order.rb +8 -0
- data/app/models/orders/imported_order.rb +7 -0
- data/app/models/orders/order.rb +164 -51
- data/app/models/orders/refund_order.rb +14 -1
- data/app/models/orders/unrefundable.rb +5 -0
- data/app/models/orders/web_order.rb +1 -1
- data/app/models/organization.rb +38 -7
- data/app/models/parsed_row.rb +167 -0
- data/app/models/payments/comp_payment.rb +10 -1
- data/app/models/payments/credit_card_payment.rb +63 -10
- data/app/models/payments/payment.rb +28 -0
- data/app/models/person.rb +115 -43
- data/app/models/refund.rb +28 -28
- data/app/models/return.rb +2 -0
- data/app/models/sale.rb +8 -5
- data/app/models/search.rb +117 -0
- data/app/models/section.rb +18 -0
- data/app/models/segment.rb +14 -4
- data/app/models/show.rb +14 -4
- data/app/models/slices.rb +82 -0
- data/app/models/statement.rb +170 -3
- data/app/models/temp_discount.rb +14 -0
- data/app/models/ticket.rb +42 -134
- data/app/models/ticket/pricing.rb +45 -0
- data/app/models/ticket/reports.rb +10 -7
- data/app/models/ticket/sale_transitions.rb +44 -0
- data/app/models/ticket/transfers.rb +50 -0
- data/app/models/user.rb +10 -2
- data/app/models/valuation/lifetime_donations.rb +35 -0
- data/app/models/venue.rb +12 -1
- data/app/presenters/event_presenter.rb +41 -0
- data/app/views/actions/_list.html.haml +1 -2
- data/app/views/actions/new.html.haml +1 -1
- data/app/views/contributions/_form.html.haml +40 -0
- data/app/views/contributions/_sidebar.html.haml +12 -0
- data/app/views/contributions/edit.html.haml +11 -0
- data/app/views/contributions/index.html.haml +2 -2
- data/app/views/contributions/new.html.haml +5 -35
- data/app/views/discounts/_discount_section_fields.html.haml +25 -0
- data/app/views/discounts/_form.html.haml +95 -0
- data/app/views/discounts/edit.html.haml +16 -0
- data/app/views/discounts/index.html.haml +33 -0
- data/app/views/discounts/new.html.haml +16 -0
- data/app/views/discounts_reports/index.html.haml +76 -0
- data/app/views/events/_discount_section_fields.html.haml +25 -0
- data/app/views/events/_glance.html.haml +4 -1
- data/app/views/events/_list.html.haml +2 -4
- data/app/views/events/_menu.html.haml +3 -3
- data/app/views/events/_section_fields.html.haml +32 -15
- data/app/views/events/_share_and_sell.haml +2 -1
- data/app/views/events/edit.html.haml +7 -6
- data/app/views/events/image.html.haml +1 -0
- data/app/views/events/index.html.haml +3 -1
- data/app/views/events/messages.html.haml +1 -0
- data/app/views/events/prices.html.haml +2 -1
- data/app/views/events/resell.html.haml +1 -1
- data/app/views/events/show.html.haml +25 -1
- data/app/views/events/storefront_link.html.haml +1 -1
- data/app/views/events/temp_discount_form.html.haml +108 -0
- data/app/views/events/temp_discounts_index.html.haml +38 -0
- data/app/views/events/widget.html.haml +14 -1
- data/app/views/exchanges/new.html.haml +50 -73
- data/app/views/imports/{_imported.html.haml → donations/_approved.html.haml} +2 -5
- data/app/views/imports/donations/_caching.html.haml +17 -0
- data/app/views/imports/donations/_failed.html.haml +5 -0
- data/app/views/imports/donations/_imported.html.haml +9 -0
- data/app/views/imports/donations/_importing.html.haml +12 -0
- data/app/views/imports/donations/_invalid.html.haml +5 -0
- data/app/views/imports/donations/_new.html.haml +99 -0
- data/app/views/imports/donations/_pending.html.haml +41 -0
- data/app/views/imports/events/_approved.html.haml +10 -0
- data/app/views/imports/events/_caching.html.haml +17 -0
- data/app/views/imports/events/_failed.html.haml +5 -0
- data/app/views/imports/events/_imported.html.haml +9 -0
- data/app/views/imports/events/_importing.html.haml +12 -0
- data/app/views/imports/events/_invalid.html.haml +5 -0
- data/app/views/imports/events/_new.html.haml +95 -0
- data/app/views/imports/events/_pending.html.haml +35 -0
- data/app/views/imports/index.html.haml +41 -18
- data/app/views/imports/new.html.haml +1 -93
- data/app/views/imports/{_approved.html.haml → people/_approved.html.haml} +0 -1
- data/app/views/imports/{_caching.html.haml → people/_caching.html.haml} +0 -0
- data/app/views/imports/people/_failed.html.haml +5 -0
- data/app/views/imports/people/_imported.html.haml +25 -0
- data/app/views/imports/{_importing.html.haml → people/_importing.html.haml} +1 -2
- data/app/views/imports/people/_invalid.html.haml +5 -0
- data/app/views/imports/people/_new.html.haml +120 -0
- data/app/views/imports/people/_pending.html.haml +39 -0
- data/app/views/imports/shared/_date_format.html.haml +14 -0
- data/app/views/imports/shared/_failed.html.haml +18 -0
- data/app/views/imports/shared/_inspect_modal.html.haml +11 -0
- data/app/views/imports/shared/_invalid.html.haml +18 -0
- data/app/views/imports/shared/_knowledge_base.haml +2 -0
- data/app/views/imports/shared/_sidebar.html.haml +5 -0
- data/app/views/imports/show.html.haml +2 -2
- data/app/views/index/dashboard.html.haml +4 -2
- data/app/views/layouts/_custom_css_includes.haml +0 -0
- data/app/views/layouts/_custom_js_includes.haml +0 -0
- data/app/views/layouts/_google_analytics.html.haml +3 -3
- data/app/views/layouts/_menu.html.haml +6 -2
- data/app/views/layouts/application.html.haml +4 -0
- data/app/views/layouts/{devise.html.haml → devise_layout.html.haml} +0 -0
- data/app/views/order_mailer/confirmation_for.html.haml +3 -2
- data/app/views/order_mailer/confirmation_for.text.haml +3 -2
- data/app/views/orders/_grouped_form_help.haml +4 -0
- data/app/views/orders/_item_table.haml +15 -4
- data/app/views/orders/_order_sidebar.html.haml +27 -6
- data/app/views/orders/index.html.haml +1 -12
- data/app/views/orders/show.html.haml +1 -1
- data/app/views/organizations/_form.html.haml +20 -6
- data/app/views/organizations/edit.html.haml +2 -1
- data/app/views/organizations/new.html.haml +1 -0
- data/app/views/organizations/show.html.haml +7 -1
- data/app/views/people/_form.html.haml +5 -2
- data/app/views/people/_key_relationships.html.haml +1 -1
- data/app/views/people/_list.html.haml +1 -12
- data/app/views/people/_person_summary_sidebar.html.haml +82 -50
- data/app/views/people/_relationship_table_row.html.haml +1 -1
- data/app/views/people/edit.html.haml +3 -1
- data/app/views/people/index.html.haml +7 -1
- data/app/views/people/new.html.haml +2 -0
- data/app/views/people/show.html.haml +2 -0
- data/app/views/refunds/new.html.haml +4 -6
- data/app/views/reports_mailer/daily.html.haml +67 -0
- data/app/views/reports_mailer/daily.text.erb +16 -0
- data/app/views/sales/new.html.haml +5 -20
- data/app/views/searches/_form.html.haml +43 -0
- data/app/views/searches/_person.html.haml +7 -0
- data/app/views/searches/new.html.haml +10 -0
- data/app/views/searches/show.html.haml +64 -0
- data/app/views/sections/edit.html.haml +12 -0
- data/app/views/segments/index.html.haml +8 -4
- data/app/views/segments/show.html.haml +39 -5
- data/app/views/shared/_door_list_table.haml +24 -0
- data/app/views/shared/_event_image_icon.html.haml +1 -1
- data/app/views/shared/_preload_assets.html.haml +2 -0
- data/app/views/shared/_tags.html.haml +3 -2
- data/app/views/shows/_glance.html.haml +8 -2
- data/app/views/shows/_ticket_table.html.haml +17 -10
- data/app/views/shows/_upcoming.html.haml +1 -1
- data/app/views/shows/door_list.html.haml +2 -24
- data/app/views/shows/index.html.haml +3 -3
- data/app/views/shows/new.html.haml +2 -2
- data/app/views/shows/show.html.haml +1 -1
- data/app/views/slices/_data.json +50 -0
- data/app/views/slices/index.html.haml +58 -0
- data/app/views/statements/_discounts_table.html.haml +26 -0
- data/app/views/statements/_order_location_table.html.haml +20 -0
- data/app/views/statements/_payment_method_table.haml +20 -0
- data/app/views/statements/{_played_shows.html.haml → _shows.html.haml} +3 -3
- data/app/views/statements/_ticket_type_table.haml +20 -0
- data/app/views/statements/_top_stats.haml +12 -0
- data/app/views/statements/show.html.haml +24 -32
- data/app/views/store/events/_show.html.haml +11 -5
- data/app/views/store/events/show.html.haml +24 -5
- data/app/views/users/registrations/edit.html.erb +1 -1
- data/app/views/venues/edit.html.haml +1 -0
- data/config/artfully.yml.sample +3 -0
- data/config/initializers/active_model_serializer.rb +3 -0
- data/config/initializers/braintree_error_mapping.rb +5 -0
- data/config/initializers/devise.rb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/routes.rb +31 -8
- data/db/migrate/0000_set_up_artfully.rb +9 -11
- data/db/migrate/20120809212802_add_do_not_email_to_people.rb +5 -0
- data/db/migrate/20120831200120_create_advanced_search.rb +30 -0
- data/db/migrate/20120926201927_add_email_to_organization.rb +5 -0
- data/db/migrate/20121001143351_add_import_id_orders_events.rb +6 -0
- data/db/migrate/20121006024736_add_import_to_actions.rb +5 -0
- data/db/migrate/20121011180654_add_type_to_imports.rb +14 -0
- data/db/migrate/20121024143846_create_discounts.rb +15 -0
- data/db/migrate/20121026131454_deleted_at_to_orders_items_actions.rb +7 -0
- data/db/migrate/20121026203948_add_initial_price_to_tickets.rb +5 -0
- data/db/migrate/20121029183949_change_initial_price_to_cart_price.rb +5 -0
- data/db/migrate/20121113144826_migrate_donation_types.rb +41 -0
- data/db/migrate/20121115020441_add_salutation_to_people.rb +5 -0
- data/db/migrate/20121130004314_add_visibility_to_sections.rb +6 -0
- data/db/migrate/20121205184343_add_discount_to_ticket.rb +6 -0
- data/db/migrate/20121206212835_add_discount_to_carts_and_items.rb +7 -0
- data/db/migrate/20121211193728_add_deleted_at_to_discounts.rb +5 -0
- data/db/migrate/20121212022026_add_uuid_to_show_and_event.rb +9 -0
- data/db/migrate/20121212023203_set_uuids.rb +11 -0
- data/db/migrate/20121217201422_add_minimum_ticket_count_to_discounts.rb +5 -0
- data/db/migrate/20121221154152_add_shows_and_sections_to_discounts.rb +5 -0
- data/db/migrate/20130103153946_make_shows_and_sections_habtm.rb +19 -0
- data/db/migrate/20130108213102_add_original_price_to_items.rb +10 -0
- data/db/migrate/20130111211929_convert_discounts_sections_to_array_of_strings.rb +14 -0
- data/db/migrate/20130114200128_add_discount_code_to_search.rb +5 -0
- data/db/migrate/20130114212408_add_limit_to_discounts.rb +5 -0
- data/db/migrate/20130116203331_add_title_to_person.rb +5 -0
- data/db/migrate/20130122143845_install_audited.rb +28 -0
- data/db/migrate/20130131024955_add_gateway_transactions.rb +13 -0
- data/db/migrate/20130301144159_add_receive_daily_sales_report_boolean_to_organizations.rb +5 -0
- data/db/migrate/20130306213416_add_subscribed_lists_to_people.rb +5 -0
- data/db/migrate/20130308193328_people_arent_dummies.rb +6 -0
- data/db/migrate/20130312173340_add_categories_to_events.rb +6 -0
- data/db/migrate/20130319110520_add_transaction_id_index.rb +6 -0
- data/db/migrate/20130320192827_add_index_to_notes.rb +8 -0
- data/db/migrate/20130324173939_add_index_to_import_rows.rb +5 -0
- data/db/migrate/20130325190110_add_indexes_to_actions.rb +9 -0
- data/db/migrate/20130326173653_add_lifetime_donations_to_people_and_searches.rb +9 -0
- data/lib/artfully_ose.rb +5 -1
- data/lib/artfully_ose/common_abilities.rb +6 -9
- data/lib/artfully_ose/engine.rb +19 -5
- data/lib/artfully_ose/version.rb +1 -1
- data/lib/email_validator.rb +6 -0
- metadata +442 -138
- data/MIT-LICENSE +0 -20
- data/app/controllers/pages_controller.rb +0 -29
- data/app/models/import_person.rb +0 -78
- data/app/views/imports/_failed.html.haml +0 -20
- data/app/views/imports/_pending.html.haml +0 -35
- data/app/views/index/splash.html.erb +0 -160
- data/app/views/segments/new.html.haml +0 -20
@@ -20,6 +20,6 @@
|
|
20
20
|
|
21
21
|
<h3>Cancel my account</h3>
|
22
22
|
|
23
|
-
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure you want to cancel your account?", :method => :delete %>.</p>
|
23
|
+
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => {:confirm => "Are you sure you want to cancel your account?"}, :method => :delete %>.</p>
|
24
24
|
|
25
25
|
<%= link_to "Back", :back %>
|
data/config/artfully.yml.sample
CHANGED
@@ -0,0 +1,5 @@
|
|
1
|
+
BRAINTREE_GENERIC_REJECT = "We're sorry but we could not process your credit card. Please check the details and try again."
|
2
|
+
|
3
|
+
BRAINTREE_REJECT_MESSAGE_MAPPING = Hash.new(BRAINTREE_GENERIC_REJECT)
|
4
|
+
BRAINTREE_REJECT_MESSAGE_MAPPING["CVV must be 4 digits for American Express and 3 digits for other card types (81707)"] = "CVV is invalid. CVV must be 4 digits for American Express and 3 digits for other card types."
|
5
|
+
BRAINTREE_REJECT_MESSAGE_MAPPING["2004 Expired Card"] = "We're sorry but we could not process your credit card. It looks like your card has expired."
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Devise.setup do |config|
|
4
4
|
# ==> Mailer Configuration
|
5
5
|
# Configure the e-mail address which will be shown in DeviseMailer.
|
6
|
-
config.mailer_sender =
|
6
|
+
config.mailer_sender = ARTFULLY_CONFIG[:contact_email]
|
7
7
|
config.case_insensitive_keys = [ :email ]
|
8
8
|
config.use_salt_as_remember_token = true
|
9
9
|
config.reset_password_within = 24.hours
|
data/config/locales/en.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -58,7 +58,13 @@ Rails.application.routes.draw do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
resources :reports, :only => :index
|
61
|
-
resources :statements, :only => [ :index, :show ]
|
61
|
+
resources :statements, :only => [ :index, :show ] do
|
62
|
+
resources :slices, :only => [ :index ] do
|
63
|
+
collection do
|
64
|
+
get :data
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
62
68
|
|
63
69
|
resources :people, :except => :destroy do
|
64
70
|
resources :actions
|
@@ -66,15 +72,30 @@ Rails.application.routes.draw do
|
|
66
72
|
resources :phones, :only => [:create, :destroy]
|
67
73
|
resource :address, :only => [:create, :update, :destroy]
|
68
74
|
end
|
69
|
-
resources :
|
75
|
+
resources :searches, :only => [:new, :create, :show] do
|
76
|
+
resources :actions, :only => [:new, :create]
|
77
|
+
member do
|
78
|
+
post :tag
|
79
|
+
end
|
80
|
+
end
|
81
|
+
resources :segments, :only => [:index, :show, :create, :destroy] do
|
82
|
+
resources :actions, :only => [:new, :create]
|
83
|
+
member do
|
84
|
+
post :tag
|
85
|
+
end
|
86
|
+
end
|
70
87
|
|
71
88
|
resources :events do
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
89
|
+
member do
|
90
|
+
get :widget
|
91
|
+
get :storefront_link
|
92
|
+
get :resell
|
93
|
+
get :wp_plugin
|
94
|
+
get :prices
|
95
|
+
get :image
|
96
|
+
get :messages
|
97
|
+
end
|
98
|
+
resources :discounts
|
78
99
|
resources :shows do
|
79
100
|
resource :sales, :only => [:new, :create, :show, :update]
|
80
101
|
member do
|
@@ -141,6 +162,8 @@ Rails.application.routes.draw do
|
|
141
162
|
end
|
142
163
|
end
|
143
164
|
|
165
|
+
resources :discounts_reports, :only => [:index]
|
166
|
+
|
144
167
|
match '/events/:event_id/charts/' => 'events#assign', :as => :assign_chart, :via => "post"
|
145
168
|
match '/people/:id/star/:type/:action_id' => 'people#star', :as => :star, :via => "post"
|
146
169
|
match '/people/:id/tag/' => 'people#tag', :as => :new_tag, :via => "post"
|
@@ -14,7 +14,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
14
14
|
t.integer "subject_id"
|
15
15
|
t.string "subject_type"
|
16
16
|
t.integer "creator_id"
|
17
|
-
|
17
|
+
end
|
18
18
|
|
19
19
|
create_table "addresses" do |t|
|
20
20
|
t.string "address1"
|
@@ -26,7 +26,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
26
26
|
t.integer "person_id"
|
27
27
|
t.datetime "created_at"
|
28
28
|
t.datetime "updated_at"
|
29
|
-
|
29
|
+
end
|
30
30
|
|
31
31
|
add_index "addresses", ["person_id"], :name => "index_addresses_on_person_id"
|
32
32
|
|
@@ -43,7 +43,6 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
43
43
|
t.boolean "is_template"
|
44
44
|
t.integer "event_id"
|
45
45
|
t.integer "organization_id"
|
46
|
-
|
47
46
|
end
|
48
47
|
|
49
48
|
create_table "delayed_jobs" do |t|
|
@@ -77,7 +76,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
77
76
|
t.integer "organization_id"
|
78
77
|
t.datetime "created_at"
|
79
78
|
t.datetime "updated_at"
|
80
|
-
|
79
|
+
t.datetime "deleted_at"
|
81
80
|
t.string "contact_phone"
|
82
81
|
t.string "contact_email"
|
83
82
|
t.text "description"
|
@@ -133,7 +132,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
133
132
|
t.integer "show_id"
|
134
133
|
t.datetime "created_at"
|
135
134
|
t.datetime "updated_at"
|
136
|
-
|
135
|
+
end
|
137
136
|
|
138
137
|
add_index "items", ["created_at"], :name => "index_items_on_created_at"
|
139
138
|
add_index "items", ["order_id"], :name => "index_items_on_order_id"
|
@@ -173,7 +172,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
173
172
|
t.datetime "updated_at"
|
174
173
|
t.integer "service_fee"
|
175
174
|
t.string "details"
|
176
|
-
|
175
|
+
t.string "type"
|
177
176
|
t.string "payment_method"
|
178
177
|
t.text "special_instructions"
|
179
178
|
end
|
@@ -203,7 +202,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
203
202
|
t.boolean "dummy"
|
204
203
|
t.datetime "created_at"
|
205
204
|
t.datetime "updated_at"
|
206
|
-
|
205
|
+
t.string "person_type"
|
207
206
|
t.string "twitter_handle"
|
208
207
|
t.string "facebook_url"
|
209
208
|
t.string "linked_in_url"
|
@@ -228,7 +227,6 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
228
227
|
t.integer "capacity"
|
229
228
|
t.integer "price"
|
230
229
|
t.integer "chart_id"
|
231
|
-
|
232
230
|
t.text "description"
|
233
231
|
end
|
234
232
|
|
@@ -237,14 +235,14 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
237
235
|
t.string "terms"
|
238
236
|
t.integer "organization_id"
|
239
237
|
end
|
240
|
-
|
238
|
+
|
241
239
|
create_table "shows" do |t|
|
242
240
|
t.string "state"
|
243
241
|
t.datetime "datetime"
|
244
242
|
t.integer "event_id"
|
245
243
|
t.integer "chart_id"
|
246
244
|
t.integer "organization_id"
|
247
|
-
|
245
|
+
end
|
248
246
|
|
249
247
|
add_index "shows", ["event_id"], :name => "index_shows_on_event_id"
|
250
248
|
add_index "shows", ["organization_id"], :name => "index_shows_on_organization_id"
|
@@ -278,7 +276,7 @@ class SetUpArtfully < ActiveRecord::Migration
|
|
278
276
|
t.datetime "created_at"
|
279
277
|
t.datetime "updated_at"
|
280
278
|
t.integer "cart_id"
|
281
|
-
|
279
|
+
t.integer "section_id"
|
282
280
|
end
|
283
281
|
|
284
282
|
add_index "tickets", ["cart_id"], :name => "index_tickets_on_cart_id"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class CreateAdvancedSearch < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :segments, :force => true do |t|
|
4
|
+
t.string :name, :null => false
|
5
|
+
t.integer :organization_id, :null => false
|
6
|
+
t.integer :search_id, :null => false
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :segments, :organization_id
|
11
|
+
add_index :segments, :search_id
|
12
|
+
|
13
|
+
create_table "searches" do |t|
|
14
|
+
t.integer "organization_id", :null => false
|
15
|
+
t.string "zip"
|
16
|
+
t.string "state"
|
17
|
+
t.integer "event_id"
|
18
|
+
t.integer "min_lifetime_value"
|
19
|
+
t.integer "min_donations_amount"
|
20
|
+
t.integer "max_lifetime_value"
|
21
|
+
t.integer "max_donations_amount"
|
22
|
+
t.datetime "min_donations_date"
|
23
|
+
t.datetime "max_donations_date"
|
24
|
+
t.string "tagging"
|
25
|
+
|
26
|
+
t.timestamps
|
27
|
+
end
|
28
|
+
add_index :searches, :organization_id
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateDiscounts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :discounts do |t|
|
4
|
+
t.string :code, :null => false
|
5
|
+
t.boolean :active, :null => false, :default => true
|
6
|
+
t.string :promotion_type, :null => false
|
7
|
+
t.text :properties
|
8
|
+
t.integer :event_id, :null => false
|
9
|
+
t.integer :organization_id, :null => false
|
10
|
+
t.integer :user_id, :null => false
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class MigrateDonationTypes < ActiveRecord::Migration
|
2
|
+
def update_action_and_order(action, new_subtype, payment_method=nil)
|
3
|
+
puts "Fixing Action #{action.id} -----------------------------------------"
|
4
|
+
puts "Old subtype #{action.subtype}"
|
5
|
+
puts "New subtype #{new_subtype}"
|
6
|
+
action.subtype = new_subtype
|
7
|
+
saved = action.save
|
8
|
+
puts "Saved #{saved}"
|
9
|
+
|
10
|
+
if action.subject.nil?
|
11
|
+
puts "No order found"
|
12
|
+
elsif payment_method.nil?
|
13
|
+
puts "No change to payment method"
|
14
|
+
else
|
15
|
+
puts "Fixing Order #{action.subject.id}"
|
16
|
+
puts "Old payment method #{action.subject.payment_method}"
|
17
|
+
puts "New payment method #{payment_method}"
|
18
|
+
action.subject.payment_method = payment_method
|
19
|
+
saved = action.subject.save
|
20
|
+
puts "Saved #{saved}"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def change
|
25
|
+
Action.where(:subtype => 'Donation').each do |action|
|
26
|
+
update_action_and_order(action, "Monetary")
|
27
|
+
end
|
28
|
+
|
29
|
+
Action.where(:subtype => 'Donation (Cash)').each do |action|
|
30
|
+
update_action_and_order(action, "Monetary", "Cash")
|
31
|
+
end
|
32
|
+
|
33
|
+
Action.where(:subtype => 'Donation (Check)').each do |action|
|
34
|
+
update_action_and_order(action, "Monetary", "Check")
|
35
|
+
end
|
36
|
+
|
37
|
+
Action.where(:subtype => 'Donation (In-Kind)').each do |action|
|
38
|
+
update_action_and_order(action, "In-Kind", "Other")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|