effective_products 0.3.3 → 0.3.5

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
  SHA256:
3
- metadata.gz: 608edbc080f05b93e5f96bf6ad8923aef1c935662e6fb7548d3bd246187968bc
4
- data.tar.gz: c28497ba83e4b1c441bebd385a4c842a31b40b22fbb1a3631a350957f57ae1eb
3
+ metadata.gz: f3ff01ae072bb605fb980749ddb04650e3f8f5efd0464b4ef96a69d266d710aa
4
+ data.tar.gz: 6fd0f50ce242878ad9f1b85c6280fd3e825ff036bce4ee1dfcc7dd550ee0b2f5
5
5
  SHA512:
6
- metadata.gz: 327f222af6cf10256ac77a4919b1ce1646e1e3b8213ab8329c1e49e35a85c381a464c6d3503b991575dec6519fd61891dde52a879c4ed6322830295c327c0cd7
7
- data.tar.gz: f3fd02fb3527434fb3a78336fc87e2ebd745d4a44a50e11f5b25be901ece93d357fe18619f4711d7441dcab88b4ca8c4f9b84573494e04b7813bc2486f1e85e7
6
+ metadata.gz: 999ce15808dac05122f3f4c3ba7a59f9cb2ab6e2631f157beb3497c8c96d2de8c09f2a228b7cc32e1b1fc04449bf3dd09f431040771a9aece1c078eefd12d67f
7
+ data.tar.gz: 2205482c645655070368ddf10164b9d06e1cd69b0de82620b20fb54b67ab31cae934f652ad50eb284fdf15b3fa87243f63e8898465e2f87c6787dbcdeabc32aa
@@ -5,6 +5,7 @@ module Admin
5
5
  scope :pending_applicant_approval
6
6
  scope :pending_stamp_request_purchase
7
7
  scope :issued
8
+ scope :draft
8
9
  scope :all
9
10
  end
10
11
 
@@ -15,12 +15,12 @@ class EffectiveRingWizardsDatatable < Effective::Datatable
15
15
  col :orders, action: :show
16
16
 
17
17
  col(:issued_at, label: 'Issued on') do |resource|
18
- resource.ring.issued_at&.strftime('%F') || '-'
18
+ resource.ring&.issued_at&.strftime('%F') || '-'
19
19
  end
20
20
 
21
21
  actions_col(actions: []) do |resource|
22
22
  if resource.draft?
23
- dropdown_link_to('Continue', effective_products.ring_wizard_build_path(resource, reource.next_step), 'data-turbolinks' => false)
23
+ dropdown_link_to('Continue', effective_products.ring_wizard_build_path(resource, resource.next_step), 'data-turbolinks' => false)
24
24
  dropdown_link_to('Delete', effective_products.ring_wizard_path(resource), 'data-confirm': "Really delete #{resource}?", 'data-method': :delete)
25
25
  else
26
26
  dropdown_link_to('Show', effective_products.ring_wizard_path(resource))
@@ -30,7 +30,7 @@ class EffectiveRingWizardsDatatable < Effective::Datatable
30
30
  end
31
31
 
32
32
  collection do
33
- EffectiveProducts.RingWizard.deep.done.where(owner: current_user)
33
+ EffectiveProducts.RingWizard.deep.where(owner: current_user)
34
34
  end
35
35
 
36
36
  end
@@ -20,7 +20,7 @@ class EffectiveStampWizardsDatatable < Effective::Datatable
20
20
 
21
21
  actions_col(actions: []) do |resource|
22
22
  if resource.draft?
23
- dropdown_link_to('Continue', effective_products.stamp_wizard_build_path(resource, reource.next_step), 'data-turbolinks' => false)
23
+ dropdown_link_to('Continue', effective_products.stamp_wizard_build_path(resource, resource.next_step), 'data-turbolinks' => false)
24
24
  dropdown_link_to('Delete', effective_products.stamp_wizard_path(resource), 'data-confirm': "Really delete #{resource}?", 'data-method': :delete)
25
25
  else
26
26
  dropdown_link_to('Show', effective_products.stamp_wizard_path(resource))
@@ -30,7 +30,7 @@ class EffectiveStampWizardsDatatable < Effective::Datatable
30
30
  end
31
31
 
32
32
  collection do
33
- EffectiveProducts.StampWizard.deep.done.where(owner: current_user)
33
+ EffectiveProducts.StampWizard.deep.where(owner: current_user)
34
34
  end
35
35
 
36
36
  end
@@ -92,7 +92,7 @@ module EffectiveProductsStampWizard
92
92
 
93
93
  # Instance Methods
94
94
  def to_s
95
- persisted? ? "#{model_name.human} ##{id}" : model_name.human
95
+ (persisted? || destroyed?) ? "#{model_name.human} ##{id_was}" : model_name.human
96
96
  end
97
97
 
98
98
  def in_progress?
@@ -84,7 +84,13 @@ module Effective
84
84
  end
85
85
 
86
86
  def to_s
87
- [model_name.human, *name.presence, ("- #{category}" if category.present?)].join(' ')
87
+ [
88
+ model_name.human,
89
+ ('Replacement' if stamp_wizard_id_was.present?),
90
+ '-',
91
+ name.presence,
92
+ ("- #{category}" if category.present?)
93
+ ].compact.join(' ')
88
94
  end
89
95
 
90
96
  def mark_as_submitted!
@@ -1,3 +1,3 @@
1
1
  module EffectiveProducts
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.3.5'.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.3.3
4
+ version: 0.3.5
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: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails