effective_memberships 0.13.6 → 0.13.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: 77571110c375655e79ac7ef7150003db9d611ea564d7f0f9ebc65ec38be21715
4
- data.tar.gz: a6aa04f69f1cf002779f768f6b2362b819bbfdb8d874ee23bfad8f4ed1c1f65f
3
+ metadata.gz: fee4d3bcf27de0af18f92b9e8cfa6c1deb2ab8d5269252bda05aa4b5053a474e
4
+ data.tar.gz: 1feb91e4f927b50cedadfba765af24eaee716300c65ea3d7d924226d254361ee
5
5
  SHA512:
6
- metadata.gz: 96bad4189f675621a5fc51652b23c021fd09e21bb4737a3b97e7ab0f3fa2a770bdc437dac40fc27179b3c91b19d7ce296cb50d14601fc83d8e7be8184df6a382
7
- data.tar.gz: b979ee021ff929ebbab1415f5da5e89134fb2202c4f41bafeeb514c83e10312bf9cc97bf8aa0ad3ea73ef185463eaef574c8d5a94564c589ad16586e18aa4f29
6
+ metadata.gz: d6a4a5e2057af3fc3f60f4e56305359f7ffd73a97cd3d2043a2c5f201039670ebd5a85e5ae3a5e2a2df4d3ede01d758b22be3166656192bfb29f30d8a4cb9be3
7
+ data.tar.gz: 9548a342bcf721e7cc9e1bdbe222cfcebfd832d25f9b8b26678e1e5943d513dd0b9f5127c7f32b100491dc904ca2f3a55cf37f85a2958f40a39277b385c83827
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  # EffectiveMembershipsApplicant
4
2
  #
5
3
  # Mark your owner model with effective_memberships_applicant to get all the includes
@@ -4,6 +4,8 @@ module Effective
4
4
  class ApplicantEndorsement < ActiveRecord::Base
5
5
  acts_as_tokened
6
6
 
7
+ attr_accessor :email_form_skip
8
+
7
9
  acts_as_statused(
8
10
  :submitted, # Was submitted by the applicant
9
11
  :completed # Was completed by the endorser.
@@ -14,6 +16,7 @@ module Effective
14
16
  belongs_to :applicant, polymorphic: true
15
17
  belongs_to :endorser, polymorphic: true, optional: true
16
18
 
19
+
17
20
  effective_resource do
18
21
  # These fields are submitted by the applicant
19
22
  # They should try to select an endorser from the dropdown
@@ -58,7 +61,7 @@ module Effective
58
61
  validates :accept_declaration, acceptance: true
59
62
  end
60
63
 
61
- after_commit(on: :create, if: -> { applicant.was_submitted? }) { notify! }
64
+ after_commit(on: :create, if: -> { applicant.was_submitted? && !applicant.done? }, unless: -> { email_form_skip }) { notify! }
62
65
 
63
66
  def self.endorser_collection(applicant)
64
67
  raise('expected an effective memberships applicant') unless applicant.class.try(:effective_memberships_applicant?)
@@ -3,6 +3,8 @@ module Effective
3
3
  acts_as_tokened
4
4
  acts_as_addressable :reference
5
5
 
6
+ attr_accessor :email_form_skip
7
+
6
8
  acts_as_statused(
7
9
  :submitted, # Was submitted by the applicant
8
10
  :completed # Was completed by the reference.
@@ -63,7 +65,7 @@ module Effective
63
65
  validates :accept_declaration, acceptance: true
64
66
  end
65
67
 
66
- after_commit(on: :create, if: -> { applicant.was_submitted? }) { notify! }
68
+ after_commit(on: :create, if: -> { applicant.was_submitted? && !applicant.done? }, unless: -> { email_form_skip }) { notify! }
67
69
 
68
70
  def to_s
69
71
  'reference'
@@ -17,7 +17,7 @@
17
17
  = render 'effective/applicants/applicant', applicant: applicant, namespace: :admin
18
18
 
19
19
  - # Just normal tabs now
20
- - if applicant.applicant_reviews.present?
20
+ - if applicant.applicant_reviews.present? || applicant.was_completed?
21
21
  = tab 'Reviews' do
22
22
  .mb-4= render_inline_datatable(Admin::EffectiveApplicantReviewsDatatable.new(applicant: applicant))
23
23
 
@@ -22,6 +22,11 @@
22
22
  = card do
23
23
  = render 'effective/applicants/summary', applicant: resource
24
24
 
25
+ - if resource.transcripts_required? && !resource.transcripts_received?
26
+ = card do
27
+ %h3 Transcripts
28
+ = render 'effective/applicants/transcripts_requirements', applicant: resource
29
+
25
30
  - if resource.min_applicant_references.to_i > 0 || resource.applicant_references.present?
26
31
  = card do
27
32
  %h3 Confidential References
@@ -13,3 +13,6 @@
13
13
  - if completed.present?
14
14
  %p The following #{cpd_statements_label} have been completed:
15
15
  = render_datatable(completed, simple: true)
16
+
17
+ - if available.blank? && completed.blank?
18
+ %p No #{cpd_statements_label} are present
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.13.6'
2
+ VERSION = '0.13.7'
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.13.6
4
+ version: 0.13.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: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails