From: Mike Rylander Date: Mon, 24 Jul 2017 20:41:08 +0000 (-0400) Subject: serials: Display existing item notes in the receiving modal X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=695f72167999eecfb81dc62cc0144d560c174372;p=working%2FEvergreen.git serials: Display existing item notes in the receiving modal Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/templates/staff/serials/index.tt2 b/Open-ILS/src/templates/staff/serials/index.tt2 index 17f152b403..040bc21e62 100644 --- a/Open-ILS/src/templates/staff/serials/index.tt2 +++ b/Open-ILS/src/templates/staff/serials/index.tt2 @@ -37,6 +37,8 @@ angular.module('egCoreMod').run(['egStrings', function(s) { s.SERIALS_SCAP_FAIL_DELETE = "[% l('Failed to delete serial prediction pattern') %]"; s.SERIALS_ISSUANCE_FAIL_SAVE = "[% l('Failed to save issuance') %]"; s.SERIALS_ISSUANCE_SUCCESS_SAVE = "[% l('Issuance saved') %]"; + s.SERIALS_ITEM_NOTE_FAIL_SAVE = "[% l('Failed to save item notes') %]"; + s.SERIALS_ITEM_NOTE_SUCCESS_SAVE = "[% l('Item notes saved') %]"; s.SERIALS_DISTRIBUTION_SUCCESS_LINK_MFHD = "[% l('Distribution linked to MFHD') %]"; s.SERIALS_DISTRIBUTION_FAIL_LINK_MFHD = "[% l('Failed to link distribution to MFHD') %]"; s.SERIALS_DISTRIBUTION_SUCCESS_BINDING_TEMPLATE = "[% l('Binding unit template applied to Distribution') %]"; diff --git a/Open-ILS/src/templates/staff/serials/t_batch_receive.tt2 b/Open-ILS/src/templates/staff/serials/t_batch_receive.tt2 index 9ff469e73c..d688669131 100644 --- a/Open-ILS/src/templates/staff/serials/t_batch_receive.tt2 +++ b/Open-ILS/src/templates/staff/serials/t_batch_receive.tt2 @@ -38,6 +38,8 @@
[% l('Library : Distribution/Stream') %] +
+
[% l('Item notes') %]
[% l('Issuance') %] @@ -102,6 +104,12 @@
{{item.stream().distribution().holding_lib().name()}}: {{item.stream().distribution().label()}}/{{item.stream().routing_label()}} +
+
+
{{note.title()}}
+
{{note.value()}}
+
+
{{item.issuance().label()}} diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js b/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js index 627bb2ceee..f1b1b9c755 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/view-items-grid.js @@ -431,10 +431,9 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , orderByF backdrop: 'static', keyboard: false }).result.then(function(notes) { - console.log('results',notes); egCore.pcrud.apply(notes).then( - function(a) { console.log('toast here 1',a); }, - function(a) { console.log('toast here 2',a); } + function(a) { ngToast.success(egCore.strings.SERIALS_ITEM_NOTE_SUCCESS_SAVE) }, + function(a) { ngToast.danger(egCore.strings.SERIALS_ITEM_NOTE_FAIL_SAVE) } ); }); } @@ -507,8 +506,6 @@ function($scope , $uibModalInstance , egCore , note_type , rows , notes ) { if ( (typeof note.title != 'undefined' && note.title != '') || (typeof note.value != 'undefined' && note.value != '')) { angular.forEach(rows, function (r) { - console.log('r',r); - window.my_r = r; var n; switch(note_type) { case 'subscription': @@ -538,7 +535,6 @@ function($scope , $uibModalInstance , egCore , note_type , rows , notes ) { return_notes.push( n ); } }); - window.return_notes = return_notes; $uibModalInstance.close(return_notes); } diff --git a/Open-ILS/web/js/ui/default/staff/serials/services/core.js b/Open-ILS/web/js/ui/default/staff/serials/services/core.js index 2d989a50ef..d7012b8bd8 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/services/core.js +++ b/Open-ILS/web/js/ui/default/staff/serials/services/core.js @@ -233,7 +233,7 @@ function(egCore , orderByFilter , $q , $filter , $uibModal , ngToast , egConfirm order_by : [{class:'sitem',field:'date_expected'}], // best aprox of pub date flesh : 1, flesh_fields : { - sitem : ['issuance','editor','creator','unit','url'] + sitem : ['notes','issuance','editor','creator','unit','url'] } }); if (sort) {