|
91 | 91 | </tbody>
|
92 | 92 | </table>
|
93 | 93 |
|
94 |
| - <modal x-show="modalOpen" class="fixed inset-0 z-50 overflow-y-auto" aria-labelledby="modal-title" role="dialog" |
95 |
| - aria-modal="true"> |
96 |
| - <div class="flex items-end justify-center min-h-screen px-4 text-center md:items-center sm:block sm:p-0"> |
97 |
| - <div x-cloak @click="modalOpen = false" x-show="modalOpen" |
98 |
| - x-transition:enter="transition ease-out duration-300 transform" x-transition:enter-start="opacity-0" |
99 |
| - x-transition:enter-end="opacity-100" x-transition:leave="transition ease-in duration-200 transform" |
100 |
| - x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" |
101 |
| - class="fixed inset-0 transition-opacity bg-gray-500 bg-opacity-40" aria-hidden="true"></div> |
102 |
| - <div x-cloak x-show="modalOpen" x-transition:enter="transition ease-out duration-300 transform" |
103 |
| - x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" |
104 |
| - x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" |
105 |
| - x-transition:leave="transition ease-in duration-200 transform" |
106 |
| - x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" |
107 |
| - x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" |
108 |
| - class="inline-block w-full max-w-xl p-8 my-20 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl 2xl:max-w-2xl"> |
109 |
| - <div class="flex items-center justify-between space-x-4"> |
110 |
| - <h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title" x-text="modalBill.name"></h3> |
111 |
| - <button @click="modalOpen = false" class="text-gray-600 focus:outline-none hover:text-gray-700"> |
112 |
| - <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" |
113 |
| - stroke="currentColor"> |
114 |
| - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
115 |
| - d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
116 |
| - </svg> |
117 |
| - </button> |
118 |
| - </div> |
119 |
| - <p class="mt-2 text-sm text-gray-500">Data for the week of <span x-text="modalBill.start_month"></span> <span |
120 |
| - x-text="modalBill.start_day"></span> to <span x-text="modalBill.end_month"></span> <span |
121 |
| - x-text="modalBill.end_day"></span>, <span x-text="modalBill.year"></span> (<span |
122 |
| - x-text="modalBill.split_year"></span>)</p> |
123 |
| - <p class="mt-2 text-sm text-gray-800">There were <span x-text="modalBill.count ? modalBill.count : 'no' "></span> people <span x-text="modalBill.count_type === 'Buried' ? 'buried' : modalBill.count_type === 'Plague' ? 'with plague' : ''"></span> in <span x-text="modalBill.name"></span> during the week of <span x-text="modalBill.start_month"></span> <span x-text="modalBill.start_day"></span>—<span x-text="modalBill.end_month"></span> <span x-text="modalBill.end_day"></span>, <span x-text="modalBill.year"></span> (<span x-text="modalBill.split_year"></span>).</p> |
124 |
| - |
125 |
| - <hr class="mt-2 mb-2"/> |
126 |
| - |
127 |
| - <p class="mt-2 text-sm text-gray-800"><strong>Count Type</strong>: <span x-text="modalBill.count_type"></p> |
128 |
| - <p class="mt-2 text-sm text-gray-800"><strong>Count</strong>: <span x-text="modalBill.count ? modalBill.count : 'No count available.'"></p> |
129 |
| - <p class="mt-2 text-sm text-gray-800"><strong>Week Number</strong>: <span x-text="modalBill.week_number"></span> |
130 |
| - <div x-data="{ isMissing: false }"> |
131 |
| - <!-- if missing is True, display "record has missing values" --> |
132 |
| - <p class="mt-2 text-sm text-gray-800" x-show="isMissing"><strong>Record has missing values</strong></p> |
133 |
| - </div> |
134 |
| - <div x-data="{ isIllegible: false }"> |
135 |
| - <!-- if missing is True, display "record has missing values" --> |
136 |
| - <p class="mt-2 text-sm text-gray-800" x-show="isIllegible"><strong>Record has illegible values</strong></p> |
137 |
| - </div> |
138 |
| - </p> |
139 |
| - </div> |
| 94 | + <modal x-show="modalOpen" class="fixed inset-0 z-50 overflow-y-auto" aria-labelledby="modal-title" id="weekly-modal" role="dialog" |
| 95 | + aria-modal="true"> |
| 96 | + <div class="flex items-end justify-center min-h-screen px-4 text-center md:items-center sm:block sm:p-0"> |
| 97 | + <!-- Backdrop overlay --> |
| 98 | + <div x-cloak @click="modalOpen = false" x-show="modalOpen" |
| 99 | + x-transition:enter="transition ease-out duration-300 transform" |
| 100 | + x-transition:enter-start="opacity-0" |
| 101 | + x-transition:enter-end="opacity-100" |
| 102 | + x-transition:leave="transition ease-in duration-200 transform" |
| 103 | + x-transition:leave-start="opacity-100" |
| 104 | + x-transition:leave-end="opacity-0" |
| 105 | + class="fixed inset-0 transition-opacity bg-gray-500 bg-opacity-40" aria-hidden="true"></div> |
| 106 | + |
| 107 | + <!-- Modal content --> |
| 108 | + <div x-cloak x-show="modalOpen" |
| 109 | + x-transition:enter="transition ease-out duration-300 transform" |
| 110 | + x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" |
| 111 | + x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100" |
| 112 | + x-transition:leave="transition ease-in duration-200 transform" |
| 113 | + x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100" |
| 114 | + x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" |
| 115 | + class="inline-block w-full max-w-xl p-8 my-20 overflow-hidden text-left transition-all transform bg-white rounded-lg shadow-xl 2xl:max-w-2xl"> |
| 116 | + |
| 117 | + <!-- Modal header --> |
| 118 | + <div class="flex items-center justify-between space-x-4"> |
| 119 | + <h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title" x-text="modalBill.name"></h3> |
| 120 | + <button @click="modalOpen = false" class="text-gray-600 focus:outline-none hover:text-gray-700"> |
| 121 | + <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" |
| 122 | + stroke="currentColor"> |
| 123 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
| 124 | + d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 125 | + </svg> |
| 126 | + </button> |
| 127 | + </div> |
| 128 | + |
| 129 | + <!-- Modal content with bill information --> |
| 130 | + <p class="mt-2 text-sm text-gray-500">Data for the week of <span x-text="modalBill.start_month"></span> <span |
| 131 | + x-text="modalBill.start_day"></span> to <span x-text="modalBill.end_month"></span> <span |
| 132 | + x-text="modalBill.end_day"></span>, <span x-text="modalBill.year"></span> (<span |
| 133 | + x-text="modalBill.split_year"></span>)</p> |
| 134 | + |
| 135 | + <!-- Bill details --> |
| 136 | + <p class="mt-2 text-sm text-gray-800"><strong>Count Type</strong>: <span x-text="modalBill.count_type"></span></p> |
| 137 | + <p class="mt-2 text-sm text-gray-800"><strong>Count</strong>: <span x-text="modalBill.count ? modalBill.count : 'No count available.'"></span> |
| 138 | + <span x-show="modalBill.missing === true" class="ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 text-xs rounded-full">The data for this record is marked as missing</span> |
| 139 | + <span x-show="modalBill.illegible === true" class="ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 text-xs rounded-full">The data for this record is marked as illegible</span> |
| 140 | + </p> |
| 141 | + <p class="mt-2 text-sm text-gray-800"><strong>Week Number</strong>: <span x-text="modalBill.week_number"></span></p> |
| 142 | + |
| 143 | + <!-- Chart section --> |
| 144 | + <div class="mt-4"> |
| 145 | + <h4 class="text-sm font-medium text-gray-700">Historical Trend</h4> |
| 146 | + <p class="text-sm text-gray-500">Click a legend to toggle data on and off.</p> |
| 147 | + <div class="mt-2 parish-chart-modal"> |
| 148 | + <div id="modal-chart-container" class="chart-container w-full"></div> |
| 149 | + <div id="modal-loading-indicator" class="loading-indicator text-center text-xs text-gray-500 py-2">Loading chart data...</div> |
| 150 | + <div id="modal-error-message" class="error-message hidden text-center text-xs text-red-500 py-2"></div> |
140 | 151 | </div>
|
141 | 152 | </div>
|
142 | 153 | </div>
|
@@ -181,4 +192,3 @@ <h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title" x-text=
|
181 | 192 | </div>
|
182 | 193 | </div>
|
183 | 194 | {{/* end: weeklies table */}}
|
184 |
| - |
|
0 commit comments