mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 18:08:21 +02:00
Compare commits
16 Commits
fix_pipeli
...
update_per
Author | SHA1 | Date | |
---|---|---|---|
03d2d5f03e | |||
d2057a9f45 | |||
6b1cd3ba7a | |||
9f114b8ca2 | |||
e0132b6dc8 | |||
31e67ae3f6 | |||
2839d3de1e | |||
30afa6da0a | |||
84fc77696f | |||
19fc620d1f | |||
6bceb394c5 | |||
62cf8f9d84 | |||
2dd1c3fb89 | |||
c8665c5798 | |||
e9f1b6f52d | |||
1d95ae4810 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -42,7 +42,6 @@ map.json
|
|||||||
backups/
|
backups/
|
||||||
/static/
|
/static/
|
||||||
/media/
|
/media/
|
||||||
/tmp/
|
|
||||||
|
|
||||||
# Virtualenv
|
# Virtualenv
|
||||||
env/
|
env/
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"name": "Pot",
|
"name": "Pot",
|
||||||
"manage_entries": true,
|
"manage_entries": true,
|
||||||
"can_invite": true,
|
"can_invite": true,
|
||||||
"guest_entry_fee": 500
|
"guest_entry_fee": 1000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -28,5 +28,25 @@
|
|||||||
"can_invite": false,
|
"can_invite": false,
|
||||||
"guest_entry_fee": 0
|
"guest_entry_fee": 0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "activity.activitytype",
|
||||||
|
"pk": 5,
|
||||||
|
"fields": {
|
||||||
|
"name": "Soir\u00e9e avec entrées",
|
||||||
|
"manage_entries": true,
|
||||||
|
"can_invite": false,
|
||||||
|
"guest_entry_fee": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "activity.activitytype",
|
||||||
|
"pk": 7,
|
||||||
|
"fields": {
|
||||||
|
"name": "Soir\u00e9e avec invitations",
|
||||||
|
"manage_entries": true,
|
||||||
|
"can_invite": true,
|
||||||
|
"guest_entry_fee": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 2.2.26 on 2022-09-04 21:25
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('member', '0008_auto_20211005_1544'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='profile',
|
|
||||||
name='promotion',
|
|
||||||
field=models.PositiveSmallIntegerField(default=2022, help_text='Year of entry to the school (None if not ENS student)', null=True, verbose_name='promotion'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -221,7 +221,7 @@ function consume (source, source_alias, dest, quantity, amount, reason, type, ca
|
|||||||
.done(function () {
|
.done(function () {
|
||||||
if (!isNaN(source.balance)) {
|
if (!isNaN(source.balance)) {
|
||||||
const newBalance = source.balance - quantity * amount
|
const newBalance = source.balance - quantity * amount
|
||||||
if (newBalance <= -5000) {
|
if (newBalance <= -2000) {
|
||||||
addMsg(interpolate(gettext('Warning, the transaction from the note %s succeed, ' +
|
addMsg(interpolate(gettext('Warning, the transaction from the note %s succeed, ' +
|
||||||
'but the emitter note %s is very negative.'), [source_alias, source_alias]), 'danger', 30000)
|
'but the emitter note %s is very negative.'), [source_alias, source_alias]), 'danger', 30000)
|
||||||
} else if (newBalance < 0) {
|
} else if (newBalance < 0) {
|
||||||
|
@ -314,7 +314,7 @@ $('#btn_transfer').click(function () {
|
|||||||
|
|
||||||
if (!isNaN(source.note.balance)) {
|
if (!isNaN(source.note.balance)) {
|
||||||
const newBalance = source.note.balance - source.quantity * dest.quantity * amount
|
const newBalance = source.note.balance - source.quantity * dest.quantity * amount
|
||||||
if (newBalance <= -5000) {
|
if (newBalance <= -2000) {
|
||||||
addMsg(interpolate(gettext('Warning, the transaction of %s from the note %s to the note %s succeed, but the emitter note %s is very negative.'),
|
addMsg(interpolate(gettext('Warning, the transaction of %s from the note %s to the note %s succeed, but the emitter note %s is very negative.'),
|
||||||
[pretty_money(source.quantity * dest.quantity * amount), source.name, dest.name, source.name]), 'danger', 10000)
|
[pretty_money(source.quantity * dest.quantity * amount), source.name, dest.name, source.name]), 'danger', 10000)
|
||||||
reset()
|
reset()
|
||||||
|
File diff suppressed because it is too large
Load Diff
19
apps/permission/migrations/0002_club_not_required.py
Normal file
19
apps/permission/migrations/0002_club_not_required.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.28 on 2023-07-24 10:15
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('permission', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='role',
|
||||||
|
name='for_club',
|
||||||
|
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, to='member.Club', verbose_name='for club'),
|
||||||
|
),
|
||||||
|
]
|
@ -339,6 +339,7 @@ class Role(models.Model):
|
|||||||
"member.Club",
|
"member.Club",
|
||||||
verbose_name=_("for club"),
|
verbose_name=_("for club"),
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
default=None,
|
default=None,
|
||||||
)
|
)
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 2.2.28 on 2023-01-29 22:48
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('treasury', '0004_auto_20211005_1544'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='invoice',
|
|
||||||
name='bde',
|
|
||||||
field=models.CharField(choices=[('TotalistSpies', 'Tota[list]Spies'), ('Saperlistpopette', 'Saper[list]popette'), ('Finalist', 'Fina[list]'), ('Listorique', '[List]orique'), ('Satellist', 'Satel[list]'), ('Monopolist', 'Monopo[list]'), ('Kataclist', 'Katac[list]')], default='TotalistSpies', max_length=32, verbose_name='BDE'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -28,9 +28,8 @@ class Invoice(models.Model):
|
|||||||
|
|
||||||
bde = models.CharField(
|
bde = models.CharField(
|
||||||
max_length=32,
|
max_length=32,
|
||||||
default='TotalistSpies',
|
default='Saperlistpopette',
|
||||||
choices=(
|
choices=(
|
||||||
('TotalistSpies', 'Tota[list]Spies'),
|
|
||||||
('Saperlistpopette', 'Saper[list]popette'),
|
('Saperlistpopette', 'Saper[list]popette'),
|
||||||
('Finalist', 'Fina[list]'),
|
('Finalist', 'Fina[list]'),
|
||||||
('Listorique', '[List]orique'),
|
('Listorique', '[List]orique'),
|
||||||
@ -96,7 +95,7 @@ class Invoice(models.Model):
|
|||||||
products = self.products.all()
|
products = self.products.all()
|
||||||
|
|
||||||
self.place = "Gif-sur-Yvette"
|
self.place = "Gif-sur-Yvette"
|
||||||
self.my_name = "BDE ENS Paris Saclay"
|
self.my_name = "BDE ENS Cachan"
|
||||||
self.my_address_street = "4 avenue des Sciences"
|
self.my_address_street = "4 avenue des Sciences"
|
||||||
self.my_city = "91190 Gif-sur-Yvette"
|
self.my_city = "91190 Gif-sur-Yvette"
|
||||||
self.bank_code = 30003
|
self.bank_code = 30003
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB |
Binary file not shown.
Before Width: | Height: | Size: 35 KiB |
@ -108,7 +108,7 @@ class InvoiceListView(LoginRequiredMixin, SingleTableView):
|
|||||||
name="",
|
name="",
|
||||||
address="",
|
address="",
|
||||||
)
|
)
|
||||||
if not PermissionBackend.check_perm(self.request, "treasury.add_invoice", sample_invoice):
|
if not PermissionBackend.check_perm(self.request, "treasury.view_invoice", sample_invoice):
|
||||||
raise PermissionDenied(_("You are not able to see the treasury interface."))
|
raise PermissionDenied(_("You are not able to see the treasury interface."))
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 2.2.26 on 2022-09-04 21:25
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('wei', '0003_bus_size'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='weiclub',
|
|
||||||
name='year',
|
|
||||||
field=models.PositiveIntegerField(default=2022, unique=True, verbose_name='year'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 2.2.28 on 2023-01-28 17:50
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('wei', '0004_auto_20220904_2325'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='weiclub',
|
|
||||||
name='year',
|
|
||||||
field=models.PositiveIntegerField(default=2023, unique=True, verbose_name='year'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -118,13 +118,13 @@ Exemples
|
|||||||
{"F": [
|
{"F": [
|
||||||
"ADD",
|
"ADD",
|
||||||
["F", "source__balance"],
|
["F", "source__balance"],
|
||||||
5000]
|
2000]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
| si la destination est la note du club dont on est membre et si le montant est inférieur au solde de la source + 50 €,
|
| si la destination est la note du club dont on est membre et si le montant est inférieur au solde de la source + 20 €,
|
||||||
autrement dit le solde final est au-dessus de -50 €.
|
autrement dit le solde final est au-dessus de -20 €.
|
||||||
|
|
||||||
|
|
||||||
Masques de permissions
|
Masques de permissions
|
||||||
|
@ -83,13 +83,6 @@ Je suis trésorier d'un club, qu'ai-je le droit de faire ?
|
|||||||
bien sûr permis pour faciliter des transferts. Tout abus de droits constaté
|
bien sûr permis pour faciliter des transferts. Tout abus de droits constaté
|
||||||
pourra mener à des sanctions prises par le bureau du BDE.
|
pourra mener à des sanctions prises par le bureau du BDE.
|
||||||
|
|
||||||
.. warning::
|
|
||||||
Une fonctionnalité pour permettre de gérer plus proprement les remboursements
|
|
||||||
entre amis est en cours de développement. Temporairement et pour des raisons
|
|
||||||
de confort, les trésoriers de clubs ont le droit de prélever n'importe quelle
|
|
||||||
adhérente vers n'importe quelle autre note adhérente, tant que la source ne
|
|
||||||
descend pas sous ``- 50 €``. Ces droits seront retirés d'ici quelques semaines.
|
|
||||||
|
|
||||||
|
|
||||||
Je suis trésorier d'un club, je n'arrive pas à voir le solde du club / faire des transactions
|
Je suis trésorier d'un club, je n'arrive pas à voir le solde du club / faire des transactions
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
72
note_kfet/static/css/custom.css
Executable file → Normal file
72
note_kfet/static/css/custom.css
Executable file → Normal file
@ -65,10 +65,7 @@ mark {
|
|||||||
|
|
||||||
/* Last BDE colors */
|
/* Last BDE colors */
|
||||||
.bg-primary {
|
.bg-primary {
|
||||||
/* background-color: rgb(18, 67, 4) !important; */
|
background-color: rgb(102, 83, 105) !important;
|
||||||
/* MODE VIEUXCON=ON */
|
|
||||||
/* background-color: rgb(166, 0, 2) !important; */
|
|
||||||
background-color: rgb(0, 0, 0) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@ -83,15 +80,15 @@ 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: rgb(241, 229, 52);
|
color: #fff;
|
||||||
background-color: rgb(228, 35, 132);
|
background-color: rgb(102, 83, 105);
|
||||||
border-color: rgb(228, 35, 132);
|
border-color: rgb(102, 83, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-primary {
|
.btn-outline-primary {
|
||||||
color: #fff;
|
color: rgb(102, 83, 105);
|
||||||
background-color: #000;
|
background-color: rgba(248, 249, 250, 0.9);
|
||||||
border-color: #464647;
|
border-color: rgb(102, 83, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
.turbolinks-progress-bar {
|
.turbolinks-progress-bar {
|
||||||
@ -101,63 +98,36 @@ body {
|
|||||||
.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: rgb(241, 229, 52);
|
color: #fff;
|
||||||
background-color: rgb(228, 35, 132);
|
background-color: rgb(102, 83, 105);
|
||||||
border-color: rgb(228, 35, 132);
|
border-color: rgb(102, 83, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
color: #fff;
|
color: rgba(248, 249, 250, 0.9);
|
||||||
background-color: #000;
|
background-color: rgb(102, 83, 105);
|
||||||
border-color: #adb5bd;
|
border-color: rgb(102, 83, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
.border-primary {
|
.border-primary {
|
||||||
border-color: rgb(228, 35, 132) !important;
|
border-color: rgb(115, 15, 115) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
|
||||||
color: #fff;
|
|
||||||
background-color: #000;
|
|
||||||
border-color: #adb5bd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-secondary:hover,
|
|
||||||
.btn-secondary:not(:disabled):not(.disabled).active,
|
|
||||||
.btn-secondary:not(:disabled):not(.disabled):active {
|
|
||||||
color: rgb(241, 229, 52);
|
|
||||||
background-color: rgb(228, 35, 132);
|
|
||||||
border-color: rgb(228, 35, 132);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.btn-outline-dark {
|
|
||||||
color: #343a40;
|
|
||||||
border-color: #343a40;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-outline-dark:hover,
|
|
||||||
.btn-outline-dark:not(:disabled):not(.disabled).active,
|
|
||||||
.btn-outline-dark:not(:disabled):not(.disabled):active {
|
|
||||||
color: rgb(241, 229, 52);
|
|
||||||
background-color: rgb(228, 35, 132);
|
|
||||||
border-color: rgb(228, 35, 132);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: rgb(228, 35, 132);
|
color: rgb(102, 83, 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: rgb(228, 35, 132);
|
color: rgb(200, 30, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
box-shadow: 0 0 0 0.25rem rgb(228 35 132 / 50%);
|
box-shadow: 0 0 0 0.25rem rgba(200, 30, 200, 0.25);
|
||||||
border-color: rgb(228, 35, 132);
|
border-color: rgb(200, 30, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-primary.focus {
|
.btn-outline-primary.focus {
|
||||||
box-shadow: 0 0 0 0.25rem rgb(228 35 132 / 10%);
|
box-shadow: 0 0 0 0.25rem rgba(200, 30, 200, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ function displayStyle (note) {
|
|||||||
if (!note) { return '' }
|
if (!note) { return '' }
|
||||||
const balance = note.balance
|
const balance = note.balance
|
||||||
var css = ''
|
var css = ''
|
||||||
if (balance < -5000) { 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' }
|
||||||
|
@ -17,6 +17,3 @@ django-tables2~=2.3.1
|
|||||||
python-memcached~=1.59
|
python-memcached~=1.59
|
||||||
phonenumbers~=8.9.10
|
phonenumbers~=8.9.10
|
||||||
Pillow>=5.4.1
|
Pillow>=5.4.1
|
||||||
oauthlib<3.2.1
|
|
||||||
lxml<4.9.2
|
|
||||||
zipp>=2.0.0,<2.0.1
|
|
||||||
|
2
tox.ini
2
tox.ini
@ -16,7 +16,7 @@ skipsdist = True
|
|||||||
sitepackages = True
|
sitepackages = True
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
coverage<6.5.0
|
coverage
|
||||||
commands =
|
commands =
|
||||||
coverage run --omit='apps/scripts*,*_example.py,note_kfet/wsgi.py' --source=apps,note_kfet ./manage.py test apps/
|
coverage run --omit='apps/scripts*,*_example.py,note_kfet/wsgi.py' --source=apps,note_kfet ./manage.py test apps/
|
||||||
coverage report -m
|
coverage report -m
|
||||||
|
Reference in New Issue
Block a user