mirror of
https://github.com/jambonz/chrome-extension-dialer.git
synced 2026-10-04 02:04:28 +00:00
wip
This commit is contained in:
+8
-2
@@ -1,4 +1,10 @@
|
|||||||
import { Application, FetchError, FetchTransport, StatusCodes } from "./types";
|
import {
|
||||||
|
Application,
|
||||||
|
FetchError,
|
||||||
|
FetchTransport,
|
||||||
|
Queue,
|
||||||
|
StatusCodes,
|
||||||
|
} from "./types";
|
||||||
import { MSG_SOMETHING_WRONG } from "./constants";
|
import { MSG_SOMETHING_WRONG } from "./constants";
|
||||||
import { getAdvancedSettings } from "src/storage";
|
import { getAdvancedSettings } from "src/storage";
|
||||||
|
|
||||||
@@ -134,7 +140,7 @@ export const getApplications = () => {
|
|||||||
|
|
||||||
export const getQueues = () => {
|
export const getQueues = () => {
|
||||||
const advancedSettings = getAdvancedSettings();
|
const advancedSettings = getAdvancedSettings();
|
||||||
return getFetch<string[]>(
|
return getFetch<Queue[]>(
|
||||||
`${advancedSettings.apiServer}/Accounts/${advancedSettings.accountSid}/Queues`
|
`${advancedSettings.apiServer}/Accounts/${advancedSettings.accountSid}/Queues`
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,3 +29,8 @@ export interface Application {
|
|||||||
application_sid: string;
|
application_sid: string;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Queue {
|
||||||
|
name: string;
|
||||||
|
length: number;
|
||||||
|
}
|
||||||
|
|||||||
@@ -449,8 +449,8 @@ export const Phone = ({
|
|||||||
.then(({ json }) => {
|
.then(({ json }) => {
|
||||||
resolve(
|
resolve(
|
||||||
json.map((q) => ({
|
json.map((q) => ({
|
||||||
name: q,
|
name: `${q.name} (${q.length})`,
|
||||||
value: q,
|
value: q.name,
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user