From 42b4807e070e83f0cd705457105a2a13d337ef05 Mon Sep 17 00:00:00 2001
From: ralphlevan
Date: Sat, 16 Jul 2022 15:38:57 -0400
Subject: [PATCH 01/47] PLAN-585 Added human strings for con state values and
use them to format the table values
---
app/javascript/constants/strings.js | 12 ++++++++++++
app/javascript/people/people.js | 17 ++++++-----------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/app/javascript/constants/strings.js b/app/javascript/constants/strings.js
index d6585b02c..7aa9bbb75 100644
--- a/app/javascript/constants/strings.js
+++ b/app/javascript/constants/strings.js
@@ -241,6 +241,18 @@ module.exports = {
},
PERSON_SAVE_SUCCESS: "Profile record saved successfully",
PERSON_NEVER_LOGGED_IN: "Never logged in",
+ PERSON_CON_STATE: {
+ not_set: "Not Set",
+ applied: "Applied",
+ vetted: "Vetted",
+ wait_list: "Wait List",
+ invite_pending: "Invite Pending",
+ invited: "Invited",
+ probable: "Probable",
+ accepted: "Accepted",
+ declined: "Declined",
+ rejected: "Rejected"
+ },
SURVEY_REDIRECT: "Unfortunately due to the browser refreshing we have lost any answers you filled in. Please fill the survey out again.",
SURVEY_PUBLIC_NO_EDIT: "You cannot edit a published survey. Close the survey to enable editing.",
diff --git a/app/javascript/people/people.js b/app/javascript/people/people.js
index f49414944..3804753c9 100644
--- a/app/javascript/people/people.js
+++ b/app/javascript/people/people.js
@@ -1,3 +1,5 @@
+import {PERSON_CON_STATE, SESSION_STATUS} from "@/constants/strings";
+
export const people_columns = [
{
key: 'published_name',
@@ -32,19 +34,12 @@ export const people_columns = [
search_key: 'con_state',
label: 'Status',
type: "select",
+ formatter: (value) => PERSON_CON_STATE[value] || value,
// TODO: needs to be driven by settings enums
choices: [
- {label: "not_set", value: "not_set"},
- {label: "applied", value: "applied"},
- {label: "vetted", value: "vetted"},
- {label: "wait_list", value: "wait_list"},
- {label: "invite_pending", value: "invite_pending"},
- {label: "invited", value: "invited"},
- {label: "probable", value: "probable"},
- {label: "accepted", value: "accepted"},
- {label: "declined", value: "declined"},
- {label: "rejected", value: "rejected"}
- ],
+ "not_set", "applied", "vetted", "wait_list", "invite_pending",
+ "invited", "probable", "accepted", "declined", "rejected"
+ ].map(value => ({label: PERSON_CON_STATE[value], value})),
operators: ["=", "!="],
sortable: false
},
From 9cb4f696236a951b79dbce134a9788ffc8a9e8db Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 09:59:30 -0400
Subject: [PATCH 02/47] Coclar WIP
---
app/controllers/schedule_controller.rb | 42 ++++++++++++++
app/serializers/conclar/session_serializer.rb | 56 +++++++++++++++++++
app/services/reports_service.rb | 35 +++++-------
config/routes.rb | 4 +-
4 files changed, 114 insertions(+), 23 deletions(-)
create mode 100644 app/controllers/schedule_controller.rb
create mode 100644 app/serializers/conclar/session_serializer.rb
diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb
new file mode 100644
index 000000000..a68247632
--- /dev/null
+++ b/app/controllers/schedule_controller.rb
@@ -0,0 +1,42 @@
+# Produce a schedule suitable for Conclar
+class ScheduleController < ApplicationController
+ skip_before_action :check_up, :authenticate_person!, only: [:index, :participants]
+
+ def index
+ # TODO: we really need to use published sessions, this is fine for testing for now
+ sessions = ReportsService.scheduled_sessions
+
+ render plain: "var program = " + ActiveModel::Serializer::CollectionSerializer.new(
+ sessions,
+ serializer: Conclar::SessionSerializer
+ ).to_json
+ end
+
+ def participants
+ # All participants on the schedule ...
+ # var people = [
+ # {
+ # "id": "4567",
+ # "name": [ "Friend Andhis Jr." ],
+ # "sortname" : "Andhis Jr., Friend",
+ # "tags": [],
+ # "prog": [ "1234", "614", "801" ],
+ # "links": [],
+ # "bio": "Prior art for Adams's satirical point – that humans attach such importance to their automobiles that a visiting extraterrestrial might reasonably mistake them for the planet's dominant life form – can be found in a widely reprinted article from The Rockefeller Institute Review titled Life on Earth (by a Martian) by Paul Weiss. The idea was also expounded by Carl Sagan, though this may have postdated Adams's creation of the character of Ford. The 1967 Oscar-nominated animated film What on Earth! from the National Film Board of Canada is also based on this premise."
+ # },
+ # {
+ # "id": "1234",
+ # "name": [ "Galahad", "", "Sir" ],
+ # "sortname": "Sir Galahad",
+ # "tags": [ "GoH" ],
+ # "prog": [ "416" ],
+ # "links": {
+ # "img": "/images/galahad.jpg",
+ # "photo": "/images/galahad.jpg",
+ # "img_256_url": "/images/galahad.jpg",
+ # "url": "http://en.wikipedia.org/wiki/Galahad"
+ # },
+ # "bio": "Sir Galahad (/ˈɡæləhæd/; Middle Welsh: Gwalchavad, sometimes referred to as Galeas /ɡəˈliːəs/ or Galath /ˈɡæləθ/), in Arthurian legend, is a knight of King Arthur's Round Table and one of the three achievers of the Holy Grail."
+ # },
+ end
+end
diff --git a/app/serializers/conclar/session_serializer.rb b/app/serializers/conclar/session_serializer.rb
new file mode 100644
index 000000000..093a01fd0
--- /dev/null
+++ b/app/serializers/conclar/session_serializer.rb
@@ -0,0 +1,56 @@
+class Conclar::SessionSerializer < ActiveModel::Serializer
+ attributes :id, :title, :start_time
+
+ attribute :desc do
+ object.description
+ end
+
+ # TODO: change for when we do have tags
+ attribute :tags do
+ res = []
+
+ # TODO: optimize
+ res.concat object.areas.collect(&:name)
+
+ res.concat [object.age_restriction.name] if object.age_restriction
+ res.concat [object.environment] if object.environment != 'unknown'
+
+ if object.minors_participation && object.minors_participation.class == Array
+ res.concat object.minors_participation
+ end
+
+ res
+ end
+
+ attribute :mins do
+ object.duration
+ end
+
+ attribute :loc do
+ # [ "Some Room", "Some Area" ],
+ if object.room
+ [object.room.name, object.room.venue.name]
+ else
+ []
+ end
+ end
+
+ attribute :people do
+ moderator = SessionAssignmentRoleType.find_by(name: 'Moderator')
+ invisible = SessionAssignmentRoleType.find_by(name: 'Invisible')
+ parts = []
+ object.participant_assignments.each do |assignment|
+ next if assignment.session_assignment_role_type_id == invisible.id
+
+ p = {
+ id: assignment.person.id,
+ name: assignment.person.published_name
+ # role: nil
+ }
+ p['role'] = 'moderator' if assignment.session_assignment_role_type_id == moderator.id
+ parts << p
+ end
+
+ parts
+ end
+end
diff --git a/app/services/reports_service.rb b/app/services/reports_service.rb
index 36f63b0c7..bc47e54a2 100644
--- a/app/services/reports_service.rb
+++ b/app/services/reports_service.rb
@@ -1,27 +1,5 @@
module ReportsService
- def self.all_sessions
- sessions_table = Session.arel_table
- subquery = Session.area_list.as('areas_list')
-
- joins = [
- sessions_table.create_join(
- subquery,
- sessions_table.create_on(
- subquery[:session_id].eq(sessions_table[:id])
- ),
- Arel::Nodes::OuterJoin
- )
- ]
-
- Session.select(
- ::Session.arel_table[Arel.star],
- 'areas_list.area_list'
- )
- .joins(joins)
- .order('title')
- end
-
def self.all_conflicts(ignored: false)
conflicts_table = ::Conflicts::SessionConflict.arel_table
subquery = Session.area_list.as('areas_list')
@@ -95,6 +73,19 @@ def self.scheduled_session_no_people
# .order(:start_time)
end
+ # Get all the schedule sessions
+ def self.scheduled_sessions
+ Session.select(
+ ::Session.arel_table[Arel.star],
+ 'areas_list.area_list'
+ )
+ .includes(:format, :room, {participant_assignments: :person})
+ .joins(self.area_subquery)
+ .where("start_time is not null and room_id is not null")
+ .where("status != 'dropped' and status != 'draft'")
+ .order(:start_time)
+ end
+
def self.sessions_with_no_moderator
sched_table = PersonSchedule.arel_table
diff --git a/config/routes.rb b/config/routes.rb
index 86e778f64..e6a3cab4d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -20,6 +20,8 @@
get '/settings', to: 'settings#index'
+ get '/conclar/schedule', to: 'schedule#index'
+
# REST based resources
get 'person/session/me', to: 'people#me'
get 'person/me', to: 'people#me'
@@ -62,7 +64,7 @@
get 'report/session_reports/invited_accepted_not_scheduled', to: 'reports/session_reports#invited_accepted_not_scheduled'
get 'report/session_reports/session_with_no_moderator', to: 'reports/session_reports#session_with_no_moderator'
get 'report/session_reports/assigned_sessions_not_scheduled', to: 'reports/session_reports#assigned_sessions_not_scheduled'
- get 'report/session_reports/session_copy_edit_status', to: 'reports/session_reports#session_copy_edit_status'
+ get 'report/session_reports/session_copy_edit_status', to: 'reports/session_reports#session_copy_edit_status'
get 'report/session_reports/scheduled_session_no_people', to: 'reports/session_reports#scheduled_session_no_people'
get 'report/session_reports/non_accepted_on_schedule', to: 'reports/session_reports#non_accepted_on_schedule'
get 'report/session_reports/participants_over_session_limits', to: 'reports/session_reports#participants_over_session_limits'
From c3f9b413b8ef74f062406001adb22e0c8c9bd3b6 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 10:28:19 -0400
Subject: [PATCH 03/47] conclar WIP
---
app/controllers/schedule_controller.rb | 31 ++---------
.../conclar/participant_serializer.rb | 55 +++++++++++++++++++
app/services/reports_service.rb | 17 +++++-
config/routes.rb | 1 +
4 files changed, 78 insertions(+), 26 deletions(-)
create mode 100644 app/serializers/conclar/participant_serializer.rb
diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb
index a68247632..a9da386fc 100644
--- a/app/controllers/schedule_controller.rb
+++ b/app/controllers/schedule_controller.rb
@@ -13,30 +13,11 @@ def index
end
def participants
- # All participants on the schedule ...
- # var people = [
- # {
- # "id": "4567",
- # "name": [ "Friend Andhis Jr." ],
- # "sortname" : "Andhis Jr., Friend",
- # "tags": [],
- # "prog": [ "1234", "614", "801" ],
- # "links": [],
- # "bio": "Prior art for Adams's satirical point – that humans attach such importance to their automobiles that a visiting extraterrestrial might reasonably mistake them for the planet's dominant life form – can be found in a widely reprinted article from The Rockefeller Institute Review titled Life on Earth (by a Martian) by Paul Weiss. The idea was also expounded by Carl Sagan, though this may have postdated Adams's creation of the character of Ford. The 1967 Oscar-nominated animated film What on Earth! from the National Film Board of Canada is also based on this premise."
- # },
- # {
- # "id": "1234",
- # "name": [ "Galahad", "", "Sir" ],
- # "sortname": "Sir Galahad",
- # "tags": [ "GoH" ],
- # "prog": [ "416" ],
- # "links": {
- # "img": "/images/galahad.jpg",
- # "photo": "/images/galahad.jpg",
- # "img_256_url": "/images/galahad.jpg",
- # "url": "http://en.wikipedia.org/wiki/Galahad"
- # },
- # "bio": "Sir Galahad (/ˈɡæləhæd/; Middle Welsh: Gwalchavad, sometimes referred to as Galeas /ɡəˈliːəs/ or Galath /ˈɡæləθ/), in Arthurian legend, is a knight of King Arthur's Round Table and one of the three achievers of the Holy Grail."
- # },
+ participants = ReportsService.scheduled_people
+
+ render json: ActiveModel::Serializer::CollectionSerializer.new(
+ participants,
+ serializer: Conclar::ParticipantSerializer
+ ).to_json
end
end
diff --git a/app/serializers/conclar/participant_serializer.rb b/app/serializers/conclar/participant_serializer.rb
new file mode 100644
index 000000000..85492d0bb
--- /dev/null
+++ b/app/serializers/conclar/participant_serializer.rb
@@ -0,0 +1,55 @@
+class Conclar::ParticipantSerializer < ActiveModel::Serializer
+ attributes :id, :bio
+
+ attribute :name do
+ object.published_name
+ end
+
+ attribute :sortname do
+ object.published_name_sort_by
+ end
+
+ attribute :prog do
+ res = []
+ moderator = SessionAssignmentRoleType.find_by(name: 'Moderator')
+ participant = SessionAssignmentRoleType.find_by(name: 'Participant')
+
+ object.session_assignments.each do |assignment|
+ next if assignment.session_assignment_role_type_id != moderator.id and assignment.session_assignment_role_type_id != participant.id
+
+ res << assignment.session_id
+ end
+
+ res
+ end
+
+ # links ????
+ # what about social media URLs?
+ # tags - not supported yet
+end
+
+# All participants on the schedule ...
+# var people = [
+# {
+# "id": "4567",
+# "name": [ "Friend Andhis Jr." ],
+# "sortname" : "Andhis Jr., Friend",
+# "tags": [],
+# "prog": [ "1234", "614", "801" ],
+# "links": [],
+# "bio": "Prior art for Adams's satirical point – that humans attach such importance to their automobiles that a visiting extraterrestrial might reasonably mistake them for the planet's dominant life form – can be found in a widely reprinted article from The Rockefeller Institute Review titled Life on Earth (by a Martian) by Paul Weiss. The idea was also expounded by Carl Sagan, though this may have postdated Adams's creation of the character of Ford. The 1967 Oscar-nominated animated film What on Earth! from the National Film Board of Canada is also based on this premise."
+# },
+# {
+# "id": "1234",
+# "name": [ "Galahad", "", "Sir" ],
+# "sortname": "Sir Galahad",
+# "tags": [ "GoH" ],
+# "prog": [ "416" ],
+# "links": {
+# "img": "/images/galahad.jpg",
+# "photo": "/images/galahad.jpg",
+# "img_256_url": "/images/galahad.jpg",
+# "url": "http://en.wikipedia.org/wiki/Galahad"
+# },
+# "bio": "Sir Galahad (/ˈɡæləhæd/; Middle Welsh: Gwalchavad, sometimes referred to as Galeas /ɡəˈliːəs/ or Galath /ˈɡæləθ/), in Arthurian legend, is a knight of King Arthur's Round Table and one of the three achievers of the Holy Grail."
+# },
diff --git a/app/services/reports_service.rb b/app/services/reports_service.rb
index bc47e54a2..5a85ba44b 100644
--- a/app/services/reports_service.rb
+++ b/app/services/reports_service.rb
@@ -73,7 +73,7 @@ def self.scheduled_session_no_people
# .order(:start_time)
end
- # Get all the schedule sessions
+ # Get all the schedule sessions
def self.scheduled_sessions
Session.select(
::Session.arel_table[Arel.star],
@@ -86,6 +86,21 @@ def self.scheduled_sessions
.order(:start_time)
end
+ def self.scheduled_people
+ moderator = SessionAssignmentRoleType.find_by(name: 'Moderator')
+ participant = SessionAssignmentRoleType.find_by(name: 'Participant')
+
+ people = Person.includes(
+ {session_assignments: [:session, :session_assignment_role_type]}
+ ).references(
+ {session_assignments: :session}
+ )
+ .where("session_assignments.session_assignment_role_type_id in (?)", [moderator.id, participant.id])
+ .where("sessions.start_time is not null and sessions.room_id is not null")
+ .where("sessions.status != 'dropped' and sessions.status != 'draft'")
+ .where("people.con_state not in (?)", ['declined', 'rejected']) #.distinct
+ .order("people.published_name")
+ end
def self.sessions_with_no_moderator
sched_table = PersonSchedule.arel_table
diff --git a/config/routes.rb b/config/routes.rb
index e6a3cab4d..429f1e3f1 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -21,6 +21,7 @@
get '/settings', to: 'settings#index'
get '/conclar/schedule', to: 'schedule#index'
+ get '/conclar/participants', to: 'schedule#participants'
# REST based resources
get 'person/session/me', to: 'people#me'
From 065f0fa60cf13f66acc6440a160be10f474cdd11 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 10:29:46 -0400
Subject: [PATCH 04/47] conclar WIP
---
app/controllers/schedule_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb
index a9da386fc..0f994869c 100644
--- a/app/controllers/schedule_controller.rb
+++ b/app/controllers/schedule_controller.rb
@@ -15,7 +15,7 @@ def index
def participants
participants = ReportsService.scheduled_people
- render json: ActiveModel::Serializer::CollectionSerializer.new(
+ render plain: "var people = " + ActiveModel::Serializer::CollectionSerializer.new(
participants,
serializer: Conclar::ParticipantSerializer
).to_json
From a767420bb5842cde146d8cab2a7b7248ede588f5 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 11:20:25 -0400
Subject: [PATCH 05/47] use datetime as attribute name
---
app/serializers/conclar/session_serializer.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/serializers/conclar/session_serializer.rb b/app/serializers/conclar/session_serializer.rb
index 093a01fd0..5189ff8b9 100644
--- a/app/serializers/conclar/session_serializer.rb
+++ b/app/serializers/conclar/session_serializer.rb
@@ -1,10 +1,14 @@
class Conclar::SessionSerializer < ActiveModel::Serializer
- attributes :id, :title, :start_time
+ attributes :id, :title
attribute :desc do
object.description
end
+ attribute :datetime do
+ object.start_time
+ end
+
# TODO: change for when we do have tags
attribute :tags do
res = []
From 05ebead26ce45d7f3b6eca5cd0fc0803a351c33b Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 14:59:44 -0400
Subject: [PATCH 06/47] changing to just json instead of var =
---
app/controllers/schedule_controller.rb | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb
index 0f994869c..4a91c4843 100644
--- a/app/controllers/schedule_controller.rb
+++ b/app/controllers/schedule_controller.rb
@@ -3,21 +3,22 @@ class ScheduleController < ApplicationController
skip_before_action :check_up, :authenticate_person!, only: [:index, :participants]
def index
- # TODO: we really need to use published sessions, this is fine for testing for now
sessions = ReportsService.scheduled_sessions
- render plain: "var program = " + ActiveModel::Serializer::CollectionSerializer.new(
+ render json: ActiveModel::Serializer::CollectionSerializer.new(
sessions,
serializer: Conclar::SessionSerializer
- ).to_json
+ ),
+ content_type: 'application/json'
end
def participants
participants = ReportsService.scheduled_people
- render plain: "var people = " + ActiveModel::Serializer::CollectionSerializer.new(
+ render ActiveModel::Serializer::CollectionSerializer.new(
participants,
serializer: Conclar::ParticipantSerializer
- ).to_json
+ ),
+ content_type: 'application/json'
end
end
From 9b4519e0d60737c7e6ca460410d960b9b6ea3dad Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 20 Jul 2022 16:53:11 -0400
Subject: [PATCH 07/47] if the request is patch then it may not have time and
room in the params
---
app/controllers/sessions_controller.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index ee162f40f..a586dc93c 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -143,7 +143,8 @@ def before_update
# if time or room have changed removed ignored conflicts
p = _permitted_params(model: object_name, instance: @object)
if (@object.start_time || @object.room_id)
- if p[:start_time] != @object.start_time || p[:room_id] != @object.room_id
+ if (p.has_key?(:start_time) && p[:start_time] != @object.start_time) ||
+ (p.has_key?(:room_id) && p[:room_id] != @object.room_id)
# so we remove any ignore conflicts for this session
cids = @object.ignored_session_conflicts.pluck(:conflict_id)
cids += @object.ignored_conflict_sessions.pluck(:conflict_id)
From b2dace8f0c6b12e21b49b286601ff66859953ee4 Mon Sep 17 00:00:00 2001
From: Henry
Date: Thu, 21 Jul 2022 12:54:23 -0400
Subject: [PATCH 08/47] adjust output
---
app/controllers/schedule_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb
index 4a91c4843..02d7fd031 100644
--- a/app/controllers/schedule_controller.rb
+++ b/app/controllers/schedule_controller.rb
@@ -15,7 +15,7 @@ def index
def participants
participants = ReportsService.scheduled_people
- render ActiveModel::Serializer::CollectionSerializer.new(
+ render json: ActiveModel::Serializer::CollectionSerializer.new(
participants,
serializer: Conclar::ParticipantSerializer
),
From 20ec584e5828e48705ef9d7861e0f1eb1951c15c Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Thu, 21 Jul 2022 18:54:54 -0400
Subject: [PATCH 09/47] PLAN-538 PLAN-379 tweaks to report page
- make it so staff cannot click on the report they may not run
- start description process
- make table of contents at top of reports page
- adjust styling of titles
---
app/javascript/reports/reports_screen.vue | 39 ++++++++++++++++++-----
1 file changed, 31 insertions(+), 8 deletions(-)
diff --git a/app/javascript/reports/reports_screen.vue b/app/javascript/reports/reports_screen.vue
index c4311dea3..ce8417928 100644
--- a/app/javascript/reports/reports_screen.vue
+++ b/app/javascript/reports/reports_screen.vue
@@ -1,13 +1,30 @@
diff --git a/app/javascript/profile/person_schedule_display.vue b/app/javascript/profile/person_schedule_display.vue
index 68adca9c7..36749ca91 100644
--- a/app/javascript/profile/person_schedule_display.vue
+++ b/app/javascript/profile/person_schedule_display.vue
@@ -42,6 +42,7 @@
From 19e2c0cb9fb4e570768470bf5e0615b5aa1b1c1d Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 27 Jul 2022 07:06:17 -0400
Subject: [PATCH 34/47] fix logged in time display
---
app/javascript/people/people_table.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/javascript/people/people_table.vue b/app/javascript/people/people_table.vue
index e3de1cb8e..ee89793f4 100644
--- a/app/javascript/people/people_table.vue
+++ b/app/javascript/people/people_table.vue
@@ -98,8 +98,8 @@
-
- {{new Date(item.current_sign_in_at).toLocaleString()}}
+
+ {{new Date(item.current_sign_in_at).toLocaleString('en', {dateStyle:'medium', timeStyle: "short", hour12: false})}}
From 57c34e973c79a7a95d8ed429ab419b38caca7e78 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 27 Jul 2022 07:13:36 -0400
Subject: [PATCH 35/47] make sure it is up to date for staging
---
db/structure.sql | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/db/structure.sql b/db/structure.sql
index ce7c5342e..2e5efed3c 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -1123,7 +1123,7 @@ CREATE VIEW public.person_schedules AS
sessions.description,
sessions.environment
FROM (((public.session_assignments sa
- JOIN public.session_assignment_role_type sart ON (((sart.id = sa.session_assignment_role_type_id) AND (sart.role_type = 'participant'::public.assignment_role_enum) AND ((sart.name)::text <> 'Reserve'::text))))
+ JOIN public.session_assignment_role_type sart ON (((sart.id = sa.session_assignment_role_type_id) AND (sart.role_type = 'participant'::public.assignment_role_enum))))
JOIN public.people p ON ((p.id = sa.person_id)))
LEFT JOIN public.sessions ON ((sessions.id = sa.session_id)))
WHERE ((sa.session_assignment_role_type_id IS NOT NULL) AND (sessions.room_id IS NOT NULL) AND (sessions.start_time IS NOT NULL) AND ((sa.state)::text <> 'rejected'::text));
@@ -1205,7 +1205,7 @@ CREATE VIEW public.person_back_to_back_to_back AS
psc2.conflict_room_id,
psc2.id AS conflict_b2b_id
FROM (public.person_back_to_back psc1
- JOIN public.person_back_to_back psc2 ON ((psc2.session_id = psc1.conflict_session_id)));
+ JOIN public.person_back_to_back psc2 ON (((psc2.session_id = psc1.conflict_session_id) AND (psc2.person_id = psc1.person_id))));
--
@@ -1398,7 +1398,9 @@ CREATE TABLE public.published_sessions (
room_id uuid,
visibility public.visibility_enum DEFAULT 'public'::public.visibility_enum,
require_signup boolean DEFAULT false,
- waiting_list_size integer DEFAULT 0
+ waiting_list_size integer DEFAULT 0,
+ environment public.session_environments_enum DEFAULT 'unknown'::public.session_environments_enum,
+ minors_participation jsonb
);
@@ -3334,6 +3336,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220714124643'),
('20220714124706'),
('20220719000644'),
-('20220723213605');
+('20220723213605'),
+('20220726130346');
From 27716c739107df867da1a1d83066a7919596ccac Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 27 Jul 2022 08:42:42 -0400
Subject: [PATCH 36/47] plan-595 save minor participation as json
---
app/javascript/sessions/minors_participation.mixin.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/javascript/sessions/minors_participation.mixin.js b/app/javascript/sessions/minors_participation.mixin.js
index cdaafa22f..2537f76ef 100644
--- a/app/javascript/sessions/minors_participation.mixin.js
+++ b/app/javascript/sessions/minors_participation.mixin.js
@@ -12,7 +12,7 @@ export const minorsParticipationMixin = {
get() {
const session = this.session || this.selected;
try {
- const existing = JSON.parse(session.minors_participation)
+ const existing = session.minors_participation
return Array.isArray(existing) ? existing : existing ? [existing] : []
} catch {
return []
@@ -20,8 +20,8 @@ export const minorsParticipationMixin = {
},
set(val) {
if(this.session) {
- this.session.minors_participation = JSON.stringify(val);
- }
+ this.session.minors_participation = val;
+ }
}
}
}
From 508c68f0e9104d75f470543c4a326d9382745b31 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 27 Jul 2022 12:14:04 -0400
Subject: [PATCH 37/47] param keyt is not symbol
---
app/controllers/sessions_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index a586dc93c..3da8736ed 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -143,8 +143,8 @@ def before_update
# if time or room have changed removed ignored conflicts
p = _permitted_params(model: object_name, instance: @object)
if (@object.start_time || @object.room_id)
- if (p.has_key?(:start_time) && p[:start_time] != @object.start_time) ||
- (p.has_key?(:room_id) && p[:room_id] != @object.room_id)
+ if (p.has_key?('start_time') && p['start_time'] != @object.start_time) ||
+ (p.has_key?('room_id') && p['room_id'] != @object.room_id)
# so we remove any ignore conflicts for this session
cids = @object.ignored_session_conflicts.pluck(:conflict_id)
cids += @object.ignored_conflict_sessions.pluck(:conflict_id)
From 219b4a72b048306647fa7b32ffd068df692d4452 Mon Sep 17 00:00:00 2001
From: Henry
Date: Wed, 27 Jul 2022 12:39:25 -0400
Subject: [PATCH 38/47] plan-624 add share permission to person prefs
---
app/javascript/constants/strings.js | 3 ++-
app/javascript/profile/person_details.vue | 12 ++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/app/javascript/constants/strings.js b/app/javascript/constants/strings.js
index b6455e482..e9b9efca6 100644
--- a/app/javascript/constants/strings.js
+++ b/app/javascript/constants/strings.js
@@ -237,7 +237,8 @@ module.exports = {
can_record_exceptions: "Recordings excluded topics",
name: "Name",
pseudonym: "Pseudonym",
- languages_fluent_in: "Languages spoken"
+ languages_fluent_in: "Languages spoken",
+ can_share: "Permission to share email with other Participants"
},
PERSON_SAVE_SUCCESS: "Profile record saved successfully",
PERSON_NEVER_LOGGED_IN: "Never logged in",
diff --git a/app/javascript/profile/person_details.vue b/app/javascript/profile/person_details.vue
index 41f123a08..a5d16fd4a 100644
--- a/app/javascript/profile/person_details.vue
+++ b/app/javascript/profile/person_details.vue
@@ -70,6 +70,17 @@
+
+
+
+ {{yesLabel.label}}
+ {{noLabel.label}}
+
+
+
Date: Wed, 27 Jul 2022 16:11:17 -0400
Subject: [PATCH 39/47] change operators for those mathematically illiterate
---
app/controllers/concerns/resource_methods.rb | 8 ++++++++
app/javascript/people/people.js | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/app/controllers/concerns/resource_methods.rb b/app/controllers/concerns/resource_methods.rb
index 4f3f0e4be..d7390d959 100644
--- a/app/controllers/concerns/resource_methods.rb
+++ b/app/controllers/concerns/resource_methods.rb
@@ -462,12 +462,20 @@ def translate_operator(operation:)
:not_eq
when '!='
:not_eq
+ when 'is less than'
+ :lt
when '<'
:lt
+ when 'is greater than'
+ :gt
when '>'
:gt
+ when 'is less than or equal'
+ :lteq
when '<='
:lteq
+ when 'is greater than or equal'
+ :gteq
when '>='
:gteq
when 'is'
diff --git a/app/javascript/people/people.js b/app/javascript/people/people.js
index 69e39b2f3..0a7bb68f0 100644
--- a/app/javascript/people/people.js
+++ b/app/javascript/people/people.js
@@ -51,7 +51,8 @@ export const people_columns = [
key: 'session_count',
search_key: 'session_count',
label: 'Session Count',
- type: "numeric"
+ type: "numeric",
+ operators: ["equal", "does not equal", "is less than", "is less than or equal", "is greater than", "is greater than or equal"]
},
{
key: 'draft_approval',
From c91937d53ad1a72ba475cf619fd0fe0a2e8d7af6 Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 18:54:04 -0400
Subject: [PATCH 40/47] PLAN-538 fix missing trailing tags
---
app/javascript/reports/reports_screen.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/javascript/reports/reports_screen.vue b/app/javascript/reports/reports_screen.vue
index 8ff9eff97..b964c5a00 100644
--- a/app/javascript/reports/reports_screen.vue
+++ b/app/javascript/reports/reports_screen.vue
@@ -44,6 +44,7 @@
+ Participants and Do Not Assign With
Participants and Do Not Assign With
Description: People who should not be assigned to the same session, one line per person and session; available only to users with permission to view sensitive data
@@ -51,7 +52,6 @@
Session data included: all scheduled sessions
Person data included: moderators, participants, invisible participants who listed information about who not to assign with
- Participants and Do Not Assign With
Participants over Daily Limits
@@ -243,7 +243,7 @@
Schedule by Room then Time
- Description: All scheduled sessions, one line per room and day/time
+ Description: All scheduled sessions, one line per room and day/time
Fields: Session title, area(s) of session, session start time, session duration, room, assigned participants, moderators
Session data included: all scheduled sessions
Person data included: moderators, participants
From bc62a51630864529a27f907607fd1e579b7f949e Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 19:00:05 -0400
Subject: [PATCH 41/47] PLAN-538 move new report to correct location
---
app/javascript/reports/reports_screen.vue | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/app/javascript/reports/reports_screen.vue b/app/javascript/reports/reports_screen.vue
index 22b64c7ab..67af576de 100644
--- a/app/javascript/reports/reports_screen.vue
+++ b/app/javascript/reports/reports_screen.vue
@@ -89,9 +89,6 @@
Person data included: people with a participant status of accepted, invited, or invite_pending who are assigned to no sessions, or who are assigned as invisible participants or reserved on one or more sessions
-
- Draft and Firm Schedule Acceptance
-
Sessions
@@ -260,14 +257,10 @@
Person data included: moderators, participants, invisible participants
-
-
+
+ Participants with Approved Draft and Firm Schedules
+
-
From a01ee2c3222b54eb42badd957f7a5443bab5dc3e Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 19:13:59 -0400
Subject: [PATCH 42/47] PLAN-538 add new report description
---
app/javascript/reports/reports_screen.vue | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/javascript/reports/reports_screen.vue b/app/javascript/reports/reports_screen.vue
index 67af576de..6aa0dd9bd 100644
--- a/app/javascript/reports/reports_screen.vue
+++ b/app/javascript/reports/reports_screen.vue
@@ -162,7 +162,7 @@
Fields: Session title, area(s) of session, session status, has session been copy edited (y/n), has session been scheduled (y/n), visibility (visible, not visible)
Session data included: all sessions
-
+
Conflicts
@@ -233,7 +233,8 @@
Description: All conflicts in these categories: people outside of availability, people double booked, person scheduled against a conflict item, back to back), one line per conflict
Fields: Session title, area(s) of session, session start time, session duration, room, person name, conflict type
- Session data included: all scheduled sessions
+ Session data included: all scheduled sessions
+ Person data included: moderators, participants, invisible participants
@@ -259,6 +260,11 @@
Participants with Approved Draft and Firm Schedules
+
+ Description: People with a participant status that is not rejected, declined, or not_set, with indication whether and when they have approved their draft and firm schedules, with comments if not approved, one line per person
+ Fields: Person name, published name, primary email, attendance type (in-person, virtual, hybrid), participant status, draft approval, draft comments, draft edited time, firm approval, firm comments, firm edited time
+ Person data included: people with a participant status that is not rejected, declined, or not_set, including those who are not assigned to any sessions
+
From 1f647fe3fcc47d42b3578cc50ecf6694605f5d8f Mon Sep 17 00:00:00 2001
From: dcterman <105614148+dcterman@users.noreply.github.com>
Date: Wed, 27 Jul 2022 19:17:14 -0400
Subject: [PATCH 43/47] Update version to 1.6.2
---
docs/index.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index da30c9c73..a20d191d1 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -7,8 +7,8 @@ This software is open source! If you'd like to contribute, please email planoram
[Planorama Data Privacy & Protection Policy](/planorama/privacy)
-Production version: 1.6.1
+Production version: 1.6.2
-Staging version: 1.6.1
+Staging version: 1.6.2
From 8f4443c52861b5844bfd9c5e171b25ca7b88aefa Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 19:41:46 -0400
Subject: [PATCH 44/47] PLAN-193 add confirmation on primary email change
---
.../components/email_addresses_editor.vue | 43 +++++++++++++++----
1 file changed, 34 insertions(+), 9 deletions(-)
diff --git a/app/javascript/components/email_addresses_editor.vue b/app/javascript/components/email_addresses_editor.vue
index b18f7ba89..ea1cac3cf 100644
--- a/app/javascript/components/email_addresses_editor.vue
+++ b/app/javascript/components/email_addresses_editor.vue
@@ -13,7 +13,7 @@
@@ -33,6 +33,10 @@
+
+ You are about to change the primary email address associated with this profile. This will change the login email used for this account.
+ Are you sure you wish to make this change?
+
@@ -42,11 +46,13 @@ import EmailAddressEditor from './email_address_editor.vue'
import emailAddressMixin from '../store/email_address.mixin'
import {personSessionMixin} from '@/mixins';
import modelUtilsMixin from "@/store/model_utils.mixin";
+import PlanoModal from './plano_modal.vue';
export default {
name: 'EmailAddressesEditor',
components: {
- EmailAddressEditor
+ EmailAddressEditor,
+ PlanoModal
},
mixins: [
modelUtilsMixin,
@@ -68,12 +74,11 @@ export default {
default: 'email-addresses-editor'
}
},
- data() {
- return {
- emails: [],
- additional: []
- }
- },
+ data: () => ({
+ emails: [],
+ additional: [],
+ pendingPrimaryChange: null
+ }),
computed: {
primary: {
get: function() {
@@ -102,7 +107,27 @@ export default {
)
}
},
- onInput(arg) {
+ onConfirmCancel() {
+ this.setLists()
+ this.pendingPrimaryChange = null;
+ },
+ onConfirmOk() {
+ this.saveEmail(this.pendingPrimaryChange).then(
+ () => {
+ this.setLists()
+ }
+ ).catch((err) => {
+ console.log("i caught an error", err)
+ this.setLists()
+ });
+ this.pendingPrimaryChange = null;
+ },
+ onInput(arg, isPrimary = false) {
+ if(isPrimary) {
+ this.$bvModal.show('primaryEmailConfirm')
+ this.pendingPrimaryChange = arg;
+ return;
+ }
if (arg.id) {
this.saveEmail(arg).then(
() => {
From 951009b9e87e1fa6952496a491950ecb18aaa717 Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 19:53:29 -0400
Subject: [PATCH 45/47] PLAN-534 fix last logged in format
---
app/javascript/people/people_table.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/javascript/people/people_table.vue b/app/javascript/people/people_table.vue
index ee89793f4..4af0e13fa 100644
--- a/app/javascript/people/people_table.vue
+++ b/app/javascript/people/people_table.vue
@@ -98,9 +98,10 @@
-
- {{new Date(item.current_sign_in_at).toLocaleString('en', {dateStyle:'medium', timeStyle: "short", hour12: false})}}
-
+
+ {{DateTime.fromISO(item.current_sign_in_at).toFormat("DDD, t ZZZZ")}}
+
+ {{PERSON_NEVER_LOGGED_IN}}
@@ -149,6 +150,8 @@ import searchStateMixin from '../store/search_state.mixin'
import { formatPersonScheduleApprovalState } from '@/store/person_schedule_approval';
import { FETCH_WORKFLOWS, scheduleWorkflowMixin } from '@/store/schedule_workflow';
import { mapActions } from 'vuex';
+import { PERSON_NEVER_LOGGED_IN } from '@/constants/strings';
+import { DateTime } from 'luxon';
export default {
name: 'PeopleTable',
@@ -171,6 +174,8 @@ export default {
editableIds: [],
selectedConState: null,
searchEmails: null,
+ PERSON_NEVER_LOGGED_IN,
+ DateTime
}),
computed: {
declinedRejected() {
From 0b572ff808fbb296d22ef06f0ab347d70c94bf19 Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 21:17:29 -0400
Subject: [PATCH 46/47] PLAN-600 PLAN-534 tweak the person table
- fix english in search
- make staff able to see *_signed_in_at
---
app/controllers/concerns/resource_methods.rb | 6 ++++--
app/javascript/people/people.js | 4 ++--
app/services/access_control_service.rb | 4 ++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/app/controllers/concerns/resource_methods.rb b/app/controllers/concerns/resource_methods.rb
index d7390d959..62df5a612 100644
--- a/app/controllers/concerns/resource_methods.rb
+++ b/app/controllers/concerns/resource_methods.rb
@@ -453,6 +453,8 @@ def translate_operator(operation:)
:not_in
when 'equals'
:eq
+ when 'equal'
+ :eq
when '='
:eq
when 'does not equal'
@@ -470,11 +472,11 @@ def translate_operator(operation:)
:gt
when '>'
:gt
- when 'is less than or equal'
+ when 'is less than or equal to'
:lteq
when '<='
:lteq
- when 'is greater than or equal'
+ when 'is greater than or equal to'
:gteq
when '>='
:gteq
diff --git a/app/javascript/people/people.js b/app/javascript/people/people.js
index 0a7bb68f0..9c1147437 100644
--- a/app/javascript/people/people.js
+++ b/app/javascript/people/people.js
@@ -40,7 +40,7 @@ export const people_columns = [
"not_set", "applied", "vetted", "wait_list", "invite_pending",
"invited", "probable", "accepted", "declined", "rejected"
].map(value => ({label: PERSON_CON_STATE[value], value})),
- operators: ["equal", "does not equal"],
+ operators: ["equals", "does not equal"],
sortable: false
},
{
@@ -52,7 +52,7 @@ export const people_columns = [
search_key: 'session_count',
label: 'Session Count',
type: "numeric",
- operators: ["equal", "does not equal", "is less than", "is less than or equal", "is greater than", "is greater than or equal"]
+ operators: ["equals", "does not equal", "is less than", "is less than or equal to", "is greater than", "is greater than or equal to"]
},
{
key: 'draft_approval',
diff --git a/app/services/access_control_service.rb b/app/services/access_control_service.rb
index 1fe39eb90..68efc6633 100644
--- a/app/services/access_control_service.rb
+++ b/app/services/access_control_service.rb
@@ -11,8 +11,8 @@ def self.attribute_meta_data
pseudonym: { sensitive: false, linkable: true, type: :string},
primary_email: { sensitive: false, linkable: false, type: :email},
contact_email: { sensitive: false, linkable: true, type: :email},
- last_sign_in_at: { sensitive: true, linkable: false, type: :datetime},
- current_sign_in_at: { sensitive: true, linkable: false, type: :datetime},
+ last_sign_in_at: { sensitive: false, linkable: false, type: :datetime},
+ current_sign_in_at: { sensitive: false, linkable: false, type: :datetime},
pronouns: { sensitive: false, linkable: true, type: :string},
year_of_birth: { sensitive: true, linkable: false, type: :integer},
gender: { sensitive: true, linkable: true, type: :string},
From 3a7ed520506fbb261456c5be27ee406c83f3098f Mon Sep 17 00:00:00 2001
From: Gail Terman
Date: Wed, 27 Jul 2022 21:40:42 -0400
Subject: [PATCH 47/47] PLAN-193 add confirmation to make primary radio button
---
app/javascript/components/email_addresses_editor.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/javascript/components/email_addresses_editor.vue b/app/javascript/components/email_addresses_editor.vue
index ea1cac3cf..47a5adcc5 100644
--- a/app/javascript/components/email_addresses_editor.vue
+++ b/app/javascript/components/email_addresses_editor.vue
@@ -13,7 +13,7 @@
@@ -122,8 +122,8 @@ export default {
});
this.pendingPrimaryChange = null;
},
- onInput(arg, isPrimary = false) {
- if(isPrimary) {
+ onInput(arg) {
+ if(arg.isdefault) {
this.$bvModal.show('primaryEmailConfirm')
this.pendingPrimaryChange = arg;
return;