caboose-cms 0.9.78 → 0.9.79

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
  SHA1:
3
- metadata.gz: ee8ecb4c9c7e4d56f905c869c54528bd6a5e56bb
4
- data.tar.gz: d06492e063533258dec0dc43503e8fb79f48c3b4
3
+ metadata.gz: 9f3eaff5231a8427c3a7aded0962b8235f691469
4
+ data.tar.gz: 236c9aa46e964d9bebda96b2a327dfb82a3a0504
5
5
  SHA512:
6
- metadata.gz: 906e2228f18312dae8e8cd7ba76834f307d0a69916fb9ceabba7d205d6e40f5b87237298f96b9a696cc2ca60e0c0eb3e8fcde555783d8749294ec13b9d55a874
7
- data.tar.gz: e7fbad86da05e316c13f7aa385d0b08067296462d571f55ff60b75a3873cd996ddabe4a303460e1813d2310094cbd192e0fccf2a645f560237a0e8311a3d47ee
6
+ metadata.gz: 4d41728c2a73aacfc41bc3bc003be46dcf39162a3500afd6452173283bcd58331fc420856903edf62ada192fa8e58f60f336095f28d4ca0ee3a93d2f0f5bdfe9
7
+ data.tar.gz: 4cad9ad3fd7c2dba703f19160aef157fb785d7fd9c570c34e87b6d57d463b62b2b3f70d4496238e106ade965fc4764104a100e9b31cb5aae3e489cac023c9604
@@ -67,7 +67,7 @@ module Caboose
67
67
  :date_logged => DateTime.now.utc,
68
68
  :invoice_action => InvoiceLog::ACTION_INVOICE_CREATED
69
69
  )
70
- if !params[:colonnade_game_id].blank? && defined?(Colonnade::Campus) && Colonnade::Campus.where(:site_id => @site.id).exists?
70
+ if !params[:colonnade_game_id].blank? && Colonnade::SuiteMenu.respond_to?(:to_s) && Colonnade::Campus.where(:site_id => @site.id).exists?
71
71
  game = Colonnade::Game.where(:id => params[:colonnade_game_id], :site_id => @site.id).first
72
72
  menu = Colonnade::Menu.where(:game_id => game.id, :site_id => @site.id).first if game
73
73
  user = Caboose::User.where(:site_id => @site.id, :id => params[:colonnade_user_id]).first
@@ -298,6 +298,7 @@ module Caboose
298
298
  return if !user_is_allowed('invoices', 'edit')
299
299
  invoice = Invoice.find(params[:id])
300
300
  invoice.delay(:queue => 'caboose_store').send_payment_authorization_email
301
+ # invoice.send_payment_authorization_email
301
302
  render :json => { :success => true }
302
303
  end
303
304
 
@@ -305,7 +306,8 @@ module Caboose
305
306
  def admin_send_receipt
306
307
  return if !user_is_allowed('invoices', 'edit')
307
308
  invoice = Invoice.find(params[:id])
308
- invoice.delay(:queue => 'caboose_store').send_receipt_email
309
+ invoice.delay(:queue => 'caboose_store').send_receipt_email
310
+ # invoice.send_receipt_email
309
311
  render :json => { :success => true }
310
312
  end
311
313
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>This will create a new invoice that you can populate and then send to the customer for payment.</p>
4
4
 
5
- <% if defined?(Colonnade::Campus) && Colonnade::Campus.where(:site_id => @site.id).exists? %>
5
+ <% if Colonnade::Campus.respond_to?(:to_s) && Colonnade::Campus.where(:site_id => @site.id).exists? %>
6
6
  <form id="colonnade_info">
7
7
  <h5>Game</h5>
8
8
  <select name="colonnade_game_id" id="colonnade_game_id">
@@ -44,7 +44,7 @@ function create_invoice()
44
44
  $.ajax({
45
45
  url: '/admin/invoices',
46
46
  type: 'post',
47
- <% if defined?(Colonnade::Campus) && Colonnade::Campus.where(:site_id => @site.id).exists? %>
47
+ <% if Colonnade::Campus.respond_to?(:to_s) && Colonnade::Campus.where(:site_id => @site.id).exists? %>
48
48
  data: {
49
49
  colonnade_game_id: $('#colonnade_game_id').val(),
50
50
  colonnade_suite_id: $('#colonnade_suite_id').val(),
@@ -15,14 +15,15 @@ logo = logo.gsub('//','https://') if !logo.nil?
15
15
  <p><%== @invoice.site.store_config.download_instructions %></p>
16
16
  <% end %>
17
17
 
18
- <% if defined?(Colonnade::SuiteMenu) %>
19
- <%
20
- sm = Colonnade::SuiteMenu.where(:invoice_id => @invoice.id).first
21
- game = sm.menu.game if sm && sm.menu
22
- %>
23
- <% if game %>
24
- <p>Game: <%= game.opponent %> on <%= game.date.strftime('%B %-d, %Y') %></p>
25
- <% end %>
18
+
19
+ <% if Colonnade::SuiteMenu.respond_to?(:to_s) %>
20
+ <%
21
+ sm = Colonnade::SuiteMenu.where(:invoice_id => @invoice.id).first
22
+ game = sm.menu.game if sm && sm.menu
23
+ %>
24
+ <% if game %>
25
+ <p>Game: <%= game.opponent %> on <%= game.date.strftime('%B %-d, %Y') %></p>
26
+ <% end %>
26
27
  <% end %>
27
28
 
28
29
  <table border='1' style='border-collapse: collapse;'>
@@ -9,7 +9,7 @@ logo = logo.gsub('//','https://') if !logo.nil?
9
9
 
10
10
  <p>Your invoice number #<%= @invoice.id %> has been paid.</p>
11
11
 
12
- <% if defined?(Colonnade::SuiteMenu) %>
12
+ <% if Colonnade::SuiteMenu.respond_to?(:to_s) %>
13
13
  <%
14
14
  sm = Colonnade::SuiteMenu.where(:invoice_id => @invoice.id).first
15
15
  game = sm.menu.game if sm && sm.menu
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.78'
2
+ VERSION = '0.9.79'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.78
4
+ version: 0.9.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry