[FIX] LEAVE: Remove leave type leave calculation method, leave type creation/updation form

This commit is contained in:
Horilla
2023-10-09 11:58:52 +05:30
parent d15785c321
commit b6f2fd5127
3 changed files with 9 additions and 7 deletions

View File

@@ -112,6 +112,8 @@ class LeaveTypeForm(ConditionForm):
}
widgets = {
"color": TextInput(attrs={"type": "color", "style": "height:40px;"}),
"period_in": forms.HiddenInput(),
"total_days": forms.HiddenInput(),
}
def clean(self):
@@ -161,7 +163,7 @@ class UpdateLeaveTypeForm(ConditionForm):
class Meta:
model = LeaveType
fields = "__all__"
exclude = ["period_in", "total_days"]
widgets = {
"color": TextInput(attrs={"type": "color", "style": "height:40px;"}),
}

View File

@@ -63,21 +63,21 @@
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Leave Count" %}</label>
<label for="" class="oh-label">{% trans "Total Days" %}</label>
{{form.count}}
{{form.count.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Period In" %}</label>
{% comment %} <label for="" class="oh-label">{% trans "Period In" %}</label> {% endcomment %}
{{form.period_in}}
{{form.period_in.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Total Days" %}</label>
{% comment %} <label for="" class="oh-label">{% trans "Total Days" %}</label> {% endcomment %}
{{form.total_days}}
{{form.total_days.errors}}
</div>

View File

@@ -65,21 +65,21 @@
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Leave Count" %}</label>
<label for="" class="oh-label">{% trans "Total Days" %}</label>
{{form.count}}
{{form.count.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Period In" %}</label>
{% comment %} <label for="" class="oh-label">{% trans "Period In" %}</label> {% endcomment %}
{{form.period_in}}
{{form.period_in.errors}}
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-4">
<div class="oh-input-group">
<label for="" class="oh-label">{% trans "Total Days" %}</label>
{% comment %} <label for="" class="oh-label">{% trans "Total Days" %}</label> {% endcomment %}
{{form.total_days}}
{{form.total_days.errors}}
</div>