</div>
</form>
</div>
+ <div class="col-md-8">
+ <div class="flex-row">
+ <div class="pad-horiz" ng-if="is_backdate()">
+ <div class="alert-danger pad-min">
+ [% l('Backdated Check In [_1]',
+ '{{checkinArgs.backdate | date:"shortDate"}}') %]
+ </div>
+ </div>
+ <div class="flex-cell"></div>
+ <div class="pad-horiz">[% l('Effective Date') %]</div>
+ <!-- date max= not yet supported -->
+ <div><input eg-date-input
+ class="form-control" ng-model="checkinArgs.backdate"/>
+ </div>
+ </div>
+ </div>
+
</div>
+<hr/>
+
[% INCLUDE 'staff/circ/checkin/t_checkin_table.tt2' %]
[% END %]
s.CHECKOUT_FAILED_GENERIC =
'[% l('Unable to checkout copy "[_1]" : [_2]', '{{barcode}}', '{{textcode}}') %]';
s.COPY_ALERT_MSG_DIALOG_TITLE =
- '[% l('Copy Alert Message for "[_1]"', '{{copy_barcode}}') %]';
+ '[% l('Copy Alert Message for "[_1]"', '{{copy_barcode}}') %]';
s.UNCAT_ALERT_DIALOG =
- '[% l('Copy "[_1]" was mis-scanned or is not cataloged', '{{copy_barcode}}') %]';
+ '[% l('Copy "[_1]" was mis-scanned or is not cataloged', '{{copy_barcode}}') %]';
s.PERMISSION_DENIED =
- '[% l('Permission Denied : [_1]', '{{permission}}') %]';
+ '[% l('Permission Denied : [_1]', '{{permission}}') %]';
+s.PRECAT_CHECKIN_MSG =
+ '[% l("This item needs to be routed to CATALOGING") %]';
}]);
</script>
.pad-horiz {padding : 0px 10px 0px 10px; }
.pad-vert {padding : 20px 0px 10px 0px;}
+.pad-min {padding : 5px; }
#print-div { display: none; }
$scope.focusMe = true;
$scope.checkins = checkinSvc.checkins;
+ $scope.checkinArgs = {backdate : new Date()}
+ var today = new Date();
+
+ $scope.$watch('checkinArgs.backdate', function(newval) {
+ if (newval && newval > today)
+ $scope.checkinArgs.backdate = today;
+ });
+
+ $scope.is_backdate = function() {
+ return $scope.checkinArgs.backdate < today;
+ }
+
var checkinGrid = $scope.gridControls = {};
$scope.gridDataProvider = egGridDataProvider.instance({
$scope.checkin = function(args) {
if (args && args.copy_barcode) {
+ var params = angular.copy(args);
+
+ if (params.backdate) {
+ params.backdate =
+ params.backdate.toISOString().replace(/T.*/,'');
+
+ // a backdate of 'today' is not really a backdate
+ if (params.backdate == $scope.max_backdate)
+ delete params.backdate;
+ }
- egCirc.checkin(angular.copy(args))
+ egCirc.checkin(angular.copy(params))
.then(function(final_resp) {
final_resp.evt.index = checkinSvc.checkins.length;
checkinSvc.checkins.unshift(final_resp.evt);
egCore.strings.UNCAT_ALERT_DIALOG, params)
.result.then(function() {return final_resp});
+ case 'ITEM_NOT_CATALOGED':
+ return egAlertDialog.open(
+ egCore.strings.PRECAT_CHECKIN_MSG, params)
+ .result.then(function() {return final_resp});
+
case 'COPY_ALERT_MESSAGE':
return service.copy_alert_dialog(evt, params, options, 'checkin');
+
default:
console.warn('unhandled checkin response : ' + evt.textcode);
return $q.when(final_resp);