if (patronProfile == 'Staff members') {
result.durationRule = '3_weeks_2_renew';
}
-if (patronProfile == 'Readers') {
+if (patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') {
result.durationRule = '3_weeks_2_renew';
}
-
log_info('final duration results: ' +
result.durationRule + ' : ' + result.recurringFinesRule + ' : ' + result.maxFine );
var temp_array = patronProfile.split(" ");
var profileFirst = temp_array[0];
- if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') {
// use override value - Non-Law Readers can borrow nothing
- } else if (patronProfile == 'Readers' && copy.circ_modifier == 'LAW_MONO') {
+ } else if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && copy.circ_modifier == 'LAW_MONO') {
result.durationRule = 'OWAL_' + profileFirst; // Law Readers can only borrow LAW_MONO items
} else {
switch(copy.circ_modifier) {
overdueThreshold : 100,
maxHolds : -1
},
+ 'Alumni' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
+ 'College Students' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
+ 'High School Students' : {
+ maxItemsOut : 15,
+ fineThreshold : 10,
+ overdueThreshold : 100,
+ maxHolds : -1
+ },
}
/* custom functions for Windsor libraries */
function isValidPatron(patronProfile) {
- var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers'];
+ var valid_patrons = ['Faculty', 'Graduate', 'Undergraduate', 'Staff members', 'Readers', 'Alumni', 'College Students', 'High School Students'];
for (var i = 0; i < valid_patrons.length; i++) {
if (valid_patrons[i] == patronProfile) {
return true;
if (isValidPatron(patronProfile)) {
// only Law external borrowers can borrow Law items
- if (patronProfile == 'Readers' && patron.home_ou.shortname != 'OWAL') {
+ if ((patronProfile == 'Readers' || patronProfile == 'Alumni' || patronProfile == 'College Students' || patronProfile == 'High School Students') && patron.home_ou.shortname != 'OWAL') {
result.events.push('COPY_CIRC_NOT_ALLOWED');
}