Widget tworzenia wycieczki na podstawie zapytania
This commit is contained in:
@@ -679,7 +679,8 @@ include '../../header-sneat.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary w-100 py-2 shadow-sm">
|
||||
<button type="button" class="btn btn-secondary w-100 py-2 shadow-sm" data-bs-toggle="modal"
|
||||
data-bs-target="#createTripModal">
|
||||
<i class="bi bi-printer-fill me-2"></i> Utwórz wycieczkę
|
||||
</button>
|
||||
|
||||
@@ -782,6 +783,189 @@ include '../../header-sneat.php';
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="createTripModal" tabindex="-1" aria-hidden="true" style="z-index: 1090;">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg">
|
||||
<div class="modal-content shadow-lg">
|
||||
<div class="modal-header border-bottom">
|
||||
<h5 class="modal-title"><i class="bi bi-calendar-plus me-2"></i>Utwórz wycieczkę</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body p-4">
|
||||
<div class="alert alert-primary d-flex align-items-center p-3 mb-4" role="alert">
|
||||
<i class="bi bi-info-circle-fill me-2 fs-5"></i>
|
||||
<div class="small">
|
||||
Poniższe dane zostały automatycznie wczytane z zapytania ofertowego, ale możesz je jeszcze
|
||||
zmienić przed utworzeniem wycieczki.
|
||||
</div>
|
||||
</div>
|
||||
<form>
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-md-8">
|
||||
<label class="form-label fw-bold">Nazwa wycieczki</label>
|
||||
<input type="text" class="form-control" value="Tatry - Weekend Majowy"
|
||||
placeholder="Wprowadź nazwę...">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label fw-bold">Identyfikator</label>
|
||||
<input type="text" class="form-control" value="TRP-2026-001" disabled readonly>
|
||||
<div class="form-text mt-1 d-flex justify-content-between">
|
||||
<span>Nadany automatycznie</span>
|
||||
<a href="#" class="text-primary text-decoration-none">Zmień</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Daty wycieczki</label>
|
||||
<input type="text" class="form-control" placeholder="DD.MM.RRRR - DD.MM.RRRR"
|
||||
value="01.05.2026 - 03.05.2026">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Opiekun</label>
|
||||
<div class="dropdown">
|
||||
<button
|
||||
class="btn btn-outline-secondary w-100 d-flex justify-content-between align-items-center bg-white text-dark text-start"
|
||||
type="button" data-bs-toggle="dropdown" aria-expanded="false"
|
||||
style="border-color: #d9dee3;">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div class="avatar avatar-xs">
|
||||
<span class="avatar-initial rounded-circle bg-label-primary">MT</span>
|
||||
</div>
|
||||
<span>Mateusz Travel</span>
|
||||
</div>
|
||||
<i class="bi bi-chevron-down text-muted" style="font-size: 0.8rem;"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu w-100">
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center gap-2 active" href="#">
|
||||
<div class="avatar avatar-xs">
|
||||
<span class="avatar-initial rounded-circle bg-label-primary">MT</span>
|
||||
</div>
|
||||
Mateusz Travel
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center gap-2" href="#">
|
||||
<div class="avatar avatar-xs">
|
||||
<span class="avatar-initial rounded-circle bg-label-secondary">AA</span>
|
||||
</div>
|
||||
Adam Admin
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center gap-2" href="#">
|
||||
<div class="avatar avatar-xs">
|
||||
<img src="https://demos.themeselection.com/sneat-bootstrap-html-admin-template/assets/img/avatars/5.png"
|
||||
alt="Avatar" class="rounded-circle">
|
||||
</div>
|
||||
Kasia Kowalska
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Organizacja</label>
|
||||
<div class="input-group">
|
||||
<select class="form-select">
|
||||
<option>Firma XYZ</option>
|
||||
<option>Szkoła Podstawowa nr 1</option>
|
||||
<option value="">Inna / Brak</option>
|
||||
</select>
|
||||
<button class="btn btn-outline-primary" type="button" data-bs-toggle="tooltip"
|
||||
title="Dodaj nową organizację">
|
||||
<i class="bi bi-plus-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Przedstawiciel</label>
|
||||
<div class="input-group">
|
||||
<select class="form-select">
|
||||
<option>Jan Jan</option>
|
||||
<option>Anna Nowak</option>
|
||||
</select>
|
||||
<button class="btn btn-outline-primary" type="button" data-bs-toggle="tooltip"
|
||||
title="Dodaj nowego przedstawiciela">
|
||||
<i class="bi bi-plus-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Liczba uczestników płatnych</label>
|
||||
<input type="number" class="form-control" value="40" min="0">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label fw-bold">Liczba uczestników niepłatnych</label>
|
||||
<input type="number" class="form-control" value="4" min="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<div class="mb-3">
|
||||
<h6 class="fw-bold mb-1">Załączniki (Opcjonalnie)</h6>
|
||||
<small class="text-muted">Wybierz, które z poniższych załączników chcesz przenieść do stworzonej
|
||||
wycieczki.</small>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<label
|
||||
class="list-group-item d-flex gap-3 align-items-center bg-lighter border-0 mb-1 rounded cursor-pointer">
|
||||
<input class="form-check-input flex-shrink-0" type="checkbox"
|
||||
style="width: 1.2em; height: 1.2em;" checked>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<i class="bi bi-file-earmark-pdf text-danger fs-4"></i>
|
||||
<div>
|
||||
<span class="d-block fw-semibold">Oferta_Wstepna_v1.pdf</span>
|
||||
<small class="text-muted">850 KB</small>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label
|
||||
class="list-group-item d-flex gap-3 align-items-center bg-lighter border-0 mb-1 rounded cursor-pointer">
|
||||
<input class="form-check-input flex-shrink-0" type="checkbox"
|
||||
style="width: 1.2em; height: 1.2em;" checked>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<i class="bi bi-file-earmark-pdf text-danger fs-4"></i>
|
||||
<div>
|
||||
<span class="d-block fw-semibold">Program_Tatry_2026.pdf</span>
|
||||
<small class="text-muted">1.2 MB</small>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<label
|
||||
class="list-group-item d-flex gap-3 align-items-center bg-lighter border-0 mb-1 rounded cursor-pointer">
|
||||
<input class="form-check-input flex-shrink-0" type="checkbox"
|
||||
style="width: 1.2em; height: 1.2em;">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<i class="bi bi-file-earmark-pdf text-danger fs-4"></i>
|
||||
<div>
|
||||
<span class="d-block fw-semibold">OWU_Umowa_Ogolna.pdf</span>
|
||||
<small class="text-muted">450 KB</small>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer border-top-0 pt-0">
|
||||
<button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal">Anuluj</button>
|
||||
<button type="button" class="btn btn-primary"><i class="bi bi-check2 me-2"></i>Utwórz wycieczkę</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include '../../footer-sneat.php'; ?>
|
||||
|
||||
<script>
|
||||
@@ -879,27 +1063,30 @@ include '../../header-sneat.php';
|
||||
// ==========================================
|
||||
// 5. FIX: NAPRAWA Z-INDEX DLA TŁA (BACKDROP)
|
||||
// ==========================================
|
||||
const linkModalElement = document.getElementById('linkInquiriesModal');
|
||||
const overlappingModals = ['linkInquiriesModal', 'createTripModal'];
|
||||
|
||||
if (linkModalElement) {
|
||||
linkModalElement.addEventListener('show.bs.modal', () => {
|
||||
// Czekamy chwilę aż Bootstrap doda backdrop do DOM
|
||||
setTimeout(() => {
|
||||
// Pobieramy wszystkie aktywne tła (backdrops)
|
||||
const backdrops = document.querySelectorAll('.modal-backdrop');
|
||||
overlappingModals.forEach(modalId => {
|
||||
const modalEl = document.getElementById(modalId);
|
||||
if (modalEl) {
|
||||
modalEl.addEventListener('show.bs.modal', () => {
|
||||
// Czekamy chwilę aż Bootstrap doda backdrop do DOM
|
||||
setTimeout(() => {
|
||||
// Pobieramy wszystkie aktywne tła (backdrops)
|
||||
const backdrops = document.querySelectorAll('.modal-backdrop');
|
||||
|
||||
// Jeśli mamy więcej niż jedno tło (czyli modal nad modalem)
|
||||
if (backdrops.length > 1) {
|
||||
// Ostatnie tło na liście to to od naszego drugiego modala
|
||||
const secondBackdrop = backdrops[backdrops.length - 1];
|
||||
// Jeśli mamy więcej niż jedno tło (czyli modal nad modalem)
|
||||
if (backdrops.length > 1) {
|
||||
// Ostatnie tło na liście to to od naszego drugiego modala
|
||||
const secondBackdrop = backdrops[backdrops.length - 1];
|
||||
|
||||
// Ustawiamy mu z-index na 1080
|
||||
// (Pierwszy modal ma ~1055, nasz drugi modal ma ustawione 1090 w HTML)
|
||||
secondBackdrop.style.zIndex = '1080';
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
// Ustawiamy mu z-index na 1080
|
||||
// (Pierwszy modal ma ~1055, nasz drugi modal ma ustawione 1090 w HTML)
|
||||
secondBackdrop.style.zIndex = '1080';
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// ==========================================
|
||||
// 6. TABS: AKTUALIZACJA STYLI PRZYCISKÓW
|
||||
|
||||
Reference in New Issue
Block a user