effective_memberships 0.6.12 → 0.6.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58da6947ec96b076bd125a190e31ade30e7964b6dc796423dc7387efa156a246
|
4
|
+
data.tar.gz: 5805aa420a911f2abbb4d38ceaf1d6d743a3932e3b47a14b3b1e4a8796afd0bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea84383f2dbd0763c31e4c8a1c13f16d474d96e749502717dec4825cdbd50eee9fe3dbf3572650dcccedc3f05785bc283c0451fd9ac51fee5f17fd7fa738e7b6
|
7
|
+
data.tar.gz: f0d0dad74b75782b25fc76f786b6e1d042faa591941ebc747ac85d24301dda54e8d3fc5be080ef5827ac251de0f60d23eafea443106565fb872fd2ccdb9bf1a6
|
@@ -292,6 +292,21 @@ module EffectiveMembershipsApplicant
|
|
292
292
|
|
293
293
|
self.errors.add(:applicant_endorsements, "please include #{required} or more endorsements") if existing < required
|
294
294
|
end
|
295
|
+
|
296
|
+
validate do
|
297
|
+
endorsements = applicant_endorsements().reject(&:marked_for_destruction?)
|
298
|
+
|
299
|
+
duplicates = endorsements.select do |endorsement|
|
300
|
+
(endorsements - [endorsement]).find do |existing|
|
301
|
+
(endorsement.endorser.present? && endorsement.endorser == existing.endorser)
|
302
|
+
end.present?
|
303
|
+
end
|
304
|
+
|
305
|
+
if duplicates.present?
|
306
|
+
self.errors.add(:applicant_endorsements, "cannot use the same endorser more than once")
|
307
|
+
duplicates.each { |dup| dup.errors.add(:endorser_id, "has already been included") }
|
308
|
+
end
|
309
|
+
end
|
295
310
|
end
|
296
311
|
|
297
312
|
# Applicant Equivalences Step
|
@@ -51,6 +51,6 @@
|
|
51
51
|
= tab 'Other Applications' do
|
52
52
|
= render_datatable(Admin::EffectiveApplicantsDatatable.new(user: applicant.owner, except_id: applicant.id))
|
53
53
|
|
54
|
-
- if applicant.persisted? && applicant.respond_to?(:
|
54
|
+
- if applicant.persisted? && applicant.respond_to?(:logs_datatable)
|
55
55
|
= tab 'Logs' do
|
56
|
-
=
|
56
|
+
= render_datatable(applicant.logs_datatable, inline: true, namespace: :admin)
|
@@ -29,7 +29,7 @@
|
|
29
29
|
%td
|
30
30
|
Joined on #{membership.joined_on.strftime('%F')}
|
31
31
|
- if membership.reregistered?
|
32
|
-
and last changed on #{membership.
|
32
|
+
and last changed on #{membership.registration_on.strftime('%F')}
|
33
33
|
|
34
34
|
= collapse('show more', card_class: '') do
|
35
35
|
%p #{applicant.owner} membership history
|