WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/routes/(authenticated)/management/[conferenceId]/participants Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11query ConferenceParticipantsByParticipationTypeQuery ($conferenceId : String ! ) {
22 findUniqueConference (where : { id : $conferenceId }) {
33 endConference
4+ startConference
45 }
56 findManyDelegationMembers (where : { conferenceId : { equals : $conferenceId } }) {
67 user {
Original file line number Diff line number Diff line change 1010 import DataTable from ' $lib/components/DataTable/DataTable.svelte' ;
1111 import type { ParticipationType , UserRowData } from ' ./types' ;
1212 import { cache } from ' $houdini' ;
13+ import { ofAgeAtConference } from ' $lib/services/ageChecker' ;
1314
1415 const { data }: { data: PageData } = $props ();
1516 const queryData = $derived (data .ConferenceParticipantsByParticipationTypeQuery );
6364 };
6465
6566 const calculateConferenceAge = (birthday : Date ) => {
66- if (! conference ?.endConference ) return undefined ;
67- const age = conference .endConference .getFullYear () - birthday .getFullYear ();
68- const m = conference .endConference .getMonth () - birthday .getMonth ();
69- const d = conference .endConference .getDate () - birthday .getDate ();
67+ if (! conference ?.startConference ) return undefined ;
68+ const age = conference .startConference .getFullYear () - birthday .getFullYear ();
69+ const m = conference .startConference .getMonth () - birthday .getMonth ();
70+ const d = conference .startConference .getDate () - birthday .getDate ();
7071 return (m < 0 || (m === 0 && d < 0 ) ? age - 1 : age ).toString ();
7172 };
7273
170171 if (
171172 row .status ?.termsAndConditions === ' DONE' &&
172173 row .status ?.mediaConsent === ' DONE' &&
173- row .status ?.guardianConsent === ' DONE'
174+ (row .status ?.guardianConsent === ' DONE' ||
175+ ofAgeAtConference (conference ?.startConference , row .birthday ))
174176 ) {
175177 return ` <i class="fas fa-check text-success"></i> ` ;
176178 }
You can’t perform that action at this time.
0 commit comments