mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-30 23:39:54 +01:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			potvieux
			...
			a221b1e40e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | a221b1e40e | ||
|  | 5a0fe7a6f0 | ||
|  | eda8460014 | ||
|  | 15c71ad31a | 
| @@ -201,8 +201,7 @@ class Entry(models.Model): | |||||||
|     def save(self, *args, **kwargs): |     def save(self, *args, **kwargs): | ||||||
|         qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest) |         qs = Entry.objects.filter(~Q(pk=self.pk), activity=self.activity, note=self.note, guest=self.guest) | ||||||
|         if qs.exists(): |         if qs.exists(): | ||||||
|             raise ValidationError(_("Already entered on ") |             raise ValidationError(_("Already entered on ") + _("{:%Y-%m-%d %H:%M:%S}").format(qs.get().time, )) | ||||||
|                                   + _("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(qs.get().time), )) |  | ||||||
|  |  | ||||||
|         if self.guest: |         if self.guest: | ||||||
|             self.note = self.guest.inviter |             self.note = self.guest.inviter | ||||||
|   | |||||||
| @@ -1,8 +1,6 @@ | |||||||
| # Copyright (C) 2018-2025 by BDE ENS Paris-Saclay | # Copyright (C) 2018-2025 by BDE ENS Paris-Saclay | ||||||
| # SPDX-License-Identifier: GPL-3.0-or-later | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
|  |  | ||||||
| import datetime |  | ||||||
|  |  | ||||||
| from django.utils import timezone | from django.utils import timezone | ||||||
| from django.utils.html import escape | from django.utils.html import escape | ||||||
| from django.utils.safestring import mark_safe | from django.utils.safestring import mark_safe | ||||||
| @@ -57,7 +55,7 @@ class GuestTable(tables.Table): | |||||||
|  |  | ||||||
|     def render_entry(self, record): |     def render_entry(self, record): | ||||||
|         if record.has_entry: |         if record.has_entry: | ||||||
|             return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(timezone.localtime(record.entry.time)))) |             return str(_("Entered on ") + str(_("{:%Y-%m-%d %H:%M:%S}").format(record.entry.time, ))) | ||||||
|         return mark_safe('<button id="{id}" class="btn btn-danger btn-sm" onclick="remove_guest(this.id)"> ' |         return mark_safe('<button id="{id}" class="btn btn-danger btn-sm" onclick="remove_guest(this.id)"> ' | ||||||
|                          '{delete_trans}</button>'.format(id=record.id, delete_trans=_("remove").capitalize())) |                          '{delete_trans}</button>'.format(id=record.id, delete_trans=_("remove").capitalize())) | ||||||
|  |  | ||||||
| @@ -79,9 +77,6 @@ def get_row_class(record): | |||||||
|             c += " table-info" |             c += " table-info" | ||||||
|         elif record.note.balance < 0: |         elif record.note.balance < 0: | ||||||
|             c += " table-danger" |             c += " table-danger" | ||||||
|         # MODE VIEUXCON=ON |  | ||||||
|         if (datetime.datetime.utcnow().timestamp() - record.note.created_at.timestamp()) > 3600 * 24 * 365 * 2.5: |  | ||||||
|             c += " font-weight-bold underline" |  | ||||||
|     return c |     return c | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -264,22 +264,13 @@ class ActivityEntryView(LoginRequiredMixin, SingleTableMixin, TemplateView): | |||||||
|                                          balance=F("note__balance")) |                                          balance=F("note__balance")) | ||||||
|  |  | ||||||
|         # Keep only users that have a note |         # Keep only users that have a note | ||||||
|         note_qs = note_qs.filter(note__noteuser__isnull=False).exclude(note__inactivity_reason='forced') |         note_qs = note_qs.filter(note__noteuser__isnull=False) | ||||||
|  |  | ||||||
|         if activity.activity_type.name != "Pot Vieux": |  | ||||||
|             # Keep only members |  | ||||||
|             note_qs = note_qs.filter( |  | ||||||
|                 note__noteuser__user__memberships__club=activity.attendees_club, |  | ||||||
|                 note__noteuser__user__memberships__date_start__lte=timezone.now(), |  | ||||||
|                 note__noteuser__user__memberships__date_end__gte=timezone.now(), |  | ||||||
|             ) |  | ||||||
|  |  | ||||||
|         # Keep only valid members |         # Keep only valid members | ||||||
| #        note_qs = note_qs.filter( |         note_qs = note_qs.filter( | ||||||
| #            note__noteuser__user__memberships__club=activity.attendees_club, |             note__noteuser__user__memberships__club=activity.attendees_club, | ||||||
| #            note__noteuser__user__memberships__date_start__lte=timezone.now(), |             note__noteuser__user__memberships__date_start__lte=timezone.now(), | ||||||
| #            note__noteuser__user__memberships__date_end__gte=timezone.now(), |             note__noteuser__user__memberships__date_end__gte=timezone.now()).exclude(note__inactivity_reason='forced') | ||||||
| #       ) |  | ||||||
|  |  | ||||||
|         # Filter with permission backend |         # Filter with permission backend | ||||||
|         note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view")) |         note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view")) | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ from .models import Profile, Club, Membership | |||||||
| class CustomAuthenticationForm(AuthenticationForm): | class CustomAuthenticationForm(AuthenticationForm): | ||||||
|     permission_mask = forms.ModelChoiceField( |     permission_mask = forms.ModelChoiceField( | ||||||
|         label=_("Permission mask"), |         label=_("Permission mask"), | ||||||
|         queryset=PermissionMask.objects.order_by("-rank"), |         queryset=PermissionMask.objects.order_by("rank"), | ||||||
|         empty_label=None, |         empty_label=None, | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								apps/member/migrations/0013_auto_20240807_1409.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								apps/member/migrations/0013_auto_20240807_1409.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | # Generated by Django 2.2.28 on 2024-08-07 12:09 | ||||||
|  |  | ||||||
|  | from django.db import migrations, models | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  |  | ||||||
|  |     dependencies = [ | ||||||
|  |         ('member', '0012_club_add_registration_form'), | ||||||
|  |     ] | ||||||
|  |  | ||||||
|  |     operations = [ | ||||||
|  |         migrations.AlterField( | ||||||
|  |             model_name='profile', | ||||||
|  |             name='promotion', | ||||||
|  |             field=models.PositiveSmallIntegerField(default=2024, help_text='Year of entry to the school (None if not ENS student)', null=True, verbose_name='promotion'), | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
| @@ -20,14 +20,12 @@ SPDX-License-Identifier: GPL-3.0-or-later | |||||||
|       </form> |       </form> | ||||||
|     </div> |     </div> | ||||||
|     <!-- MODAL TO CROP THE IMAGE --> |     <!-- MODAL TO CROP THE IMAGE --> | ||||||
|     <div class="modal fade" id="modalCrop" data-backdrop="static"> |     <div class="modal fade" id="modalCrop"> | ||||||
|       <div class="modal-dialog"> |       <div class="modal-dialog"> | ||||||
|         <div class="modal-content"> |         <div class="modal-content"> | ||||||
|             <div class="modal-body-wrapper" style="width: 500px; height: 500px; padding: 16px;"> |           <div class="modal-body"> | ||||||
|               <div class="modal-body" style="width: 100%; height: 100%; padding: 0"> |             <img src="" id="modal-image" style="max-width: 100%;"> | ||||||
|                 <img src="" id="modal-image" style="display: block; max-width: 100%;"> |           </div> | ||||||
|               </div> |  | ||||||
|             </div> |  | ||||||
|           <div class="modal-footer"> |           <div class="modal-footer"> | ||||||
|             <div class="btn-group pull-left" role="group"> |             <div class="btn-group pull-left" role="group"> | ||||||
|               <button type="button" class="btn btn-default" id="js-zoom-in"> |               <button type="button" class="btn btn-default" id="js-zoom-in"> | ||||||
|   | |||||||
							
								
								
									
										65
									
								
								apps/note/templates/note/mails/summary_notes_report.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								apps/note/templates/note/mails/summary_notes_report.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,65 @@ | |||||||
|  | {% load pretty_money %} | ||||||
|  | {% load i18n %} | ||||||
|  |  | ||||||
|  | <!DOCTYPE html> | ||||||
|  | <html lang="fr"> | ||||||
|  | <head> | ||||||
|  |     <meta charset="UTF-8"> | ||||||
|  |     <title>[Note Kfet] Récapitulatif de trésorerie</title> | ||||||
|  | </head> | ||||||
|  | <body> | ||||||
|  | <h1> | ||||||
|  |   Récapitulatif de trésorerie au {{ summary.date|date:"d/m/Y" }} à {{ summary.date|date:"H:i:s" }} : | ||||||
|  | </h1> | ||||||
|  |  | ||||||
|  | <h2> | ||||||
|  |   Tous les utilisateur⋅rices : | ||||||
|  | </h2> | ||||||
|  | <ul> | ||||||
|  |   <li>Positifs : {{ summary.total_positive_user }} soit {{ summary.balance_positive_user / 100 }} €</li> | ||||||
|  |   <li>Neutres : {{ summary.total_zero_user }}</li> | ||||||
|  |   <li>Négatifs : {{ summary.total_negative_user }} soit {{ summary.balance_negative_user / 100 }} €</li> | ||||||
|  | </ul> | ||||||
|  |  | ||||||
|  | <h2> | ||||||
|  |   Les {{ summary.total_positive_user_bde + summary.total_zero_user_bde + summary.total_negative_user_bde }} adhérent⋅es BDE : | ||||||
|  | </h2> | ||||||
|  | <ul> | ||||||
|  |   <li>Positifs : {{ summary.total_positive_user_bde }} soit {{ summary.balance_positive_user_bde / 100 }} €</li> | ||||||
|  |   <li>Neutres : {{ summary.total_zero_user_bde }}</li> | ||||||
|  |   <li>Négatifs : {{ summary.total_negative_user_bde }} soit {{ summary.balance_negative_user_bde / 100 }} €</li> | ||||||
|  | </ul> | ||||||
|  |  | ||||||
|  | <h2> | ||||||
|  |   Clubs : | ||||||
|  | </h2> | ||||||
|  | <ul> | ||||||
|  |   <li>Positifs : {{ summary.total_positive_club }} soit {{ summary.balance_positive_club / 100 }} €</li> | ||||||
|  |   <li>Neutres : {{ summary.total_zero_club }}</li> | ||||||
|  |   <li>Négatifs : {{ summary.total_negative_club }} soit {{ summary.balance_negative_club / 100 }} €</li> | ||||||
|  | </ul> | ||||||
|  |  | ||||||
|  | <h2> | ||||||
|  |   Clubs hors BDE / Kfet et club dont le nom fini par "- BDE" : | ||||||
|  | </h2> | ||||||
|  | <ul> | ||||||
|  |   <li>Positifs : {{ summary.total_positive_club_nbde }} soit {{ summary.balance_positive_club_nbde / 100 }} €</li> | ||||||
|  |   <li>Neutres : {{ summary.total_zero_club_nbde }}</li> | ||||||
|  |   <li>Négatifs : {{ summary.total_negative_club_nbde }} soit {{ summary.balance_negative_club_nbde / 100 }} €</li> | ||||||
|  | </ul> | ||||||
|  |  | ||||||
|  | <h2> | ||||||
|  |   Progression : | ||||||
|  | </h2> | ||||||
|  | <ul> | ||||||
|  |   <li>Ceci correspond à une différence de {{ balance_difference_user / 100 }} € pour les utilisateur⋅rices</li> | ||||||
|  |   <li>Ceci correspond à une différence de {{ balance_difference_club / 100 }} € pour les clubs</li> | ||||||
|  | </ul> | ||||||
|  |  | ||||||
|  | -- | ||||||
|  | <p> | ||||||
|  |     Le BDE<br> | ||||||
|  |     {% trans "Mail generated by the Note Kfet on the" %} {% now "j F Y à H:i:s" %} | ||||||
|  | </p> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
							
								
								
									
										33
									
								
								apps/note/templates/note/mails/summary_notes_report.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								apps/note/templates/note/mails/summary_notes_report.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | |||||||
|  | {% load pretty_money %} | ||||||
|  | {% load i18n %} | ||||||
|  |  | ||||||
|  | Récapitulatif de trésorerie au {{ summary.date|date:"d/m/Y" }} à {{ summary.date|date:"H:i:s" }} : | ||||||
|  |  | ||||||
|  | Tous les utilisateur⋅rices : | ||||||
|  |   - Positifs : {{ summary.total_positive_user }} soit {{ summary.balance_positive_user / 100 }} € | ||||||
|  |   - Neutres : {{ summary.total_zero_user }} | ||||||
|  |   - Négatifs : {{ summary.total_negative_user }} soit {{ summary.balance_negative_user / 100 }} € | ||||||
|  |  | ||||||
|  | Les {{ summary.total_positive_user_bde + summary.total_zero_user_bde + summary.total_negative_user_bde }} adhérent⋅es BDE : | ||||||
|  |   - Positifs : {{ summary.total_positive_user_bde }} soit {{ summary.balance_positive_user_bde / 100 }} € | ||||||
|  |   - Neutres : {{ summary.total_zero_user_bde }} | ||||||
|  |   - Négatifs : {{ summary.total_negative_user_bde }} soit {{ summary.balance_negative_user_bde /100 }} € | ||||||
|  |  | ||||||
|  | Clubs : | ||||||
|  |   - Positifs : {{ summary.total_positive_club }} soit {{ summary.balance_positive_club / 100 }} € | ||||||
|  |   - Neutres : {{ summary.total_zero_club }} | ||||||
|  |   - Négatifs : {{ summary.total_negative_club }} soit {{ summary.balance_negative_club / 100 }} € | ||||||
|  |  | ||||||
|  | Clubs hors BDE / Kfet et club dont le nom fini par "- BDE" : | ||||||
|  |   - Positifs : {{ summary.total_positive_club_nbde }} soit {{ summary.balance_positive_club_nbde / 100 }} € | ||||||
|  |   - Neutres : {{ summary.total_zero_club_nbde }} | ||||||
|  |   - Négatifs : {{ summary.total_negative_club_nbde }} soit {{ summary.balance_negative_club_nbde / 100 }} € | ||||||
|  |  | ||||||
|  | Progression : | ||||||
|  |   - Ceci correspond à une différence de {{ balance_difference_user / 100 }} € pour les utilisateur⋅rices | ||||||
|  |   - Ceci correspond à une différence de {{ balance_difference_club / 100 }} € pour les clubs | ||||||
|  |  | ||||||
|  | -- | ||||||
|  | Le BDE | ||||||
|  |  | ||||||
|  | {% trans "Mail generated by the Note Kfet on the" %} {% now "j F Y à H:i:s" %} | ||||||
| @@ -89,7 +89,7 @@ SPDX-License-Identifier: GPL-2.0-or-later | |||||||
|                 </ul> |                 </ul> | ||||||
|                 <div class="card-body"> |                 <div class="card-body"> | ||||||
|                     <select id="debit_type" class="form-control custom-select d-none"> |                     <select id="debit_type" class="form-control custom-select d-none"> | ||||||
|                         {% for special_type in special_types|slice:"::-1" %} |                         {% for special_type in special_types %} | ||||||
|                             <option value="{{ special_type.id }}">{{ special_type.special_type }}</option> |                             <option value="{{ special_type.id }}">{{ special_type.special_type }}</option> | ||||||
|                         {% endfor %} |                         {% endfor %} | ||||||
|                     </select> |                     </select> | ||||||
|   | |||||||
| @@ -3815,8 +3815,8 @@ | |||||||
|             "mask": 2, |             "mask": 2, | ||||||
|             "field": "", |             "field": "", | ||||||
|             "permanent": false, |             "permanent": false, | ||||||
|             "description": "Créer une transaction vers la note d'un club" |             "description": "Créer une transaction vers la note d'un club tant que la source reste au dessus de -20 €" | ||||||
| 	} |         } | ||||||
|     }, |     }, | ||||||
|     { |     { | ||||||
|         "model": "permission.permission", |         "model": "permission.permission", | ||||||
| @@ -4812,10 +4812,8 @@ | |||||||
|                 168, |                 168, | ||||||
|                 176, |                 176, | ||||||
|                 177, |                 177, | ||||||
| 		178, |  | ||||||
|                 197, |                 197, | ||||||
|                 211, |                 211 | ||||||
| 		244 |  | ||||||
|             ] |             ] | ||||||
|         } |         } | ||||||
|     }, |     }, | ||||||
|   | |||||||
 Submodule apps/scripts updated: f580f9b9e9...f76acb3248
									
								
							| @@ -5,13 +5,13 @@ from django.contrib import admin | |||||||
| from note_kfet.admin import admin_site | from note_kfet.admin import admin_site | ||||||
|  |  | ||||||
| from .forms import ProductForm | from .forms import ProductForm | ||||||
| from .models import RemittanceType, Remittance, SogeCredit, Invoice, Product | from .models import Invoice, NoteSummary, Product, RemittanceType, Remittance, SogeCredit | ||||||
|  |  | ||||||
|  |  | ||||||
| @admin.register(RemittanceType, site=admin_site) | @admin.register(RemittanceType, site=admin_site) | ||||||
| class RemittanceTypeAdmin(admin.ModelAdmin): | class RemittanceTypeAdmin(admin.ModelAdmin): | ||||||
|     """ |     """ | ||||||
|     Admin customisation for RemiitanceType |     Admin customisation for RemittanceType | ||||||
|     """ |     """ | ||||||
|     list_display = ('note', ) |     list_display = ('note', ) | ||||||
|  |  | ||||||
| @@ -55,3 +55,19 @@ class InvoiceAdmin(admin.ModelAdmin): | |||||||
|     """ |     """ | ||||||
|     list_display = ('object', 'id', 'bde', 'name', 'date', 'acquitted',) |     list_display = ('object', 'id', 'bde', 'name', 'date', 'acquitted',) | ||||||
|     inlines = (ProductInline,) |     inlines = (ProductInline,) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @admin.register(NoteSummary, site=admin_site) | ||||||
|  | class NoteSummaryAdmin(admin.ModelAdmin): | ||||||
|  |     """ | ||||||
|  |     Admin customisation for NoteSummary | ||||||
|  |     """ | ||||||
|  |     list_display = ( | ||||||
|  |         'date', 'total_positive_user', 'balance_positive_user', 'total_positive_user_bde', | ||||||
|  |         'balance_positive_user_bde', 'total_zero_user', 'total_zero_user_bde', 'total_negative_user', | ||||||
|  |         'balance_negative_user', 'total_negative_user_bde', 'balance_negative_user_bde', | ||||||
|  |         'total_vnegative_user', 'balance_vnegative_user', 'total_vnegative_user_bde', | ||||||
|  |         'balance_vnegative_user_bde', 'total_positive_club', 'balance_positive_club', | ||||||
|  |         'total_positive_club_nbde', 'balance_positive_club_nbde', 'total_zero_club', 'total_zero_club_nbde', | ||||||
|  |         'total_negative_club', 'balance_negative_club', 'total_negative_club_nbde', 'balance_negative_club_nbde', | ||||||
|  |     ) | ||||||
|   | |||||||
							
								
								
									
										49
									
								
								apps/treasury/migrations/0009_notesummary.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								apps/treasury/migrations/0009_notesummary.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,49 @@ | |||||||
|  | # Generated by Django 2.2.28 on 2024-08-07 12:09 | ||||||
|  |  | ||||||
|  | import datetime | ||||||
|  | from django.db import migrations, models | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class Migration(migrations.Migration): | ||||||
|  |  | ||||||
|  |     dependencies = [ | ||||||
|  |         ('treasury', '0008_auto_20240322_0045'), | ||||||
|  |     ] | ||||||
|  |  | ||||||
|  |     operations = [ | ||||||
|  |         migrations.CreateModel( | ||||||
|  |             name='NoteSummary', | ||||||
|  |             fields=[ | ||||||
|  |                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||||||
|  |                 ('date', models.DateField(default=datetime.date.today, verbose_name='Date')), | ||||||
|  |                 ('total_positive_user', models.PositiveIntegerField(verbose_name='Total positive user')), | ||||||
|  |                 ('balance_positive_user', models.PositiveIntegerField(verbose_name='Balance positive user')), | ||||||
|  |                 ('total_positive_user_bde', models.PositiveIntegerField(verbose_name='Total positive user BDE')), | ||||||
|  |                 ('balance_positive_user_bde', models.PositiveIntegerField(verbose_name='Balance positive user BDE')), | ||||||
|  |                 ('total_zero_user', models.PositiveIntegerField(verbose_name='Total zero user')), | ||||||
|  |                 ('total_zero_user_bde', models.PositiveIntegerField(verbose_name='Total zero user BDE')), | ||||||
|  |                 ('total_negative_user', models.PositiveIntegerField(verbose_name='Total negative user')), | ||||||
|  |                 ('balance_negative_user', models.PositiveIntegerField(verbose_name='Balance negative user')), | ||||||
|  |                 ('total_negative_user_bde', models.PositiveIntegerField(verbose_name='Total negative user BDE')), | ||||||
|  |                 ('balance_negative_user_bde', models.PositiveIntegerField(verbose_name='Balance negative user BDE')), | ||||||
|  |                 ('total_vnegative_user', models.PositiveIntegerField(verbose_name='Total very negative user')), | ||||||
|  |                 ('balance_vnegative_user', models.PositiveIntegerField(verbose_name='Balance very negative user')), | ||||||
|  |                 ('total_vnegative_user_bde', models.PositiveIntegerField(verbose_name='Total very negative user BDE')), | ||||||
|  |                 ('balance_vnegative_user_bde', models.PositiveIntegerField(verbose_name='Balance very negative user BDE')), | ||||||
|  |                 ('total_positive_club', models.PositiveIntegerField(verbose_name='Total positive club')), | ||||||
|  |                 ('balance_positive_club', models.PositiveIntegerField(verbose_name='Balance positive club')), | ||||||
|  |                 ('total_positive_club_nbde', models.PositiveIntegerField(verbose_name='Total positive club nbde')), | ||||||
|  |                 ('balance_positive_club_nbde', models.PositiveIntegerField(verbose_name='Balance positive club nbde')), | ||||||
|  |                 ('total_zero_club', models.PositiveIntegerField(verbose_name='Total zero club')), | ||||||
|  |                 ('total_zero_club_nbde', models.PositiveIntegerField(verbose_name='Total zero club nbde')), | ||||||
|  |                 ('total_negative_club', models.PositiveIntegerField(verbose_name='Total negative club')), | ||||||
|  |                 ('balance_negative_club', models.PositiveIntegerField(verbose_name='Balance negative club')), | ||||||
|  |                 ('total_negative_club_nbde', models.PositiveIntegerField(verbose_name='Total negative club nbde')), | ||||||
|  |                 ('balance_negative_club_nbde', models.PositiveIntegerField(verbose_name='Balance negative club nbde')), | ||||||
|  |             ], | ||||||
|  |             options={ | ||||||
|  |                 'verbose_name': 'Summary', | ||||||
|  |                 'verbose_name_plural': 'Summaries', | ||||||
|  |             }, | ||||||
|  |         ), | ||||||
|  |     ] | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| # Generated by Django 4.2.20 on 2025-04-14 20:21 |  | ||||||
|  |  | ||||||
| from django.db import migrations, models |  | ||||||
|  |  | ||||||
|  |  | ||||||
| class Migration(migrations.Migration): |  | ||||||
|  |  | ||||||
|     dependencies = [ |  | ||||||
|         ('treasury', '0009_alter_sogecredit_transactions'), |  | ||||||
|     ] |  | ||||||
|  |  | ||||||
|     operations = [ |  | ||||||
|         migrations.AlterField( |  | ||||||
|             model_name='invoice', |  | ||||||
|             name='bde', |  | ||||||
|             field=models.CharField(choices=[('Diolistos', 'Diol[list]os'), ('RavePartlist', 'RavePart[list]'), ('SecretStorlist', 'SecretStor[list]'), ('TotalistSpies', 'Tota[list]Spies'), ('Saperlistpopette', 'Saper[list]popette'), ('Finalist', 'Fina[list]'), ('Listorique', '[List]orique'), ('Satellist', 'Satel[list]'), ('Monopolist', 'Monopo[list]'), ('Kataclist', 'Katac[list]')], default='Diolistos', max_length=32, verbose_name='BDE'), |  | ||||||
|         ), |  | ||||||
|     ] |  | ||||||
| @@ -27,9 +27,8 @@ class Invoice(models.Model): | |||||||
|  |  | ||||||
|     bde = models.CharField( |     bde = models.CharField( | ||||||
|         max_length=32, |         max_length=32, | ||||||
|         default='Diolistos', |         default='RavePartlist', | ||||||
|         choices=( |         choices=( | ||||||
|             ('Diolistos', 'Diol[list]os'), |  | ||||||
|             ('RavePartlist', 'RavePart[list]'), |             ('RavePartlist', 'RavePart[list]'), | ||||||
|             ('SecretStorlist', 'SecretStor[list]'), |             ('SecretStorlist', 'SecretStor[list]'), | ||||||
|             ('TotalistSpies', 'Tota[list]Spies'), |             ('TotalistSpies', 'Tota[list]Spies'), | ||||||
| @@ -461,3 +460,117 @@ class SogeCredit(models.Model): | |||||||
|             self.credit_transaction._force_save = True |             self.credit_transaction._force_save = True | ||||||
|             self.credit_transaction.save() |             self.credit_transaction.save() | ||||||
|         super().delete(**kwargs) |         super().delete(**kwargs) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class NoteSummary(models.Model): | ||||||
|  |     """ | ||||||
|  |     Summary of every notes | ||||||
|  |     """ | ||||||
|  |  | ||||||
|  |     date = models.DateField( | ||||||
|  |         default=date.today, | ||||||
|  |         verbose_name=_("Date"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_positive_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total positive user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_positive_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance positive user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_positive_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total positive user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_positive_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance positive user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_zero_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total zero user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_zero_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total zero user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_negative_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total negative user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_negative_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance negative user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_negative_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total negative user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_negative_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance negative user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_vnegative_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total very negative user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_vnegative_user = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance very negative user"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_vnegative_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total very negative user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_vnegative_user_bde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance very negative user BDE"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_positive_club = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total positive club"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_positive_club = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance positive club"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_positive_club_nbde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total positive club nbde"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_positive_club_nbde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance positive club nbde"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_zero_club = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total zero club"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_zero_club_nbde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total zero club nbde"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_negative_club = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total negative club"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_negative_club = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance negative club"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     total_negative_club_nbde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Total negative club nbde"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     balance_negative_club_nbde = models.PositiveIntegerField( | ||||||
|  |         verbose_name=_("Balance negative club nbde"), | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     class Meta: | ||||||
|  |         verbose_name = _("Summary") | ||||||
|  |         verbose_name_plural = _("Summaries") | ||||||
|  |  | ||||||
|  |     def __str__(self): | ||||||
|  |         return "Note summary of {date}".format(date=self.date) | ||||||
|   | |||||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 2.8 MiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 284 KiB | 
| @@ -1989,6 +1989,8 @@ msgstr "Historique des transactions récentes" | |||||||
| #: apps/note/templates/note/mails/negative_balance.txt:25 | #: apps/note/templates/note/mails/negative_balance.txt:25 | ||||||
| #: apps/note/templates/note/mails/negative_notes_report.html:46 | #: apps/note/templates/note/mails/negative_notes_report.html:46 | ||||||
| #: apps/note/templates/note/mails/negative_notes_report.txt:13 | #: apps/note/templates/note/mails/negative_notes_report.txt:13 | ||||||
|  | #: apps/note/templates/note/mails/summary_notes_report.html:62 | ||||||
|  | #: apps/note/templates/note/mails/summary_ntoes_report.txt:33 | ||||||
| #: apps/note/templates/note/mails/weekly_report.html:51 | #: apps/note/templates/note/mails/weekly_report.html:51 | ||||||
| #: apps/note/templates/note/mails/weekly_report.txt:32 | #: apps/note/templates/note/mails/weekly_report.txt:32 | ||||||
| #: apps/registration/templates/registration/mails/email_validation_email.html:40 | #: apps/registration/templates/registration/mails/email_validation_email.html:40 | ||||||
| @@ -2563,6 +2565,7 @@ msgid "Address" | |||||||
| msgstr "Adresse" | msgstr "Adresse" | ||||||
|  |  | ||||||
| #: apps/treasury/models.py:69 apps/treasury/models.py:202 | #: apps/treasury/models.py:69 apps/treasury/models.py:202 | ||||||
|  | #: apps/treasury/models.py:472 | ||||||
| msgid "Date" | msgid "Date" | ||||||
| msgstr "Date" | msgstr "Date" | ||||||
|  |  | ||||||
| @@ -2682,6 +2685,102 @@ msgstr "" | |||||||
| "sa note. Merci de lui demander de recharger sa note avant d'invalider ce " | "sa note. Merci de lui demander de recharger sa note avant d'invalider ce " | ||||||
| "crédit." | "crédit." | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:476 | ||||||
|  | msgid "Total positive user" | ||||||
|  | msgstr "Nombre d'utilisateur⋅rices en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:480 | ||||||
|  | msgid "Balance positive user" | ||||||
|  | msgstr "Solde des utilisateur⋅rices en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:484 | ||||||
|  | msgid "Total positive user BDE" | ||||||
|  | msgstr "Nombre d'adhérent⋅es au BDE en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:488 | ||||||
|  | msgid "Balance positive user BDE" | ||||||
|  | msgstr "Solde des adhérent⋅es au BDE en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:492 | ||||||
|  | msgid "Total zero user" | ||||||
|  | msgstr "Nombre d'utilisateur⋅rices à zéro" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:496 | ||||||
|  | msgid "Total zero user BDE" | ||||||
|  | msgstr "Nombre d'adhérent⋅es au BDE à zéro" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:500 | ||||||
|  | msgid "Total negative user" | ||||||
|  | msgstr "Nombre d'utilisateur⋅rices en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:504 | ||||||
|  | msgid "Balance negative user" | ||||||
|  | msgstr "Solde des utilisateur⋅rices en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:508 | ||||||
|  | msgid "Total negative user BDE" | ||||||
|  | msgstr "Nombre d'adhérent⋅es au BDE en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:512 | ||||||
|  | msgid "Balance negative user BDE" | ||||||
|  | msgstr "Solde des adhérent⋅es au BDE en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:516 | ||||||
|  | msgid "Total very negative user" | ||||||
|  | msgstr "Nombre d'utilisateur⋅rices en négatif sévère" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:520 | ||||||
|  | msgid "Balance very negative user" | ||||||
|  | msgstr "Solde des utilisateur⋅rices en négatif sévère" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:524 | ||||||
|  | msgid "Total very negative user BDE" | ||||||
|  | msgstr "Nombre d'adhérent⋅es au BDE en négatif sévère" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:528 | ||||||
|  | msgid "Balance very negative user BDE" | ||||||
|  | msgstr "Solde des adhérent⋅es au BDE en négatif sévère" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:532 | ||||||
|  | msgid "Total positive club" | ||||||
|  | msgstr "Nombre de clubs en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:536 | ||||||
|  | msgid "Balance positive club" | ||||||
|  | msgstr "Solde des clubs en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:540 | ||||||
|  | msgid "Total positive club nbde" | ||||||
|  | msgstr "Nombre de clubs non-BDE en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:544 | ||||||
|  | msgid "Balance positive club nbde" | ||||||
|  | msgstr "Solde des clubs non-BDE en positif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:548 | ||||||
|  | msgid "Total zero club" | ||||||
|  | msgstr "Nombre de clubs à zéro" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:552 | ||||||
|  | msgid "Total zero club nbde" | ||||||
|  | msgstr "Nombre de clubs non-BDE à zéro" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:556 | ||||||
|  | msgid "Total negative club" | ||||||
|  | msgstr "Nombre de clubs en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:560 | ||||||
|  | msgid "Balance negative club" | ||||||
|  | msgstr "Solde des clubs en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:564 | ||||||
|  | msgid "Total negative club nbde" | ||||||
|  | msgstr "Nombre de clubs non-BDE en négatif" | ||||||
|  |  | ||||||
|  | #: apps/treasury/models.py:568 | ||||||
|  | msgid "Balance negative club nbde" | ||||||
|  | msgstr "Solde des clubs non-BDE en négatif" | ||||||
|  |  | ||||||
| #: apps/treasury/tables.py:20 | #: apps/treasury/tables.py:20 | ||||||
| msgid "Invoice #{:d}" | msgid "Invoice #{:d}" | ||||||
| msgstr "Facture n°{:d}" | msgstr "Facture n°{:d}" | ||||||
|   | |||||||
| @@ -20,6 +20,8 @@ MAILTO=notekfet2020@lists.crans.org | |||||||
|  00  5     *   *   2     root   cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --spam --negative-amount 1 -v 0 |  00  5     *   *   2     root   cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --spam --negative-amount 1 -v 0 | ||||||
| # Envoyer le rapport mensuel aux trésoriers et respos info | # Envoyer le rapport mensuel aux trésoriers et respos info | ||||||
|  00  8     *   *   5     root   cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --report --add-years 1 -v 0 |  00  8     *   *   5     root   cd /var/www/note_kfet && env/bin/python manage.py send_mail_to_negative_balances --report --add-years 1 -v 0 | ||||||
|  | # Envoyer le recap de tresorerie | ||||||
|  |  00  8     *   *   5     root   cd /var/www/note_kfet && env/bin/python manage.py send_summary_notes_report --negative-amount 2000 | ||||||
| # Envoyer les rapports aux gens | # Envoyer les rapports aux gens | ||||||
|  55  6     *   *   *     root   cd /var/www/note_kfet && env/bin/python manage.py send_reports -v 0 |  55  6     *   *   *     root   cd /var/www/note_kfet && env/bin/python manage.py send_reports -v 0 | ||||||
| # Mettre à jour les boutons mis en avant | # Mettre à jour les boutons mis en avant | ||||||
| @@ -27,5 +29,5 @@ MAILTO=notekfet2020@lists.crans.org | |||||||
| # Vider les tokens Oauth2 | # Vider les tokens Oauth2 | ||||||
|  00  6     *   *   *     root   cd /var/www/note_kfet && env/bin/python manage.py cleartokens -v 0 |  00  6     *   *   *     root   cd /var/www/note_kfet && env/bin/python manage.py cleartokens -v 0 | ||||||
| # Envoyer la liste des abonnés à la NL BDA | # Envoyer la liste des abonnés à la NL BDA | ||||||
|  00  10     *   *   0     root   cd /var/www/note_kfet && env/bin/python manage.py extract_ml_registrations -t art -e "bda.ensparissaclay@gmail.com" |  00  10     *   *   0     root   cd /var/www/note_kfet && env/bin/python manage.py extract_ml_registrations -t art | ||||||
|   |   | ||||||
							
								
								
									
										96
									
								
								note_kfet/static/css/custom.css
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										96
									
								
								note_kfet/static/css/custom.css
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -61,16 +61,20 @@ mark { | |||||||
| /* Make navbar more readable */ | /* Make navbar more readable */ | ||||||
| .navbar-dark .navbar-nav .nav-link { | .navbar-dark .navbar-nav .nav-link { | ||||||
|     color: rgba(255, 255, 255, .75); |     color: rgba(255, 255, 255, .75); | ||||||
|     /* text-shadow: 2px 2px 15px #ffeb40; */ |     text-shadow: 2px 2px 15px #ffeb40; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* .navbar-brand { */ | .navbar-brand { | ||||||
| /*     text-shadow: 2px 2px 15px #ffeb40; */ |     text-shadow: 2px 2px 15px #ffeb40; | ||||||
| /* } | } | ||||||
|  |  | ||||||
| /* Last BDE colors */ | /* Last BDE colors */ | ||||||
| .bg-primary { | .bg-primary { | ||||||
|     background-color: rgb(102, 83, 105) !important; | /*    background-color: rgb(18, 67, 4) !important; */ | ||||||
|  | /* MODE VIEUXCON=ON */ | ||||||
|  | /*    background-color: rgb(166, 0, 2) !important; */ | ||||||
|  |     background-color: rgb(0, 0, 0); | ||||||
|  |     background-image: url('/static/img/rp_bg.png'); | ||||||
| } | } | ||||||
|  |  | ||||||
| html { | html { | ||||||
| @@ -85,52 +89,94 @@ body { | |||||||
| .btn-outline-primary:hover, | .btn-outline-primary:hover, | ||||||
| .btn-outline-primary:not(:disabled):not(.disabled).active, | .btn-outline-primary:not(:disabled):not(.disabled).active, | ||||||
| .btn-outline-primary:not(:disabled):not(.disabled):active { | .btn-outline-primary:not(:disabled):not(.disabled):active { | ||||||
|     color: #fff; |     color:  rgb(0, 0, 0); | ||||||
|     background-color: rgb(102, 83, 105); |     background-color: rgb(255, 0, 101); | ||||||
|     border-color: rgb(102, 83, 105); |     border-color: rgb(255, 203, 32); | ||||||
| } | } | ||||||
|  |  | ||||||
| .btn-outline-primary { | .btn-outline-primary { | ||||||
|     color: rgb(102, 83, 105); |     color: #000; | ||||||
|     background-color: rgba(248, 249, 250, 0.9); |     background-color: #ffcb20; | ||||||
|     border-color: rgb(102, 83, 105); |     border-color: #000; | ||||||
| } | } | ||||||
|  |  | ||||||
| .turbolinks-progress-bar { | .turbolinks-progress-bar { | ||||||
|     background-color: #12432E; |     background-color: #ffffff; | ||||||
| } | } | ||||||
|  |  | ||||||
| .btn-primary:hover, | .btn-primary:hover, | ||||||
| .btn-primary:not(:disabled):not(.disabled).active, | .btn-primary:not(:disabled):not(.disabled).active, | ||||||
| .btn-primary:not(:disabled):not(.disabled):active { | .btn-primary:not(:disabled):not(.disabled):active { | ||||||
|     color: #fff; |     color:  rgb(0, 0, 0); | ||||||
|     background-color: rgb(102, 83, 105); |     background-color: rgb(255, 0, 101); | ||||||
|     border-color: rgb(102, 83, 105); |     border-color: rgb(255, 203, 32); | ||||||
| } | } | ||||||
|  |  | ||||||
| .btn-primary { | .btn-primary { | ||||||
|     color: rgba(248, 249, 250, 0.9);  |     color:  #ffcb20;  | ||||||
|     background-color: rgb(102, 83, 105); |     background-color: #000000; | ||||||
|     border-color: rgb(102, 83, 105); |     border-color: #ffcd20; | ||||||
| } | } | ||||||
|  |  | ||||||
| .border-primary { | .border-primary { | ||||||
|     border-color: rgb(115, 15, 115) !important;  |     border-color: rgb(255, 255, 255) !important;  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-secondary { | ||||||
|  |     color:  #ff0065; | ||||||
|  |     background-color: #000000; | ||||||
|  |     border-color: #ff0065; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-secondary:hover, | ||||||
|  | .btn-secondary:not(:disabled):not(.disabled).active, | ||||||
|  | .btn-secondary:not(:disabled):not(.disabled):active { | ||||||
|  |     color:  rgb(0, 0, 0); | ||||||
|  |     background-color: rgb(255, 203, 32); | ||||||
|  |     border-color: rgb(255, 0, 101); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-outline-dark-shiny { | ||||||
|  |     background-color: #222; | ||||||
|  |     border-color: #61605b; | ||||||
|  |     color: rgba(255, 0, 101, 75%); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-outline-dark-shiny:hover, | ||||||
|  | .btn-outline-dark-shiny:not(:disabled):not(.disabled).active, | ||||||
|  | .btn-outline-dark-shiny:not(:disabled):not(.disabled):active { | ||||||
|  |     color:  rgb(0, 0, 0); | ||||||
|  |     background-color: rgb(255, 203, 32); | ||||||
|  |     border-color: rgb(255, 0, 101); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-outline-dark { | ||||||
|  |     background-color: #222; | ||||||
|  |     border-color: #61605b; | ||||||
|  |     color: rgba(255, 203, 32, 75%); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .btn-outline-dark:hover, | ||||||
|  | .btn-outline-dark:not(:disabled):not(.disabled).active, | ||||||
|  | .btn-outline-dark:not(:disabled):not(.disabled):active { | ||||||
|  |     color:  rgb(0, 0, 0); | ||||||
|  |     background-color: rgb(255, 0, 101); | ||||||
|  |     border-color: rgb(255, 203, 32); | ||||||
| } | } | ||||||
|  |  | ||||||
| a { | a { | ||||||
|     color: rgb(102, 83, 105); |     color: rgb(255, 0, 101); | ||||||
| } | } | ||||||
|  |  | ||||||
| a:hover { | a:hover { | ||||||
|     color: rgb(200, 30, 200); |     color: rgb(255, 203, 32); | ||||||
| } | } | ||||||
|  |  | ||||||
| .form-control:focus { | .form-control:focus { | ||||||
|     box-shadow: 0 0 0 0.25rem rgba(200, 30, 200, 0.25); |     box-shadow: 0 0 0 0.25rem rgb(255 0 101 / 50%); | ||||||
|     border-color: rgb(200, 30, 200); |     border-color: rgb(255, 0, 101); | ||||||
| } | } | ||||||
|  |  | ||||||
| .btn-outline-primary.focus { | .btn-outline-primary.focus { | ||||||
|   box-shadow: 0 0 0 0.25rem rgba(200, 30, 200, 0.5); |   box-shadow: 0 0 0 0.25rem rgb(255 203 32 / 22%); | ||||||
|  | } | ||||||
|   | |||||||
| @@ -96,13 +96,11 @@ function displayStyle (note) { | |||||||
|   if (!note) { return '' } |   if (!note) { return '' } | ||||||
|   const balance = note.balance |   const balance = note.balance | ||||||
|   var css = '' |   var css = '' | ||||||
|   var ms_per_year = 31536000000 // 365 * 24 * 3600 * 1000 |  | ||||||
|   if (balance < -2000) { css += ' text-danger bg-dark' }  |   if (balance < -2000) { css += ' text-danger bg-dark' }  | ||||||
|   else if (balance < -1000) { css += ' text-danger' }  |   else if (balance < -1000) { css += ' text-danger' }  | ||||||
|   else if (balance < 0) { css += ' text-warning' } |   else if (balance < 0) { css += ' text-warning' } | ||||||
|   if (!note.email_confirmed) { css += ' bg-primary' } |   if (!note.email_confirmed) { css += ' bg-primary' } | ||||||
|   else if (!note.is_active || (note.membership && note.membership.date_end < new Date().toISOString())) { css += ' bg-info' } |   else if (!note.is_active || (note.membership && note.membership.date_end < new Date().toISOString())) { css += ' bg-info' } | ||||||
|   if (((Date.now() - Date.parse(note.created_at))/ms_per_year) > 2.5) { css += ' font-weight-bold underline' } |  | ||||||
|   return css |   return css | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -164,12 +164,7 @@ SPDX-License-Identifier: GPL-3.0-or-later | |||||||
|         </div> |         </div> | ||||||
|     </nav> |     </nav> | ||||||
|     <div class="{% block containertype %}container{% endblock %} my-3"> |     <div class="{% block containertype %}container{% endblock %} my-3"> | ||||||
|         <div id="messages"> | 	<div id="messages"> | ||||||
| 	    {% if user.is_authenticated %} |  | ||||||
| 	    	<div class="alert alert-info"> |  | ||||||
| 		    Bravo pour votre diplomation les survis ! |  | ||||||
| 		</div> |  | ||||||
| 	    {% endif %} |  | ||||||
|             {% if user.is_authenticated %} |             {% if user.is_authenticated %} | ||||||
|                 {% if not user|is_member:"BDE" %} |                 {% if not user|is_member:"BDE" %} | ||||||
|                     <div class="alert alert-danger"> |                     <div class="alert alert-danger"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user