So cp.copy_alerts() isn't defined when it is called.
I noticed that the copy_alert_dialog() compared to the copy_note_dialog() function is missing a bit like this.
2126 angular.forEach(copy_list, function (cp) {
2127 if (!angular.isArray(cp.notes())) cp.notes([]); <----
2128 var n = new egCore.idl.acpn();
2129 n.isnew(1);
copy_alert_dialog() doesn't seem to have anything defining an empty cp.copy_alert([]) like the copy notes do. So maybe adding in something like "if (!angular.isArray(cp.copy_alerts())) cp.copy_alerts([]);" after the forEach would do the trick.
if (typeof(copy_alert.note) != 'undefined' &&
2302 copy_alert.note != '') {
2303 angular.forEach(copy_list, function (cp) {
2304 var a = new egCore.idl.aca();
2305 a.isnew(1);
2306 a.create_staff(copy_alert.create_staff);
Confirmed in EG 3.3.4
In the browser console, there is an error when the ok button is pressed in the add alert popup.
TypeError: Cannot read property 'push' of undefined
at app.js:2310
Which is in app.js
a.ack_time(null);
a.alert_ type(
$scope. alert_types. filter( function( at) {
return at.id() == copy_alert. alert_type;
})[ 0]
); alerts( ).push( a );
});
----> cp.copy_
So cp.copy_alerts() isn't defined when it is called.
I noticed that the copy_alert_dialog() compared to the copy_note_dialog() function is missing a bit like this.
2126 angular. forEach( copy_list, function (cp) { isArray( cp.notes( ))) cp.notes([]); <----
2127 if (!angular.
2128 var n = new egCore.idl.acpn();
2129 n.isnew(1);
copy_alert_dialog() doesn't seem to have anything defining an empty cp.copy_alert([]) like the copy notes do. So maybe adding in something like "if (!angular. isArray( cp.copy_ alerts( ))) cp.copy_ alerts( []);" after the forEach would do the trick.
2302 copy_alert.note != '') {
2303 angular.
2304 var a = new egCore.idl.aca();
2305 a.isnew(1);
2306 a.create_