effective_classifieds 0.9.4 → 0.10.0

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: c143bcc84feb41ca36686363b6c4b62b28aab57b05f54e7096d224b677bf838a
4
- data.tar.gz: f5ae600938b336f9c671fdd6a28eafc67e59f3277e2ce59ca157c6fc920100cc
3
+ metadata.gz: a569bf06149638227d8758610b5fb2cb76c52923bb4227b844b4190b0e85b2a6
4
+ data.tar.gz: 8f23cc26d4c2ea667875875125842084943f8873e6aaaef4e95a55083fcad879
5
5
  SHA512:
6
- metadata.gz: 64d630734f7034c1c6c91c4ee8a1a973cc6f6b434ae17c8aab06771670898f5d0bae1161761e13feb61cd659796ee6281a1f0562e4e5c959664dc9e9d0b4b414
7
- data.tar.gz: 5491dc157101b71cf845fc9b8214ac5c7c0822889f366856eb0ae5069a27873489600691aacd56b2f90f490994fafd93be1729f26eaca8360bea271e80631b9b
6
+ metadata.gz: 2398aebd0c40dcf43f30591633796d7c84abcda1fe131623438e23e95ebe3c4682a1e7f39bb6326fca4ebab1b2424a074cbfc3fe38e6adf1f7a6f178691c67e9
7
+ data.tar.gz: d397cef51e80c66d693026f5d01d3ea89154a3a566c4be2066927d13891c9f9e95d2f03c7358e3e185862360c6355696248b5db8a5e92287124dd0bc6fba19d2
@@ -34,6 +34,8 @@ module Admin
34
34
  col :body, visible: false
35
35
  col :slug, visible: false
36
36
 
37
+ col :salary_disclosure, visible: false
38
+
37
39
  col :organization
38
40
  col :location
39
41
 
@@ -50,7 +52,7 @@ module Admin
50
52
 
51
53
  col :purchased_order, visible: false
52
54
 
53
- col :qb_item_name, label: qb_item_name_label, search: Effective::ItemName.sorted.map(&:to_s),
55
+ col :qb_item_name, label: qb_item_name_label, search: Effective::ItemName.sorted.map(&:to_s),
54
56
  visible: EffectiveOrders.use_item_names? && EffectiveClassifieds.default_qb_item_name.blank?
55
57
 
56
58
  actions_col do |classified|
@@ -83,6 +83,13 @@ module EffectiveClassifiedsClassifiedWizard
83
83
  validates :classified, presence: true
84
84
  end
85
85
 
86
+ validate(if: -> { current_step == :classified && classified.present? && EffectiveClassifieds.salary_disclosure }) do
87
+ if classified.salary_disclosure.blank?
88
+ classified.errors.add(:salary_disclosure, "can't be blank")
89
+ errors.add(:classified, "is invalid")
90
+ end
91
+ end
92
+
86
93
  # All Fees and Orders
87
94
  def submit_fees
88
95
  classifieds
@@ -46,6 +46,8 @@ module Effective
46
46
  start_on :date
47
47
  end_on :date
48
48
 
49
+ salary_disclosure :text
50
+
49
51
  # Acts as Slugged
50
52
  slug :string
51
53
 
@@ -68,8 +70,8 @@ module Effective
68
70
 
69
71
  scope :sorted, -> { order(start_on: :desc) }
70
72
 
71
- scope :deep, -> {
72
- with_rich_text_body.with_attached_file.includes(:classified_wizard, :owner, :purchased_order)
73
+ scope :deep, -> {
74
+ with_rich_text_body.with_attached_file.includes(:classified_wizard, :owner, :purchased_order)
73
75
  }
74
76
 
75
77
  scope :upcoming, -> { where(arel_table[:end_on].gt(Time.zone.now)) }
@@ -22,8 +22,7 @@
22
22
  .col-lg-6
23
23
  = f.date_field :end_on, label: "Close date", hint: "The #{classified_label.downcase} will no longer be displayed on the #{classifieds_name_label.downcase} after this date. Please enter a date within #{f.object.end_on_distance} of the start date."
24
24
 
25
- -# - if f.object.persisted? && !f.object.draft?
26
- -# = f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'
25
+ = render 'effective/classifieds/salary_fields', f: f
27
26
 
28
27
  - if defined?(EffectiveArticleEditor)
29
28
  = f.article_editor :body, label: 'Description', hint: "The #{classified_label.downcase} description - be sure to include all relevant information!"
@@ -0,0 +1,13 @@
1
+ - # Salary disclosure. Override this partial per tenant to customize the wording or layout.
2
+
3
+ - if EffectiveClassifieds.salary_disclosure == :bc
4
+ - collection = ['Salary range is included in the job posting details']
5
+
6
+ = f.radios :salary_disclosure, collection, required: true,
7
+ hint: "The Pay Transparency Act (PTA) requires firms to disclose salary range on job postings."
8
+
9
+ - if EffectiveClassifieds.salary_disclosure == :on
10
+ - collection = ['Salary range is included in the job posting details', 'Does not apply - our firm employs fewer than 25 people']
11
+
12
+ = f.radios :salary_disclosure, collection, required: true,
13
+ hint: "The Employment Standards Act (ESA) requires firms with more than 25 employees to disclose salary range on job postings."
@@ -2,6 +2,9 @@ EffectiveClassifieds.setup do |config|
2
2
  # Every classified must have a category.
3
3
  config.categories = ['Job', 'Equipment Sales', 'Other']
4
4
 
5
+ # Handles salary disclosure mode. Valid options are :bc, :on, and false
6
+ config.salary_disclosure = false
7
+
5
8
  # Layout Settings
6
9
  # Configure the Layout per controller, or all at once
7
10
  # config.layout = { application: 'application', admin: 'admin' }
@@ -18,6 +18,8 @@ class CreateEffectiveClassifieds < ActiveRecord::Migration[6.0]
18
18
  t.string :email
19
19
  t.string :phone
20
20
 
21
+ t.text :salary_disclosure
22
+
21
23
  t.datetime :start_on
22
24
  t.datetime :end_on
23
25
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.9.4'.freeze
2
+ VERSION = '0.10.0'.freeze
3
3
  end
@@ -8,6 +8,7 @@ module EffectiveClassifieds
8
8
  def self.config_keys
9
9
  [
10
10
  :classifieds_table_name, :classified_wizards_table_name,
11
+ :salary_disclosure,
11
12
  :mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject,
12
13
  :layout, :categories, :per_page, :use_effective_roles, :max_duration, :auto_approve,
13
14
  :classified_wizard_class_name, :skip_deferred,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.0
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: 2026-03-13 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -257,6 +257,7 @@ files:
257
257
  - app/views/effective/classifieds/_form.html.haml
258
258
  - app/views/effective/classifieds/_layout.html.haml
259
259
  - app/views/effective/classifieds/_qb_item_name_field.html.haml
260
+ - app/views/effective/classifieds/_salary_fields.html.haml
260
261
  - app/views/effective/classifieds/_summary.html.haml
261
262
  - app/views/effective/classifieds/edit.html.haml
262
263
  - app/views/effective/classifieds/index.html.haml