Skip to content

Commit

Permalink
feat(exchange): add company label for ressources and group (#13765)
Browse files Browse the repository at this point in the history
ref:MANAGER-13395

Signed-off-by: stif59100 <[email protected]>
Co-authored-by: CDS Translator Agent <[email protected]>
  • Loading branch information
stif59100 and ovh-cds authored Nov 7, 2024
1 parent 20ed8b3 commit 968fe4f
Show file tree
Hide file tree
Showing 16 changed files with 142 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "DKIM aktivieren (empfohlen)",
"exchange_tab_domain_add_step3_dkim_confirmation": "DKIM-Konfiguration",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "Der Bestellschein wurde erfolgreich erstellt. Ihre Bestellung wird bearbeitet.",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Bitte beachten Sie, dass die Erstellung des Accounts etwa 10 Minuten in Anspruch nimmt."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Bitte beachten Sie, dass die Erstellung des Accounts etwa 10 Minuten in Anspruch nimmt.",
"exchange_tab_RESOURCES_add_resource_company": "Unternehmen",
"exchange_GROUPS_add_group_company_label": "Unternehmen"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "Enable DKIM (recommended)",
"exchange_tab_domain_add_step3_dkim_confirmation": "DKIM configuration",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "The purchase order has been generated. Your order is being processed.",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "It will take around 10 minutes to set up your account."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "It will take around 10 minutes to set up your account.",
"exchange_tab_RESOURCES_add_resource_company": "Company",
"exchange_GROUPS_add_group_company_label": "Company"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "Activar DKIM (recomendado)",
"exchange_tab_domain_add_step3_dkim_confirmation": "Configuración de DKIM",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "La orden de pedido se ha generado correctamente. El pedido se está procesando.",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "La cuenta tardará aproximadamente unos 10 minutos en terminar de crearse."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "La cuenta tardará aproximadamente unos 10 minutos en terminar de crearse.",
"exchange_tab_RESOURCES_add_resource_company": "Empresa",
"exchange_GROUPS_add_group_company_label": "Empresa"
}
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@
"exchange_tab_RESOURCES_add_resource": "Ajouter un compte de ressource",
"exchange_tab_RESOURCES_edit_resource": "Modifier un compte de ressource",
"exchange_tab_RESOURCES_add_resource_confirm": "Créer",
"exchange_tab_RESOURCES_add_resource_company": "Société",
"exchange_tab_RESOURCES_add_resource_name": "Nom de la ressource",
"exchange_tab_RESOURCES_add_resource_email": "Email de la ressource",
"exchange_tab_RESOURCES_add_resource_capacity": "Capacité",
Expand Down Expand Up @@ -984,6 +985,7 @@
"exchange_GROUPS_delegation_error_message": "Une erreur est survenue lors de la mise à jour des droits de délégation.",
"exchange_GROUPS_add_group_title": "Créer un nouveau groupe de contacts",
"exchange_GROUPS_add_group_name_label": "Nom du groupe",
"exchange_GROUPS_add_group_company_label": "Société",
"exchange_GROUPS_add_group_email_label": "Adresse e-mail",
"exchange_GROUPS_add_group_receive_size_label": "Taille max entrante",
"exchange_GROUPS_add_group_receive_size_tooltip": "Taille maximale des messages entrants (entre 1 et 100 Mo)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@
"exchange_tab_RESOURCES_add_resource": "Ajouter un compte de ressource",
"exchange_tab_RESOURCES_edit_resource": "Modifier un compte de ressource",
"exchange_tab_RESOURCES_add_resource_confirm": "Créer",
"exchange_tab_RESOURCES_add_resource_company": "Société",
"exchange_tab_RESOURCES_add_resource_name": "Nom de la ressource",
"exchange_tab_RESOURCES_add_resource_email": "Email de la ressource",
"exchange_tab_RESOURCES_add_resource_capacity": "Capacité",
Expand Down Expand Up @@ -984,6 +985,7 @@
"exchange_GROUPS_delegation_error_message": "Une erreur est survenue lors de la mise à jour des droits de délégation.",
"exchange_GROUPS_add_group_title": "Créer un nouveau groupe de contacts",
"exchange_GROUPS_add_group_name_label": "Nom du groupe",
"exchange_GROUPS_add_group_company_label": "Société",
"exchange_GROUPS_add_group_email_label": "Adresse e-mail",
"exchange_GROUPS_add_group_receive_size_label": "Taille max entrante",
"exchange_GROUPS_add_group_receive_size_tooltip": "Taille maximale des messages entrants (entre 1 et 100 Mo)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "Attivare DKIM (consigliato)",
"exchange_tab_domain_add_step3_dkim_confirmation": "Configurazione DKIM",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "L’ordine è stato generato correttamente Elaborazione dell'ordine in corso...",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Ti ricordiamo che la creazione dell'account richiederà circa 10 minuti."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Ti ricordiamo che la creazione dell'account richiederà circa 10 minuti.",
"exchange_tab_RESOURCES_add_resource_company": "Società",
"exchange_GROUPS_add_group_company_label": "Società"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "Włącz DKIM (zalecane)",
"exchange_tab_domain_add_step3_dkim_confirmation": "Konfiguracja DKIM",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "Zamówienie zostało wygenerowane. Trwa przetwarzanie Twojego zamówienia.",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Utworzenie konta zajmie około 10 minut."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Utworzenie konta zajmie około 10 minut.",
"exchange_tab_RESOURCES_add_resource_company": "Firma",
"exchange_GROUPS_add_group_company_label": "Firma"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1687,5 +1687,7 @@
"exchange_tab_domain_add_step2_dkim_checkbox": "Ativar DKIM (recomendado)",
"exchange_tab_domain_add_step3_dkim_confirmation": "Configuração DKIM",
"exchange_ACTION_order_accounts_step3_bc_ovhtel": "A nota de encomenda foi gerada com sucesso. A sua encomenda está a ser tratada.",
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Tenha em conta que é necessário aguardar cerca de 10 minutos para que a conta seja criada."
"exchange_ACTION_order_accounts_step3_explication_ovhtel": "Tenha em conta que é necessário aguardar cerca de 10 minutos para que a conta seja criada.",
"exchange_tab_RESOURCES_add_resource_company": "Empresa",
"exchange_GROUPS_add_group_company_label": "Empresa"
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export default class ExchangeAddGroupCtrl {
}

prepareModel() {
this.model.displayName = this.groupToAdd.displayName;
this.model.displayName =
this.groupToAdd.displayName === '' ? null : this.groupToAdd.displayName;
this.model.domain = this.groupToAdd.completeDomain.name;
this.model.address = this.groupToAdd.address;
this.model.senderAuthentification = this.groupToAdd.auth;
Expand All @@ -71,6 +72,8 @@ export default class ExchangeAddGroupCtrl {
: this.groupToAdd.maxReceiveSize;
this.model.joinRestriction = this.groupToAdd.subscribeRestriction;
this.model.departRestriction = this.groupToAdd.unsubscribeRestriction;
this.model.company =
this.groupToAdd.company === '' ? null : this.groupToAdd.company;

this.saveSelected();
}
Expand Down Expand Up @@ -206,6 +209,7 @@ export default class ExchangeAddGroupCtrl {
const isSentSizeCorrect =
this.groupToAdd.sentSizeUnlimited ||
(!isNaN(maxSendSize) && maxSendSize >= 0 && maxSendSize <= 100);

const isSubscriptionPresent =
this.groupToAdd.subscribeRestriction != null &&
this.groupToAdd.unsubscribeRestriction != null;
Expand Down
26 changes: 24 additions & 2 deletions packages/manager/modules/exchange/src/group/add/group-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,21 @@
data-ng-if="ctrl.takenEmailError"
></small>
</div>

<div class="form-group">
<label
class="control-label"
for="company"
data-translate="exchange_GROUPS_add_group_company_label"
></label>
<input
type="text"
class="form-control"
maxlength="256"
name="groupToAddCompany"
id="company"
data-ng-model="ctrl.groupToAdd.company"
/>
</div>
<div class="form-group">
<label
class="control-label"
Expand Down Expand Up @@ -439,7 +453,15 @@ <h3 data-translate="exchange_GROUPS_add_group_title"></h3>
class="word-break"
data-ng-bind-template="{{ctrl.groupToAdd.address}}@{{ctrl.groupToAdd.completeDomain.displayName}}"
></dd>

<dt
data-ng-if="ctrl.groupToAdd.company"
data-translate="exchange_GROUPS_add_group_company_label"
></dt>
<dd
class="word-break"
data-ng-if="ctrl.groupToAdd.company"
data-ng-bind="ctrl.groupToAdd.company | wucSliceContent: 150"
></dd>
<dt
data-ng-if="ctrl.groupToAdd.displayName"
data-translate="exchange_GROUPS_add_group_name_label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class ExchangeUpdateGroupCtrl {

this.$routerParams = wucExchange.getParams();
this.selectedGroup = navigation.currentActionData;

if (
has(this.selectedGroup, 'mailingListAddress') &&
this.selectedGroup.mailingListAddress != null
Expand Down Expand Up @@ -85,7 +84,10 @@ export default class ExchangeUpdateGroupCtrl {

prepareModel() {
this.model = {
displayName: this.selectedGroup.displayName,
displayName:
this.selectedGroup.displayName === ''
? null
: this.selectedGroup.displayName,
mailingListAddress: `${this.selectedGroup.address}@${this.selectedGroup.completeDomain.name}`,
senderAuthentification: this.selectedGroup.senderAuthentification,
hiddenFromGAL: this.selectedGroup.hiddenFromGAL,
Expand All @@ -97,6 +99,8 @@ export default class ExchangeUpdateGroupCtrl {
: this.selectedGroup.maxReceiveSize,
joinRestriction: camelCase(this.selectedGroup.joinRestriction),
departRestriction: camelCase(this.selectedGroup.departRestriction),
company:
this.selectedGroup.company === '' ? null : this.selectedGroup.company,
};
}

Expand Down Expand Up @@ -140,7 +144,6 @@ export default class ExchangeUpdateGroupCtrl {
this.services.$translate.instant('exchange_dashboard_action_doing'),
);
this.prepareModel();

this.services.wucExchange
.updateGroup(
this.$routerParams.organization,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@
></small>
</fieldset>

<div class="form-group">
<label
class="control-label"
for="selectedGroupCompany"
data-translate="exchange_GROUPS_add_group_company_label"
></label>
<input
type="text"
class="form-control"
id="selectedGroupCompany"
maxlength="256"
name="selectedGroupCompany"
data-ng-model="ctrl.selectedGroup.company"
/>
</div>
<div class="form-group">
<label
class="control-label"
Expand Down Expand Up @@ -256,7 +271,15 @@ <h3 data-translate="exchange_GROUPS_settings_title"></h3>
data-ng-bind="ctrl.selectedGroup.displayName | wucSliceContent: 150"
class="word-break"
></dd>

<dt
data-ng-if="ctrl.selectedGroup.company"
data-translate="exchange_GROUPS_add_group_company_label"
></dt>
<dd
data-ng-if="ctrl.selectedGroup.company"
data-ng-bind="ctrl.selectedGroup.company | wucSliceContent: 150"
class="word-break"
></dd>
<dt
data-translate="exchange_GROUPS_add_group_receive_size_label"
></dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class ExchangeAddResourceController {
displayName: '',
capacity: 0,
resourceEmailAddress: '',
company: '',
};

$scope.addResource = () => this.addResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,24 @@
data-ng-model="ctrl.model.displayName"
/>
</div>

<div
class="form-group"
data
-ng-class="{'has-error': ctrl.addResourceForm.company.$dirty && (ctrl.takenEmailError || ctrl.addResourceForm.company.$invalid)}"
>
<label
for="company"
data-translate="exchange_tab_RESOURCES_add_resource_company"
></label>
<input
type="text"
class="form-control"
id="company"
maxlength="256"
name="company"
data-ng-model="ctrl.model.company"
/>
</div>
<div
class="form-group"
data-ng-class="{'has-error': ctrl.addResourceForm.resourceCapacity.$dirty && ctrl.addResourceForm.resourceCapacity.$invalid}"
Expand Down Expand Up @@ -171,12 +188,22 @@ <h3 data-translate="exchange_tab_RESOURCES_add_resource"></h3>

<dt
data-translate="exchange_tab_RESOURCES_add_resource_name"
data-ng-if="ctrl.model.displayName"
data-ng-if="ctrl.model.company"
></dt>
<dd
class="word-break"
data-ng-bind="ctrl.model.company | wucSliceContent: 150"
data-ng-if="ctrl.model.company"
></dd>

<dt
data-translate="exchange_tab_RESOURCES_add_resource_company"
data-ng-if="ctrl.model.company"
></dt>
<dd
class="word-break"
data-ng-bind="ctrl.model.displayName | wucSliceContent: 150"
data-ng-if="ctrl.model.displayName"
data-ng-bind="ctrl.model.company | wucSliceContent: 150"
data-ng-if="ctrl.model.company"
></dd>

<dt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default class ExchangeResources {
type: camelCase(resource.resourceType),
resourceEmailAddress: resource.resourceEmailAddress,
displayName: resource.displayName,
company: resource.company,
},
},
).then((response) => {
Expand All @@ -96,6 +97,7 @@ export default class ExchangeResources {
allowConflict: resource.allowConflict,
capacity: resource.capacity,
displayName: resource.displayName,
company: resource.company,
},
},
).then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,24 @@
data-ng-pattern="/^[^<>]+$/"
/>
</div>

<div
class="form-group"
data-ng-class="{'has-error': ctrl.updateResourceForm.company.$dirty && ctrl.updateResourceForm.company.$invalid}"
>
<label
for="company"
data-translate="exchange_tab_RESOURCES_add_resource_company"
></label>
<input
type="text"
class="form-control"
id="company"
maxlength="256"
name="company"
data-ng-model="ctrl.model.company"
data-ng-pattern="/^[^<>]+$/"
/>
</div>
<div
class="form-group"
data-ng-class="{'has-error': ctrl.updateResourceForm.resourceCapacity.$dirty && ctrl.updateResourceForm.resourceCapacity.$invalid}"
Expand Down Expand Up @@ -89,7 +106,15 @@
data-ng-if="ctrl.model.displayName"
data-ng-bind-html="ctrl.model.displayName | wucSliceContent: 150"
></dd>

<dt
data-ng-if="ctrl.model.company"
data-translate="exchange_tab_RESOURCES_add_resource_company"
></dt>
<dd
class="word-break"
data-ng-if="ctrl.model.company"
data-ng-bind-html="ctrl.model.company | wucSliceContent: 150"
></dd>
<dt
data-translate="exchange_tab_RESOURCES_add_resource_capacity"
></dt>
Expand Down

0 comments on commit 968fe4f

Please sign in to comment.