<!ENTITY staff.admin.survey.save_question.label "Save this Question">
<!ENTITY staff.admin.survey.staff_client.label "Staff Client:">
<!ENTITY staff.admin.survey.start.label "Start:">
-<!ENTITY staff.admin.work_log.list1.header "Most Recent Staff Actions">
-<!ENTITY staff.admin.work_log.list2.header "Most Recently Affected Patrons and Last Action for each">
+<!ENTITY staff.admin.work_log.list1.header "Most Recently Logged Staff Actions">
+<!ENTITY staff.admin.work_log.list2.header "Most Recently Affected Patrons for Logged Staff Actions and Last Action for each">
<!ENTITY staff.admin.work_log.refresh_btn.label "Refresh">
<!ENTITY staff.admin.work_log.refresh_btn.accesskey "">
<!ENTITY staff.admin.work_log.list1.retrieve_item_btn.label "Retrieve Item">
'cmd_patron_register' : [
['oncommand'],
function() {
+
+ function log_registration(p) {
+ try {
+ obj.error.work_log(
+ document.getElementById('offlineStrings').getFormattedString(
+ 'staff.circ.work_log_patron_registration.message',
+ [
+ ses('staff_usrname'),
+ p.family_name(),
+ p.card().barcode()
+ ]
+ ), {
+ 'au_id' : p.id(),
+ 'au_family_name' : p.family_name(),
+ 'au_barcode' : p.card().barcode()
+ }
+ );
+ } catch(E) {
+ obj.error.sdump('D_ERROR','Error with work_logging in menu.js, cmd_patron_register:' + E);
+ }
+ }
+
function spawn_editor(p) {
var url = urls.XUL_PATRON_EDIT;
var param_count = 0;
'passthru_content_params' : {
'spawn_search' : function(s) { obj.spawn_search(s); },
'spawn_editor' : spawn_editor,
+ 'on_save' : function(p) { log_registration(p); }
}
}
);
'ses' : ses(),
'spawn_search' : function(s) { obj.spawn_search(s); },
'spawn_editor' : spawn_editor,
+ 'on_save' : function(p) { log_registration(p); }
}
}
);
menu.cmd_search_tcn.deleted.error="%1$s" is deleted. Show the deleted record anyway?
menu.cmd_patron_register.related.tab=Editing Related Patron
menu.cmd_patron_register.tab=Register Patron
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode
+staff.circ.work_log_patron_registration.message=%1$s registered %3$s (%2$s)
menu.cmd_browse_holds.tab=Hold Browser
menu.cmd_browse_holds_shelf.tab=Holds Shelf
menu.cmd_browse_hold_pull_list.tab=On Shelf Pull List
try {
var check = req.getResultObject();
var r = circ.util.checkin_via_barcode2(session,params,backdate,auto_print,check);
+ try {
+ error.work_log(
+ document.getElementById('circStrings').getFormattedString(
+ 'staff.circ.work_log_checkin_attempt.' + r.what_happened + '.message',
+ [
+ ses('staff_usrname'),
+ r.payload.patron ? r.payload.patron.family_name() : '',
+ r.payload.patron ? r.payload.patron.card().barcode() : '',
+ r.payload.copy ? r.payload.copy.barcode() : '',
+ r.route_to ? r.route_to : ''
+ ]
+ ), {
+ 'au_id' : r.payload.patron ? r.payload.patron.id() : '',
+ 'au_family_name' : r.payload.patron ? r.payload.patron.family_name() : '',
+ 'au_barcode' : r.payload.patron ? r.payload.patron.card().barcode() : '',
+ 'acp_barcode' : r.payload.copy ? r.payload.copy.barcode() : ''
+ }
+ );
+ } catch(E) {
+ error.sdump('D_ERROR','Error with work_logging in server/circ/checkout.js, _checkout:' + E);
+ }
+
if (typeof params.checkin_result == 'function') {
try { params.checkin_result(r); } catch(E) { error.sdump('D_ERROR','params.checkin_result() = ' + E); };
}
}
if (check.ilsevent == 3 /* NO_CHANGE */) {
//msg = 'This item is already checked in.\n';
+ check.what_happened = 'no_change';
if (document.getElementById('no_change_label')) {
var m = document.getElementById('no_change_label').getAttribute('value');
document.getElementById('no_change_label').setAttribute('value', m + document.getElementById('circStrings').getFormattedString('staff.circ.utils.item_checked_in', [params.barcode]) + ' ');
}
}
if (check.ilsevent == 1202 /* ITEM_NOT_CATALOGED */ && check.copy.status() != 11) {
+ check.what_happened = 'error';
var copy_status = (data.hash.ccs[ check.copy.status() ] ? data.hash.ccs[ check.copy.status() ].name() : check.copy.status().name() );
var err_msg = document.getElementById('commonStrings').getString('common.error');
err_msg += '\nFIXME --';
switch(Number(check.copy.status())) {
case 0: /* AVAILABLE */
case 7: /* RESHELVING */
+ check.what_happened = 'success';
if (msg) {
print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
print_data.route_to = check.route_to;
}
break;
case 8: /* ON HOLDS SHELF */
+ check.what_happened = 'hold_shelf';
check.route_to = document.getElementById('circStrings').getString('staff.circ.route_to.hold_shelf');
if (check.payload.hold) {
if (check.payload.hold.pickup_lib() != data.list.au[0].ws_ou()) {
+ check.what_happened = 'error';
var err_msg = document.getElementById('commonStrings').getString('common.error');
err_msg += '\nFIXME: ';
err_msg += document.getElementById('circStrings').getString('staff.circ.utils.route_item_error');
msg += '\n';
}
} else {
+ check.what_happened = 'error';
var err_msg = document.getElementById('commonStrings').getString('common.error');
err_msg += '\nFIXME: ';
err_msg += document.getElementById('circStrings').getString('staff.circ.utils.route_item_status_error');
}
break;
case 6: /* IN TRANSIT */
+ check.what_happened = 'error';
check.route_to = 'TRANSIT SHELF??';
print_data.route_to;
var err_msg = document.getElementById('commonStrings').getString('common.error');
msg += err_msg;
break;
case 11: /* CATALOGING */
+ check.what_happened = 'cataloging';
check.route_to = 'CATALOGING';
print_data.route_to;
if (document.getElementById('do_not_alert_on_precat')) {
}
break;
default:
+ check.what_happened = 'error';
msg += document.getElementById('commonStrings').getString('common.error');
var copy_status = data.hash.ccs[check.copy.status()] ? data.hash.ccs[check.copy.status()].name() : check.copy.status().name();
msg += '\n';
}
} else /* ROUTE_ITEM */ if (check.ilsevent == 7000) {
+ check.what_happened = 'transit';
var lib = data.hash.aou[ check.org ];
check.route_to = lib.shortname();
print_data.route_to = check.route_to;
msg += '\n';
JSAN.use('util.date');
if (check.payload.hold) {
+ check.what_happened = 'transit_for_hold';
JSAN.use('patron.util');
var au_obj = patron.util.retrieve_fleshed_au_via_id( session, check.payload.hold.usr() );
print_data.user = au_obj;
} else /* ASSET_COPY_NOT_FOUND */ if (check.ilsevent == 1502) {
+ check.what_happened = 'not_found';
check.route_to = 'CATALOGING';
var mis_scan_msg = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.status.copy_not_found', [params.barcode]);
error.yns_alert(
} else /* HOLD_CAPTURE_DELAYED */ if (check.ilsevent == 7019) {
+ check.what_happened = 'hold_capture_delayed';
var rv = 0;
msg += document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.description');
rv = error.yns_alert_formatted(
return circ.util.checkin_via_barcode(session,params,backdate,auto_print,false);
} else /* NETWORK TIMEOUT */ if (check.ilsevent == -1) {
+ check.what_happened = 'error';
error.standard_network_error_alert(document.getElementById('circStrings').getString('staff.circ.checkin.suggest_offline'));
} else {
staff.circ.utils.total_holds=Total Number of Holds
staff.circ.work_log_column.message=Message
staff.circ.work_log_column.when=When
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode
staff.circ.work_log_checkout.message=%1$s circulated %4$s to %3$s (%2$s)
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode
staff.circ.work_log_renew.message=%1$s renewed %4$s for %3$s (%2$s)
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.transit.message=%1$s attempted checkin of %4$s, resulting in transit. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.transit_for_hold.message=%1$s attempted checkin of %4$s, resulting in a hold-transit. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.no_change.message=%1$s attempted checkin of %4$s, but nothing happened. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.error.message=%1$s attempted checkin of %4$s, and an error occurred. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.success.message=%1$s attempted checkin of %4$s, which succeeded. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.hold_shelf.message=%1$s attempted checkin of %4$s, which routed the item to the Holds Shelf. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which is a pre-cat and was routed to Cataloging. Route To = %5$s
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Item Barcode 5 - Route To text
+staff.circ.work_log_checkin_attempt.cataloging.message=%1$s attempted checkin of %4$s, which was not found, and so was routed to Cataloging. Route To = %5$s
staff.circ.checkin.hold_capture=Hold Capture
staff.circ.checkin.check_in.tab=Item Check In
staff.circ.renew.tab.label=Renew Items
web.staff.patron.ue.session_no_defined=User session is not defined
web.staff.patron.ue.uedit_show_search.search_would_be=Search would be:\n%1$s
web.staff.patron.ue.uedit_show_addr_replacement=<div>Replaces address <b>%1$s</b><br/> %2$s %3$s<br/> %4$s, %5$s %6$s</div>
+
+# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode
+staff.circ.work_log_patron_edit.message=%1$s edited %3$s (%2$s)
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
'new_patron_tab' : xulG.new_patron_tab,
- 'params' : p
+ 'params' : p,
+ 'on_save' : function(p_obj) {
+ JSAN.use('patron.util');
+ patron.util.work_log_patron_edit(p_obj);
+ }
}
}
);
},
'on_save' : function(p) {
try {
+ JSAN.use('patron.util');
+ patron.util.work_log_patron_edit(p);
if (obj.barcode) obj.barcode = p.card().barcode();
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//obj.summary_window.g.summary.retrieve();
'clone' : g.sel_list[i],
'spawn_search' : spawn_search,
'spawn_editor' : spawn_editor,
- 'on_save' : function() { refresh(); },
+ 'on_save' : function(p) { patron.util.work_log_patron_edit(p); refresh(); },
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
},
var passthru = {
'spawn_search' : spawn_search,
'spawn_editor' : spawn_editor,
- 'on_save' : function() { refresh(); },
+ 'on_save' : function(p) { patron.util.work_log_patron_edit(p); refresh(); },
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
};
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
'new_patron_tab' : xulG.new_patron_tab,
- 'on_save' : function() { if (typeof func == 'function') { func(); } },
+ 'on_save' : function(p) { patron.util.work_log_patron_edit(p); if (typeof func == 'function') { func(p); } },
'params' : p
}
}
patron.util.EXPORT_OK = [
'columns', 'mbts_columns', 'mb_columns', 'mp_columns', /*'std_map_row_to_column',*/ 'std_map_row_to_columns',
'retrieve_au_via_id', 'retrieve_fleshed_au_via_id', 'retrieve_fleshed_au_via_barcode', 'set_penalty_css', 'retrieve_name_via_id',
- 'merge', 'ausp_columns', 'format_name'
+ 'merge', 'ausp_columns', 'format_name', 'work_log_patron_edit'
];
patron.util.EXPORT_TAGS = { ':all' : patron.util.EXPORT_OK };
return patron_name;
}
+patron.util.work_log_patron_edit = function(p) {
+ var error;
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
+ JSAN.use('util.error'); error = new util.error();
+ error.work_log(
+ document.getElementById('patronStrings').getFormattedString(
+ 'staff.circ.work_log_patron_edit.message',
+ [
+ ses('staff_usrname'),
+ p.family_name(),
+ p.card().barcode()
+ ]
+ ), {
+ 'au_id' : p.id(),
+ 'au_family_name' : p.family_name(),
+ 'au_barcode' : p.card().barcode()
+ }
+ );
+ } catch(E) {
+ error.sdump('D_ERROR','Error with work_logging in menu.js, cmd_patron_register:' + E);
+ }
+}
+
+
dump('exiting patron/util.js\n');