|
@@ -227,20 +227,34 @@
|
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-dialog modal-lg">
|
|
|
<div class="modal-content">
|
|
<div class="modal-content">
|
|
|
<div class="modal-header" style="background-color: #0C6197!important;">
|
|
<div class="modal-header" style="background-color: #0C6197!important;">
|
|
|
- <h5 class="modal-title" id="causalsModalLabel">Dettaglio Causali</h5>
|
|
|
|
|
|
|
+ <h5 class="modal-title" id="causalsModalLabel">
|
|
|
|
|
+ <i class="me-2"></i>
|
|
|
|
|
+ Dettaglio Causali
|
|
|
|
|
+ </h5>
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="CHIUDI"></button>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="CHIUDI"></button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="modal-body">
|
|
<div class="modal-body">
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="col-12">
|
|
<div class="col-12">
|
|
|
- <h6>Causali incluse:</h6>
|
|
|
|
|
- <ul id="causalsList" class="list-group list-group-flush">
|
|
|
|
|
- </ul>
|
|
|
|
|
|
|
+ <div class="d-flex justify-content-between align-items-center mb-3">
|
|
|
|
|
+ <h6 class="mb-0">
|
|
|
|
|
+ <i class="me-2 text-primary"></i>
|
|
|
|
|
+ Causali incluse:
|
|
|
|
|
+ </h6>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="border rounded" style="max-height: 400px; overflow-y: auto;">
|
|
|
|
|
+ <ul id="causalsList" class="list-group list-group-flush mb-0">
|
|
|
|
|
+ <!-- Causals will be populated here by JavaScript -->
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="modal-footer" style="background-color: #FFF!important;">
|
|
<div class="modal-footer" style="background-color: #FFF!important;">
|
|
|
- <button type="button" class="btn--ui lightGrey me-2" data-bs-dismiss="modal">CHIUDI</button>
|
|
|
|
|
|
|
+ <button type="button" class="btn--ui lightGrey me-2" data-bs-dismiss="modal">
|
|
|
|
|
+ <i class="fas fa-times me-1"></i>
|
|
|
|
|
+ CHIUDI
|
|
|
|
|
+ </button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -695,6 +709,43 @@
|
|
|
opacity: 0.7;
|
|
opacity: 0.7;
|
|
|
cursor: not-allowed;
|
|
cursor: not-allowed;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .list-group-item {
|
|
|
|
|
+ border-left: none;
|
|
|
|
|
+ border-right: none;
|
|
|
|
|
+ border-top: 1px solid #dee2e6;
|
|
|
|
|
+ padding: 12px 15px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .list-group-item:first-child {
|
|
|
|
|
+ border-top: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .list-group-item:last-child {
|
|
|
|
|
+ border-bottom: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* Enhanced styles for the causal modal with amounts */
|
|
|
|
|
+ .list-group-item.d-flex {
|
|
|
|
|
+ display: flex !important;
|
|
|
|
|
+ justify-content: space-between !important;
|
|
|
|
|
+ align-items: center !important;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .list-group-item .badge {
|
|
|
|
|
+ font-size: 0.875rem;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .list-group-item:hover {
|
|
|
|
|
+ background-color: rgba(12, 97, 151, 0.05);
|
|
|
|
|
+ transition: background-color 0.2s ease;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #causalsModal .modal-body {
|
|
|
|
|
+ padding: 1rem 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|
|
|
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
|
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
|
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
|
@@ -846,12 +897,30 @@
|
|
|
|
|
|
|
|
causals.forEach(function(causal) {
|
|
causals.forEach(function(causal) {
|
|
|
if (causal.trim()) {
|
|
if (causal.trim()) {
|
|
|
- $('#causalsList').append(
|
|
|
|
|
- '<li class="list-group-item">' +
|
|
|
|
|
- '<i class="fas fa-tags me-2" style="color: #0C6197;"></i>' +
|
|
|
|
|
- causal.trim() +
|
|
|
|
|
- '</li>'
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ if (causal.includes(':::')) {
|
|
|
|
|
+ const parts = causal.split(':::');
|
|
|
|
|
+ const causalName = parts[0].trim();
|
|
|
|
|
+ const amount = parts[1].trim();
|
|
|
|
|
+
|
|
|
|
|
+ $('#causalsList').append(
|
|
|
|
|
+ '<li class="list-group-item d-flex justify-content-between align-items-center">' +
|
|
|
|
|
+ '<div>' +
|
|
|
|
|
+ '<i class="fas fa-tags me-2" style="color: #0C6197;"></i>' +
|
|
|
|
|
+ causalName +
|
|
|
|
|
+ '</div>' +
|
|
|
|
|
+ '<span class="badge bg-primary rounded-pill" style="background-color: #0C6197 !important;">' +
|
|
|
|
|
+ amount +
|
|
|
|
|
+ '</span>' +
|
|
|
|
|
+ '</li>'
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $('#causalsList').append(
|
|
|
|
|
+ '<li class="list-group-item">' +
|
|
|
|
|
+ '<i class="fas fa-tags me-2" style="color: #0C6197;"></i>' +
|
|
|
|
|
+ causal.trim() +
|
|
|
|
|
+ '</li>'
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -862,17 +931,7 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- $('#causalsModal').on('show.bs.modal', function () {
|
|
|
|
|
- closeSelect2Dropdowns();
|
|
|
|
|
- $('body').addClass('modal-open');
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- $('#causalsModal').on('hidden.bs.modal', function () {
|
|
|
|
|
- $('body').removeClass('modal-open');
|
|
|
|
|
- });
|
|
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
Livewire.on('load-table', () => {
|
|
Livewire.on('load-table', () => {
|
|
|
load();
|
|
load();
|
|
|
});
|
|
});
|