commit message for submodule

This commit is contained in:
ayachebaane 2024-12-04 10:47:17 +01:00
parent f4e05a0799
commit f5a90e387c
4 changed files with 48 additions and 18 deletions

View File

@ -48,16 +48,10 @@ class WorkingForm(EvaForm):
class ITForm(EvaForm): class ITForm(EvaForm):
def clean(self):
data = self.cleaned_data
if data['vendor'] == 'MAC' and data['os'] != 'MOS':
raise ValidationError('Ein MAC sollte Mac OS installiert haben')
return data
class Meta: class Meta:
model = Employee model = Employee
fields = [ fields = [
'vendor', 'os', 'keyboard', 'screen', 'mobile', 'landline', 'framework', 'os', 'keyboard', 'screen', 'mobile', 'landline',
'comment', 'language', 'accounts', 'lists', 'rebu2go' ] 'comment', 'language', 'accounts', 'lists', 'rebu2go' ]
class OfficeForm(EvaForm): class OfficeForm(EvaForm):

View File

@ -0,0 +1,32 @@
# Generated by Django 4.2.16 on 2024-11-26 09:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('evapp', '0005_alter_employee_accounts'),
]
operations = [
migrations.RemoveField(
model_name='employee',
name='vendor',
),
migrations.AddField(
model_name='employee',
name='framework',
field=models.CharField(blank=True, max_length=300, null=True, verbose_name='Möchten Sie vom Standard des Frameworks abweichen, und wenn ja, warum?'),
),
migrations.AlterField(
model_name='employee',
name='add_to_wikimediade',
field=models.CharField(choices=[('NEIN', 'Nein'), ('JA', 'Ja')], default=True, max_length=5, verbose_name='Soll die Person bei Ansprechpartner*innen auf der WMDE-Webseite mit aufgenommen werden?'),
),
migrations.AlterField(
model_name='employee',
name='os',
field=models.CharField(choices=[('FED', 'Fedora (Standard)'), ('WIN', 'Windows (bitte Begründung angeben)'), ('MOS', 'Mac OS (nur wenn Mac gewählt)'), ('UBU', 'Ubuntu')], default='FED', max_length=3, verbose_name='Betriebssystem'),
),
]

View File

@ -13,14 +13,14 @@ DEPARTMENT_CHOICES = {'COENG': _('Communitys & Engagement'),
'KOMAD': _('Kommunikation & Advocacy'), 'KOMAD': _('Kommunikation & Advocacy'),
'VOR': _('Vorstand'),} 'VOR': _('Vorstand'),}
VENDOR_CHOICES = {'STANDARD': 'Dell Latitude', #VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
'LENOVO': 'Lenovo Thinkpad', # 'LENOVO': 'Lenovo Thinkpad',
'MAC': _('Mac (nur für Grafiker_innen)')} # 'MAC': _('Mac (nur für Grafiker_innen)')}
OS_CHOICES = {'UBU': 'Ubuntu (Standard)', OS_CHOICES = {'FED': 'Fedora (Standard)',
'WIN': _('Windows (bitte Begründung angeben)'), 'WIN': _('Windows (bitte Begründung angeben)'),
'MOS': _('Mac OS (nur wenn Mac gewählt)')} 'MOS': _('Mac OS (nur wenn Mac gewählt)'),
'UBU': _('Ubuntu')}
LANG_CHOICES = {'GER': 'Deutsch', LANG_CHOICES = {'GER': 'Deutsch',
'ENG': 'English',} 'ENG': 'English',}
@ -41,6 +41,9 @@ TRANSPONDER_CHOICES = {'NORM': _('Allgemeiner Transponder'),
'SPECIAL': _('Besondere Schließungen (bitte angeben)'), 'SPECIAL': _('Besondere Schließungen (bitte angeben)'),
'NOTRANS': _('Kein Transponder'),} 'NOTRANS': _('Kein Transponder'),}
JANEIN_CHOICES = {'NEIN': ('Nein'),
'JA': _('Ja'),}
class Employee(models.Model): class Employee(models.Model):
# email adress of user. should not be necessary if we use openauth one day # email adress of user. should not be necessary if we use openauth one day
@ -52,7 +55,7 @@ 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)
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name=_('Bereich')) department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items(), verbose_name=_('Bereich'))
team = models.CharField(max_length=50, null=True, blank=True) # TODO? better with choices? team = models.CharField(max_length=50, null=True, blank=True) # TODO? better with choices?
add_to_wikimediade = models.BooleanField(default = False, verbose_name=_('Soll auf wikimedia.de irgendwo stehen?')) 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?"))
# 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"))
@ -63,8 +66,9 @@ class Employee(models.Model):
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?"))
# IT related stuff # IT related stuff
vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD', verbose_name=_('Hersteller')) #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')) 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'))
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.BooleanField(max_length=6, default=False, verbose_name=_('Diensttelefon (Handy)')) mobile = models.BooleanField(max_length=6, default=False, verbose_name=_('Diensttelefon (Handy)'))
landline = models.BooleanField(default = False, verbose_name=_('Festnetznummer (Sipgate)')) landline = models.BooleanField(default = False, verbose_name=_('Festnetznummer (Sipgate)'))

View File

@ -12,8 +12,8 @@ from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.mixins import LoginRequiredMixin
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from .models import Employee, DEPARTMENT_CHOICES, OS_CHOICES, VENDOR_CHOICES, \ from .models import Employee, DEPARTMENT_CHOICES, OS_CHOICES, \
LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES, KEYBOARD_CHOICES LANG_CHOICES, ACCOUNT_CHOICES, TRANSPONDER_CHOICES, KEYBOARD_CHOICES, JANEIN_CHOICES
from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm,\ from .forms import PersonalForm, WorkingForm, ITForm, OfficeForm, DummyForm,\
ChangeForm, TYPE_CHOICES ChangeForm, TYPE_CHOICES
from .settings import MAILS, EVA_MAIL, BASIC_DATA, ONLY_ONBOARDING from .settings import MAILS, EVA_MAIL, BASIC_DATA, ONLY_ONBOARDING