From 51ce880c0a35c69fcadff5b846793b3b30c46e0e Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Wed, 8 Jan 2020 09:05:58 -0500 Subject: [PATCH] lp1846354 staff client changes References to Message or Messages in the UI, including the button bar that spawns the interface, will be changed to Note and Notes. The Alert Message field in the patron editor will be removed. The Notes interface under Other -> Notes will be removed. The Notes (and count) indicator in the patron summary sidebar will be removed. The note count will instead be presented as part of the Notes nav button. The patron summary sidebar and the "stop sign page" will be modified to retrieve and display user messages linked to standing penalties that are flagged as staff alerting. It will retain the same styling (i.e. red text) by default. The Messages interface, including the archived view, will be populated with a combination of user messages and user penalties, which may or may not be linked in pairs via a new foreign key on the penalties. For messages without associated standing penalties, the sending_lib column will be used for the implicit filtering on org units that standing penalties get now, based on the workstation library. This combined view will result in new columns for the interface. At minimum the following columns (subject to label changes) will be displayed by default: Title, Message, Create Date, Creator, Library, and Patron Visible. Columns such as Staff Alert, Org Depth, Block List, Ignore Proximity, and Penalty Label will still be available. The Apply Penalty / Message dialog will gain a new widget for toggling whether or not a message is intended to be visible to the patron. The Edit message version of the dialog will also show when/if a patron has read and/or deleted the message. An entry field for the message title will be added. The dialog will also gain an org selector to the right of the penalty type selector, which will default to the workstation library, and will change based on the org depth of any standing penalty type selected in the UI (either via the Note/Alert/Block buttons or the penalty menu). This will be passed as the org_unit field for a penalty instead of the workstation library and org depth that is implicitly used today The sending_lib field for the user message will always be set to the workstation library. The Archive Penalty / Message action will be modified to work with both penalties and user messages depending on what it is selected. If an archived penalty has a linked user message, then both will have their archive fields set. An archived user message may still be otherwise visible to the patron if it is not marked as deleted or staff only. The Remove Penalty / Message action will behave as normal for a selected penalty. For a user message, linked or unlinked, the message will be flagged as deleted and, even if public, will no longer show up in the patron's Message Center. Signed-off-by: Jason Etheridge Signed-off-by: Mike Rylander --- .../src/templates/actor/user/register_table.tt2 | 1 - Open-ILS/src/templates/staff/circ/patron/index.tt2 | 16 +- .../src/templates/staff/circ/patron/t_alerts.tt2 | 23 +-- .../src/templates/staff/circ/patron/t_edit.tt2 | 18 -- .../src/templates/staff/circ/patron/t_messages.tt2 | 64 ++++--- .../src/templates/staff/circ/patron/t_summary.tt2 | 14 +- .../staff/circ/share/t_new_message_dialog.tt2 | 84 ++++++-- Open-ILS/src/templates/staff/css/circ.css.tt2 | 1 + .../staff/share/print_templates/t_patron_data.tt2 | 1 - Open-ILS/web/js/ui/default/actor/user/register.js | 2 - .../js/ui/default/staff/admin/workstation/app.js | 1 - .../web/js/ui/default/staff/circ/patron/app.js | 212 ++++++++++++++++---- .../web/js/ui/default/staff/circ/patron/regctl.js | 2 - .../web/js/ui/default/staff/circ/services/circ.js | 213 ++++++++++++++++++--- Open-ILS/web/js/ui/default/staff/services/auth.js | 28 +++ .../js/ui/default/staff/services/patron_search.js | 1 - Open-ILS/web/js/ui/default/staff/services/ui.js | 21 +- 17 files changed, 528 insertions(+), 174 deletions(-) diff --git a/Open-ILS/src/templates/actor/user/register_table.tt2 b/Open-ILS/src/templates/actor/user/register_table.tt2 index 8235c65772..37ff89305d 100644 --- a/Open-ILS/src/templates/actor/user/register_table.tt2 +++ b/Open-ILS/src/templates/actor/user/register_table.tt2 @@ -60,7 +60,6 @@ - diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2 index a36c758953..bee3b2acbc 100644 --- a/Open-ILS/src/templates/staff/circ/patron/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2 @@ -70,7 +70,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) { s.PAGE_TITLE_PATRON_SEARCH = "[% l('Patron Search') %]"; s.PAGE_TITLE_PATRON_NAME = "[% l('[_1], [_2] [_3]', '{{lname}}','{{fname}}','{{mname}}') %]"; s.PAGE_TITLE_PATRON_CHECKOUT = "[% l('Checkout') %]"; - s.PAGE_TITLE_PATRON_MESSAGES = "[% l('Messages') %]"; + s.PAGE_TITLE_PATRON_MESSAGES = "[% l('Notes') %]"; /* TODO: The "Other" page title could be smarter.. */ s.PAGE_TITLE_PATRON_OTHER = "[% l('Other') %]"; s.PAGE_TITLE_PATRON_BILLS = "[% l('Bills') %]"; @@ -107,7 +107,6 @@ angular.module('egCoreMod').run(['egStrings', function(s) { -

Notes  {{patron().notes().length}}

  • - [% l('Messages') %] + [% l('Notes') %] + + ({{visible_notes().length}}) + +
  • [% l('Edit') %] @@ -168,12 +171,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
  • - -
    -
    -
    -
    -
    [% l('Alert Message') %]
    -
    -
    - {{patron().alert_message()}} -
    -
    -
    -
    -
    -
    [% l('Penalties') %]
    +
    [% l('Alerts') %]
    - {{penalty.standing_penalty().label()}} -
    {{penalty.note()}}
    + title="{{penalty.standing_penalty().name()}} (id {{penalty.id()}})"> + {{penalty.usr_message().title() || penalty.standing_penalty().label()}} +
    {{penalty.usr_message().message()}}
    +
     
    {{penalty.set_date() | date:$root.egDateFormat}} diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 index 1a8bb24181..b17bee7907 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -671,24 +671,6 @@ within the "form" by name for validation.
    - - -
    - [% draw_field_label('au', 'alert_message') %] -
    - -
    -
    - [% draw_example_text('au', 'alert_message') %] -
    -
    -
    -
    -
    - {{patron().alert_message()}} -
    -
    [% l('Patron account will expire soon. Please renew.') %]
    @@ -40,7 +32,7 @@
    + ng-class="{'patron-summary-divider' : alert_penalties().length}">
    [% l('Profile') %]
    {{patron().profile().name()}}
    diff --git a/Open-ILS/src/templates/staff/circ/share/t_new_message_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_new_message_dialog.tt2 index d588f8bf4c..0637a63c83 100644 --- a/Open-ILS/src/templates/staff/circ/share/t_new_message_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/share/t_new_message_dialog.tt2 @@ -1,39 +1,93 @@ -
    +