Commit 55c0cb26 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request maarch/MaarchCourrier!297
parents 6a7ebc29 07f44c2f
......@@ -143,6 +143,7 @@ export class CustomizationComponent implements OnInit {
tinymce.init({
selector: 'textarea',
base_url: '../node_modules/tinymce/',
convert_urls: false,
height: '150',
suffix: '.min',
language: this.translate.instant('lang.langISO').replace('-', '_'),
......
......@@ -40,6 +40,7 @@ export class MySignatureMailComponent implements OnInit {
tinymce.suffix = '.min';
tinymce.init({
selector: 'textarea#emailSignature',
convert_urls: false,
statusbar: false,
language: this.translate.instant('lang.langISO').replace('-', '_'),
language_url: `../node_modules/tinymce-i18n/langs/${this.translate.instant('lang.langISO').replace('-', '_')}.js`,
......
......@@ -833,7 +833,9 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
}
editResource() {
if (this.editor.mode === 'java' && this.file.format.toLowerCase() === 'pdf') {
if (!this.functions.empty(this.externalId.signatureBookId)) {
this.notify.error(this.translate.instant('lang.sendInExternalSignatoryBook'));
} else if (this.editor.mode === 'java' && this.file.format.toLowerCase() === 'pdf') {
this.notify.error(this.translate.instant('lang.javaEditDenied') + ' <b>PDF</b> ' + this.translate.instant('lang.javaEditDenied2'));
} else {
if (this.mode === 'attachment') {
......
......@@ -148,7 +148,7 @@ export class CreateExternalUserComponent implements OnInit {
this.userOTP.firstname = data.firstname;
this.userOTP.lastname = data.lastname;
this.userOTP.email = data.email;
this.userOTP.phone = phone !== null ? phone.replace(/( |\.|\-)/g, '').replace('0', '+33') : '';
this.userOTP.phone = !this.functions.empty(phone) ? phone.replace(/( |\.|\-)/g, '').replace('0', '+33') : '';
}),
catchError((err: any) => {
this.notify.handleSoftErrors(err);
......@@ -236,9 +236,14 @@ export class CreateExternalUserComponent implements OnInit {
// map country calling code with national number length
const phonesMap = {
'32': [8, 10], // Belgium
'41': [4, 12], // Swiss
'44': [7, 10], // United Kingdom
'352': [4, 11], // Luxembourg
'351': [9, 11], // Portugal
'33': 9, // France
'1' : 10, // United States
'27': 9 // South Africa
'1' : 10, // USA
'39': 11, // Italy
'34': 9 // Spain
};
const regex = Object.keys(phonesMap).reduce((phoneFormats: any [], countryCode: any) => {
const numberLength = phonesMap[countryCode];
......
......@@ -99,7 +99,7 @@
<mat-form-field>
<input matInput class="comment" maxlength="255"
[disabled]="!adminMode || diffusion.process_date != null || (target === 'signatureBook' && getCurrentVisaUserIndex() === i)"
[placeholder]="'lang.visaNote' | translate" [(ngModel)]="diffusion.process_comment">
[placeholder]="'lang.visaNote' | translate" [(ngModel)]="diffusion.process_comment" title="{{!functions.empty(diffusion.process_comment) ? diffusion.process_comment : null}}">
</mat-form-field>
</div>
<div *ngIf="diffusion.process_date != null && !stringIncludes(diffusion.process_comment, 'lang.visaWorkflowInterrupted' | translate) && !stringIncludes(diffusion.process_comment, 'lang.hasInterruptedWorkflow' | translate)"
......
......@@ -544,6 +544,7 @@ export class MailEditorComponent implements OnInit, OnDestroy {
},
selector: 'textarea#emailSignature',
base_url: '../node_modules/tinymce/',
convert_urls: false,
readonly: this.readonly,
height: '400',
suffix: '.min',
......
......@@ -125,11 +125,14 @@ export class AuthService {
);
}
async logout(cleanUrl: boolean = true, forcePageLogin: boolean = false) {
async logout(cleanUrl: boolean = true, forcePageLogin: boolean = false, history: boolean = false) {
this.clearFilters();
if (['cas', 'keycloak', 'azure_saml'].indexOf(this.authMode) > -1 && !forcePageLogin) {
if (['cas', 'keycloak'].indexOf(this.authMode) > -1 && !forcePageLogin) {
this.SsoLogout(cleanUrl);
} else {
if (history) {
this.http.get('../rest/authenticate/logout').subscribe();
}
// HANDLE LOGOUT IN GUARD FOR PROCESS
if (['process'].indexOf(this.router.url.split('/')[1]) > -1) {
this.router.navigate(['/login']);
......
......@@ -2067,6 +2067,7 @@
"manualSearchInfo": "You can leave the term in the field without selecting a value for the search.",
"groupSign": "Signatory's group",
"producerService": "Producer service",
"fastParapheurSubscriberId": "Fast-Parapheur subscriber Id",
"sendersDepartment": "Senders department",
"recordManagement": "Record management",
"slipLabel": "Slip label",
......@@ -2258,6 +2259,7 @@
"addTile": "Add a tile",
"tileType": "Tile type",
"dashboardEmpty": "Your dashboard is empty",
"sendInExternalSignatoryBook": "This document is currently in an external signatory book",
"navigation": "Navigation",
"acountNotLinkedTomaarchParapheur": "Your account is not linked to Maarch Parapheur",
"error": "Eroor",
......
......@@ -2084,6 +2084,7 @@
"groupSign": "Groupe du signataire",
"noAdminSearchConfiguration": "Aucune configuration de recherche trouvée",
"producerService": "Identifiant de service producteur",
"fastParapheurSubscriberId": "Identifiant Fast-Parapheur",
"sendersDepartment": "Département des expéditeurs",
"recordManagement": "Archivage électronique",
"slipLabel": "Libellé du bordereau",
......@@ -2253,6 +2254,7 @@
"addTile": "Ajouter une tuile",
"tileType": "Type de tuile",
"dashboardEmpty": "Votre tableau de bord est vide",
"sendInExternalSignatoryBook": "Ce document est en cours de traitement dans un parapheur externe",
"refStatus": "Ce document a été refusé dans le parapheur externe",
"valStatus": "Ce document a été validé dans le parapheur externe",
"stopStatus": "Ce document a été interrompu dans la parapheur externe",
......@@ -2512,5 +2514,6 @@
"viewSuggestions": "Voir les suggestions",
"noSuggestion": "Aucune suggestion",
"contactsParameters_sector": "Secteur",
"otpVisaUser": "L'utilisateur sera notifié par <b>courriel</b> au moment de son tour dans le circuit."
"otpVisaUser": "L'utilisateur sera notifié par <b>courriel</b> au moment de son tour dans le circuit.",
"mustSign": "La position de signature pour les utilisateurs externes est obligatoire."
}
Supports Markdown
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