effective_memberships 0.3.1 → 0.3.5

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: 259907d1e85043159bf1f3000ee1d6b9d856b422b8cc8e6164045c5a7513142a
4
- data.tar.gz: f0f0b98543ee1e1cbd20ea53749a9ca2d479798d7374ee992815af8d9b2800e2
3
+ metadata.gz: 88bffb7bd99244104ce17a88a864debcea2fd3e19e7741b46a7b5ca655e688b4
4
+ data.tar.gz: c0b583bbfeea31146338d5148faf64ae973bc05eb49c694f0d3e2f9fd1488897
5
5
  SHA512:
6
- metadata.gz: f4b7d38ee4af24942eed3d80c66cb62ba47850616b620cd24351ff9f860bcc3ef4ee3fa66e3d54a128790694c2c85798fa57282602b24914fc4df7810d8785dd
7
- data.tar.gz: 18111c8718b33ca1253ee82b706195cc5cccde005ca07a5f102c30c6588e1bbb6dde7a7387037ba888b4d516ec15e41e0845257ddaa1635fcd329aafb090491a
6
+ metadata.gz: 0fafe61c02d58d5e4f84c4b35f343cc838573f2e8ec4d4f88d3afabe8f2bd844402dd9209964042c17d4881a02f1854f244b9a7bcf4878f89db79f8aa1707ca1
7
+ data.tar.gz: a2762bd75668e045ca8d9f6ff1118387d5150d0ab2756fedd1a48478b88685909b6bf0bb3fd0fe98e05cc7a7d8333ec2f6455a32643a91cf90e2a2c03f603a13
@@ -13,6 +13,9 @@ module Admin
13
13
  col :late_fee, as: :price
14
14
  col :rich_text_body, label: 'Body'
15
15
 
16
+ col :tax_exempt
17
+ col :qb_item_name, visible: false
18
+
16
19
  actions_col
17
20
  end
18
21
 
@@ -77,26 +77,26 @@ module EffectiveMembershipsApplicant
77
77
  belongs_to :category, polymorphic: true, optional: true
78
78
  belongs_to :from_category, polymorphic: true, optional: true
79
79
 
80
- has_many :applicant_reviews, -> { order(:id) }, as: :applicant, dependent: :destroy
80
+ has_many :applicant_reviews, -> { order(:id) }, as: :applicant, inverse_of: :applicant, dependent: :destroy
81
81
  accepts_nested_attributes_for :applicant_reviews, reject_if: :all_blank, allow_destroy: true
82
82
 
83
83
  # Effective Namespace
84
- has_many :applicant_courses, -> { order(:id) }, class_name: 'Effective::ApplicantCourse', as: :applicant, dependent: :destroy
84
+ has_many :applicant_courses, -> { order(:id) }, class_name: 'Effective::ApplicantCourse', as: :applicant, inverse_of: :applicant, dependent: :destroy
85
85
  accepts_nested_attributes_for :applicant_courses, reject_if: :all_blank, allow_destroy: true
86
86
 
87
- has_many :applicant_educations, -> { order(:id) }, class_name: 'Effective::ApplicantEducation', as: :applicant, dependent: :destroy
87
+ has_many :applicant_educations, -> { order(:id) }, class_name: 'Effective::ApplicantEducation', as: :applicant, inverse_of: :applicant, dependent: :destroy
88
88
  accepts_nested_attributes_for :applicant_educations, reject_if: :all_blank, allow_destroy: true
89
89
 
90
- has_many :applicant_experiences, -> { order(:id) }, class_name: 'Effective::ApplicantExperience', as: :applicant, dependent: :destroy
90
+ has_many :applicant_experiences, -> { order(:id) }, class_name: 'Effective::ApplicantExperience', as: :applicant, inverse_of: :applicant, dependent: :destroy
91
91
  accepts_nested_attributes_for :applicant_experiences, reject_if: :all_blank, allow_destroy: true
92
92
 
93
- has_many :applicant_references, -> { order(:id) }, class_name: 'Effective::ApplicantReference', as: :applicant, dependent: :destroy
93
+ has_many :applicant_references, -> { order(:id) }, class_name: 'Effective::ApplicantReference', as: :applicant, inverse_of: :applicant, dependent: :destroy
94
94
  accepts_nested_attributes_for :applicant_references, reject_if: :all_blank, allow_destroy: true
95
95
 
96
- has_many :fees, -> { order(:id) }, as: :parent, class_name: 'Effective::Fee', dependent: :nullify
96
+ has_many :fees, -> { order(:id) }, as: :parent, inverse_of: :parent, class_name: 'Effective::Fee', dependent: :nullify
97
97
  accepts_nested_attributes_for :fees, reject_if: :all_blank, allow_destroy: true
98
98
 
99
- has_many :orders, -> { order(:id) }, as: :parent, class_name: 'Effective::Order', dependent: :nullify
99
+ has_many :orders, -> { order(:id) }, as: :parent, inverse_of: :parent, class_name: 'Effective::Order', dependent: :nullify
100
100
  accepts_nested_attributes_for :orders
101
101
 
102
102
  effective_resource do
@@ -58,7 +58,7 @@ module Effective
58
58
  validates :accept_declaration, acceptance: true
59
59
  end
60
60
 
61
- after_commit(on: :create, if: -> { applicant.submitted? }) { notify! }
61
+ after_commit(on: :create, if: -> { applicant.was_submitted? }) { notify! }
62
62
 
63
63
  def to_s
64
64
  'reference'
@@ -2,7 +2,7 @@
2
2
  %span.badge.badge-secondary= applicant.status_was
3
3
  = applicant.summary
4
4
 
5
- %table.table.table-striped
5
+ %table.table.table-sm.table-striped
6
6
  %thead
7
7
  %tr
8
8
  %th Status
@@ -12,7 +12,7 @@
12
12
 
13
13
  - applicant = EffectiveMemberships.Applicant.new
14
14
 
15
- %table.table
15
+ %table.table.table-sm
16
16
  %tbody
17
17
  %tr
18
18
  %td= applicant.wizard_step_title(:education)
@@ -1,6 +1,6 @@
1
1
  - reference = applicant_reference
2
2
 
3
- %table.table
3
+ %table.table.table-sm
4
4
  %tbody
5
5
  %tr
6
6
  %th Name
@@ -1,10 +1,9 @@
1
1
  = effective_form_with(model: applicant_reference, engine: true) do |f|
2
- - if inline_datatable?
3
- = f.hidden_field :applicant_id
4
- - else
5
- - raise('expected inline datatable')
2
+ = f.hidden_field :applicant_id
3
+ = f.hidden_field :applicant_type
6
4
 
7
5
  = f.text_field :name
6
+
8
7
  .row
9
8
  .col= f.email_field :email
10
9
  .col= f.tel_field :phone
@@ -13,6 +12,8 @@
13
12
  .col= f.select :relationship, Effective::ApplicantReference::RELATIONSHIPS
14
13
  .col= f.select :known, Effective::ApplicantReference::KNOWNS, label: 'Known for'
15
14
 
16
- %p An email will be sent asking them to complete a reference declaration form.
17
-
18
- = f.submit('Create and Notify Reference')
15
+ - if f.object.new_record?
16
+ %p An email will be sent asking them to complete a reference declaration form.
17
+ = f.submit('Create and Notify Reference')
18
+ - else
19
+ = f.submit
@@ -6,7 +6,7 @@
6
6
  .col-sm-auto.text-right
7
7
  = link_to('Edit', wizard_path(:declarations)) if edit_effective_wizard?
8
8
 
9
- %table.table
9
+ %table.table.table-sm
10
10
  %tbody
11
11
  %tr
12
12
  %td= icon('check')
@@ -1,4 +1,4 @@
1
- %table.table
1
+ %table.table.table-sm
2
2
  %tbody
3
3
  %tr
4
4
  %th Name
@@ -6,7 +6,7 @@
6
6
  .col-sm-auto.text-right
7
7
  = link_to('Edit', wizard_path(:files)) if edit_effective_wizard?
8
8
 
9
- %table.table
9
+ %table.table.table-sm
10
10
  %tbody
11
11
  - applicant.applicant_files.each do |file|
12
12
 
@@ -28,7 +28,7 @@
28
28
  References are automatically sent a reference request.
29
29
  Click 'New' to add an additional reference, or click 'Notify' to resend the reference request.
30
30
 
31
- = render_datatable(EffectiveApplicantReferencesDatatable.new(applicant_id: resource.id), inline: true, simple: true)
31
+ = render_datatable(EffectiveApplicantReferencesDatatable.new(applicant: resource), inline: true, simple: true)
32
32
 
33
33
  .mb-4
34
34
  = collapse('Show application...', card_class: 'my-2') do
@@ -6,7 +6,7 @@
6
6
  .col-sm-auto.text-right
7
7
  = link_to('Edit', wizard_path(:declarations)) if edit_effective_wizard?
8
8
 
9
- %table.table
9
+ %table.table.table-sm
10
10
  %tbody
11
11
  %tr
12
12
  %td= icon('check')
@@ -1,4 +1,4 @@
1
- %table.table
1
+ %table.table.table-sm
2
2
  %tbody
3
3
  %tr
4
4
  %th Name
@@ -1,4 +1,4 @@
1
- %table.table
1
+ %table.table.table-sm
2
2
  %tbody
3
3
  %tr
4
4
  %th Category
@@ -1,14 +1,21 @@
1
- %h2 Membership
2
1
  - current_owner = current_user.effective_memberships_owner
3
2
  - membership = current_owner.membership
4
3
 
4
+ %h2 Membership
5
+
5
6
  - if membership.present?
6
7
  - if membership.categories.length == 0
7
- You are a member.
8
+ %p
9
+ You do not have an assigned membership category.
10
+ To fix this, click the Apply to Join button or the Pay Fees button and then complete the wizard.
11
+ You cannot access member-only pages until this has been completed.
12
+ Please contact us if you believe this is an error with your account.
13
+
8
14
  - elsif membership.categories.length == 1
9
15
  %p You are a #{membership.category} member.
16
+
10
17
  - else
11
- %p You are a member of the following:
18
+ %p You are a member with the following membership categories:
12
19
 
13
20
  %ul
14
21
  - membership.categories.each do |category|
@@ -1,4 +1,4 @@
1
- %table.table
1
+ %table.table.table-sm
2
2
  %tbody
3
3
  %tr
4
4
  %th Joined
data/config/routes.rb CHANGED
@@ -23,7 +23,7 @@ EffectiveMemberships::Engine.routes.draw do
23
23
  namespace :admin do
24
24
  resources :applicants, except: [:new, :create, :show]
25
25
 
26
- resources :applicant_references, only: [:show] do
26
+ resources :applicant_references do
27
27
  post :notify, on: :member
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_memberships
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
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: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails