chol
/
eva
forked from tohe/eva
1
0
Fork 0

Mobile is BooleanField now.

This commit is contained in:
Benni Bärmann 2021-05-03 15:49:05 +02:00
parent 07a90dae8c
commit 2de76d44d5
3 changed files with 16 additions and 10 deletions

5
TODO
View File

@ -0,0 +1,5 @@
- remove empty lines in mail
- in mail ändern "Deine mailadresse" in "ansprechpartner_in"
- true/false übersetzen in dataloop

View File

@ -21,10 +21,10 @@ VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
OS_CHOICES = {'UBU': 'Ubuntu (Standard)',
'WIN': 'Windows (bitte Begründung angeben)',}
MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
'SINGLE': 'Smartphone, Single SIM',
'DUAL': 'Smartphone, Dual SIM',}
# MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
# 'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
# 'SINGLE': 'Smartphone, Single SIM',
# 'DUAL': 'Smartphone, Dual SIM',}
LANG_CHOICES = {'GER': 'Deutsch',
'ENG': 'English',}
@ -68,10 +68,11 @@ class Employee(models.Model):
vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD')
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')
mobile = models.BooleanField(max_length=6, default=False)
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")
sim2 = models.BooleanField(default=False, verbose_name="Zweite Sim (für Laptop zB)") # do we still need this?
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon") # do we still need this?
# TODO: tastaturlayout DE/US
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")
accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), null=True)

View File

@ -12,7 +12,7 @@ from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Employee, DEPARTMENT_CHOICES, LAPTOP_CHOICES, OS_CHOICES, VENDOR_CHOICES, \
MOBILE_CHOICES, LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES
LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm,\
ChangeForm, TYPE_CHOICES
from .settings import MAILS, EVA_MAIL, BASIC_DATA, ONLY_ONBOARDING
@ -164,7 +164,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
# update values in data dictionary with keys from *_CHOICES if present there
choices = {**DEPARTMENT_CHOICES, **LAPTOP_CHOICES, **TRANSPONDER_CHOICES,
**OS_CHOICES, **MOBILE_CHOICES, **LANG_CHOICES, **VENDOR_CHOICES}
**OS_CHOICES, **LANG_CHOICES, **VENDOR_CHOICES}
data.update({k:choices[v] for k,v in data.items() \
if isinstance(v,collections.abc.Hashable) \
and v in choices})