added faulty owner view

This commit is contained in:
Luca Haid
2025-05-20 13:44:55 +02:00
parent 90987baec0
commit 288727f465
9 changed files with 506 additions and 4 deletions

View File

@@ -343,7 +343,11 @@ $pagination_entity_name = "Adressen";
</td>
<td>
<?php if($owner->company): ?>
<strong><?=$owner->company?></strong><br />
<?php else: ?>
<strong><?=($owner->title) ? $owner->title." " : ""?><?=$owner->firstname?> <?=$owner->lastname?></strong><br />
<?php endif; ?>
<?=$owner->street?><br />
<?=$owner->zip?> <?=$owner->city?><br />
<?=$owner->country?>
@@ -514,6 +518,11 @@ $pagination_entity_name = "Adressen";
<label for="title" class="col-form-label">Titel:</label>
<input type="text" class="form-control" name="title" id="title" />
</div>
<div class="form-group">
<label for="company" class="col-form-label">Firma:</label>
<input type="text" required class="form-control" name="company" id="company" />
</div>
<div class="form-group">
<label for="firnstname" class="col-form-label">Vorname:</label>
@@ -1168,10 +1177,49 @@ $pagination_entity_name = "Adressen";
}
});
});
$(document).ready(function() {
$('#company').on('input', function() {
if ($(this).val().length > 0) {
$('#firstname').prop('required', false);
$('#lastname').prop('required', false);
} else {
$('#firstname').prop('required', true);
$('#lastname').prop('required', true);
}
});
$('#firstname, #lastname').on('input', function() {
if ($('#firstname').val().length > 0 && $('#lastname').val().length > 0) {
$('#company').prop('required', false);
} else {
$('#company').prop('required', true);
}
});
const urlParams = new URLSearchParams(window.location.search);
const highlightOwnerId = urlParams.get('highlight_owner_id');
if (highlightOwnerId) {
const targetRow = document.querySelector(`#owner-data-${highlightOwnerId}`);
if (targetRow) {
targetRow.scrollIntoView({ behavior: 'smooth', block: 'center' });
targetRow.classList.add('highlight');
setTimeout(() => {
targetRow.classList.remove('highlight');
}, 1500);
}
}
})
</script>
<style>
.highlight {
background-color: #ffeb3b !important;
transition: background-color 0.5s ease;
}
/* Styles for the status circle */
.status-circle {
width: 14px;