fix: fix popup blocker and Select2 error when prefilling calendar
- Open window synchronously before await to avoid popup blocker, then navigate it to /Calendar/View after successful save; close it if the save fails - Guard the #customer Select2 change handler so it bails early when #customer has not been initialized as Select2 yet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2378,6 +2378,8 @@ $(document).ready(function () {
|
||||
|
||||
$('body').on('change', '#customer,#customer-info-type', function () {
|
||||
|
||||
if (!$('#customer').hasClass('select2-hidden-accessible')) return;
|
||||
|
||||
if ($('#name').val() == "") {
|
||||
$('#name').val('IBN: ' + $("#customer").select2('data')[0].name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user