first step offboarding ready
This commit is contained in:
parent
da8c744227
commit
e61c28aae3
|
@ -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'})}
|
||||
|
||||
|
|
|
@ -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'''
|
||||
|
|
Loading…
Reference in New Issue