TT#23398 Sort sound handles and pbx devs

Otherwise, sound handles and pbx devices are displayed in UI
based on the order of insertion, which is not nice from a
usability perspective.

Change-Id: I584a40ec7a55e4317126a2eb073951b3c8ae8332
changes/90/16090/3
Andreas Granig 8 years ago
parent 5be3cc8cc6
commit 82d761027f

@ -1557,6 +1557,7 @@ sub pbx_device_create :Chained('base') :PathPart('pbx/device/create') :Args(0) {
->search({
'device.reseller_id' => $c->stash->{contract}->contact->reseller_id,
},{
order_by => { -asc => 'name' },
join => { 'config' => 'device' },
});
my $form = NGCP::Panel::Form::get("NGCP::Panel::Form::Customer::PbxFieldDevice", $c);

@ -461,6 +461,7 @@ sub handles_list :Chained('base') :PathPart('handles') :CaptureArgs(0) {
{ 'handles.id' => { '=' => \'files.handle_id'}, 'files.set_id' => $c->stash->{set_result}->id},
],
],
order_by => { -asc => 'handles.name' }
});
if($c->stash->{set_result}->contract_id) {

Loading…
Cancel
Save