-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogrammati.html
More file actions
272 lines (247 loc) · 16.6 KB
/
programmati.html
File metadata and controls
272 lines (247 loc) · 16.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="manifest.json">
<title>Programmati - Gestione Attività</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
<!-- FullCalendar -->
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.11/index.global.min.js'></script>
<style>
.fc {
font-family: inherit;
background: white;
padding: 10px;
border-radius: 12px;
box-shadow: var(--shadow);
font-size: 0.9rem;
}
.fc-toolbar-title {
font-size: 1.2rem !important;
font-weight: 700;
color: var(--blue-primary);
}
.fc-button-primary {
background-color: var(--blue-primary) !important;
border-color: var(--blue-primary) !important;
text-transform: capitalize;
}
.fc-event {
cursor: pointer;
border-radius: 4px;
padding: 2px 4px;
font-size: 0.8em;
font-weight: 600;
}
#programmatiTable {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
margin-top: 10px;
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: var(--shadow);
}
#programmatiTable th {
background: var(--blue-primary);
color: white;
text-align: left;
padding: 12px;
}
#programmatiTable td {
padding: 10px 12px;
border-bottom: 1px solid #eee;
color: var(--text-main);
}
</style>
</head>
<body>
<header class="top-nav" style="display: flex; justify-content: space-between; align-items: center;">
<a href="index.html" style="background: white; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--blue-primary); display: flex; align-items: center; gap: 5px; font-weight: 700; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
<span style="font-size: 1.2rem;">←</span> Menu
</a>
<h1 style="margin: 0; font-size: 1.2rem;">Programmati</h1>
<div style="width: 70px;"></div> <!-- Spacer -->
</header>
<main class="container" style="max-width: 900px;">
<datalist id="assistitiDatalist"></datalist>
<!-- INSERIMENTO PROGRAMMATO -->
<section class="card glass-card">
<h2><span class="btn-icon">➕</span> Nuova Programmazione</h2>
<form id="newProgrammatoForm">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
<div class="form-group" style="margin-bottom: 0;">
<label for="paziente">Paziente / Ente *</label>
<input type="text" id="paziente" placeholder="Nominativo" list="assistitiDatalist" required>
</div>
<div class="form-group" style="margin-bottom: 0;">
<label for="progTecnicoAssegnato">Tecnico Assegnato *</label>
<select id="progTecnicoAssegnato" required style="width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #ccc; font-size: 0.9rem; font-family: inherit;">
<option value="">Seleziona Tecnico...</option>
</select>
</div>
<div style="display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 0;">
<div class="form-group" style="flex: 1; min-width: 140px; margin-bottom: 0;">
<label for="localita">Località *</label>
<input type="text" id="localita" placeholder="Es. Napoli" required>
</div>
<div class="form-group" style="flex: 1; min-width: 140px; margin-bottom: 0;">
<label for="indirizzo">Indirizzo *</label>
<input type="text" id="indirizzo" placeholder="Via Roma 1" required>
</div>
</div>
<div class="form-group" style="margin-bottom: 0;">
<label for="telefono">Recapito Telefonico</label>
<input type="tel" id="telefono" placeholder="Es. 3331234567">
</div>
<div style="display: flex; gap: 10px; margin-bottom: 0;">
<div class="form-group" style="flex: 1; margin-bottom: 0;">
<label for="dataProgrammata">Data Prevista</label>
<input type="date" id="dataProgrammata">
</div>
<div class="form-group" style="flex: 1; margin-bottom: 0;">
<label for="oraProgrammata">Ora Prevista</label>
<input type="time" id="oraProgrammata" style="width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit;">
</div>
</div>
<!-- NOTE PROGRAMMAZIONE CON SUPPORTO ALLEGATI E INCOLLA -->
<div class="form-group" style="margin-top: 15px; margin-bottom: 0; position: relative;" id="progNoteContainer">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px;">
<label for="progNoteInput" style="margin-bottom: 0;">Note Essenziali (es. Problema) *</label>
<button type="button" id="btnExpandNote" class="btn btn-sm" style="padding: 2px 8px; font-size: 0.75rem; background: #e2e8f0; color: #333; border: 1px solid #cbd5e1; border-radius: 4px;">Espandi ↕</button>
</div>
<div style="position: relative; border: 1px solid #ccc; border-radius: 6px; background: white; padding-bottom: 30px;">
<textarea id="progNoteInput" rows="3" placeholder="Scrivi note o incolla un'immagine (Ctrl+V)..." style="width: 100%; border: none; outline: none; padding: 10px; font-family: inherit; font-size: 0.9rem; resize: none; background: transparent; transition: height 0.3s;"></textarea>
<!-- Pulsantiera incollata sul fondo della textarea -->
<div style="position: absolute; bottom: 0; left: 0; width: 100%; height: 30px; background: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; align-items: center; padding: 0 10px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px;">
<label for="progNoteFileInput" style="cursor: pointer; display: flex; align-items: center; gap: 5px; color: var(--blue-primary); font-size: 0.8rem; font-weight: bold;">
📎 Allega File (PDF, Immagini, Video, Audio)
</label>
<input type="file" id="progNoteFileInput" accept="image/*,video/*,audio/*,application/pdf" multiple style="display: none;">
</div>
</div>
<!-- Anteprime file note -->
<div id="progNotePreviewContainer" class="hidden" style="margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,0.5); padding: 8px; border-radius: 8px; border: 1px dashed #ccc;"></div>
</div>
</div>
<!-- Dynamic Interventions Array Block -->
<div id="dynamicProgInterventionsContainer" style="margin-top: 15px;">
<!-- Dynamic Blocks injected by JS -->
</div>
<button type="button" id="btnAddProgInterventionBlock" class="btn btn-secondary" style="margin-bottom: 15px; width: 100%; background: #fff7ed; color: #ea580c; border: 1px dashed #f97316; padding: 10px; border-radius: 8px; font-weight: bold;">
➕ Aggiungi Dispositivo / Intervento
</button>
<div class="form-group" style="margin-bottom: 15px;">
<label for="progAllegatoFile">Allegato/i (Foto, PDF, o Video) - Obbligatorio per Chiudere</label>
<input type="file" id="progAllegatoFile" accept="image/*,video/*,application/pdf" multiple>
<div id="progFilePreviewContainer" class="hidden" style="margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: start; background: rgba(255,255,255,0.5); padding: 10px; border-radius: 8px;">
<!-- Le anteprime verranno inserite qui dinamicamente -->
</div>
</div>
<div style="display: flex; gap: 10px; margin-top: 10px; flex-direction: column;">
<button type="button" class="btn btn-primary btn-orange btn-large" style="width: 100%; border: none; padding: 15px; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(234, 88, 12, 0.4); display: flex; align-items: center; justify-content: center; gap: 8px; color: white;" id="btnProgStartIntervention">
<span class="btn-icon">⚡</span> TERMINA ATTIVITA'
</button>
<div style="display: flex; gap: 10px; margin-top: 5px;">
<button type="submit" class="btn btn-primary" style="flex: 1; background-color: var(--blue-primary); border: none; color: white; padding: 12px; font-weight: bold;" id="btnPlanIntervention">
<span class="btn-icon">📅</span> SALVA PROGRAM.
</button>
<button type="button" class="btn btn-secondary" style="flex: 1; padding: 12px; font-weight: bold;" id="btnSaveWaiting">
<span class="btn-icon">⏳</span> SALVA IN ATTESA
</button>
</div>
</div>
</form>
</section>
<!-- ELENCO DA PROGRAMMARE (IN ATTESA) -->
<section class="card glass-card" style="padding: 1rem 0; overflow-x: auto; margin-bottom: 20px;">
<div style="padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;">
<h2 style="margin: 0;"><span class="btn-icon">⏳</span> Da Programmare (In Attesa)</h2>
<div style="display: flex; gap: 8px;">
<button type="button" id="btnStampaListone" onclick="if(window.stampaListoneMagazzinoPDF) window.stampaListoneMagazzinoPDF()" class="btn btn-sm" style="background: #ea580c; color: white; border: none; padding: 6px 12px; border-radius: 6px; font-weight: bold; width: auto; margin: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2);">🖨️ Stampa Riepilogo Magazzino</button>
<button id="btnToggleWaiting" class="btn btn-secondary" style="width: auto; padding: 6px 12px; font-size: 0.8rem; margin: 0;">Mostra / Nascondi</button>
</div>
</div>
<div id="waitingContainer" class="hidden" style="margin: 10px 1rem 0 1rem;">
<table id="waitingTable" style="width: 100%; border-collapse: collapse; font-size: 0.9rem; background: white; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);">
<thead>
<tr>
<th style="background: var(--blue-primary); color: white; padding: 12px; text-align: left;">Paziente</th>
<th style="background: var(--blue-primary); color: white; padding: 12px; text-align: left;">Località</th>
<th style="background: var(--blue-primary); color: white; padding: 12px; text-align: left;">Indirizzo (Tel)</th>
<th style="background: var(--blue-primary); color: white; padding: 12px; text-align: left;">Programma Data</th>
</tr>
</thead>
<tbody id="waitingTableBody">
<tr><td colspan="4" style="text-align: center; padding: 20px;">Caricamento...</td></tr>
</tbody>
</table>
</div>
</section>
<!-- CALENDARIO -->
<section class="card glass-card" style="padding: 1rem 0.5rem;">
<h2 style="padding: 0 1rem;"><span class="btn-icon">📆</span> Calendario</h2>
<div id="calendar"></div>
</section>
<!-- ELENCO TABELLA -->
<section class="card glass-card" style="padding: 1rem 0; overflow-x: auto;">
<div style="padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px;">
<h2 style="margin: 0;"><span class="btn-icon">📋</span> Elenco Programmati</h2>
<button type="button" onclick="if(window.stampaListoneMagazzinoPDF) window.stampaListoneMagazzinoPDF()" class="btn btn-sm" style="background: #ea580c; color: white; border: none; padding: 6px 12px; border-radius: 6px; font-weight: bold; width: auto; margin: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2);">🖨️ Stampa Riepilogo Magazzino</button>
</div>
<div style="margin: 0 1rem;">
<table id="programmatiTable">
<thead>
<tr>
<th>Data</th>
<th>Paziente</th>
<th>Località</th>
<th>Indirizzo (Tel)</th>
<th>Tipo</th>
<th>Dispositivi / Note</th>
<th>Azioni</th>
</tr>
</thead>
<tbody id="programmatiTableBody">
<tr><td colspan="7" style="text-align: center; padding: 20px;">Caricamento...</td></tr>
</tbody>
</table>
</div>
</section>
</main>
<!-- Modale Mapping Assistiti Excel -->
<div id="assistitiMappingModal" class="hidden" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1050; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center;">
<div style="background: white; padding: 20px; border-radius: 12px; width: 90%; max-width: 500px; margin: 40px auto; box-shadow: 0 10px 25px rgba(0,0,0,0.2);">
<h3 style="color: var(--blue-dark); margin-bottom: 15px;">Mappatura Colonne Rubrica Assistiti</h3>
<p style="font-size: 0.9rem; color: #555; margin-bottom: 15px;">Seleziona a quali colonne del tuo file di Excel corrispondono i seguenti campi. L'app userà questi dati per autocompilare Nome, Dispositivi, Apparecchiature e Indirizzi quando scriverai il Paziente!</p>
<div class="form-group">
<label>Colonna: Nome Cognome Paziente/Ente *</label>
<select id="colPaziente" required></select>
</div>
<div class="form-group">
<label>Colonna: Apparecchiatura e Accessori</label>
<select id="colDispositivi"></select>
</div>
<div class="form-group">
<label>Colonna: Località</label>
<select id="colLocalita"></select>
</div>
<div class="form-group">
<label>Colonna: Indirizzo Struttura/Domicilio</label>
<select id="colIndirizzo"></select>
</div>
<div style="display:flex; justify-content:flex-end; gap:10px; margin-top:20px;">
<button type="button" id="btnCancelAssistitiMapping" class="btn btn-secondary" style="padding:10px 15px;">Annulla</button>
<button type="button" id="btnSaveAssistitiMapping" class="btn btn-primary" style="background:#10b981; padding:10px 15px; border:none; color:white;">Salva e Importa Rubrica</button>
</div>
</div>
</div>
<script type="module" src="programmati.js?v=66"></script>
<script type="module" src="global_notifications.js?v=66"></script>
</body>
</html>