From e9b7b429123901db36dabdff232363a24671a488 Mon Sep 17 00:00:00 2001 From: Ana Ulin Date: Sat, 11 Dec 2021 10:36:07 -0800 Subject: [PATCH 1/2] Add partial explaining what the different door codes mean. --- .../admin/door_codes/_status_legend.html.erb | 22 +++++++++++++++++++ app/views/admin/door_codes/index.html.erb | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 app/views/admin/door_codes/_status_legend.html.erb diff --git a/app/views/admin/door_codes/_status_legend.html.erb b/app/views/admin/door_codes/_status_legend.html.erb new file mode 100644 index 00000000..07134648 --- /dev/null +++ b/app/views/admin/door_codes/_status_legend.html.erb @@ -0,0 +1,22 @@ +
+

What door code statuses mean

+ +
diff --git a/app/views/admin/door_codes/index.html.erb b/app/views/admin/door_codes/index.html.erb index 15608b86..b125e1ba 100644 --- a/app/views/admin/door_codes/index.html.erb +++ b/app/views/admin/door_codes/index.html.erb @@ -12,6 +12,8 @@ There are no door codes in the database yet! <% end %> +<%= render partial: 'status_legend' %> + From fcb93c6e118cb6a1bd4533154d71c2df2080ecd2 Mon Sep 17 00:00:00 2001 From: Ana Ulin Date: Sat, 11 Dec 2021 10:53:11 -0800 Subject: [PATCH 2/2] Add legend explaining what the different code statuses mean. --- .../admin/door_codes/_status_legend.html.erb | 33 +++++++++---------- app/views/admin/door_codes/edit.html.erb | 4 +++ app/views/admin/door_codes/new.html.erb | 4 +++ 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/app/views/admin/door_codes/_status_legend.html.erb b/app/views/admin/door_codes/_status_legend.html.erb index 07134648..0379e727 100644 --- a/app/views/admin/door_codes/_status_legend.html.erb +++ b/app/views/admin/door_codes/_status_legend.html.erb @@ -1,22 +1,21 @@

What door code statuses mean

-
    -
  • - not_in_lock: code exists in the database, but not in the physical door lock -
  • -
  • - in_lock: code exists in the lock -
  • -
  • - formerly_assigned_in_lock: code used to be assigned to a member, but is no longer assigned; +
    +
    not_in_lock
    +
    code exists in the database, but not in the physical door lock
    +
    in_lock
    +
    code exists in the lock
    +
    formerly_assigned_in_lock
    +
    + code used to be assigned to a member, but is no longer assigned; this code exists in the lock (we probably want to remove it!) -
  • -
  • - formerly_assigned_not_in_lock: code used to be assigned to a member, and is not in the lock; + +
    formerly_assigned_not_in_lock
    +
    + code used to be assigned to a member, and is not in the lock; we keep it in the database to prevent code reuse -
  • -
  • - denylisted: we don't allow this code to be used -
  • -
+ +
denylisted
+
we don't allow this code to be used
+
diff --git a/app/views/admin/door_codes/edit.html.erb b/app/views/admin/door_codes/edit.html.erb index 14c95286..aecb15ff 100644 --- a/app/views/admin/door_codes/edit.html.erb +++ b/app/views/admin/door_codes/edit.html.erb @@ -1,3 +1,7 @@

Edit Door Code

<%= render partial: 'form', locals: { door_code: door_code} %> + +
+ +<%= render partial: 'status_legend' %> diff --git a/app/views/admin/door_codes/new.html.erb b/app/views/admin/door_codes/new.html.erb index 06898f99..27dbdac3 100644 --- a/app/views/admin/door_codes/new.html.erb +++ b/app/views/admin/door_codes/new.html.erb @@ -1,3 +1,7 @@

Add New Door Code

<%= render partial: 'form', locals: { door_code: door_code} %> + +
+ +<%= render partial: 'status_legend' %>