From 33aad6a501d83881003a0911e8ed0fd440161537 Mon Sep 17 00:00:00 2001 From: nidrissi-zouggari Date: Tue, 10 Mar 2026 16:29:08 +0100 Subject: [PATCH] MT#64565 Subscriber Admin user should be able to configure CLIR per seat Add a new CLIR "Hide number to the callee" on seat pbx details Change-Id: I6a5635c5f822ac0370151cbc8906957c4393a6ba --- src/api/pbx-seats.js | 9 +++++++++ src/api/subscriber.js | 4 ++++ src/i18n/de.json | 3 +++ src/i18n/en.json | 3 +++ src/i18n/es.json | 3 +++ src/i18n/fr.json | 3 +++ src/i18n/it.json | 3 +++ src/pages/CscPagePbxSeatDetails.vue | 20 ++++++++++++++++++++ src/store/pbx-seats.js | 21 ++++++++++++++++++++- 9 files changed, 68 insertions(+), 1 deletion(-) diff --git a/src/api/pbx-seats.js b/src/api/pbx-seats.js index c3619f24..be0a264a 100644 --- a/src/api/pbx-seats.js +++ b/src/api/pbx-seats.js @@ -29,6 +29,7 @@ import { setPreferenceAnnouncementCfu, setPreferenceAnnouncementToCallee, setPreferenceCli, + setPreferenceClir, setPreferenceCstaClient, setPreferenceCstaController, setPreferenceIgnoreCfWhenHunting, @@ -289,6 +290,14 @@ export function setSeatSIPPassword (options) { }) } +/** + * @param seatId + * @param clir + */ +export function setSeatClir (seatId, clir) { + return setPreferenceClir(seatId, clir) +} + /** * @param seatId * @param clirIntrapbx diff --git a/src/api/subscriber.js b/src/api/subscriber.js index 3cee60fd..eeba9297 100644 --- a/src/api/subscriber.js +++ b/src/api/subscriber.js @@ -407,6 +407,10 @@ export function setPbxGroupIds (id, ids) { return setField(id, 'pbx_group_ids', ids) } +export function setPreferenceClir (id, value) { + return setPreference(id, 'clir', value) +} + export function setPreferenceIntraPbx (id, value) { return setPreference(id, 'clir_intrapbx', value) } diff --git a/src/i18n/de.json b/src/i18n/de.json index d30ece0d..e079b7d0 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -252,6 +252,7 @@ "Group Name": "Gruppenname", "Group/Seat/Pilot": "Gruppe/Nebenstelle/Hauptanschluss", "Groups": "Gruppen", + "Hide number to the callee": "Nummer für den Angerufenen verbergen", "Hide number to the callee within own PBX": "Rufnummer intern im PBX für den Angerufenen verbergen", "Hide number within own PBX": "Rufnummer intern im PBX verbergen", "Hide your number to the callee": "Rufnummer für den Angerufenen unterdrücken", @@ -554,6 +555,8 @@ "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.": "Das Zeit-Set „{timeset}“ enthält inkompatible Werte. Sie können dies beheben, indem Sie es von Grund auf neu anlegen.", "The Destination Email is already used": "Die Ziel-E-Mail-Adresse wird bereits verwendet", "The Notify Email is already used": "Diese E-Mail-Adresse wird bereits zur Benachrichtigung verwendet", + "The visibility of the number to the callee": "Die Sichtbarkeit der Nummer für den Angerufenen", + "The visibility of the number within own PBX": "Die Anzeige der Nummer innerhalb der eigenen Telefonanlage", "There are no ACLs yet": "Es wurden noch keine ACLs erstellt", "There are no Key Renew Notify Emails yet": "Es gibt noch keine Benachrichtigungs-E-Mails zur Schlüsselerneuerung", "There is a problem with your account, please contact support": "Es gibt ein Problem mit Ihrem Konto, bitte kontaktieren Sie den Support", diff --git a/src/i18n/en.json b/src/i18n/en.json index 09c284aa..356dbdc3 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -249,6 +249,7 @@ "Group Name": "Group Name", "Group/Seat/Pilot": "Group/Seat/Pilot", "Groups": "Groups", + "Hide number to the callee": "Hide number to the callee", "Hide number to the callee within own PBX": "Hide number to the callee within own PBX", "Hide number within own PBX": "Hide number within own PBX", "Hide your number to the callee": "Hide your number to the callee", @@ -539,6 +540,8 @@ "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.": "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.", "The Destination Email is already used": "The Destination Email is already used", "The Notify Email is already used": "The Notify Email is already used", + "The visibility of the number to the callee": "The visibility of the number to the callee", + "The visibility of the number within own PBX": "The visibility of the number within own PBX", "There are no ACLs yet": "There are no ACLs yet", "There are no Key Renew Notify Emails yet": "There are no Key Renew Notify Emails yet", "There is a problem with your account, please contact support": "There is a problem with your account, please contact support", diff --git a/src/i18n/es.json b/src/i18n/es.json index 206218f2..827ce002 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -252,6 +252,7 @@ "Group Name": "Nombre del grupo", "Group/Seat/Pilot": "Grupo/Asiento/Piloto", "Groups": "Grupos", + "Hide number to the callee": "Ocultar el número al destinatario", "Hide number to the callee within own PBX": "Ocultar el número al destinatario dentro de su propia centralita", "Hide number within own PBX": "Ocultar el número dentro de la propia centralita", "Hide your number to the callee": "Ocultar número al destinatario", @@ -555,6 +556,8 @@ "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.": "El conjunto de tiempos {timeset} contiene valores incompatibles. Puede resolver esto eliminándolo y creándolo nuevamente.", "The Destination Email is already used": "El correo electrónico de destino ya está utilizado", "The Notify Email is already used": "El correo electrónico de notificación ya está en uso", + "The visibility of the number to the callee": "La visibilidad del número para la persona que recibe la llamada", + "The visibility of the number within own PBX": "La visualización del número dentro de la propia centralita", "There are no ACLs yet": "Aún no hay ACLs", "There are no Key Renew Notify Emails yet": "Aún no hay correos electrónicos para notificaciones de renovación de claves", "There is a problem with your account, please contact support": "Hay un problema con tu cuenta, por favor contacta con el soporte", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index b68b031f..8136b057 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -252,6 +252,7 @@ "Group Name": "Nom du groupe", "Group/Seat/Pilot": "Groupe/Siège/Pilote", "Groups": "Groupes", + "Hide number to the callee": "Masquer le numéro de l'appelant", "Hide number to the callee within own PBX": "Masquer le numéro à l'appelé au sein de son propre PBX", "Hide number within own PBX": "Masquer le numéro dans son propre PBX", "Hide your number to the callee": "Masquer votre numéro à l'appelé", @@ -554,6 +555,8 @@ "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.": "Le timeset \"{timeset}\" contient des valeurs incompatibles. Vous pouvez résoudre ce problème en le supprimant et en le recréant à partir de zéro.", "The Destination Email is already used": "L'e-mail de destination est déjà utilisé", "The Notify Email is already used": "L'e-mail de notification est déjà utilisé", + "The visibility of the number to the callee": "La visibilité du numéro pour l'appelé", + "The visibility of the number within own PBX": "Affichage du numéro au sein du PBX", "There are no ACLs yet": "Il n'y a pas encore d'ACLs", "There are no Key Renew Notify Emails yet": "Il n'y a pas encore d'e-mails de notification de renouvellement des clés", "There is a problem with your account, please contact support": "Il y a un problème avec votre compte, veuillez contacter le support", diff --git a/src/i18n/it.json b/src/i18n/it.json index c5fea5fd..5311f623 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -249,6 +249,7 @@ "Group Name": "Nome del gruppo", "Group/Seat/Pilot": "Gruppo/Postazione/Pilota", "Groups": "Gruppi", + "Hide number to the callee": "Nascondi il numero al destinatario della chiamata", "Hide number to the callee within own PBX": "Nascondi il numero al destinatario all'interno della propria PBX", "Hide number within own PBX": "Nascondere il numero all'interno della propria PBX", "Hide your number to the callee": "Nascondi il tuo numero al destinatario", @@ -548,6 +549,8 @@ "The \"{timeset}\" timeset contains incompatible values. You can resolve this by deleting it and recreating from the scratch.": "Il timeset \"{timeset}\" contiene valori incompatibili. Puoi risolvere cancellandolo e ricreandolo da zero.", "The Destination Email is already used": "L'email di destinazione è già in uso", "The Notify Email is already used": "L'email di notifica è già in uso", + "The visibility of the number to the callee": "La visibilità del numero per il destinatario della chiamata", + "The visibility of the number within own PBX": "La visibilità del numero all'interno del proprio centralino", "There are no ACLs yet": "Non ci sono ancora ACL", "There are no Key Renew Notify Emails yet": "Ancora non ci sono email di notifica per il rinnovo delle chiavi", "There is a problem with your account, please contact support": "C'è un problema con il tuo account, contatta l'assistenza", diff --git a/src/pages/CscPagePbxSeatDetails.vue b/src/pages/CscPagePbxSeatDetails.vue index cf91c154..84e04781 100644 --- a/src/pages/CscPagePbxSeatDetails.vue +++ b/src/pages/CscPagePbxSeatDetails.vue @@ -287,6 +287,14 @@ top no-wrap > + { + const seatPreferences = state.preferenceMapById[id] + return seatPreferences && seatPreferences.clir ? state.preferenceMapById[id].clir : false + } + }, getAnnouncementCfu (state) { return (id) => { const seatPreferences = state.preferenceMapById[id] @@ -552,10 +559,22 @@ export default { context.commit('seatUpdateFailed', err.message) }) }, + async setClir (context, options) { + context.commit('seatUpdateRequesting', { + seatId: options.seatId, + seatField: options.message || i18n.global.t('The visibility of the number to the callee') + }) + try { + const result = await setSeatClir(options.seatId, options.clir) + context.commit('seatUpdateSucceeded', result) + } catch (err) { + context.commit('seatUpdateFailed', err.message) + } + }, async setIntraPbx (context, options) { context.commit('seatUpdateRequesting', { seatId: options.seatId, - seatField: options.message || i18n.global.t('the visibility of the number within own PBX') + seatField: options.message || i18n.global.t('The visibility of the number within own PBX') }) try { const result = await setSeatIntraPbx(options.seatId, options.intraPbx)