mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-18 17:34:23 +00:00
Sort SIP gateways (in edit form and table view)
This commit is contained in:
1 parent
21045249cf
commit
6e87b31880
3 files changed
+17
No files matched your search
@@ -11,6 +11,7 @@ import FormError from '../blocks/FormError';
|
||||
import Button from '../elements/Button';
|
||||
import TrashButton from '../elements/TrashButton';
|
||||
import Loader from '../blocks/Loader';
|
||||
import sortSipGateways from '../../helpers/sortSipGateways';
|
||||
|
||||
const SipTrunkForm = props => {
|
||||
const history = useHistory();
|
||||
@@ -113,6 +114,7 @@ const SipTrunkForm = props => {
|
||||
const currentSipGateways = allSipGateways.filter(s => {
|
||||
return s.voip_carrier_sid === currentSipTrunk[0].voip_carrier_sid;
|
||||
});
|
||||
sortSipGateways(currentSipGateways);
|
||||
|
||||
if (currentSipTrunk.length) {
|
||||
setName(currentSipTrunk[0].name);
|
||||
|
||||
@@ -5,6 +5,7 @@ import { NotificationDispatchContext } from '../../../contexts/NotificationConte
|
||||
import InternalTemplate from '../../templates/InternalTemplate';
|
||||
import TableContent from '../../blocks/TableContent.js';
|
||||
import Sbcs from '../../blocks/Sbcs';
|
||||
import sortSipGateways from '../../../helpers/sortSipGateways';
|
||||
|
||||
const SipTrunksList = () => {
|
||||
let history = useHistory();
|
||||
@@ -51,6 +52,7 @@ const SipTrunksList = () => {
|
||||
// Add appropriate gateways to each trunk
|
||||
const trunksWithGateways = trunkResults.data.map(t => {
|
||||
const gateways = gatewayResults.data.filter(g => t.voip_carrier_sid === g.voip_carrier_sid);
|
||||
sortSipGateways(gateways);
|
||||
return {
|
||||
...t,
|
||||
gateways,
|
||||
|
||||
Reference in new issue
Block a user