Commit Graph

137 Commits

Author SHA1 Message Date
imperosol
8524996f06 simplify Subscription.save() 2025-09-01 15:30:39 +02:00
imperosol
2086d23b50 fix old subscribers group attribution
Si un utilisateur faisait sa première cotisation alors qu'il avait déjà un compte AE (par exemple, en effectuant un achat sur l'eboutic avant sa cotisation), alors il pouvait se retrouver hors du groupe Anciens cotisants.
2025-08-31 20:49:56 +02:00
Sli
c904e41ea3 Replace tab macro with new tab web component 2025-06-16 09:05:19 +02:00
imperosol
8a38ebb09d skip useless checks when creating a subscription for a new member 2025-03-13 18:49:42 +01:00
imperosol
7c3186da79 apply ruff rule A005 2025-03-10 10:33:05 +01:00
imperosol
9c0d89de83 Give the student role when creating a new user subscription 2025-02-24 07:13:19 +01:00
imperosol
6bf02cecd9 Allow some customisation in core/edit.jinja 2025-02-15 12:05:54 +01:00
imperosol
05d4a09f8c Add a page to manage the groups that can create permissions 2025-02-15 12:05:54 +01:00
imperosol
294b59b4d6 use django auth for subscription creation page 2025-02-13 13:36:46 +01:00
imperosol
b7bf3fd375 Give the old_subscribers group when subscribing 2025-01-10 02:12:17 +01:00
imperosol
be6a077c8e fix access to the subscription page 2024-12-18 14:13:39 +01:00
Sli
f63fb59cbf Allow filtering of refilling options
* Move settings.SITH_COUNTER_PAYMENT_METHOD to counter.apps.PAYMENT_METHOD
* Move student cards to an accordion on counter click
* Make cash default refilling option
* Disable bank selection option in refilling if CHECK are not allowed
* Disable refilling with CHECK from the frontend
2024-12-16 00:15:21 +01:00
imperosol
f0bc502ec9 fix translation in subscription creation success fragment 2024-12-09 12:31:58 +01:00
imperosol
9667c79162 remove htmx-ext-response-targets 2024-12-03 19:41:10 +01:00
imperosol
04b4b34bfe add back user profiles on subscription form 2024-12-03 19:41:09 +01:00
imperosol
fc0e689d4e add initial values to forms 2024-12-03 19:41:09 +01:00
imperosol
8dcfc604a0 write tests 2024-12-03 19:41:09 +01:00
imperosol
d2d639e5f6 Split SubscriptionForm into SubscriptionNewUserForm and SubscriptionExistingUserForm 2024-12-03 19:41:09 +01:00
imperosol
70f5ae4f9c Move subscription forms to subscription/forms.py 2024-11-26 16:17:44 +01:00
Sli
0485ab1120 Remove defer from script where type=module is used 2024-11-19 21:22:14 +01:00
Sli
8a8851847c Passage de webpack à vite.dev 2024-11-19 21:22:14 +01:00
Sli
7b41051d0d Go for a more generic js bundling architecture
* Don't tie the output name to webpack itself
* Don't call js bundling webpack in python code
* Make the doc more generic about js bundling
2024-11-19 21:22:14 +01:00
imperosol
6853ec0b69 make random password generation safe 2024-11-19 13:21:08 +01:00
Sli
a21460a1b8 Remove ajax_select from subscriptions 2024-10-20 22:36:55 +02:00
thomas girod
d16a207a83 Add more Ruff rules (#891)
* ruff: apply rule F

* ruff: apply rule E

* ruff: apply rule SIM

* ruff: apply rule TCH

* ruff: apply rule ERA

* ruff: apply rule PLW

* ruff: apply rule FLY

* ruff: apply rule PERF

* ruff: apply rules FURB & RUF
2024-10-15 11:36:26 +02:00
Sli
7e1734aed5 Migrate chartjs to npm 2024-10-14 00:55:48 +02:00
thomas girod
a4fe4996aa Merge pull request #834 from ae-utbm/real-name
Restore real name
2024-10-03 10:12:23 +02:00
thomas girod
0eaa20e09d fix localdate issues 2024-10-03 00:25:22 +02:00
Sli
9c93162741 Add missing files 2024-09-23 10:25:27 +02:00
Sli
6068c6048a Use real name of the website once again 2024-09-23 01:37:25 +02:00
thomas girod
352b09d9cd fix subscription form translation 2024-09-01 15:20:07 +02:00
thomas girod
d295cc5223 move vendored files into their own folder 2024-08-26 22:34:32 +02:00
thomas girod
eef15e05f4 use autocomplete_fields in admin 2024-08-01 11:27:54 +02:00
thomas girod
b25805e0a1 introduce djhtml as jinja+scss formater 2024-07-25 16:46:45 +02:00
thomas girod
04e7f65e8e Merge pull request #725 from ae-utbm/drop-jquery-calendar
Remove jquery datetimepicker
2024-07-25 01:20:41 +02:00
Sli
fee7ade1a5 Harmonize test names 2024-07-24 00:50:48 +02:00
thomas girod
9295325d21 remove jquery datetime picker 2024-07-23 23:26:48 +02:00
thomas girod
3046438cb1 replace drf by django-ninja 2024-07-23 19:57:33 +02:00
thomas girod
8c69a94488 use google convention for docstrings 2024-07-21 00:57:04 +02:00
thomas girod
2ac578c3ad ruff rule DJ
Co-authored-by: Bartuccio Antoine <klmp200@users.noreply.github.com>
2024-07-08 15:37:10 +02:00
thomas girod
cfc19434d0 ruff rules UP008 and UP009 2024-07-08 15:37:09 +02:00
thomas girod
d97602e60b Use pytest for tests (#681)
* use pytest for tests

Eh ouais, il y a que la config qui change. Pytest est implémentable par étapes. Et ça c'est beau.

* rework tests with pytest

* remove unittest custom TestRunner

* Edit doc and CI
2024-06-26 19:10:24 +02:00
thomas girod
3143d3d91a reorganize imports with ruff 2024-06-26 12:35:38 +02:00
Julien Constant
38295e591d Fix immutable default variable in get_start_of_semester (#656)
Le serveur ne percevait pas le changement de semestre, parce
que la valeur par défaut passée à la fonction `get_start_of_semester()` était une fonction appelée une seule fois, lors du lancement du serveur. Bref, c'était ça : https://beta.ruff.rs/docs/rules/function-call-in-default-argument/

---------

Co-authored-by: imperosol <thgirod@hotmail.com>
2023-09-07 23:11:58 +02:00
thomas girod
ef968f3673 Better usage of cache for groups and clubs related operations (#634)
* Better usage of cache for group retrieval

* Cache clearing on object deletion or update

* replace signals by save and delete override

* add is_anonymous check in is_owned_by

Add in many is_owned_by(self, user) methods that user is not anonymous. Since many of those functions do db queries, this should reduce a little bit the load of the db.

* Stricter usage of User.is_in_group

Constrain the parameters that can be passed to the function to make sure only a str or an int can be used. Also force to explicitly specify if the group id or the group name is used.

* write test and correct bugs

* remove forgotten populate commands

* Correct test
2023-05-02 12:36:59 +02:00
thomas girod
96dede5077 Speed up tests (#638) 2023-05-02 11:00:23 +02:00
thomas girod
b5a40cfda9 Mise à jour de Black vers la version 23.3 (#629) 2023-04-22 15:32:31 +02:00
Julien Constant
8e7c025e47 [FIX] Broken link in readme and license fix (& update) (#591) 2023-04-04 18:39:45 +02:00
thomas girod
a73fe598ef repair user merging tool (#498) 2023-03-04 15:01:08 +01:00
thomas girod
d726f4b1e8 Merge pull request #499 from ae-utbm/unify-account-creation
Unify account id creation
2023-01-11 13:26:00 +01:00