s.CONFIRM_DELETE_SCAP_MESSAGE = "[% l('Will delete the prediction pattern if there are no attached issuances.') %]";
s.CONFIRM_CHANGE_ITEMS = {};
- s.CONFIRM_CHANGE_ITEMS_MESSAGE = {};
s.CONFIRM_CHANGE_ITEMS.delete = "[% l('Delete selected item(s)?') %]";
- s.CONFIRM_CHANGE_ITEMS_MESSAGE.delete = "[% l('Will delete {{items}} item(s).') %]";
s.CONFIRM_CHANGE_ITEMS.reset = "[% l('Reset selected items?') %]"
- s.CONFIRM_CHANGE_ITEMS_MESSAGE.reset = "[% l('Will reset {{items}} item(s) to Expected and remove unit(s).') %]";
s.CONFIRM_CHANGE_ITEMS.receive = "[% l('Receive selected items?') %]"
- s.CONFIRM_CHANGE_ITEMS_MESSAGE.receive = "[% l('Will receive {{items}} item(s) without barcoding.') %]";
s.CONFIRM_CHANGE_ITEMS.status = "[% l('Change status selected items?') %]"
- s.CONFIRM_CHANGE_ITEMS_MESSAGE.status = "[% l('Will change status of {{items}} item(s).') %]";
s.CONFIRM_DELETE_MFHDS = "[% l('Delete selected MFHD(s)?') %]";
s.CONFIRM_DELETE_MFHDS_MESSAGE = "[% l('Will delete {{items}} MFHD(s).') %]";
<div class="col-md-3">
<b>[% l('Library : Distribution/Stream') %]</b>
<br/>
- <dl class="dl-horizontal"><dt>[% l('Item notes') %]</dt></dl>
+ <dl class="dl-horizontal"><dt>[% l('Notes') %]</dt></dl>
</div>
<div class="col-md-1">
<b>[% l('Issuance') %]</b>
<div class="col-md-3">
{{item.stream().distribution().holding_lib().name()}}: {{item.stream().distribution().label()}}/{{item.stream().routing_label()}}
<dl class="dl-horizontal">
+ <div ng-repeat="note in item.stream().distribution().subscription().notes()">
+ <div ng-show="note.alert() == 't'">
+ <dt>{{note.title()}}</dt>
+ <dd>{{note.value()}}</dd>
+ </div>
+ </div>
+ <div ng-repeat="note in item.stream().distribution().notes()">
+ <div ng-show="note.alert() == 't'">
+ <dt>{{note.title()}}</dt>
+ <dd>{{note.value()}}</dd>
+ </div>
+ </div>
<div ng-repeat="note in item.notes()">
- <dt>{{note.title()}}</dt>
- <dd>{{note.value()}}</dd>
+ <div ng-show="note.alert() == 't'">
+ <dt>{{note.title()}}</dt>
+ <dd>{{note.value()}}</dd>
+ </div>
</div>
<dl>
</div>
var deferred = $q.defer();
var current_promise = deferred.promise;
var last_promise;
+
+ var sitem_alerts = [];
+ var sdist_alerts = [];
+ var ssub_alerts = list[0].stream().distribution().subscription().notes().filter(function(n){
+ return n.alert() == 't';
+ })
+
+ var dist_seen = {};
+ angular.forEach(list, function(i) {
+ sitem_alerts = sitem_alerts.concat(
+ i.notes().filter(function(n){
+ return n.alert() == 't';
+ })
+ );
+ var sdist = '_'+i.stream().distribution().id();
+ if (!dist_seen[sdist]) {
+ dist_seen[sdist] = 1;
+ sdist_alerts = sdist_alerts.concat(
+ i.stream().distribution().notes().filter(function(n){
+ return n.alert() == 't';
+ })
+ );
+ }
+ });
+
if (do_barcode || bind) {
last_promise = current_promise.then(function(){ return $uibModal.open({
$scope.force_bind = bind;
$scope.bind = bind;
$scope.items = list;
+ $scope.ssub_alerts = ssub_alerts;
+ $scope.sdist_alerts = sdist_alerts;
+ $scope.sitem_alerts = sitem_alerts;
$scope.acn_list = [];
$scope.acnp_labels = [];
$scope.acns_labels = [];
}]
}).result});
} else {
- last_promise = current_promise.then(function(){
- return egConfirmDialog.open(
- egCore.strings.CONFIRM_CHANGE_ITEMS[mode],
- egCore.strings.CONFIRM_CHANGE_ITEMS_MESSAGE[mode],
- {items : list.length}
- ).result.then(function () {
+ last_promise = current_promise.then(function(){ return $uibModal.open({
+ templateUrl: './serials/t_receive_alerts',
+ controller:
+ ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) {
+ $scope.title = egCore.strings.CONFIRM_CHANGE_ITEMS[mode];
+ $scope.items = list.length;
+ $scope.list = list;
+ $scope.mode = mode;
+ $scope.ssub_alerts = ssub_alerts;
+ $scope.sdist_alerts = sdist_alerts;
+ $scope.sitem_alerts = sitem_alerts;
+
+ $scope.ok = function(items) { $uibModalInstance.close(items) }
+ $scope.cancel = function () { $uibModalInstance.dismiss() }
+ }]
+ }).result.then(
+ function(items) {
angular.forEach(list, function (i, index) {
i._receive = true;
});
return $q.when(list);
- });
+ })
});
}