Wrapped up approval visuals and refresh behaviour

This commit is contained in:
2026-01-16 19:17:43 -05:00
parent 19eb2be252
commit fafacbefc3
6 changed files with 47 additions and 10 deletions

View File

@@ -40,6 +40,17 @@ async function loadHistory() {
pageData.value = d.pagination;
}
function refresh() {
loadHistory();
promoDayDetails.value?.[0].loadData();
}
defineExpose({
refresh
})
const promoDayDetails = ref<InstanceType<typeof PromotionListDay>[]>(null)
const expanded = ref<number | null>(null);
const hoverID = ref<number | null>(null);
@@ -107,7 +118,8 @@ function formatDate(date: Date): string {
:class="{ 'bg-muted/50 border-t-0': hoverID === index }">
<TableCell :colspan="8" class="p-0">
<div class="w-full p-2 mb-6 space-y-3">
<PromotionListDay :date="new Date(batch.entry_day)"></PromotionListDay>
<PromotionListDay ref="promoDayDetails" :date="new Date(batch.entry_day)">
</PromotionListDay>
</div>
</TableCell>
</TableRow>