Commit aad14a4e authored by Guillaume Heurtier's avatar Guillaume Heurtier

FEAT #13339 TIME 3:00 fix civility + changed labels

parent 52ccd870
......@@ -851,6 +851,7 @@ class ContactController
// [fieldNameInFront] => field_name_in_db
$allowedFields = [
'civility' => 'civility',
'firstname' => 'firstname',
'lastname' => 'lastname',
'company' => 'company',
......@@ -946,6 +947,8 @@ class ContactController
$contactIds = array_column($duplicates, 'id');
$contactsUsed = ContactController::isContactUsed(['ids' => $contactIds]);
$civilities = ContactModel::getCivilities();
$contacts = [];
foreach ($duplicates as $key => $contact) {
unset($duplicates[$key]['count']);
......@@ -972,6 +975,7 @@ class ContactController
'isUsed' => $contactsUsed[$contact['id']],
'filling' => $filling,
'customFields' => !empty($contact['custom_fields']) ? json_decode($contact['custom_fields'], true) : null,
'civility' => !empty($contact['civility']) ? $civilities[$contact['civility']]['label'] : null
];
}
$count = $duplicates[0]['total'];
......
......@@ -6,7 +6,7 @@
<ng-template #elseTemplate>
<mat-card class="contact-card">
<div *ngIf="selectable" class="selectable" [class.selected]="contact.selected">
<button style="line-height: 15px;padding: 5px;" *ngIf="!contact.selected" mat-raised-button color="primary" (click)="toggleContact(contact)"><span>selectionner</span><br><small style="font-size:80%">{{contact.resourcesCount}} {{lang.associatedElements}}</small></button>
<button style="line-height: 15px;padding: 5px;" *ngIf="!contact.selected" mat-raised-button color="primary" (click)="toggleContact(contact)"><span>{{lang.selectDuplicatedContact}}</span><br><small style="font-size:80%">{{contact.resourcesCount}} {{lang.associatedElements}}</small></button>
<button style="line-height: 15px;padding: 10px;" *ngIf="contact.selected" mat-raised-button color="primary" (click)="toggleContact(contact)"><i class="far fa-check-circle"></i> {{lang.selectedContact}}</button>
</div>
<mat-card-header>
......@@ -109,4 +109,4 @@
</mat-expansion-panel>
</mat-card-content>
</mat-card>
</ng-template>
\ No newline at end of file
</ng-template>
......@@ -1700,7 +1700,8 @@ export const LANG_EN = {
"duplicatesContactsAdmin": "Manage contacts duplicates",
"merge": "Merge",
"associatedElements": "associated elements",
"selectedContact": "selected contact",
'selectedContact': 'Target contact selected',
"modificationsProcessed": "Modifications processed",
'updateIndexingFieldWarning': 'Warning: if you remove a field from the model, this field will be reset for <b>ALL</b> resources linked to this model. Do you want to continue ?',
'selectDuplicatedContact': 'Merge with this contact',
};
......@@ -1702,7 +1702,8 @@ export const LANG_FR = {
"duplicatesContactsAdmin": "Gérer les doublons de contacts",
"merge": "Fusionner",
"associatedElements": "élément(s) associé(s)",
"selectedContact": "contact sélectionné",
'selectedContact': 'Contact cible sélectionné',
"modificationsProcessed": "Modifications effectuées",
'updateIndexingFieldWarning': 'Attention si vous supprimez un champ du modèle, ce champ sera réinitialisé pour <b>TOUS</b> les courriers associés au modèle. Voulez-vous continuer ?'
'updateIndexingFieldWarning': 'Attention si vous supprimez un champ du modèle, ce champ sera réinitialisé pour <b>TOUS</b> les courriers associés au modèle. Voulez-vous continuer ?',
'selectDuplicatedContact': 'Fusionner vers ce contact',
};
......@@ -1684,7 +1684,8 @@ export const LANG_NL = {
"duplicatesContactsAdmin": "Manage contacts duplicates", //_TO_TRANSLATE
"merge": "Merge", //_TO_TRANSLATE
"associatedElements": "associated elements", //_TO_TRANSLATE
"selectedContact": "selected contact", //_TO_TRANSLATE
'selectedContact': 'Target contact selected', //_TO_TRANSLATE
"modificationsProcessed": "Modifications processed", //_TO_TRANSLATE,
'updateIndexingFieldWarning': 'Warning: if you remove a field from the model, this field will be reset for <b>ALL</b> resources linked to this model. Do you want to continue ?', //_TO_TRANSLATE
'selectDuplicatedContact': 'Merge with this contact', // _TO_TRANSLATE
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment