From 2b25c6d09d70bfe1cf87d3e85fe484f1c594a4e4 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 26 May 2021 15:09:40 +0200 Subject: [PATCH] sim and intern removed, language => sprache --- TODO | 8 ++++++ evapp/forms.py | 4 +-- evapp/migrations/0024_auto_20210526_1259.py | 31 +++++++++++++++++++++ evapp/models.py | 8 +++--- evapp/views.py | 8 +++--- 5 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 evapp/migrations/0024_auto_20210526_1259.py diff --git a/TODO b/TODO index 9972ffb..bd90a68 100644 --- a/TODO +++ b/TODO @@ -3,3 +3,11 @@ * Datumsformat bei Ausgabe ist englisch nicht deutsch. * use new it support adress in evapp/settings.py + +* enforce Mac OS if Mac is choosen? + +* Remove interner mitarbeiter? + +* Diensttelefon? + +* Language => Sprache diff --git a/evapp/forms.py b/evapp/forms.py index 016f374..1ebaa0e 100644 --- a/evapp/forms.py +++ b/evapp/forms.py @@ -29,7 +29,7 @@ class PersonalForm(EvaForm): class Meta: model = Employee - fields = ['firstname', 'lastname', 'intern', 'department', 'team', ] + fields = ['firstname', 'lastname', 'department', 'team', ] class WorkingForm(EvaForm): @@ -50,7 +50,7 @@ class ITForm(EvaForm): class Meta: model = Employee fields = [ - 'vendor', 'os', 'keyboard', 'screen', 'mobile', 'sim', 'comment', + 'vendor', 'os', 'keyboard', 'screen', 'mobile', 'comment', 'language', 'accounts', 'lists', 'rebu2go' ] class OfficeForm(EvaForm): diff --git a/evapp/migrations/0024_auto_20210526_1259.py b/evapp/migrations/0024_auto_20210526_1259.py new file mode 100644 index 0000000..65c9445 --- /dev/null +++ b/evapp/migrations/0024_auto_20210526_1259.py @@ -0,0 +1,31 @@ +# Generated by Django 3.1.4 on 2021-05-26 12:59 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('evapp', '0023_auto_20210518_0856'), + ] + + operations = [ + migrations.RemoveField( + model_name='employee', + name='intern', + ), + migrations.RemoveField( + model_name='employee', + name='sim', + ), + migrations.AlterField( + model_name='employee', + name='language', + field=models.CharField(choices=[('GER', 'Deutsch'), ('ENG', 'English')], default='GER', max_length=3, verbose_name='Sprache'), + ), + migrations.AlterField( + model_name='employee', + name='mobile', + field=models.BooleanField(default=False, max_length=6, verbose_name='Diensttelefon (Handy)'), + ), + ] diff --git a/evapp/models.py b/evapp/models.py index 17ce07d..25bd282 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -47,7 +47,7 @@ class Employee(models.Model): # personal data firstname = models.CharField(max_length=50, verbose_name="Vorname") lastname = models.CharField(max_length=50, verbose_name="Nachname") - intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True) + # intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True) department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name='Bereich') team = models.CharField(max_length=20, null=True, blank=True) # TODO? better with choices? @@ -63,11 +63,11 @@ class Employee(models.Model): vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD', verbose_name='Hersteller') os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU', verbose_name='Betriebssystem') screen = models.BooleanField(default=False, verbose_name='Zusätzlicher Monitor? Einer ist standard.') - mobile = models.BooleanField(max_length=6, default=False, verbose_name='Handy benötigt?') - sim = models.BooleanField(default=False, verbose_name="Mobilfunkvertrag") + mobile = models.BooleanField(max_length=6, default=False, verbose_name='Diensttelefon (Handy)') + # sim = models.BooleanField(default=False, verbose_name="Mobilfunkvertrag") keyboard = models.CharField(max_length=2, choices=KEYBOARD_CHOICES.items(), default='DE', verbose_name="Tastaturlayout") 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") + language = models.CharField(max_length=3, choices=LANG_CHOICES.items(), default="GER", verbose_name="Sprache") accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), null=True, blank=True, verbose_name="Zusätzliche Accounts") lists = models.CharField(max_length=100, null=True, blank=True, verbose_name="Zusätzliche Mailinglisten") rebu2go = models.BooleanField(verbose_name="Rebu2Go-Zugang benötigt?", default=False) diff --git a/evapp/views.py b/evapp/views.py index b2fbb95..4840549 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -59,10 +59,10 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView): (first, *_) = data['firstname'].split(maxsplit=1) (last, *_) = data['lastname'].split(maxsplit=1) name = first + '.' + last - if not data['intern']: - mail = name + '_ext@wikimedia.de' - else: - mail = name + '@wikimedia.de' + #if not data['intern']: + # mail = name + '_ext@wikimedia.de' + #else: + mail = name + '@wikimedia.de' data['email'] = mail def get_all_cleaned_data(self):