effective_products 0.3.5 → 0.3.7

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: f3ff01ae072bb605fb980749ddb04650e3f8f5efd0464b4ef96a69d266d710aa
4
- data.tar.gz: 6fd0f50ce242878ad9f1b85c6280fd3e825ff036bce4ee1dfcc7dd550ee0b2f5
3
+ metadata.gz: 2b339a0aac52ca7f1cb0723ea8807061a5bfe58a593b735cb7fd3963fbb3b365
4
+ data.tar.gz: 11bb3d70210a7cd213440f95f758cc9219de554d1610fbea2393124150a5d48b
5
5
  SHA512:
6
- metadata.gz: 999ce15808dac05122f3f4c3ba7a59f9cb2ab6e2631f157beb3497c8c96d2de8c09f2a228b7cc32e1b1fc04449bf3dd09f431040771a9aece1c078eefd12d67f
7
- data.tar.gz: 2205482c645655070368ddf10164b9d06e1cd69b0de82620b20fb54b67ab31cae934f652ad50eb284fdf15b3fa87243f63e8898465e2f87c6787dbcdeabc32aa
6
+ metadata.gz: 4b6b20349a62da271c83a550ef954134b5e7b5f4ba38e2fc4cdbe79f2553c577470968b294cf39f9894c5e20ed2e0a07ddff8dc06da3265010d9f2258ebb185e
7
+ data.tar.gz: 26b65e114b40e52abcb62d7153c6f95b3bcc7c8dfc52259a8227353f0a4af8c51947ff50d11741525d41b773c75dfbcf91767d0be0829f741f03e82070fb2260
@@ -15,7 +15,7 @@ class EffectiveStampWizardsDatatable < Effective::Datatable
15
15
  col :orders, action: :show
16
16
 
17
17
  col(:issued_at, label: 'Issued on') do |resource|
18
- resource.stamp.issued_at&.strftime('%F') || '-'
18
+ resource.stamp&.issued_at&.strftime('%F') || '-'
19
19
  end
20
20
 
21
21
  actions_col(actions: []) do |resource|
@@ -134,6 +134,10 @@ module EffectiveProductsStampWizard
134
134
  save!
135
135
  end
136
136
 
137
+ def stamp_categories
138
+ EffectiveProducts.stamp_categories
139
+ end
140
+
137
141
  private
138
142
 
139
143
  def present_stamps
@@ -14,6 +14,6 @@
14
14
  = fr.hidden_field :owner_id
15
15
  = fr.hidden_field :owner_type
16
16
 
17
- = render('effective/stamps/fields', f: fr)
17
+ = render('effective/stamps/fields', f: fr, parent: resource)
18
18
 
19
19
  = f.save 'Save and Continue'
@@ -4,7 +4,7 @@
4
4
  = f.text_field :name
5
5
  = f.text_field :name_confirmation, hint: 'must match name'
6
6
 
7
- - collection = EffectiveProducts.stamp_categories
7
+ - collection = local_assigns[:parent].try(:stamp_categories) || EffectiveProducts.stamp_categories
8
8
 
9
9
  - if collection.length == 1
10
10
  = f.hidden_field :category, value: collection.first
@@ -1,3 +1,3 @@
1
1
  module EffectiveProducts
2
- VERSION = '0.3.5'.freeze
2
+ VERSION = '0.3.7'.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.5
4
+ version: 0.3.7
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-06-20 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails