WMDE
/
eva
forked from tohe/eva
7
1
Fork 0

sim and intern removed, language => sprache

This commit is contained in:
Benni Bärmann 2021-05-26 15:09:40 +02:00
parent 0f55c8f82d
commit 2b25c6d09d
5 changed files with 49 additions and 10 deletions

8
TODO
View File

@ -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

View File

@ -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):

View File

@ -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)'),
),
]

View File

@ -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)

View File

@ -59,9 +59,9 @@ 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:
#if not data['intern']:
# mail = name + '_ext@wikimedia.de'
#else:
mail = name + '@wikimedia.de'
data['email'] = mail