@@ -26,7 +26,12 @@ const filteredFamilies = ref<IFamily[]>(familyData.value);
2626
2727async function setApiState(state : State ) {
2828 try {
29- if (! confirm (' This will update the state of the website. Are you sure you want to do this?' )) return ;
29+ if (
30+ ! confirm (
31+ ' This will update the state of the website. Are you sure you want to do this?'
32+ )
33+ )
34+ return ;
3035 await $fetch (' /api/admin/state' , {
3136 method: ' PUT' ,
3237 headers ,
@@ -50,7 +55,10 @@ function filterFamilies() {
5055 family .parents .some (student =>
5156 student .shortcode .startsWith (search .value )
5257 ) ||
53- family .kids .some (student => student .shortcode .startsWith (search .value ))
58+ family .kids .some (student =>
59+ student .shortcode .startsWith (search .value )
60+ ) ||
61+ family .id == search .value
5462 );
5563 }
5664}
@@ -89,6 +97,12 @@ definePageMeta({
8997 <b >Freshers who successfully completed survey:</b >
9098 {{ statsData.registered_freshers }}
9199 </p >
100+ <p >
101+ <b >Minimum to reasonably expect (all parents + all kids):</b > {{ statsData.families * 2 + statsData.registered_freshers }}
102+ </p >
103+ <p >
104+ <b >Maximum to unreasonably expect (all freshers + all parents)</b > {{ statsData.families * 2 + statsData.all_freshers }}
105+ </p >
92106 </div >
93107 </div >
94108 </Card >
@@ -116,7 +130,7 @@ definePageMeta({
116130 <CardTitle >All families</CardTitle >
117131 <input
118132 class =" my-2"
119- placeholder =" search by shortcode"
133+ placeholder =" search by shortcode or family ID "
120134 v-model =" search"
121135 @input =" filterFamilies" />
122136 <div v-for =" family of filteredFamilies" class =" m-1 border-4 p-1" >
0 commit comments