diff --git a/app/hackathon_variables.py b/app/hackathon_variables.py index b83194ba..bc395b25 100644 --- a/app/hackathon_variables.py +++ b/app/hackathon_variables.py @@ -40,9 +40,9 @@ HACKATHON_GITHUB_REPO = 'https://github.com/hackupc/myhackupc/' # (OPTIONAL) Applications deadline -HACKATHON_APP_DEADLINE = timezone.datetime(2030, 4, 24, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) -VOLUNTEER_APP_DEADLINE = timezone.datetime(2030, 4, 18, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) -MENTOR_APP_DEADLINE = timezone.datetime(2030, 3, 25, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) +HACKATHON_APP_DEADLINE = timezone.datetime(2025, 4, 21, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) +VOLUNTEER_APP_DEADLINE = timezone.datetime(2025, 4, 11, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) +MENTOR_APP_DEADLINE = timezone.datetime(2025, 4, 21, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) # (OPTIONAL) Online checkin activated ONLINE_CHECKIN = timezone.datetime(2020, 5, 3, 17, 00, tzinfo=timezone.pytz.timezone(TIME_ZONE)) # (OPTIONAL) When to arrive at the hackathon @@ -68,7 +68,7 @@ REIMBURSEMENT_ENABLED = True DEFAULT_REIMBURSEMENT_AMOUNT = 100 CURRENCY = '€' -REIMBURSEMENT_EXPIRY_DATE = timezone.datetime(2025, 5, 1, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) +REIMBURSEMENT_EXPIRY_DATE = timezone.datetime(2025, 5, 2, 17, 00, tzinfo=timezone.pytz.timezone(TIME_ZONE)) REIMBURSEMENT_REQUIREMENTS = 'You have to submit a project and demo it during the event in order to get reimbursed' REIMBURSEMENT_DEADLINE = timezone.datetime(2025, 5, 5, 23, 59, tzinfo=timezone.pytz.timezone(TIME_ZONE)) diff --git a/app/utils.py b/app/utils.py index 448982bb..406f39f4 100644 --- a/app/utils.py +++ b/app/utils.py @@ -235,7 +235,7 @@ def generateGTicketUrl(qrValue: str): }, "logo": { "sourceUri": { - "uri": "https://i.ibb.co/tXt96Xn/Logo-1.png", + "uri": "https://i.ibb.co/b5TQV4md/hackupc2025.png", }, "contentDescription": { "defaultValue": { @@ -298,12 +298,12 @@ def generateGTicketUrl(qrValue: str): }, }, }, - "dateTime": {"start": "2024-05-03T16:00", "end": "2024-05-05T17:00"}, + "dateTime": {"start": "2025-05-02T16:00", "end": "2025-05-04T17:00"}, "reviewStatus": "UNDER_REVIEW", - "hexBackgroundColor": "#0060BF", + "hexBackgroundColor": "#231F20", "heroImage": { "sourceUri": { - "uri": "https://i.ibb.co/2ytdRvf/Gpay-2.png", + "uri": "https://i.ibb.co/LL5T8d0/walletv2.png", }, "contentDescription": { "defaultValue": { diff --git a/applications/emails.py b/applications/emails.py index 22e58091..2b1f09a9 100644 --- a/applications/emails.py +++ b/applications/emails.py @@ -26,7 +26,7 @@ def create_confirmation_email(application, request): c = { 'name': application.user.get_full_name, 'token': application.uuid_str, - 'qr_url': 'http://chart.googleapis.com/chart?cht=qr&chs=350x350&chl=%s' + 'qr_url': 'https://quickchart.io/qr?size=350&text=%s' % application.uuid_str, 'cancel_url': str(reverse('cancel_app', request=request, kwargs={'id': application.uuid_str})), 'is_hacker': application.user.is_hacker(), diff --git a/applications/templates/dashboard.html b/applications/templates/dashboard.html index 8ff9f58b..3c4a876c 100644 --- a/applications/templates/dashboard.html +++ b/applications/templates/dashboard.html @@ -193,6 +193,24 @@
Remember! You will need to submit your travel tickets after confirming your spot.
\ + '; + + reimb.on('change', function () { + if ($('input[name="reimb"]:checked').val() === 'True') { + console.log('reimb Yes'); + if ($('#reimbursement_reminder').length === 0) { + // add the reminder to the parent's child that has the help-block classname + $('#id_reimb').parent().parent().find('.help-block').append(reimbursement_reminder); + } + } else { + console.log('reimb No'); + $('#reimbursement_reminder').remove(); + } + }); + let origin = $('#origin').text().trim(); origin = origin.toLowerCase().split(','); if (origin[1].includes('barcelona') || origin[1].includes('tarragona') || origin[1].includes('lleida') || origin[1].includes('girona')){ diff --git a/reimbursement/forms.py b/reimbursement/forms.py index 6d9af9aa..877c6dea 100644 --- a/reimbursement/forms.py +++ b/reimbursement/forms.py @@ -47,6 +47,12 @@ def clean_receipt(self): "Please keep resume under %s. Current filesize %s" % (filesizeformat(settings.MAX_UPLOAD_SIZE), filesizeformat(size)) ) + # # check if is pdf + # if receipt and not receipt.name.endswith(".pdf"): + # raise forms.ValidationError("Please upload a PDF file") + + if(not receipt.name.endswith(".pdf")): + raise forms.ValidationError("Please upload a PDF file") return receipt def clean_origin(self): @@ -176,11 +182,15 @@ class Meta: labels = {"devpost": "Devpost URL"} help_texts = {"devpost": "Please provide the URL of your Devpost project"} widgets = { - "devpost": forms.TextInput(attrs={"autocomplete": "off"}), + "devpost": forms.TextInput(attrs={"autocomplete": "off", + "placeholder": "https://devpost.com/software/..."}), } def clean_devpost(self): devpost = self.cleaned_data["devpost"] if not devpost: raise forms.ValidationError("Please provide a Devpost URL") + if not devpost.startswith("https://devpost.com/software/"): + raise forms.ValidationError("Please provide a valid Software Devpost URL \ + that follows the structure: https://devpost.com/software/your-project-name") return devpost diff --git a/reimbursement/models.py b/reimbursement/models.py index 7f45c488..c89fa657 100644 --- a/reimbursement/models.py +++ b/reimbursement/models.py @@ -97,7 +97,7 @@ class Reimbursement(models.Model): related_name="reimbursements_made", on_delete=models.SET_NULL, ) - expiration_time = models.DateTimeField(blank=True, null=True) + expiration_time = models.DateTimeField(default=settings.REIMBURSEMENT_EXPIRY_DATE) update_time = models.DateTimeField(default=timezone.now) creation_time = models.DateTimeField(default=timezone.now) status = models.CharField(max_length=2, choices=RE_STATUS, default=RE_PEND_TICKET) @@ -157,6 +157,13 @@ def validate(self, user): self.reimbursed_by = user self.save() + def invalidate(self, user): + if self.status == RE_PEND_DEMO_VAL: + self.status = RE_WAITLISTED + self.status_update_date = timezone.now() + self.reimbursed_by = user + self.save() + def no_reimb(self, user): if self.status == RE_PEND_TICKET: self.status = RE_WAITLISTED diff --git a/reimbursement/templates/include/devpost_form.html b/reimbursement/templates/include/devpost_form.html index 67ee6381..fbaa01c9 100644 --- a/reimbursement/templates/include/devpost_form.html +++ b/reimbursement/templates/include/devpost_form.html @@ -10,13 +10,12 @@