@@ -207,24 +207,6 @@ <h2 class="text-sm font-semibold text-slate-900" x-text="tt('queue.section_targe
207207 < span class ="text-xs font-normal text-slate-400 "
208208 x-text ="tt('queue.field_ring_timeout_hint') "> </ span >
209209 </ label >
210- < label class ="md:col-span-2 flex flex-col gap-2 text-sm font-medium text-slate-700 ">
211- < span x-text ="tt('queue.field_acd_policy') "> </ span >
212- < template x-if ="acdPolicies.length ">
213- < select x-model ="form.spec.acd_policy "
214- class ="rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm text-slate-700 focus:border-sky-300 focus:outline-none focus:ring-2 focus:ring-sky-200 ">
215- < option value ="" x-text ="tt('queue.field_acd_policy_placeholder') "> </ option >
216- < template x-for ="policy in acdPolicies " :key ="policy.name ">
217- < option :value ="policy.name " x-text ="policy.name "> </ option >
218- </ template >
219- </ select >
220- </ template >
221- < template x-if ="!acdPolicies.length ">
222- < input type ="text " x-model.trim ="form.spec.acd_policy "
223- class ="rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-700 focus:border-sky-300 focus:outline-none focus:ring-2 focus:ring-sky-200 "
224- :placeholder ="tt('queue.field_acd_policy_placeholder') ">
225- </ template >
226- < span class ="text-xs font-normal text-slate-400 " x-text ="tt('queue.field_acd_policy_hint') "> </ span >
227- </ label >
228210 </ div >
229211 < div class ="space-y-3 ">
230212 < div class ="flex items-center justify-between ">
@@ -329,12 +311,13 @@ <h2 class="text-sm font-semibold text-slate-900" x-text="tt('queue.section_fallb
329311 < span x-text ="tt('queue.fallback_failure_opt') "> </ span >
330312 </ label >
331313 </ div >
332- < div class ="grid gap-4 md:grid-cols-2 " x-show ="fallbackMode === 'redirect' " x-cloak >
314+ < div x-show ="fallbackMode === 'redirect' " x-cloak
315+ @destination-change ="form.spec.fallback.redirect = $event.detail.type === 'extension' ? 'sip:' + $event.detail.value : ($event.detail.type === 'uri' ? $event.detail.value : $event.detail.type + ':' + $event.detail.value) ">
333316 < label class ="flex flex-col gap-2 text-sm font-medium text-slate-700 ">
334317 < span x-text ="tt('queue.fallback_redirect_label') "> </ span >
335- < input type =" text " x-model.trim =" form.spec.fallback.redirect "
336- class =" rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-700 focus:border-sky-300 focus:outline-none focus:ring-2 focus:ring-sky-200 "
337- :placeholder =" tt('queue.fallback_redirect_placeholder') " >
318+ {% set queue_items = forwarding_catalog.queues | default([]) %}
319+ {% set ivr_items = forwarding_catalog.ivr_projects | default([]) %}
320+ {% include "console/_destination_selector.html" %}
338321 </ label >
339322 </ div >
340323 < div class ="grid gap-4 md:grid-cols-2 " x-show ="fallbackMode === 'failure' " x-cloak >
@@ -742,7 +725,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
742725 pageTitle : options . mode === 'edit' ? ( window . _queueTranslations ?. queue ?. detail_subtitle_edit || 'Edit queue' ) : ( window . _queueTranslations ?. queue ?. new_queue || 'New queue' ) ,
743726 activeTab : 'overview' ,
744727 skillGroups : [ ] ,
745- acdPolicies : [ ] ,
746728 pendingSkillGroup : '' ,
747729 form : {
748730 name : '' ,
@@ -770,7 +752,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
770752 targets : [ ] ,
771753 skill_groups : [ ] ,
772754 } ,
773- acd_policy : '' ,
774755 voice_prompts : null ,
775756 // Callback
776757 callback : {
@@ -831,7 +812,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
831812 this . apiPrefix = this . normalizeApiPrefix ( this . apiPrefix || window . __consoleApiPrefix || '/api' ) ;
832813 this . applyModel ( this . model || { } ) ;
833814 this . loadSkillGroups ( ) ;
834- this . loadAcdPolicies ( ) ;
835815 } ,
836816 extractSkillGroupId ( value ) {
837817 const raw = String ( value || '' ) . trim ( ) ;
@@ -904,27 +884,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
904884 } ) ;
905885 }
906886 } ,
907- loadAcdPolicies ( ) {
908- const loader = window . __ccAcdPoliciesLoader ;
909- if ( typeof loader === 'function' ) {
910- loader ( )
911- . then ( ( policies ) => {
912- this . acdPolicies = Array . isArray ( policies ) ? policies : [ ] ;
913- } )
914- . catch ( ( ) => {
915- this . acdPolicies = [ ] ;
916- } ) ;
917- return ;
918- }
919- fetch ( this . apiPrefix + '/cc/acd/policies' , { credentials : 'same-origin' } )
920- . then ( res => res . ok ? res . json ( ) : { data : [ ] } )
921- . then ( payload => {
922- this . acdPolicies = Array . isArray ( payload ?. data ) ? payload . data : [ ] ;
923- } )
924- . catch ( ( ) => {
925- this . acdPolicies = [ ] ;
926- } ) ;
927- } ,
928887
929888 tt ( key ) {
930889 const parts = key . split ( '.' ) ;
@@ -1171,7 +1130,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
11711130 } ) ;
11721131 } ) ( ) ,
11731132 } ,
1174- acd_policy : raw ?. acd_policy || '' ,
11751133 voice_prompts : raw ?. voice_prompts || null ,
11761134 // Callback
11771135 callback : {
@@ -1321,10 +1279,6 @@ <h3 class="text-sm font-semibold text-slate-800" x-text="tt('queue.section_final
13211279 targets,
13221280 } ;
13231281 }
1324- const acdPolicy = ( this . form . spec . acd_policy || '' ) . trim ( ) ;
1325- if ( acdPolicy ) {
1326- spec . acd_policy = acdPolicy ;
1327- }
13281282 // Voice prompts
13291283 spec . voice_prompts = this . buildVoicePrompts ( ) ;
13301284 // Callback
0 commit comments