From 187ab236a4e2c05d059066df4529ced39e1f0f58 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Sat, 31 Mar 2012 12:17:40 -0400 Subject: [PATCH] [in progress] New pull list interface taking advantage of flattener for speed, and advanced sorting. Groundwork only. This isn't done yet. Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/examples/fm_IDL.xml | 77 +++++++++++++++++++++- .../Pg/upgrade/XXXX.schema.hold-pull-list-view.sql | 25 +++++++ Open-ILS/src/templates/circ/hold_pull_list.tt2 | 45 +++++++++++++ .../web/js/dojo/openils/widget/FlattenerGrid.js | 7 ++ 4 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql create mode 100644 Open-ILS/src/templates/circ/hold_pull_list.tt2 diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index fe0af0dc96..2947880028 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4763,7 +4763,7 @@ SELECT usr, - + @@ -4826,6 +4826,74 @@ SELECT usr, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time) @@ -7770,7 +7838,7 @@ SELECT usr, - + @@ -7788,6 +7856,11 @@ SELECT usr, + + + + + diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql new file mode 100644 index 0000000000..3f38730bdc --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql @@ -0,0 +1,25 @@ +-- Evergreen DB patch XXXX.schema.hold-pull-list-view.sql +-- +-- FIXME: insert description of change, if needed +-- +BEGIN; + + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +CREATE VIEW action.hold_pull_list AS + SELECT + ahr.*, + COALESCE(999, acplo.position) AS copy_location_order_position + FROM action.hold_request ahr + JOIN asset.copy acp ON (acp.id = ahr.current_copy) + LEFT JOIN asset.copy_location_order acplo + ON (acp.location = acplo.location AND acp.circ_lib = acplo.org) + WHERE + ahr.capture_time IS NULL AND + ahr.cancel_time IS NULL AND + (ahr.expire_time is NULL OR ahr.expire_time > NOW()) ; + + +COMMIT; diff --git a/Open-ILS/src/templates/circ/hold_pull_list.tt2 b/Open-ILS/src/templates/circ/hold_pull_list.tt2 new file mode 100644 index 0000000000..31ec209a5c --- /dev/null +++ b/Open-ILS/src/templates/circ/hold_pull_list.tt2 @@ -0,0 +1,45 @@ +[% WRAPPER base.tt2 %] +[% ctx.page_title = 'Hold Pull List' %] + +
+
+
Hold Pull List
+
+ +
+
+ + + + + + + + + + + +
BarcodeShelving Location
+
+[% END %] diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js index a18cd4aba4..230974d05e 100644 --- a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js @@ -158,6 +158,13 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) { var field_def = fieldmapper.IDL.fmclasses[hint].field_map[field]; + if (!field_def) { + throw new Error( + "Lost our way in IDL at hint " + hint + + ", field " + field + ); + } + if (field_def["class"] && path.length) { last_field = field; last_hint = hint; -- 2.11.0