Destination/Action Select: Implement natural sorting for multiple apps.

This commit is contained in:
fusionate 2023-10-19 18:02:00 +00:00
parent bca1e75e02
commit f1ab4c365e
No known key found for this signature in database
10 changed files with 12 additions and 12 deletions

View File

@ -37,7 +37,7 @@
$apps[$x]['destinations'][$y]['name'] = "call_centers";
$apps[$x]['destinations'][$y]['sql'] = "select call_center_queue_uuid, call_center_queue_uuid as uuid, queue_name as name, queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' ";
$apps[$x]['destinations'][$y]['order_by'] = "queue_name asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(queue_extension) asc";
$apps[$x]['destinations'][$y]['field']['name'] = "queue_name";
$apps[$x]['destinations'][$y]['field']['destination'] = "queue_extension";
$apps[$x]['destinations'][$y]['field']['extension'] = "queue_extension";

View File

@ -36,7 +36,7 @@
$apps[$x]['destinations'][$y]['name'] = "call_flows";
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_extension as destination, call_flow_context as context from v_call_flows ";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "call_flow_name asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_extension) asc";
$apps[$x]['destinations'][$y]['field']['call_flow_uuid'] = "call_flow_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "call_flow_name";
$apps[$x]['destinations'][$y]['field']['destination'] = "destination";
@ -51,7 +51,7 @@
$apps[$x]['destinations'][$y]['name'] = "call_flows";
$apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_extension as extension, call_flow_feature_code as destination, call_flow_context as context from v_call_flows ";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "call_flow_extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_feature_code) asc";
$apps[$x]['destinations'][$y]['field']['uuid'] = "uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "name";
$apps[$x]['destinations'][$y]['field']['destination'] = "destination";

View File

@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['label'] = "conference_centers";
$apps[$x]['destinations'][$y]['name'] = "conference_centers";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_center_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "conference_center_name asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(conference_center_extension) asc";
$apps[$x]['destinations'][$y]['field']['conference_center_uuid'] = "conference_center_uuid";
$apps[$x]['destinations'][$y]['field']['uuid'] = "conference_center_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "conference_center_name";

View File

@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['label'] = "conferences";
$apps[$x]['destinations'][$y]['name'] = "conferences";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "conference_name asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(conference_extension) asc";
$apps[$x]['destinations'][$y]['field']['conference_uuid'] = "conference_uuid";
$apps[$x]['destinations'][$y]['field']['uuid'] = "conference_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "conference_name";

View File

@ -36,7 +36,7 @@
$apps[$x]['destinations'][$y]['name'] = "extensions";
$apps[$x]['destinations'][$y]['sql'] = "select extension_uuid, extension_uuid as uuid, extension, number_alias, effective_caller_id_name as name, user_context as context, description from v_extensions ";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(number_alias) asc, natural_sort(extension) asc";
$apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid";
$apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension";
$apps[$x]['destinations'][$y]['field']['extension'] = "number_alias,extension";

View File

@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['label'] = "fax";
$apps[$x]['destinations'][$y]['name'] = "fax";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' ";
$apps[$x]['destinations'][$y]['order_by'] = "fax_extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(fax_extension) asc";
$apps[$x]['destinations'][$y]['field']['fax_uuid'] = "fax_uuid";
$apps[$x]['destinations'][$y]['field']['uuid'] = "fax_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "fax_name";

View File

@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['label'] = "ivr_menus";
$apps[$x]['destinations'][$y]['name'] = "ivr_menus";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ivr_menu_extension) asc";
$apps[$x]['destinations'][$y]['field']['ivr_menu_uuid'] = "ivr_menu_uuid";
$apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name";
@ -52,7 +52,7 @@
$apps[$x]['destinations'][$y]['name'] = "ivr_menus_sub";
$apps[$x]['destinations'][$y]['sql'] = "select ivr_menu_name as name, ivr_menu_uuid as uuid from v_ivr_menus ";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ivr_menu_extension) asc";
$apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name";
$apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid";
$apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}";

View File

@ -35,7 +35,7 @@
$apps[$x]['destinations'][$y]['label'] = "ring_groups";
$apps[$x]['destinations'][$y]['name'] = "ring_groups";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ring_group_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "ring_group_extension asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ring_group_extension) asc";
$apps[$x]['destinations'][$y]['field']['ring_group_uuid'] = "ring_group_uuid";
$apps[$x]['destinations'][$y]['field']['uuid'] = "ring_group_uuid";
$apps[$x]['destinations'][$y]['field']['name'] = "ring_group_name";

View File

@ -36,7 +36,7 @@
$apps[$x]['destinations'][$y]['name'] = "time_conditions";
$apps[$x]['destinations'][$y]['sql'] = "select dialplan_uuid as time_condition_uuid, dialplan_uuid as uuid, dialplan_name as name, dialplan_number as destination, dialplan_number as extension, dialplan_context as context, dialplan_description as description from v_dialplans ";
$apps[$x]['destinations'][$y]['where'] = "where (domain_uuid = '\${domain_uuid}' or domain_uuid is null) and app_uuid = '4b821450-926b-175a-af93-a03c441818b1' and dialplan_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "dialplan_number asc";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(dialplan_number) asc";
$apps[$x]['destinations'][$y]['field']['context'] = "context";
$apps[$x]['destinations'][$y]['field']['name'] = "dialplan_name";
$apps[$x]['destinations'][$y]['field']['destination'] = "dialplan_number";

View File

@ -36,7 +36,7 @@
$apps[$x]['destinations'][$y]['name'] = "voicemails";
$apps[$x]['destinations'][$y]['sql'] = "select voicemail_uuid, voicemail_uuid as uuid, voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description, voicemail_description as name from v_voicemails";
$apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and voicemail_enabled = 'true' ";
$apps[$x]['destinations'][$y]['order_by'] = "voicemail_id asc ";
$apps[$x]['destinations'][$y]['order_by'] = "natural_sort(voicemail_id) asc ";
$apps[$x]['destinations'][$y]['field']['uuid'] = "voicemail_uuid";
$apps[$x]['destinations'][$y]['field']['voicemail_uuid'] = "voicemail_uuid";
$apps[$x]['destinations'][$y]['field']['destination'] = "voicemail_id";