Enth\u00e4lt gemischt: Laravel-10-Upgrade + Phase 1 (Contacts-Modul, Duplicats-Commands, Soft-Delete+Merge-Fields) + Phase 2 Code-Umstellungen (inquiry_id, $table='contacts'/'inquiries') + Offers-Modul (Migrationen, Models, offer_id in Booking, offer-Disk in filesystems.php). Phase 2 + Offers werden im folgenden Commit nach dev/backups/phase2-offers-2026-04-17/ verschoben, damit der Workspace auf Phase-1-only (= Test-System-Stand) reduziert ist und direkt auf Live deploybar wird. Tarball-Backup zus\u00e4tzlich unter: ../backups-safety/workspace-pre-phase1-rollback-2026-04-17.tar.gz Made-with: Cursor
97 lines
3.5 KiB
PHP
97 lines
3.5 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
|
|
<div class="float-right mt-3">
|
|
<a href="{{ route('contacts') }}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
|
</div>
|
|
|
|
<h4 class="font-weight-bold py-3 mb-1">
|
|
{{ $id === 'new' ? __('Neuer Kontakt') : __('Kontakt') . ': ' . $contact->fullName() }}
|
|
</h4>
|
|
|
|
@if(session('alert-save'))
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
{{ __('Änderungen wurden gespeichert.') }}
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
</div>
|
|
@endif
|
|
|
|
<ul class="nav nav-sm nav-tabs nav-justified tabs-alt mb-3" id="top-nav-quick-jump">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" href="javascript:void(0)" data-collapse="#collapseContactDetail">
|
|
{{ __('Kontaktdaten') }}
|
|
</a>
|
|
</li>
|
|
@if($id !== 'new')
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseContactHistory">
|
|
{{ __('Verlauf') }}
|
|
@if($contact->leads->isNotEmpty() || $contact->bookings->isNotEmpty())
|
|
<span class="badge badge-primary ml-1">
|
|
{{ $contact->leads->count() + $contact->bookings->count() }}
|
|
</span>
|
|
@endif
|
|
</a>
|
|
</li>
|
|
@endif
|
|
</ul>
|
|
|
|
{!! Form::open(['url' => route('contact_detail_store', [$id]), 'class' => 'form-horizontal', 'id' => 'contact-form-validation']) !!}
|
|
<input type="hidden" name="id" value="{{ $id }}">
|
|
|
|
@include('contact._detail_contact')
|
|
|
|
@if($id !== 'new')
|
|
@include('contact._detail_history')
|
|
@endif
|
|
|
|
<div class="float-right mt-3">
|
|
<a href="{{ route('contacts') }}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
|
|
</div>
|
|
|
|
{!! Form::close() !!}
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
$("#contact-form-validation button[type='submit']").on("click", function () {
|
|
$(':input[required]', "#contact-form-validation").each(function () {
|
|
if ($(this).val() === "" || $(this).val() === null) {
|
|
$(this).closest(".collapse").collapse('show');
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
|
|
$('#top-nav-quick-jump .nav-link').on('click', function (e) {
|
|
e.preventDefault();
|
|
$('#top-nav-quick-jump .nav-link').removeClass('active');
|
|
$(this).addClass('active');
|
|
var collapseId = $(this).data('collapse');
|
|
$(collapseId).collapse('show');
|
|
$('html, body').animate({
|
|
scrollTop: $(collapseId).parent('.card').offset().top
|
|
}, 300, function () {
|
|
window.location.hash = collapseId;
|
|
});
|
|
});
|
|
|
|
$(".collapse").on('shown.bs.collapse', function () {
|
|
window.location.hash = "#" + $(this).attr('id');
|
|
});
|
|
|
|
// Hash beim Laden auswerten
|
|
if (window.location.hash) {
|
|
var target = $(window.location.hash);
|
|
if (target.length) {
|
|
$('a[data-collapse="#' + target.attr('id') + '"]').click();
|
|
}
|
|
} else {
|
|
// Standard: Kontaktdaten aufklappen
|
|
$('#collapseContactDetail').collapse('show');
|
|
}
|
|
});
|
|
</script>
|
|
|
|
@endsection
|