Merge branch 'develop' into update-items-permission-fix

This commit is contained in:
Saqib 2020-05-30 13:16:55 +05:30 committed by GitHub
commit c16e278979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -67,6 +67,13 @@ frappe.ui.form.on("Leave Application", {
})
);
frm.dashboard.show();
frm.set_query('leave_type', function(){
return {
filters : [
['leave_type_name', 'in', Object.keys(leave_details)]
]
}
});
}
},

View File

@ -1,5 +1,5 @@
{% if data %}
{% if not jQuery.isEmptyObject(data) %}
<h5 style="margin-top: 20px;"> {{ __("Allocated Leaves") }} </h5>
<table class="table table-bordered small">
<thead>
@ -11,7 +11,6 @@
<th style="width: 16%" class="text-right">{{ __("Pending Leaves") }}</th>
<th style="width: 16%" class="text-right">{{ __("Available Leaves") }}</th>
</tr>
</thead>
<tbody>
{% for(const [key, value] of Object.entries(data)) { %}
@ -26,6 +25,6 @@
{% } %}
</tbody>
</table>
{% } else { %}
{% else %}
<p style="margin-top: 30px;"> No Leaves have been allocated. </p>
{% } %}
{% endif %}