Compare commits

..

1 Commits

Author SHA1 Message Date
9bfc5a4b95 chore(deps): update dependency vite to v6.0.4
All checks were successful
Ruff / ruff (push) Successful in 1m3s
Ruff / ruff (pull_request) Successful in 42s
Test / test (push) Successful in 12m33s
Test / test (pull_request) Successful in 12m3s
2024-12-19 10:16:08 +00:00
7 changed files with 97 additions and 117 deletions

View File

@ -149,12 +149,7 @@ def sync_members(access_client: AccessClient):
if access_user := access_users_by_employee_number.get(member.uid):
expected_user["status"] = (
UserStatus.ACTIVE
if (
member.is_active
or member.flags.filter(name="Misc. Access", type="folder").exists()
)
else UserStatus.DEACTIVATED
UserStatus.ACTIVE if member.is_active else UserStatus.DEACTIVATED
)
changes = {
k: v for k, v in expected_user.items() if getattr(access_user, k) != v

View File

@ -4,6 +4,7 @@ from datetime import datetime, timedelta
from django.conf import settings
from django.db import transaction
from django.db.models import QuerySet
from cmsmanage.django_q2_helper import q_task_group
from membershipworks.membershipworks_api import FieldType, MembershipWorks
@ -124,13 +125,13 @@ def scrape_membershipworks(*args, **options):
scrape_transactions(membershipworks)
def scrape_event_details(events: Iterable[EventExt]):
def scrape_event_details(queryset: QuerySet[EventExt]):
membershipworks = MembershipWorks()
membershipworks.login(
settings.MEMBERSHIPWORKS_USERNAME, settings.MEMBERSHIPWORKS_PASSWORD
)
for event in events:
for event in queryset:
event.details = membershipworks.get_event_by_eid(event.eid)
event.registrations = membershipworks.get_event_registrations(event.eid)
event.save()

View File

@ -1,10 +0,0 @@
<a class="btn btn-sm btn-primary"
hx-boost="true"
hx-push-url="false"
hx-indicator=".htmx-indicator"
href="{% querystring refresh=1 %}">
<div class="spinner-border spinner-border-sm htmx-indicator" role="status">
<span class="visually-hidden">Loading...</span>
</div>
Refresh Data
</a>

View File

@ -13,16 +13,10 @@
{% endblock %}
{% block content %}
<div class="container">
<div class="row justify-content-center d-print-none">
<div class="col-auto">
{% if event.registrations is not None %}
{% url 'membershipworks:event-registrations' event.pk as registrations_url %}
{% bootstrap_button extra_classes="btn-sm" href=registrations_url content="Show Registrations" %}
{% bootstrap_button href=registrations_url content="Show Registrations" %}
{% endif %}
</div>
<div class="col-auto">{% include "membershipworks/components/refresh_data_button.dj.html" %}</div>
</div>
{% include "membershipworks/event_invoice.dj.html" %}
<div class="card w-auto mt-5">

View File

@ -22,7 +22,6 @@
{% bootstrap_button extra_classes="btn-sm" href=email_link target="_blank" content="Email all attendees" %}
</div>
<div class="col-auto">{% include "cmsmanage/components/download_table.dj.html" %}</div>
<div class="col-auto">{% include "membershipworks/components/refresh_data_button.dj.html" %}</div>
</div>
<h2 class="d-none d-print-block">Registrations for {{ event.details.ttl|nh3 }}</h2>
{% render_table table %}

View File

@ -41,7 +41,6 @@ from django_weasyprint import WeasyTemplateResponseMixin
from django_weasyprint.utils import django_url_fetcher
from membershipworks.membershipworks_api import MembershipWorks
from membershipworks.tasks.scrape import scrape_event_details, scrape_events
from .forms import EventInvoiceForm
from .invoice_email import make_invoice_emails
@ -311,10 +310,6 @@ class EventDetailView(
if self.request.user.has_perm(
self.permission_required
) or self.object.user_is_instructor(self.request.user):
if "refresh" in self.request.GET:
scrape_events()
scrape_event_details([self.object])
return super().render_to_response(context, **response_kwargs)
else:
return self.handle_no_permission()
@ -458,9 +453,6 @@ class EventRegistrationsView(ExportMixin, SingleTableMixin, AccessMixin, DetailV
def render_to_response(
self, context: dict[str, Any], **response_kwargs: Any
) -> HttpResponse:
if "refresh" in self.request.GET:
scrape_event_details([self.object])
if self.request.user.has_perm(
self.permission_required
) or self.object.user_is_instructor(self.request.user):

169
pnpm-lock.yaml generated
View File

@ -47,7 +47,7 @@ importers:
version: 5.7.2
vite:
specifier: ^6.0.3
version: 6.0.3(sass@1.82.0)
version: 6.0.4(sass@1.82.0)
packages:
@ -292,93 +292,98 @@ packages:
'@popperjs/core@2.11.8':
resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==}
'@rollup/rollup-android-arm-eabi@4.28.0':
resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==}
'@rollup/rollup-android-arm-eabi@4.28.1':
resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.28.0':
resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==}
'@rollup/rollup-android-arm64@4.28.1':
resolution: {integrity: sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.28.0':
resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==}
'@rollup/rollup-darwin-arm64@4.28.1':
resolution: {integrity: sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.28.0':
resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==}
'@rollup/rollup-darwin-x64@4.28.1':
resolution: {integrity: sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-freebsd-arm64@4.28.0':
resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==}
'@rollup/rollup-freebsd-arm64@4.28.1':
resolution: {integrity: sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.28.0':
resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==}
'@rollup/rollup-freebsd-x64@4.28.1':
resolution: {integrity: sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-linux-arm-gnueabihf@4.28.0':
resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==}
'@rollup/rollup-linux-arm-gnueabihf@4.28.1':
resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.28.0':
resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==}
'@rollup/rollup-linux-arm-musleabihf@4.28.1':
resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.28.0':
resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==}
'@rollup/rollup-linux-arm64-gnu@4.28.1':
resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.28.0':
resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==}
'@rollup/rollup-linux-arm64-musl@4.28.1':
resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.28.0':
resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==}
'@rollup/rollup-linux-loongarch64-gnu@4.28.1':
resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==}
cpu: [loong64]
os: [linux]
'@rollup/rollup-linux-powerpc64le-gnu@4.28.1':
resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.28.0':
resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==}
'@rollup/rollup-linux-riscv64-gnu@4.28.1':
resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.28.0':
resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==}
'@rollup/rollup-linux-s390x-gnu@4.28.1':
resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.28.0':
resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==}
'@rollup/rollup-linux-x64-gnu@4.28.1':
resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.28.0':
resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==}
'@rollup/rollup-linux-x64-musl@4.28.1':
resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==}
cpu: [x64]
os: [linux]
'@rollup/rollup-win32-arm64-msvc@4.28.0':
resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==}
'@rollup/rollup-win32-arm64-msvc@4.28.1':
resolution: {integrity: sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.28.0':
resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==}
'@rollup/rollup-win32-ia32-msvc@4.28.1':
resolution: {integrity: sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.28.0':
resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==}
'@rollup/rollup-win32-x64-msvc@4.28.1':
resolution: {integrity: sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==}
cpu: [x64]
os: [win32]
@ -520,8 +525,8 @@ packages:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
rollup@4.28.0:
resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==}
rollup@4.28.1:
resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
@ -557,8 +562,8 @@ packages:
resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==}
engines: {node: '>=18'}
vite@6.0.3:
resolution: {integrity: sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==}
vite@6.0.4:
resolution: {integrity: sha512-zwlH6ar+6o6b4Wp+ydhtIKLrGM/LoqZzcdVmkGAFun0KHTzIzjh+h0kungEx7KJg/PYnC80I4TII9WkjciSR6Q==}
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
hasBin: true
peerDependencies:
@ -746,58 +751,61 @@ snapshots:
'@popperjs/core@2.11.8': {}
'@rollup/rollup-android-arm-eabi@4.28.0':
'@rollup/rollup-android-arm-eabi@4.28.1':
optional: true
'@rollup/rollup-android-arm64@4.28.0':
'@rollup/rollup-android-arm64@4.28.1':
optional: true
'@rollup/rollup-darwin-arm64@4.28.0':
'@rollup/rollup-darwin-arm64@4.28.1':
optional: true
'@rollup/rollup-darwin-x64@4.28.0':
'@rollup/rollup-darwin-x64@4.28.1':
optional: true
'@rollup/rollup-freebsd-arm64@4.28.0':
'@rollup/rollup-freebsd-arm64@4.28.1':
optional: true
'@rollup/rollup-freebsd-x64@4.28.0':
'@rollup/rollup-freebsd-x64@4.28.1':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.28.0':
'@rollup/rollup-linux-arm-gnueabihf@4.28.1':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.28.0':
'@rollup/rollup-linux-arm-musleabihf@4.28.1':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.28.0':
'@rollup/rollup-linux-arm64-gnu@4.28.1':
optional: true
'@rollup/rollup-linux-arm64-musl@4.28.0':
'@rollup/rollup-linux-arm64-musl@4.28.1':
optional: true
'@rollup/rollup-linux-powerpc64le-gnu@4.28.0':
'@rollup/rollup-linux-loongarch64-gnu@4.28.1':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.28.0':
'@rollup/rollup-linux-powerpc64le-gnu@4.28.1':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.28.0':
'@rollup/rollup-linux-riscv64-gnu@4.28.1':
optional: true
'@rollup/rollup-linux-x64-gnu@4.28.0':
'@rollup/rollup-linux-s390x-gnu@4.28.1':
optional: true
'@rollup/rollup-linux-x64-musl@4.28.0':
'@rollup/rollup-linux-x64-gnu@4.28.1':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.28.0':
'@rollup/rollup-linux-x64-musl@4.28.1':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.28.0':
'@rollup/rollup-win32-arm64-msvc@4.28.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.28.0':
'@rollup/rollup-win32-ia32-msvc@4.28.1':
optional: true
'@rollup/rollup-win32-x64-msvc@4.28.1':
optional: true
'@sindresorhus/merge-streams@2.3.0': {}
@ -938,28 +946,29 @@ snapshots:
reusify@1.0.4: {}
rollup@4.28.0:
rollup@4.28.1:
dependencies:
'@types/estree': 1.0.6
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.28.0
'@rollup/rollup-android-arm64': 4.28.0
'@rollup/rollup-darwin-arm64': 4.28.0
'@rollup/rollup-darwin-x64': 4.28.0
'@rollup/rollup-freebsd-arm64': 4.28.0
'@rollup/rollup-freebsd-x64': 4.28.0
'@rollup/rollup-linux-arm-gnueabihf': 4.28.0
'@rollup/rollup-linux-arm-musleabihf': 4.28.0
'@rollup/rollup-linux-arm64-gnu': 4.28.0
'@rollup/rollup-linux-arm64-musl': 4.28.0
'@rollup/rollup-linux-powerpc64le-gnu': 4.28.0
'@rollup/rollup-linux-riscv64-gnu': 4.28.0
'@rollup/rollup-linux-s390x-gnu': 4.28.0
'@rollup/rollup-linux-x64-gnu': 4.28.0
'@rollup/rollup-linux-x64-musl': 4.28.0
'@rollup/rollup-win32-arm64-msvc': 4.28.0
'@rollup/rollup-win32-ia32-msvc': 4.28.0
'@rollup/rollup-win32-x64-msvc': 4.28.0
'@rollup/rollup-android-arm-eabi': 4.28.1
'@rollup/rollup-android-arm64': 4.28.1
'@rollup/rollup-darwin-arm64': 4.28.1
'@rollup/rollup-darwin-x64': 4.28.1
'@rollup/rollup-freebsd-arm64': 4.28.1
'@rollup/rollup-freebsd-x64': 4.28.1
'@rollup/rollup-linux-arm-gnueabihf': 4.28.1
'@rollup/rollup-linux-arm-musleabihf': 4.28.1
'@rollup/rollup-linux-arm64-gnu': 4.28.1
'@rollup/rollup-linux-arm64-musl': 4.28.1
'@rollup/rollup-linux-loongarch64-gnu': 4.28.1
'@rollup/rollup-linux-powerpc64le-gnu': 4.28.1
'@rollup/rollup-linux-riscv64-gnu': 4.28.1
'@rollup/rollup-linux-s390x-gnu': 4.28.1
'@rollup/rollup-linux-x64-gnu': 4.28.1
'@rollup/rollup-linux-x64-musl': 4.28.1
'@rollup/rollup-win32-arm64-msvc': 4.28.1
'@rollup/rollup-win32-ia32-msvc': 4.28.1
'@rollup/rollup-win32-x64-msvc': 4.28.1
fsevents: 2.3.3
run-parallel@1.2.0:
@ -988,11 +997,11 @@ snapshots:
unicorn-magic@0.1.0: {}
vite@6.0.3(sass@1.82.0):
vite@6.0.4(sass@1.82.0):
dependencies:
esbuild: 0.24.0
postcss: 8.4.49
rollup: 4.28.0
rollup: 4.28.1
optionalDependencies:
fsevents: 2.3.3
sass: 1.82.0