effective_orders 6.2.0 → 6.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/effective_orders/_order.scss +1 -0
- data/app/controllers/admin/order_reports_controller.rb +8 -8
- data/app/controllers/admin/orders_controller.rb +4 -4
- data/app/controllers/effective/carts_controller.rb +1 -1
- data/app/controllers/effective/orders_controller.rb +2 -27
- data/app/datatables/admin/effective_orders_datatable.rb +1 -1
- data/app/datatables/admin/report_payment_providers_datatable.rb +0 -4
- data/app/datatables/admin/report_transactions_datatable.rb +0 -1
- data/app/datatables/effective_orders_datatable.rb +2 -15
- data/app/models/effective/order.rb +4 -1
- data/app/models/effective/order_item.rb +2 -0
- data/app/models/effective/product.rb +1 -2
- data/app/views/admin/orders/_form.html.haml +16 -35
- data/app/views/admin/orders/_form_order.html.haml +35 -0
- data/app/views/admin/orders/_order.html.haml +8 -0
- data/app/views/admin/orders/checkout.html.haml +8 -3
- data/app/views/effective/orders/_datatable_actions.html.haml +4 -0
- data/app/views/effective/orders/_order_actions.html.haml +1 -23
- data/app/views/effective/orders/pretend/_form.html.haml +10 -6
- data/config/locales/effective_orders.en.yml +16 -0
- data/config/routes.rb +3 -1
- data/lib/effective_orders/version.rb +1 -1
- metadata +5 -7
- data/app/views/admin/orders/_datatable_actions.html.haml +0 -18
- data/app/views/admin/orders/edit.html.haml +0 -16
- data/app/views/admin/orders/index.html.haml +0 -7
- data/app/views/admin/orders/new.html.haml +0 -4
- data/app/views/admin/orders/show.html.haml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bf799fd1e295b06b3e96d6083298bc3d56af80d2e5fc45aee9a3c45026e13bc
|
4
|
+
data.tar.gz: b03d84f686b369b97052b17f5b204b029d5ff79ab67bb8dd095e2b86a36af4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d96a318e778addc0d4174320c64fb54a0cf2c1e79fb0e4ea2286f69b5330562b08bdce127d9a4e02faae31afee9ebe1a1f0e043586623b92416c0256ced24d45
|
7
|
+
data.tar.gz: 6750bfa2d3c93be7cf208b0f8cc84dc355f7aab77a02553451e78d6c6a0b7ce10289ca8e4ca40ed1b93bf80594f40bc37b51d4b215d2742036565ef75b499b44
|
@@ -61,6 +61,7 @@ form.new_effective_order {
|
|
61
61
|
.effective-order-actions { display: none; }
|
62
62
|
.effective-order-purchase-actions { display: none; }
|
63
63
|
.effective-order-admin-purchase-actions { display: none; }
|
64
|
+
.effective-order-admin-logs { display: none; }
|
64
65
|
|
65
66
|
.effective-heading { display: none; }
|
66
67
|
.effective-admin-heading { display: none; }
|
@@ -6,37 +6,37 @@ module Admin
|
|
6
6
|
include Effective::CrudController
|
7
7
|
|
8
8
|
def transactions
|
9
|
-
@page_title = 'Revenue: Individual Transactions'
|
10
9
|
@datatable = Admin::ReportTransactionsDatatable.new
|
10
|
+
@page_title = @datatable.datatable_name
|
11
11
|
|
12
|
-
authorize! :index,
|
12
|
+
authorize! :index, @datatable
|
13
13
|
|
14
14
|
render 'index'
|
15
15
|
end
|
16
16
|
|
17
17
|
def transactions_grouped_by_name
|
18
|
-
@page_title = 'Revenue: Transactions Grouped By Name'
|
19
18
|
@datatable = Admin::ReportTransactionsGroupedByNameDatatable.new
|
19
|
+
@page_title = @datatable.datatable_name
|
20
20
|
|
21
|
-
authorize! :index,
|
21
|
+
authorize! :index, @datatable
|
22
22
|
|
23
23
|
render 'index'
|
24
24
|
end
|
25
25
|
|
26
26
|
def transactions_grouped_by_qb_name
|
27
|
-
@page_title = 'Revenue: Transactions Grouped By Quickbooks Name'
|
28
27
|
@datatable = Admin::ReportTransactionsGroupedByQbNameDatatable.new
|
28
|
+
@page_title = @datatable.datatable_name
|
29
29
|
|
30
|
-
authorize! :index,
|
30
|
+
authorize! :index, @datatable
|
31
31
|
|
32
32
|
render 'index'
|
33
33
|
end
|
34
34
|
|
35
35
|
def payment_providers
|
36
|
-
@page_title = 'Revenue: Payment Providers'
|
37
36
|
@datatable = Admin::ReportPaymentProvidersDatatable.new
|
37
|
+
@page_title = @datatable.datatable_name
|
38
38
|
|
39
|
-
authorize! :index,
|
39
|
+
authorize! :index, @datatable
|
40
40
|
|
41
41
|
render 'index'
|
42
42
|
end
|
@@ -38,7 +38,7 @@ module Admin
|
|
38
38
|
# The show page posts to this action
|
39
39
|
# See Effective::OrdersController checkout
|
40
40
|
def checkout
|
41
|
-
@order = Effective::Order.
|
41
|
+
@order = Effective::Order.was_not_purchased.find(params[:id])
|
42
42
|
|
43
43
|
authorize_effective_order!
|
44
44
|
|
@@ -62,7 +62,7 @@ module Admin
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def destroy
|
65
|
-
@order = Effective::Order.all.
|
65
|
+
@order = Effective::Order.all.was_not_purchased.find(params[:id])
|
66
66
|
|
67
67
|
authorize_effective_order!
|
68
68
|
|
@@ -76,7 +76,7 @@ module Admin
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def send_payment_request
|
79
|
-
@order = Effective::Order.
|
79
|
+
@order = Effective::Order.was_not_purchased.find(params[:id])
|
80
80
|
authorize_effective_order!
|
81
81
|
|
82
82
|
if @order.send_payment_request_to_buyer!
|
@@ -95,7 +95,7 @@ module Admin
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def bulk_send_payment_request
|
98
|
-
@orders = Effective::Order.
|
98
|
+
@orders = Effective::Order.was_not_purchased.where(id: params[:ids])
|
99
99
|
|
100
100
|
begin
|
101
101
|
authorize_effective_order!
|
@@ -10,7 +10,7 @@ module Effective
|
|
10
10
|
|
11
11
|
def show
|
12
12
|
@cart = current_cart
|
13
|
-
@pending_orders = Effective::Order.
|
13
|
+
@pending_orders = Effective::Order.was_not_purchased.where(user: current_user) if current_user.present?
|
14
14
|
|
15
15
|
@page_title ||= 'My Cart'
|
16
16
|
EffectiveResources.authorize!(self, :show, @cart)
|
@@ -69,13 +69,13 @@ module Effective
|
|
69
69
|
|
70
70
|
# Always step1
|
71
71
|
def edit
|
72
|
-
@order ||= Effective::Order.
|
72
|
+
@order ||= Effective::Order.was_not_purchased.find(params[:id])
|
73
73
|
EffectiveResources.authorize!(self, :edit, @order)
|
74
74
|
end
|
75
75
|
|
76
76
|
# Confirms the order from existing order
|
77
77
|
def update
|
78
|
-
@order ||= Effective::Order.
|
78
|
+
@order ||= Effective::Order.was_not_purchased.find(params[:id])
|
79
79
|
EffectiveResources.authorize!(self, :update, @order)
|
80
80
|
|
81
81
|
@order.assign_attributes(checkout_params)
|
@@ -88,12 +88,6 @@ module Effective
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
# My Orders History
|
92
|
-
def index
|
93
|
-
@datatable = EffectiveOrdersDatatable.new(user_id: current_user.id)
|
94
|
-
EffectiveResources.authorize!(self, :index, Effective::Order.new(user: current_user))
|
95
|
-
end
|
96
|
-
|
97
91
|
# Thank you for Purchasing this Order. This is where a successfully purchased order ends up
|
98
92
|
def purchased # Thank You!
|
99
93
|
@order = Effective::Order.purchased.find(params[:id])
|
@@ -110,25 +104,6 @@ module Effective
|
|
110
104
|
EffectiveResources.authorize!(self, :show, @order)
|
111
105
|
end
|
112
106
|
|
113
|
-
def send_buyer_receipt
|
114
|
-
@order = Effective::Order.purchased.find(params[:id])
|
115
|
-
EffectiveResources.authorize!(self, :show, @order)
|
116
|
-
|
117
|
-
if @order.send_order_receipt_to_buyer!
|
118
|
-
flash[:success] = "A receipt has been sent to #{@order.emails_send_to}"
|
119
|
-
else
|
120
|
-
flash[:danger] = "Unable to send receipt."
|
121
|
-
end
|
122
|
-
|
123
|
-
if respond_to?(:redirect_back)
|
124
|
-
redirect_back(fallback_location: effective_orders.order_path(@order))
|
125
|
-
elsif request.referrer.present?
|
126
|
-
redirect_to :back
|
127
|
-
else
|
128
|
-
redirect_to effective_orders.order_path(@order)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
107
|
def bulk_send_buyer_receipt
|
133
108
|
@orders = Effective::Order.purchased.where(id: params[:ids])
|
134
109
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Dashboard Orders
|
2
2
|
|
3
3
|
class EffectiveOrdersDatatable < Effective::Datatable
|
4
4
|
filters do
|
@@ -66,25 +66,12 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
66
66
|
end
|
67
67
|
|
68
68
|
collection do
|
69
|
-
|
70
|
-
user_klass ||= current_user.class
|
71
|
-
|
72
|
-
user = user_klass.find(attributes[:user_id])
|
73
|
-
|
74
|
-
scope = Effective::Order.all.deep.where(user: user)
|
69
|
+
scope = Effective::Order.all.deep.where(user: current_user)
|
75
70
|
|
76
71
|
if EffectiveOrders.orders_collection_scope.respond_to?(:call)
|
77
72
|
scope = EffectiveOrders.orders_collection_scope.call(scope)
|
78
73
|
end
|
79
74
|
|
80
|
-
if attributes[:not_purchased]
|
81
|
-
scope = scope.not_purchased
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes[:parent_id].present? && attributes[:parent_type].present?
|
85
|
-
scope = scope.where(parent_id: attributes[:parent_id], parent_type: attributes[:parent_type])
|
86
|
-
end
|
87
|
-
|
88
75
|
scope
|
89
76
|
end
|
90
77
|
|
@@ -18,6 +18,7 @@ module Effective
|
|
18
18
|
|
19
19
|
acts_as_addressable(billing: { singular: true }, shipping: { singular: true })
|
20
20
|
acts_as_reportable if respond_to?(:acts_as_reportable)
|
21
|
+
log_changes if respond_to?(:log_changes)
|
21
22
|
|
22
23
|
attr_accessor :terms_and_conditions # Yes, I agree to the terms and conditions
|
23
24
|
attr_accessor :confirmed_checkout # Set on the Checkout Step 1
|
@@ -75,7 +76,8 @@ module Effective
|
|
75
76
|
|
76
77
|
scope :purchased, -> { where(state: EffectiveOrders::PURCHASED) }
|
77
78
|
scope :purchased_by, lambda { |user| purchased.where(user: user) }
|
78
|
-
scope :not_purchased, -> { where.not(state: EffectiveOrders::PURCHASED) }
|
79
|
+
scope :not_purchased, -> { where.not(state: [EffectiveOrders::PURCHASED, EffectiveOrders::DEFERRED]) }
|
80
|
+
scope :was_not_purchased, -> { where.not(state: EffectiveOrders::PURCHASED) }
|
79
81
|
|
80
82
|
scope :pending, -> { where(state: EffectiveOrders::PENDING) }
|
81
83
|
scope :confirmed, -> { where(state: EffectiveOrders::CONFIRMED) }
|
@@ -696,6 +698,7 @@ module Effective
|
|
696
698
|
def send_order_receipt_to_buyer!
|
697
699
|
EffectiveOrders.send_email(:order_receipt_to_buyer, self) if purchased?
|
698
700
|
end
|
701
|
+
alias_method :send_buyer_receipt!, :send_order_receipt_to_buyer!
|
699
702
|
|
700
703
|
def send_payment_request_to_buyer!
|
701
704
|
EffectiveOrders.send_email(:payment_request_to_buyer, self) unless purchased?
|
@@ -1,35 +1,16 @@
|
|
1
|
-
=
|
2
|
-
=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
%h2 Order Items
|
19
|
-
= f.has_many :order_items, remove: true do |fc|
|
20
|
-
= render 'order_item_fields', f: fc
|
21
|
-
|
22
|
-
%hr
|
23
|
-
|
24
|
-
.row
|
25
|
-
.col-md-6.effective-order-note-to-buyer
|
26
|
-
%h2 Note to Buyer
|
27
|
-
= f.text_area :note_to_buyer, disabled: f.object.purchased?, label: false,
|
28
|
-
hint: (f.object.purchased? ? 'This message was displayed to the buyer during checkout and appears on the receipt.' : 'This message will be displayed to the buyer during checkout and will appear on the receipt.')
|
29
|
-
|
30
|
-
.col-md-6.effective-order-internal-note
|
31
|
-
%h2 Internal Note
|
32
|
-
= f.text_area :note_internal, label: false,
|
33
|
-
hint: 'For internal admin use only. This note will never be displayed to the buyer.'
|
34
|
-
|
35
|
-
= render partial: '/admin/orders/order_actions', locals: { order: @order, form: f, f: f }
|
1
|
+
= tabs do
|
2
|
+
= tab(order) do
|
3
|
+
- if order.custom_order? && order.in_progress?
|
4
|
+
- if order.persisted?
|
5
|
+
= collapse('show order') do
|
6
|
+
= render 'effective/orders/order', order: order, no_order_actions: true
|
7
|
+
|
8
|
+
= render 'admin/orders/form_order', order: order
|
9
|
+
- else
|
10
|
+
- # Order was already purchased. Display same as show action.
|
11
|
+
= render 'effective/orders/order', order: order
|
12
|
+
= render 'admin/orders/form_note_internal', order: order
|
13
|
+
|
14
|
+
- if order.persisted? && order.respond_to?(:logs_datatable)
|
15
|
+
= tab 'Logs' do
|
16
|
+
.effective-order-admin-logs= render_inline_datatable(order.logs_datatable)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
= effective_form_with(model: [:admin, order], engine: true) do |f|
|
2
|
+
= f.hidden_field :user_type, value: (f.object.user || current_user).class.name
|
3
|
+
|
4
|
+
- ajax_url = (@select2_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
|
5
|
+
|
6
|
+
= f.select :user_id, current_user.class.all, label: 'Buyer', required: true,
|
7
|
+
ajax_url: ajax_url, hint: 'The user that should purchase this order.'
|
8
|
+
|
9
|
+
= f.email_cc_field :cc, hint: "Cc the above on any emailed receipts or payment requests."
|
10
|
+
|
11
|
+
- if f.object.new_record?
|
12
|
+
= f.check_box :send_payment_request_to_buyer,
|
13
|
+
label: 'Yes, send a payment request email to the buyer and any cc.',
|
14
|
+
value: (f.object.send_payment_request_to_buyer.nil? ? EffectiveOrders.send_payment_request_to_buyer : f.object.send_payment_request_to_buyer?)
|
15
|
+
|
16
|
+
%hr
|
17
|
+
|
18
|
+
%h2 Order Items
|
19
|
+
= f.has_many :order_items, remove: true do |fc|
|
20
|
+
= render 'order_item_fields', f: fc
|
21
|
+
|
22
|
+
%hr
|
23
|
+
|
24
|
+
.row
|
25
|
+
.col-md-6.effective-order-note-to-buyer
|
26
|
+
%h2 Note to Buyer
|
27
|
+
= f.text_area :note_to_buyer, disabled: f.object.purchased?, label: false,
|
28
|
+
hint: (f.object.purchased? ? 'This message was displayed to the buyer during checkout and appears on the receipt.' : 'This message will be displayed to the buyer during checkout and will appear on the receipt.')
|
29
|
+
|
30
|
+
.col-md-6.effective-order-internal-note
|
31
|
+
%h2 Internal Note
|
32
|
+
= f.text_area :note_internal, label: false,
|
33
|
+
hint: 'For internal admin use only. This note will never be displayed to the buyer.'
|
34
|
+
|
35
|
+
= render partial: '/admin/orders/order_actions', locals: { order: @order, form: f, f: f }
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= tabs do
|
2
|
+
= tab(order) do
|
3
|
+
= render 'effective/orders/order', order: order
|
4
|
+
= render 'admin/orders/form_note_internal', order: order
|
5
|
+
|
6
|
+
- if order.persisted? && order.respond_to?(:logs_datatable)
|
7
|
+
= tab 'Logs' do
|
8
|
+
.effective-order-admin-logs= render_inline_datatable(order.logs_datatable)
|
@@ -1,4 +1,9 @@
|
|
1
|
-
=
|
2
|
-
|
1
|
+
- resource = (@_effective_resource || Effective::Resource.new(controller_path))
|
2
|
+
- @resource = instance_variable_get('@' + resource.name) if resource.name
|
3
3
|
|
4
|
-
|
4
|
+
- if @resource
|
5
|
+
.resource-buttons
|
6
|
+
= render_resource_buttons(@resource, checkout: false)
|
7
|
+
|
8
|
+
= card do
|
9
|
+
= render_checkout(@order, namespace: :admin, purchased_url: effective_orders.admin_order_path(@order), declined_url: effective_orders.admin_order_path(@order))
|
@@ -1,2 +1,6 @@
|
|
1
1
|
= dropdown(variation: :dropleft) do
|
2
2
|
= dropdown_link_to (order.purchased? ? 'View' : 'Checkout'), effective_orders.order_path(order)
|
3
|
+
|
4
|
+
- if EffectiveResources.authorized?(controller, :send_buyer_receipt, order)
|
5
|
+
= dropdown_link_to 'E-mail Receipt', effective_orders.send_buyer_receipt_order_path(order),
|
6
|
+
data: { method: :post, confirm: "Send receipt to #{order.emails_send_to}?" }
|
@@ -1,25 +1,3 @@
|
|
1
1
|
.effective-order-actions
|
2
2
|
- if order.persisted?
|
3
|
-
= link_to 'Print', '#', class: 'btn btn-primary print-button', data: { role: 'print-button' }, onClick: 'window.print(); false;'
|
4
|
-
|
5
|
-
- if order.purchased?
|
6
|
-
= link_to 'E-mail Receipt', effective_orders.send_buyer_receipt_order_path(order),
|
7
|
-
class: 'btn btn-secondary',
|
8
|
-
data: { method: :post, confirm: "Send receipt to #{order.emails_send_to}?" }
|
9
|
-
|
10
|
-
- if controller_path.include?('admin/') && (EffectiveResources.authorized?(controller, :admin, :effective_orders) rescue false)
|
11
|
-
- if order.persisted? && order.in_progress?
|
12
|
-
- if params[:action] == 'show'
|
13
|
-
= link_to('Edit', effective_orders.edit_admin_order_path(order), class: 'btn btn-primary')
|
14
|
-
|
15
|
-
- if params[:action] == 'edit'
|
16
|
-
= link_to('Show', effective_orders.admin_order_path(order), class: 'btn btn-primary')
|
17
|
-
|
18
|
-
- unless order.refund?
|
19
|
-
= link_to 'Email request for payment to buyer', effective_orders.send_payment_request_admin_order_path(order),
|
20
|
-
class: 'btn btn-secondary',
|
21
|
-
data: { method: :post, confirm: "Send request for payment to #{order.emails_send_to}?" }
|
22
|
-
|
23
|
-
= link_to 'Delete', effective_orders.admin_order_path(order),
|
24
|
-
class: 'btn btn-danger',
|
25
|
-
data: { method: :delete, confirm: "Really delete #{order}?" }
|
3
|
+
= link_to icon('printer') + ' Print', '#', class: 'btn btn-sm btn-outline-primary print-button', data: { role: 'print-button' }, onClick: 'window.print(); false;'
|
@@ -1,8 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
.card
|
2
|
+
.card-body
|
3
|
+
%h2 Pretend Checkout
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
= effective_form_with(scope: :pretend, url: effective_orders.pretend_order_path(order), method: :post) do |f|
|
6
|
+
= f.hidden_field :purchased_url, value: purchased_url
|
7
|
+
= f.hidden_field :declined_url, value: declined_url
|
7
8
|
|
8
|
-
|
9
|
+
- if EffectiveOrders.pretend_message.present?
|
10
|
+
%p= EffectiveOrders.pretend_message
|
11
|
+
|
12
|
+
= f.submit order_checkout_label(:pretend), border: false, center: true
|
@@ -0,0 +1,16 @@
|
|
1
|
+
en:
|
2
|
+
effective_orders:
|
3
|
+
name: 'Effective Orders'
|
4
|
+
acronym: 'Finance'
|
5
|
+
|
6
|
+
activerecord:
|
7
|
+
actions:
|
8
|
+
effective/order:
|
9
|
+
send_buyer_receipt: 'E-mail receipt to buyer'
|
10
|
+
send_buyer_receipt_confirm: 'Send receipt to @resource.emails_send_to?'
|
11
|
+
|
12
|
+
datatables:
|
13
|
+
admin/report_transactions_datatable: 'Individual Transactions'
|
14
|
+
admin/report_transactions_grouped_by_name_datatable: 'Transactions Grouped By Name'
|
15
|
+
admin/report_transactions_grouped_by_qb_name_datatable: 'Transactions Grouped By Quickbooks Name'
|
16
|
+
admin/report_payment_providers_datatable: 'Payment Providers'
|
data/config/routes.rb
CHANGED
@@ -49,10 +49,12 @@ EffectiveOrders::Engine.routes.draw do
|
|
49
49
|
resources :orders do
|
50
50
|
member do
|
51
51
|
post :send_payment_request
|
52
|
+
post :send_buyer_receipt
|
52
53
|
|
53
|
-
|
54
|
+
# GET should be last here
|
54
55
|
post :checkout
|
55
56
|
patch :checkout
|
57
|
+
get :checkout
|
56
58
|
end
|
57
59
|
|
58
60
|
collection do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
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: 2023-03-
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -239,17 +239,14 @@ files:
|
|
239
239
|
- app/views/admin/customers/show.html.haml
|
240
240
|
- app/views/admin/order_items/index.html.haml
|
241
241
|
- app/views/admin/order_reports/index.html.haml
|
242
|
-
- app/views/admin/orders/_datatable_actions.html.haml
|
243
242
|
- app/views/admin/orders/_form.html.haml
|
244
243
|
- app/views/admin/orders/_form_note_internal.html.haml
|
244
|
+
- app/views/admin/orders/_form_order.html.haml
|
245
245
|
- app/views/admin/orders/_layout.html.haml
|
246
|
+
- app/views/admin/orders/_order.html.haml
|
246
247
|
- app/views/admin/orders/_order_actions.html.haml
|
247
248
|
- app/views/admin/orders/_order_item_fields.html.haml
|
248
249
|
- app/views/admin/orders/checkout.html.haml
|
249
|
-
- app/views/admin/orders/edit.html.haml
|
250
|
-
- app/views/admin/orders/index.html.haml
|
251
|
-
- app/views/admin/orders/new.html.haml
|
252
|
-
- app/views/admin/orders/show.html.haml
|
253
250
|
- app/views/effective/carts/_cart.html.haml
|
254
251
|
- app/views/effective/carts/_cart_actions.html.haml
|
255
252
|
- app/views/effective/carts/show.html.haml
|
@@ -315,6 +312,7 @@ files:
|
|
315
312
|
- app/views/effective/subscripter/_plan.html.haml
|
316
313
|
- app/views/layouts/effective_orders_mailer_layout.html.haml
|
317
314
|
- config/effective_orders.rb
|
315
|
+
- config/locales/effective_orders.en.yml
|
318
316
|
- config/routes.rb
|
319
317
|
- db/migrate/01_create_effective_orders.rb.erb
|
320
318
|
- lib/effective_orders.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
= dropdown(variation: :dropleft) do
|
2
|
-
= dropdown_link_to 'View', effective_orders.admin_order_path(order)
|
3
|
-
|
4
|
-
- if order.purchased? == false
|
5
|
-
= dropdown_link_to 'Edit', effective_orders.edit_admin_order_path(order)
|
6
|
-
|
7
|
-
- if order.purchased?
|
8
|
-
= dropdown_link_to 'Email receipt to buyer', effective_orders.send_buyer_receipt_order_path(order),
|
9
|
-
data: { method: :post, confirm: "Send receipt to #{order.emails_send_to}?" }
|
10
|
-
|
11
|
-
- if (order.pending? || order.confirmed? || order.deferred?) && !order.refund?
|
12
|
-
= dropdown_link_to 'Email request for payment to buyer', effective_orders.send_payment_request_admin_order_path(order),
|
13
|
-
data: { method: :post, confirm: "Send request for payment to #{order.emails_send_to}?" }
|
14
|
-
|
15
|
-
= dropdown_link_to 'Admin: Checkout', effective_orders.checkout_admin_order_path(order)
|
16
|
-
|
17
|
-
= dropdown_link_to "Delete #{order}", effective_orders.admin_order_path(order),
|
18
|
-
data: { method: :delete, confirm: "Really delete #{order}?" }
|
@@ -1,16 +0,0 @@
|
|
1
|
-
= render 'layout' do
|
2
|
-
%h1.effective-admin-heading= @page_title
|
3
|
-
|
4
|
-
- if @order.custom_order? && @order.in_progress?
|
5
|
-
= render 'effective/orders/order_actions', order: @order
|
6
|
-
|
7
|
-
.mb-4
|
8
|
-
= collapse('show order') do
|
9
|
-
= render 'effective/orders/order', order: @order, no_order_actions: true
|
10
|
-
|
11
|
-
= render 'admin/orders/form', order: @order
|
12
|
-
|
13
|
-
- else
|
14
|
-
- # Same as the show action
|
15
|
-
= render 'effective/orders/order', order: @order
|
16
|
-
= render 'admin/orders/form_note_internal', order: @order
|