mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge pull request #13597 from marcusmoore/bug/sc-23681
Reset checkout to value when navigating away from type
This commit is contained in:
commit
104219ed76
|
@ -142,9 +142,11 @@ class CheckoutableListener
|
||||||
$notifiables = collect();
|
$notifiables = collect();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify the user who checked out the item
|
* Notify who checked out the item as long as the model can route notifications
|
||||||
*/
|
*/
|
||||||
$notifiables->push($event->checkedOutTo);
|
if (method_exists($event->checkedOutTo, 'routeNotificationFor')) {
|
||||||
|
$notifiables->push($event->checkedOutTo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify Admin users if the settings is activated
|
* Notify Admin users if the settings is activated
|
||||||
|
|
|
@ -454,12 +454,18 @@ $(document).ready(function () {
|
||||||
$('#assigned_location').hide();
|
$('#assigned_location').hide();
|
||||||
$('.notification-callout').fadeOut();
|
$('.notification-callout').fadeOut();
|
||||||
|
|
||||||
|
$('[name="assigned_location"]').val('').trigger('change.select2');
|
||||||
|
$('[name="assigned_user"]').val('').trigger('change.select2');
|
||||||
|
|
||||||
} else if (assignto_type == 'location') {
|
} else if (assignto_type == 'location') {
|
||||||
$('#current_assets_box').fadeOut();
|
$('#current_assets_box').fadeOut();
|
||||||
$('#assigned_asset').hide();
|
$('#assigned_asset').hide();
|
||||||
$('#assigned_user').hide();
|
$('#assigned_user').hide();
|
||||||
$('#assigned_location').show();
|
$('#assigned_location').show();
|
||||||
$('.notification-callout').fadeOut();
|
$('.notification-callout').fadeOut();
|
||||||
|
|
||||||
|
$('[name="assigned_asset"]').val('').trigger('change.select2');
|
||||||
|
$('[name="assigned_user"]').val('').trigger('change.select2');
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('#assigned_asset').hide();
|
$('#assigned_asset').hide();
|
||||||
|
@ -470,6 +476,8 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
$('.notification-callout').fadeIn();
|
$('.notification-callout').fadeIn();
|
||||||
|
|
||||||
|
$('[name="assigned_asset"]').val('').trigger('change.select2');
|
||||||
|
$('[name="assigned_location"]').val('').trigger('change.select2');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue