s.PATRON_BLOCKED_WHY.D = "[% l('Patron has penalties') %]";
s.PATRON_BLOCKED_WHY.L = "[% l('Barcode is reported Lost') %]";
s.PATRON_BLOCKED_WHY.E = "[% l('Patron account is Expired') %]";
- s.PATRON_BLOCKED_WHY.B = "[% l('Warning: as of [_1], this barcode ([_2]) was flagged Expired.', '{{formatted_date}}', '{{pbarcode}}') %]";
+ s.PATRON_BLOCKED_WHY.B = "[% l('Warning: Barcode [_2] was flagged Expired in block list downloaded [_1].', '{{formatted_date}}', '{{pbarcode}}') %]";
}]);
</script>
egLovefield.getOfflineBlockDate().then(
function(blockListDateResp) {
- $scope.blockListDate = Math.round(blockListDateResp.getTime()/1000);
- console.log("get blocklistdate=");
- console.log($scope.blockListDate)
+ if (blockListDateResp) {
+ $scope.blockListDate =
+ Math.round(blockListDateResp.getTime() / 1000);
+ }
},
function() {
- console.log("Error when retrieving block list download date");
+ console.error("Error when retrieving block list download date");
}
);
egCore.org.settings(['format.date']).then(function(set) {
if (set && set['format.date']) default_format = set['format.date'];
$scope.date_format = default_format;
- var fBlockListDate = $filter('date')(($scope.blockListDate * 1000), $scope.date_format)
+ var fBlockListDate = $scope.blockListDate ?
+ $filter('date')(($scope.blockListDate * 1000), $scope.date_format) :
+ null;
egConfirmDialog.open(
egCore.strings.PATRON_BLOCKED,
egCore.strings.PATRON_BLOCKED_WHY[blocked],