ReviewOS

also looking at this

stacks/ts-analytics

refactor: finish DataTable :text → {⁠{ }} migration

#121
Merged glennmichael123 wants to merge refactor/datatable-text-to-mustache into main
1 file +4 -5
src/dashboard/components/DataTable.stxmodified+4-5
Changes to src/dashboard/components/DataTable.stx
@@ -161,7 +161,7 @@ const columnsJson = JSON.stringify(columns)
161161 @click="toggleSort(column.key)"
162162 >
163163 <div class="flex items-center gap-1" x-class="{ 'justify-end': column.align === 'right' }">
164 <span :text="column.label"></span>
164 <span>{{ column.label }}</span>
165165 <svg
166166 :show="sortKey() === column.key"
167167 class="w-4 h-4"
@@ -188,8 +188,7 @@ const columnsJson = JSON.stringify(columns)
188188 'text-center': column.align === 'center',
189189 'tabular-nums': column.format === 'number' || column.format === 'currency'
190190 }"
191 :text="formatValueClient(row[column.key], column.format)"
192 ></td>
191 >{{ formatValueClient(row[column.key], column.format) }}</td>
193192 </div>
194193 </tr>
195194 </div>
@@ -198,7 +197,7 @@ const columnsJson = JSON.stringify(columns)
198197
199198 <div :show="totalPagesComputed() >= 2" class="flex items-center justify-between mt-4 pt-4 border-t border-gray-200">
200199 <div class="text-sm text-gray-500">
201 Showing <span :text="(currentPage() - 1) * tablePgSize + 1"></span> to <span :text="Math.min(currentPage() * tablePgSize, tableRows.length)"></span> of <span :text="tableRows.length"></span>
200 Showing <span>{{ (currentPage() - 1) * tablePgSize + 1 }}</span> to <span>{{ Math.min(currentPage() * tablePgSize, tableRows.length) }}</span> of <span>{{ tableRows.length }}</span>
202201 </div>
203202 <div class="flex items-center gap-2">
204203 <button
@@ -210,7 +209,7 @@ const columnsJson = JSON.stringify(columns)
210209 <Icon name="chevron-left" size="20" />
211210 </button>
212211 <span class="text-sm text-gray-600">
213 Page <span :text="currentPage()"></span> of <span :text="totalPagesComputed()"></span>
212 Page <span>{{ currentPage() }}</span> of <span>{{ totalPagesComputed() }}</span>
214213 </span>
215214 <button
216215 type="button"