effective_products 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a355433e74133bc2d4eb3217105b107bd7bda886da225da1a8a28aaa66b18ee8
4
- data.tar.gz: a4e568829f7d037dfe62993ed6b8540328fcf53a9b687c738fa6e9723c83886a
3
+ metadata.gz: 71749ac4354aa808c63c7400a6488b93222d840597eb2c845cbf91fd716d7626
4
+ data.tar.gz: 0b03925757372551acb5ed7d0cf403f777f399b6ba4124ea65a387ce570e03b7
5
5
  SHA512:
6
- metadata.gz: 346b3a090af9dee0399a7307d276e340a70955e46eab95ed191149716a46ca0c898b65de68396d82f9c3dbd73760abe326acc38ecf3eb549287ad79a7c60101a
7
- data.tar.gz: b3a4642a05c2e54077a98639fe548164da79c81b00f6c6039d310ca3905fdd4e8f6a630e11babf4a72f2be76fe28d5df913ba355469db9d624c72c1eefd8b545
6
+ metadata.gz: 1939852347cbaa992d8563e6518c998af279b3fd69f6dd6287b2e9c076002419a6cef6e1245098c4e20e9846759c69c69eb6ff34ac8953b048dc69c28fc3b514
7
+ data.tar.gz: afa4d7b300e9c2aba2d67e65eb2dc0c7a7b6a58b28073cc2818058552c0c345f84e1ec32b332d18f16e525c06d5b52cad070d84696782a3ccb3a0fcc638ef285
@@ -110,9 +110,8 @@ module EffectiveProductsRingWizard
110
110
 
111
111
  def build_ring
112
112
  ring = rings.build(owner: owner)
113
- address = owner.try(:shipping_address) || owner.try(:billing_address)
114
113
 
115
- if address.present?
114
+ if (address = owner.try(:shipping_address) || owner.try(:billing_address)).present?
116
115
  ring.shipping_address = address
117
116
  end
118
117
 
@@ -93,7 +93,7 @@ module EffectiveProductsStampWizard
93
93
 
94
94
  # Instance Methods
95
95
  def to_s
96
- 'stamp payment'
96
+ 'stamp request'
97
97
  end
98
98
 
99
99
  def in_progress?
@@ -109,8 +109,13 @@ module EffectiveProductsStampWizard
109
109
  end
110
110
 
111
111
  def build_stamp
112
- address = owner.try(:shipping_address) || owner.try(:billing_address)
113
- stamps.build(owner: owner, shipping_address: address)
112
+ stamp = stamps.build(owner: owner)
113
+
114
+ if (address = owner.try(:shipping_address) || owner.try(:billing_address)).present?
115
+ stamp.shipping_address = address
116
+ end
117
+
118
+ stamp
114
119
  end
115
120
 
116
121
  def assign_pricing
@@ -3,8 +3,8 @@
3
3
 
4
4
  - if all_steps_content.present?
5
5
  .card.mb-4
6
- .card-body= all_steps_content
6
+ .card-body= all_steps_content.to_s
7
7
 
8
8
  - if step_content.present?
9
9
  .card.mb-4
10
- .card-body= step_content
10
+ .card-body= step_content.to_s
@@ -3,8 +3,8 @@
3
3
 
4
4
  - if all_steps_content.present?
5
5
  .card.mb-4
6
- .card-body= all_steps_content
6
+ .card-body= all_steps_content.to_s
7
7
 
8
8
  - if step_content.present?
9
9
  .card.mb-4
10
- .card-body= step_content
10
+ .card-body= step_content.to_s
@@ -1,27 +1,29 @@
1
- -# In progress payments
1
+ -# In progress
2
2
  - existing = EffectiveProducts.StampWizard.in_progress.for(current_user).first
3
3
  - datatable = EffectiveResources.best('EffectiveStampWizardsDatatable').new(self, namespace: :effective)
4
4
 
5
5
  - if existing.present?
6
- %h2 In Progress Stamp Payments
6
+ %h2 In Progress Stamp Requests
7
7
 
8
- %p Your payment for Professional Stamp is incomplete
8
+ %p Your request for Professional Stamp is incomplete
9
9
 
10
10
  %p
11
11
  Please
12
- = link_to("Continue payment for #{existing}", effective_products.stamp_wizard_build_path(existing, existing.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
12
+ = link_to("Continue #{existing}", effective_products.stamp_wizard_build_path(existing, existing.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
13
13
  or you can
14
- = link_to('Abandon payment', effective_products.stamp_wizard_path(existing), 'data-confirm': "Really delete #{existing}?", 'data-method': :delete, class: 'btn btn-danger')
14
+ = link_to('Abandon', effective_products.stamp_wizard_path(existing), 'data-confirm': "Really delete #{existing}?", 'data-method': :delete, class: 'btn btn-danger')
15
15
  to start over.
16
16
 
17
17
  %hr
18
18
 
19
- %h2 Stamp Payments
19
+ %h2 Stamp Replacement Requests
20
+
21
+ = yield
20
22
 
21
23
  - if datatable.present?
22
24
  = render_simple_datatable(datatable)
23
25
  - else
24
- %p You have no past stamp payments. When you do, we'll show them here.
26
+ %p You have no past professional stamp replacement requests. When you do, we'll show them here.
25
27
 
26
28
  - if existing.blank?
27
- %p= link_to 'Order a Professional Stamp', effective_products.new_stamp_wizard_path, class: 'btn btn-primary'
29
+ %p= link_to 'Start Stamp Replacement Request', effective_products.new_stamp_wizard_path, class: 'btn btn-primary'
@@ -5,7 +5,7 @@
5
5
  .card-body
6
6
  %p Welcome #{current_user}!
7
7
 
8
- %p You are about to purchase a Professional Stamp.
8
+ %p You are about to request a replacement Professional Stamp.
9
9
 
10
10
  = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
11
11
  = f.hidden_field :id
@@ -1,3 +1,3 @@
1
1
  module EffectiveProducts
2
- VERSION = '0.0.8'.freeze
2
+ VERSION = '0.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_products
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.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: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails