lp1774277 Improvements to Patron Acquisition Request
authorJason Etheridge <jason@EquinoxInitiative.org>
Mon, 12 Mar 2018 22:02:47 +0000 (18:02 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 5 Sep 2018 00:20:14 +0000 (20:20 -0400)
commite9a9875da27e85e8437c082b6e40ad39ff9a1ba6
tree4efbf9454accfcd5be51d9a7f0cf4d8c22de0c16
parentc68550260497e050307b49b0743e339f96417b53
lp1774277 Improvements to Patron Acquisition Request

Squashed and rebased against master, this is an Angular reimplementation of the
Patron Acquisition Request user interface with some improvements.  It still
reaches into the Dojo-based Acquisition interfaces.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
toward acq requests

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
4-status-not-updating-to-recieved-unless-all-items-in-order-are-recieved

Change to acq patron request status logic, which now looks like this:

If a cancel_reason is set on the patron request, then status = "Canceled"

If there is an associated hold request that has fulfillment_time set,
then status = 'Fulfilled"

If there is an associated lineitem has a state of "received", then status =
"Received"

If there is an associated purchase order with a state of "on-order" and an
associated hold request, then status = "Ordered, Hold Placed"

If there is an associated purchase order with a state of "on-order" but no
associated hold request (created through the automated process), then status =
"Ordered, Hold Not Placed"

If there is an associated lineitem (selection list), then status = "Pending"

If there is no associated lineitem, then status = "New"

Any other condition, which should be impossible (I should never say that), will
give a status of "Error"

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
6-upc-not-on-patron-request-form

Adds a UPC column to the patron acq request table

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
2-hold-request-fields-that-make-use-of-user-preferences

For new requests (or edited requests when a user barcode is scanned), the user's
preferences (if any) for hold notifications and pickup library will be used to
set various fields in the request dialog.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
5-pick-up-library-not-defaulting-to-patrons-home-library

when creating new requests, given a user, default to the user's pickup library
preference setting, or absent a preference, default to their home library.

Absent a user, default to the pickup library selector value from the request
list, if it's of an org type that can have volumes.  Otherwise, default to the
workstation library.  Technically, the without-a-user behavior is going to be
mooted whenever a user is chosen.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
5-pick-up-library-not-defaulting-to-patrons-home-library

Fix defaulting to patron home library in absense of user setting when creating
acq patron request from user context

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
misc fixes

to the IDL and for the email_notify checkbox.

some refactoring to avoid using foreign fields in the request object

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
7-retrieve-patron-fails-to-load-patron-record

give the user_request.view permission some parity with VIEW_USER

And some defensive programming if trying to create a request in
the user already known context without adequate permission

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
handle undefined values for email/hold checkboxes

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
remove acq.holds.allow_holds_from_purchase_request

This was added a long time ago but never actually used by the code.

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
match pcrud perm for aur with aurs

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
live_t/ test

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
19 files changed:
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
Open-ILS/src/perlmods/live_t/22-acq-requests.t [new file with mode: 0644]
Open-ILS/src/sql/Pg/200.schema.acq.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.schema.acq.patron_requests.sql [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/index.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_cancel.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_clear.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_edit.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_list.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_set_no_hold.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/acq/requests/t_set_yes_hold.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/circ/patron/index.tt2
Open-ILS/src/templates/staff/navbar.tt2
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/picklist/brief_record.js
Open-ILS/web/js/ui/default/staff/acq/requests/list.js [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/acq/services/requests.js [new file with mode: 0644]