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

first step offboarding ready

This commit is contained in:
Benni Bärmann 2021-11-10 15:48:12 +01:00
parent da8c744227
commit e61c28aae3
2 changed files with 16 additions and 7 deletions

View File

@ -32,7 +32,7 @@ class PersonalForm(EvaForm):
class OffboardingForm(EvaForm):
class Meta:
model: Employee
model = Employee
fields = ['lastdate_employment']
widgets = {'lastdate_employment' : DateInput(attrs={'type': 'date'})}

View File

@ -28,20 +28,29 @@ def long_process(wizard):
return True
else:
data = wizard.get_cleaned_data_for_step('0') or {}
print(data)
if data.get('choice') != 'CHANGE':
# print(data)
if data.get('choice') == 'IN':
wizard.set_choice('IN')
#print('PROZESS IN')
print('PROZESS IN')
return True
else:
wizard.set_choice('CHANGE')
#print('PROZESS NOT IN')
return False
#wizard.set_choice('CHANGE')
#print('PROZESS CHANGE')
#return False
def offboarding_process(wizard):
''' this method is called via urls.py to determine if the form is part of the change process'''
print('OFFBOARDING PROZESS')
return not long_process(wizard)
if not ONLY_ONBOARDING:
data = wizard.get_cleaned_data_for_step('0') or {}
print(data)
if data.get('choice') == 'OUT':
#print("PPPPPPPPPPPPPPP")
wizard.set_choice('OUT')
return True
# wizard.set_choice('IN')
return False
def change_process(wizard):
''' this method is called via urls.py to determine if the form is part of the change process'''