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

minor modell changes

This commit is contained in:
Benni Bärmann 2021-03-01 14:19:31 +01:00
parent 9348ad4c1e
commit 51b760404a
2 changed files with 67 additions and 13 deletions

View File

@ -0,0 +1,53 @@
# Generated by Django 3.1.4 on 2021-03-01 10:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('evapp', '0007_auto_20210209_1146'),
]
operations = [
migrations.AddField(
model_name='employee',
name='special',
field=models.TextField(blank=True, max_length=500, null=True, verbose_name='Besondere Schließungen hier eintragen'),
),
migrations.AlterField(
model_name='employee',
name='firstdate_employment',
field=models.DateField(null=True, verbose_name='Erster Arbeitstag'),
),
migrations.AlterField(
model_name='employee',
name='firstdate_presence',
field=models.DateField(null=True, verbose_name='Erster Tag der Anwesenheit in der Geschäftsstelle'),
),
migrations.AlterField(
model_name='employee',
name='jobdescription_english',
field=models.CharField(max_length=100, null=True, verbose_name='Job description(english)'),
),
migrations.AlterField(
model_name='employee',
name='language',
field=models.CharField(choices=[('GER', 'Deutsch'), ('ENG', 'English')], default='GER', max_length=3),
),
migrations.AlterField(
model_name='employee',
name='laptop',
field=models.CharField(choices=[('14', '14", uUser Standardgerät'), ('12', '12,5", Geeignet für Vielreisende')], default='14', max_length=2),
),
migrations.AlterField(
model_name='employee',
name='screen',
field=models.BooleanField(default=False, verbose_name='Zusätzlicher Monitor? Einer ist standard.'),
),
migrations.AlterField(
model_name='employee',
name='transponder',
field=models.CharField(choices=[('NORM', 'Allgemeiner Transponder'), ('SPECIAL', 'Besondere Schließungen (bitte angeben)'), ('NOTRANS', 'Kein Transponder')], default='NORM', max_length=7),
),
]

View File

@ -3,15 +3,16 @@ from multiselectfield import MultiSelectField
# ATTENTION!!! # ATTENTION!!!
# No key should be used twice in any of these dicts because of the # No key should be used twice in any of these dicts because of the
# implementation in views.EvaFormView.beautify_data() # suboptimal implementation in views.EvaFormView.beautify_data()
# #
DEPARTMENT_CHOICES = {'PROG': 'Programme', DEPARTMENT_CHOICES = {'PROG': 'Programme',
'SOFT': 'Softwareentwicklung', 'SOFT': 'Softwareentwicklung',
'CENT': 'Central', 'CENT': 'Central',
'VOR': 'Vorstand',} 'VOR': 'Vorstand',}
LAPTOP_CHOICES = {'14': '14", unser Standardgerät', LAPTOP_CHOICES = {'14': '14", uUser Standardgerät',
'12': '12,5", geeignet für Vielreisende',} '12': '12,5", Geeignet für Vielreisende',}
VENDOR_CHOICES = {'STANDARD': 'Dell Latitude', VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
'LENOVO': 'Lenovo Thinkpad', 'LENOVO': 'Lenovo Thinkpad',
@ -25,8 +26,8 @@ MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
'SINGLE': 'Smartphone, Single SIM', 'SINGLE': 'Smartphone, Single SIM',
'DUAL': 'Smartphone, Dual SIM',} 'DUAL': 'Smartphone, Dual SIM',}
LANG_CHOICES = {'GER': 'deutsch', LANG_CHOICES = {'GER': 'Deutsch',
'ENG': 'english',} 'ENG': 'English',}
ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem', ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem',
'CIVIC1': 'Civic CRM (allgemein)', 'CIVIC1': 'Civic CRM (allgemein)',
@ -37,8 +38,8 @@ ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem',
'FORUM': 'forum.wikimedia.de', 'FORUM': 'forum.wikimedia.de',
} }
TRANSPONDER_CHOICES = {'NORM': 'allgemeiner Transponder', TRANSPONDER_CHOICES = {'NORM': 'Allgemeiner Transponder',
'SPECIAL': 'besondere Schließungen (bitte angeben)', 'SPECIAL': 'Besondere Schließungen (bitte angeben)',
'NOTRANS': 'Kein Transponder',} 'NOTRANS': 'Kein Transponder',}
class Employee(models.Model): class Employee(models.Model):
@ -48,13 +49,13 @@ class Employee(models.Model):
intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True) intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse") email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse")
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items()) department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items())
team = models.CharField(max_length=20, null=True, blank=True) # TODO? choices? team = models.CharField(max_length=20, null=True, blank=True) # TODO? besser als choices?
# general work related stuff # general work related stuff
firstdate_employment = models.DateField(null=True, verbose_name="erster Arbeitstag") firstdate_employment = models.DateField(null=True, verbose_name="Erster Arbeitstag")
firstdate_presence = models.DateField(null=True, verbose_name="erster Tag der Anwesenheit in der Geschäftsstelle") firstdate_presence = models.DateField(null=True, verbose_name="Erster Tag der Anwesenheit in der Geschäftsstelle")
jobdescription_german = models.CharField(null=True, max_length=100, verbose_name="Stellenbeschreibung(deutsch)") jobdescription_german = models.CharField(null=True, max_length=100, verbose_name="Stellenbeschreibung(deutsch)")
jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="job description(english)") jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="Job description(english)")
remote = models.BooleanField(verbose_name='Braucht keinen Arbeitsplatz weil Home-Office', default=False) remote = models.BooleanField(verbose_name='Braucht keinen Arbeitsplatz weil Home-Office', default=False)
desk = models.CharField(max_length=100, null=True, blank=True, verbose_name="Wo soll der Arbeitsplatz sein?") desk = models.CharField(max_length=100, null=True, blank=True, verbose_name="Wo soll der Arbeitsplatz sein?")
@ -62,7 +63,7 @@ class Employee(models.Model):
laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14') laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14')
vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD') vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD')
os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU') 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.') screen = models.BooleanField(default=False, verbose_name='Zusätzlicher Monitor? Einer ist standard.')
mobile = models.CharField(max_length=6, default='NO') mobile = models.CharField(max_length=6, default='NO')
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon") landline = models.BooleanField(default=True, verbose_name="Festnetztelefon")
comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen") comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen")
@ -73,5 +74,5 @@ class Employee(models.Model):
# office related stuff # office related stuff
transponder = models.CharField(max_length=7, choices=TRANSPONDER_CHOICES.items(), default='NORM') transponder = models.CharField(max_length=7, choices=TRANSPONDER_CHOICES.items(), default='NORM')
# TODO: we need an optional field here for SPECIAL special = models.TextField(max_length=500, null=True, blank=True, verbose_name="Besondere Schließungen hier eintragen")
post_office_box = models.BooleanField(default=True, verbose_name='Postfach am Empfang benötigt?') post_office_box = models.BooleanField(default=True, verbose_name='Postfach am Empfang benötigt?')