feat: integrate insurance coverage management for clinic services

- Updated NewSessionPage to calculate patient share based on insurance coverage rules.
- Refactored billing calculations to utilize new patientShareOf function for service items.
- Enhanced API documentation to reflect changes in service coverage structure.
- Implemented ServiceInsuranceModal for managing insurance coverage per service.
- Added UI components for displaying and editing insurance coverage details.
- Removed obsolete toggle switch styles and adjusted CSS for new components.
- Ensured backend endpoints support both service_item_id and service_item_uuid for flexibility.
This commit is contained in:
hamed
2026-06-24 04:23:50 +03:30
parent 253414ef3e
commit 27840da78d
11 changed files with 878 additions and 258 deletions
+8 -13
View File
@@ -568,19 +568,6 @@ table.t tbody tr:hover .row-actions { opacity: 1; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--primary-600)); }
/* ── Toggle switch ───────────────────────────────────────────── */
.switch {
width: 44px; height: 26px; border-radius: 99px; background: var(--border-2);
position: relative; flex-shrink: 0; transition: background .2s var(--ease); cursor: pointer; display: inline-block;
}
.switch.on { background: var(--primary); }
.switch::after {
content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
transition: transform .2s var(--ease);
}
.switch.on::after { transform: translateX(-18px); }
/* ── Modal ───────────────────────────────────────────────────── */
.overlay {
position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
@@ -690,3 +677,11 @@ table.t tbody tr:hover .row-actions { opacity: 1; }
@media (max-width: 560px) {
.stat-grid { grid-template-columns: 1fr 1fr; }
}
/* صفحه سرویس‌های کلینیک */
.srv-section-row:hover { background: var(--surface-2); }
.srv-section-actions { opacity: 0; transition: opacity 0.15s; }
.srv-section-row:hover .srv-section-actions { opacity: 1; }
@media (hover: none) {
.srv-section-actions { opacity: 1; }
}