From 5c252c81f002c25a2d41c0d3084e48ce353a3664 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Tue, 30 Mar 2021 10:27:22 +0200 Subject: [PATCH] BVG form field added --- evapp/forms.py | 2 +- evapp/migrations/0012_employee_bvg.py | 18 ++++++++++++++++++ evapp/models.py | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 evapp/migrations/0012_employee_bvg.py diff --git a/evapp/forms.py b/evapp/forms.py index 6fc3a0f..039ea83 100644 --- a/evapp/forms.py +++ b/evapp/forms.py @@ -42,7 +42,7 @@ class WorkingForm(EvaForm): class Meta: model = Employee fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german', - 'jobdescription_english', 'remote', 'desk',] + 'jobdescription_english', 'remote', 'desk', 'bvg'] widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}), 'firstdate_presence': DateInput(attrs={'type': 'date'}),} diff --git a/evapp/migrations/0012_employee_bvg.py b/evapp/migrations/0012_employee_bvg.py new file mode 100644 index 0000000..320a45e --- /dev/null +++ b/evapp/migrations/0012_employee_bvg.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.4 on 2021-03-30 08:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('evapp', '0011_auto_20210329_1254'), + ] + + operations = [ + migrations.AddField( + model_name='employee', + name='bvg', + field=models.BooleanField(default=True, verbose_name='Bekommt eine BVG-Karte, weil in Berlin tätig'), + ), + ] diff --git a/evapp/models.py b/evapp/models.py index afec9b6..af72e89 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -62,7 +62,8 @@ class Employee(models.Model): 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) desk = models.CharField(max_length=100, null=True, blank=True, verbose_name="Wo soll der Arbeitsplatz sein?") - + bvg = models.BooleanField(verbose_name='Bekommt eine BVG-Karte, weil in Berlin tätig', default=True) + # IT related stuff laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14') vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD')