mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Fix provider filter (#1530)
This commit is contained in:
parent
7713f3ffa6
commit
4703df1ada
2 changed files with 4 additions and 2 deletions
|
@ -635,8 +635,10 @@ class Providers_model extends EA_Model
|
||||||
->select('users.*')
|
->select('users.*')
|
||||||
->from('users')
|
->from('users')
|
||||||
->join('roles', 'roles.id = users.id_roles', 'inner')
|
->join('roles', 'roles.id = users.id_roles', 'inner')
|
||||||
|
->join('services_providers', 'services_providers.id_users = users.id', 'inner')
|
||||||
->where('roles.slug', DB_SLUG_PROVIDER)
|
->where('roles.slug', DB_SLUG_PROVIDER)
|
||||||
->order_by('first_name ASC, last_name ASC, email ASC')
|
->order_by('first_name ASC, last_name ASC, email ASC')
|
||||||
|
->group_by('users.id')
|
||||||
->get()
|
->get()
|
||||||
->result_array();
|
->result_array();
|
||||||
|
|
||||||
|
|
|
@ -550,8 +550,8 @@ App.Utils.CalendarTableView = (function () {
|
||||||
'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format')),
|
'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format')),
|
||||||
}).appendTo($dateColumn);
|
}).appendTo($dateColumn);
|
||||||
|
|
||||||
const filterProviderIds = $filterProvider.val();
|
const filterProviderIds = $filterProvider.val().map((filterProviderId) => Number(filterProviderId));
|
||||||
const filterServiceIds = $filterService.val();
|
const filterServiceIds = $filterService.val().map((filterServiceId) => Number(filterServiceId));
|
||||||
|
|
||||||
let providers = vars('available_providers').filter((provider) => {
|
let providers = vars('available_providers').filter((provider) => {
|
||||||
const servedServiceIds = provider.services.filter((serviceId) => {
|
const servedServiceIds = provider.services.filter((serviceId) => {
|
||||||
|
|
Loading…
Reference in a new issue