2021-01-04 14:48:32 +00:00
|
|
|
from django.db import models
|
2021-01-05 12:01:32 +00:00
|
|
|
from django.forms import ModelForm, DateInput
|
2021-01-04 14:48:32 +00:00
|
|
|
|
|
|
|
from .models import Employee
|
|
|
|
|
2021-01-13 12:12:40 +00:00
|
|
|
# class EmployeeForm(ModelForm):
|
|
|
|
# class Meta:
|
|
|
|
# model = Employee
|
|
|
|
# fields = '__all__'
|
|
|
|
# widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
|
|
|
# 'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
2021-01-11 15:12:20 +00:00
|
|
|
|
|
|
|
class PersonalForm(ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Employee
|
|
|
|
fields = ['firstname', 'lastname', 'email', 'department', 'team',]
|
|
|
|
|
|
|
|
class WorkingForm(ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Employee
|
2021-01-13 12:12:40 +00:00
|
|
|
fields = ['firstdate_employment', 'firstdate_presence', 'jobdescription_german',
|
|
|
|
'jobdescription_english', 'desk',]
|
2021-01-11 15:12:20 +00:00
|
|
|
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
|
|
|
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
2021-01-13 12:12:40 +00:00
|
|
|
|
|
|
|
class ITForm(ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Employee
|
|
|
|
fields = [
|
|
|
|
'laptop', 'os', 'screen', 'mobile', 'landline', 'comment',
|
|
|
|
'language', 'accounts', 'lists', ]
|
|
|
|
|
|
|
|
class OfficeForm(ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Employee
|
|
|
|
fields = ['transponder', 'post_office_box',]
|