EVA/evapp/models.py

87 lines
5.2 KiB
Python
Raw Permalink Normal View History

2020-12-23 10:42:57 +00:00
from django.db import models
2020-12-23 12:16:01 +00:00
from multiselectfield import MultiSelectField
2022-01-26 14:54:27 +00:00
from django.utils.translation import gettext_lazy as _
2020-12-23 10:42:57 +00:00
2021-01-14 14:10:29 +00:00
# ATTENTION!!!
# No key should be used twice in any of these dicts because of the
2021-03-01 13:19:31 +00:00
# suboptimal implementation in views.EvaFormView.beautify_data()
2021-01-14 14:10:29 +00:00
#
2021-03-01 13:19:31 +00:00
DEPARTMENT_CHOICES = {'COENG': _('Communitys & Engagement'),
2022-01-27 12:36:01 +00:00
'SOFT': _('Softwareentwicklung'),
2020-12-23 11:04:08 +00:00
'CENT': 'Central',
'KOMAD': _('Kommunikation & Advocacy'),
2022-01-27 12:36:01 +00:00
'VOR': _('Vorstand'),}
2020-12-23 11:04:08 +00:00
2024-12-04 09:47:17 +00:00
#VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
# 'LENOVO': 'Lenovo Thinkpad',
# 'MAC': _('Mac (nur für Grafiker_innen)')}
2021-02-08 13:46:38 +00:00
2024-12-04 09:47:17 +00:00
OS_CHOICES = {'FED': 'Fedora (Standard)',
2022-01-27 12:36:01 +00:00
'WIN': _('Windows (bitte Begründung angeben)'),
2024-12-04 09:47:17 +00:00
'MOS': _('Mac OS (nur wenn Mac gewählt)'),
'UBU': _('Ubuntu')}
2020-12-23 12:16:01 +00:00
2021-03-01 13:19:31 +00:00
LANG_CHOICES = {'GER': 'Deutsch',
'ENG': 'English',}
2020-12-23 12:16:01 +00:00
KEYBOARD_CHOICES = {'DE': 'Deutsch',
'US': 'USA',
2022-01-27 12:36:01 +00:00
'OT': _('Anderes (Bitte unten angeben)')}
2021-02-09 09:48:07 +00:00
ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem',
2022-01-27 12:36:01 +00:00
'CIVIC1': _('Civic CRM (allgemein)'),
'CIVIC2': _("Civic CRM (Mailings, impliziert allgemein)"),
2020-12-23 12:16:01 +00:00
'WEB': 'www.wikimedia.de (edit)',
'BLOG': 'blog.wikimedia.de (edit)',
'FORUM': 'forum.wikimedia.de',
}
2022-01-27 12:36:01 +00:00
TRANSPONDER_CHOICES = {'NORM': _('Allgemeiner Transponder'),
'SPECIAL': _('Besondere Schließungen (bitte angeben)'),
'NOTRANS': _('Kein Transponder'),}
2024-12-04 09:47:17 +00:00
JANEIN_CHOICES = {'NEIN': ('Nein'),
'JA': _('Ja'),}
2020-12-23 11:04:08 +00:00
class Employee(models.Model):
# email adress of user. should not be necessary if we use openauth one day
2021-05-17 10:41:46 +00:00
# usermail = models.EmailField(max_length=50, verbose_name="Deine Mailadresse (Ansprechpartner_in)", default='bestechefin@wikimedia.de')
# personal data
2022-01-26 14:54:27 +00:00
firstname = models.CharField(max_length=50, verbose_name=_("Vorname"))
2022-01-27 14:46:33 +00:00
lastname = models.CharField(max_length=50, verbose_name=_("Nachname"))
# intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
2022-01-27 14:46:33 +00:00
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name=_('Bereich'))
2022-02-08 09:56:46 +00:00
team = models.CharField(max_length=50, null=True, blank=True) # TODO? better with choices?
2024-12-04 09:47:17 +00:00
add_to_wikimediade = models.CharField(max_length=5, choices=JANEIN_CHOICES.items(), verbose_name=_("Soll die Person bei Ansprechpartner*innen auf der WMDE-Webseite mit aufgenommen werden?"))
2020-12-23 11:17:50 +00:00
# general work related stuff
2022-01-27 14:46:33 +00:00
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"))
jobdescription_german = models.CharField(null=True, max_length=100, verbose_name="Stellenbezeichnung(deutsch)")
2021-03-01 13:19:31 +00:00
jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="Job description(english)")
2022-01-27 14:52:27 +00:00
works_in_gs = models.BooleanField(verbose_name=_('Braucht Arbeitsplatz in der Geschäftsstelle?)'), default=True)
2022-01-27 14:46:33 +00:00
desk = models.CharField(max_length=100, null=True, blank=True, verbose_name=_("Wo soll der Arbeitsplatz sein?"))
2021-05-03 13:49:05 +00:00
# IT related stuff
2024-12-04 09:47:17 +00:00
#vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD', verbose_name=_('Hersteller'))
framework = models.CharField(max_length=300, null=True, blank=True, verbose_name=_("Möchten Sie vom Standard des Frameworks (Laptop) abweichen, und wenn ja, warum?"))
os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='FED', verbose_name=_('Betriebssystem'))
2024-12-04 14:05:54 +00:00
#screen = models.BooleanField(default=False, verbose_name=_('Zusätzlicher Monitor? Einer ist standard.'))
2022-01-27 14:46:33 +00:00
mobile = models.BooleanField(max_length=6, default=False, verbose_name=_('Diensttelefon (Handy)'))
landline = models.BooleanField(default = False, verbose_name=_('Festnetznummer (Sipgate)'))
# sim = models.BooleanField(default=False, verbose_name="Mobilfunkvertrag")
2022-01-27 14:46:33 +00:00
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", verbose_name=_("Sprache für Onboarding"))
2023-08-17 11:08:47 +00:00
accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), max_length=40, null=True, blank=True, verbose_name=_("Zusätzliche Accounts"))
2022-01-27 14:46:33 +00:00
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)
# office related stuff
transponder = models.CharField(max_length=7, choices=TRANSPONDER_CHOICES.items(), default='NORM')
2022-01-27 14:46:33 +00:00
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?'))