File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -486,8 +486,8 @@ const {
486486 :calls =" callHistory"
487487 :table-body-style =" { height: '30rem' }"
488488 @row-click ="
489- ({ mobile }) => {
490- setManualOutbound(mobile );
489+ ({ phone_number }) => {
490+ setManualOutbound(phone_number );
491491 }
492492 "
493493 ></CallHistory >
Original file line number Diff line number Diff line change @@ -241,6 +241,22 @@ export default function useConnectFirst(context: {
241241 }
242242
243243 async function dialManualOutbound ( number : string ) {
244+ const portalResponse = await axios . get (
245+ `${ import . meta. env . VITE_APP_API_BASE_URL } /portals/current` ,
246+ {
247+ headers : {
248+ Authorization : null ,
249+ } ,
250+ } ,
251+ ) ;
252+
253+ const portal = portalResponse ?. data ;
254+
255+ if ( portal ?. attr ?. disable_outbound_calls ) {
256+ $toasted . warning ( t ( '~~Outbound Calls are currently disabled' ) ) ;
257+ return ;
258+ }
259+
244260 await loginPhone ( true , 'WORKING' ) ;
245261 dialing . value = true ;
246262 try {
@@ -261,6 +277,21 @@ export default function useConnectFirst(context: {
261277 }
262278
263279 async function dialNextOutbound ( ) {
280+ const portalResponse = await axios . get (
281+ `${ import . meta. env . VITE_APP_API_BASE_URL } /portals/current` ,
282+ {
283+ headers : {
284+ Authorization : null ,
285+ } ,
286+ } ,
287+ ) ;
288+
289+ const portal = portalResponse ?. data ;
290+
291+ if ( portal ?. attr ?. disable_outbound_calls ) {
292+ throw new Error ( t ( '~~Outbound Calls are currently disabled' ) ) ;
293+ }
294+
264295 dialing . value = true ;
265296 try {
266297 const outbound = await PhoneOutbound . api ( ) . getNextOutbound ( {
You can’t perform that action at this time.
0 commit comments