From 531ffa95fe1b981952ebe58d0970ae12541a1a23 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 29 Mar 2021 14:56:06 +0200 Subject: [PATCH] added sim & sim2, configured mails in settings --- TODO | 3 +- evapp/forms.py | 2 +- evapp/migrations/0011_auto_20210329_1254.py | 23 +++++++++ evapp/models.py | 2 + evapp/settings.py | 52 ++++++++++++++++----- 5 files changed, 67 insertions(+), 15 deletions(-) create mode 100644 evapp/migrations/0011_auto_20210329_1254.py diff --git a/TODO b/TODO index c405c87..af4c42d 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,7 @@ evapp/settings auf die richtigen adressen setzen Accounts klären -Bemerkung like "E - VA soon" auf die webseite - link ins mailtemplate (seite im wiki erstellen -> alexander) +welche mails gehen an wen. liste an alexander whitenoise/gunicorn in production diff --git a/evapp/forms.py b/evapp/forms.py index 862542b..6fc3a0f 100644 --- a/evapp/forms.py +++ b/evapp/forms.py @@ -50,7 +50,7 @@ class ITForm(EvaForm): class Meta: model = Employee fields = [ - 'laptop', 'vendor', 'os', 'screen', 'mobile', 'landline', 'comment', + 'laptop', 'vendor', 'os', 'screen', 'mobile', 'sim', 'sim2', 'landline', 'comment', 'language', 'accounts', 'lists', 'rebu2go' ] class OfficeForm(EvaForm): diff --git a/evapp/migrations/0011_auto_20210329_1254.py b/evapp/migrations/0011_auto_20210329_1254.py new file mode 100644 index 0000000..d41d516 --- /dev/null +++ b/evapp/migrations/0011_auto_20210329_1254.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.4 on 2021-03-29 12:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('evapp', '0010_auto_20210325_0813'), + ] + + operations = [ + migrations.AddField( + model_name='employee', + name='sim', + field=models.BooleanField(default=False, verbose_name='Mobilfunkvertrag'), + ), + migrations.AddField( + model_name='employee', + name='sim2', + field=models.BooleanField(default=False, verbose_name='Zweite Sim (für Laptop zB)'), + ), + ] diff --git a/evapp/models.py b/evapp/models.py index 0befa71..afec9b6 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -69,6 +69,8 @@ class Employee(models.Model): os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU') screen = models.BooleanField(default=False, verbose_name='Zusätzlicher Monitor? Einer ist standard.') mobile = models.CharField(max_length=6, default='NO') + sim = models.BooleanField(default=False, verbose_name="Mobilfunkvertrag") + sim2 = models.BooleanField(default=False, verbose_name="Zweite Sim (für Laptop zB)") landline = models.BooleanField(default=True, verbose_name="Festnetztelefon") comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen") language = models.CharField(max_length=3, choices=LANG_CHOICES.items(), default="GER") diff --git a/evapp/settings.py b/evapp/settings.py index 514b771..4e40c25 100644 --- a/evapp/settings.py +++ b/evapp/settings.py @@ -1,22 +1,50 @@ # temporary setting while change and exit is not yet fully implemented ONLY_ONBOARDING = True -# sender mail adress also used for MAILTEST mode +# sender mail adress also used for MAILTEST mode EVA_MAIL = 'benni.baermann@wikimedia.de' # these Fields should be included in every mail -BASIC_DATA = ['firstname', 'lastname'] +BASIC_DATA = ['usermail', 'firstname', 'lastname', 'firstdate_employment', 'firstdate_presence',] # for every department: 'MAIL' => mail adress, 'DATA': additional fields to include -MAILS = {'IT': { +MAILS = { + 'IT': { 'MAIL': 'it@wikimedia.de', - 'DATA': ['laptop', 'os', 'email'], - }, - 'OFFICE': { - 'MAIL': 'office@wikimedia.de', - 'DATA': ['transponder',], - }, - 'ACCOUNTING': {'MAIL': 'accounting@wikimedia.de', - 'DATA': ['rebu2go',], - } + 'DATA': [ + 'laptop', 'os', 'comment', 'email', 'landline', 'lists', 'mobile', + 'department', 'accounts', 'language', 'screen', 'remote', 'desk', + ], + }, + 'OFFICE': { + 'MAIL': 'office@wikimedia.de', + 'DATA': [ + 'transponder', 'special', 'post_office_box', 'sim', 'sim2', + 'remote', 'desk', + ], + }, + 'ACCOUNTING': { + 'MAIL': 'accounting@wikimedia.de', + 'DATA': ['rebu2go',], + }, + 'KOMM': { + 'MAIL': 'kom@wikimedia.de', + 'DATA': [ + 'department', 'team', + 'jobdescription_german', 'jobdescription_english', + ], + }, + 'HR': { + 'MAIL': 'hr@wikimedia.de', + 'DATA': [ + 'department', 'team', 'language', + ] + }, + 'DIRECTORAT': { + 'MAIL': 'vorstand@wikmedia.de', + 'DATA': [ + 'team', 'department', 'language', + ] + } + }