@silexpert/core 1.1.242 → 1.1.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/resources/Comment.d.ts +1 -1
- package/dist/cjs/api/resources/Comment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Comment.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.d.ts +3 -0
- package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.js +1 -0
- package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts +4 -0
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.js +1 -0
- package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/Comment.d.ts +2 -1
- package/dist/cjs/types/Enum/Comment.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Comment.js +1 -0
- package/dist/cjs/types/Enum/Comment.js.map +1 -1
- package/dist/cjs/types/Enum/GlobalRegime.js +1 -1
- package/dist/cjs/types/Enum/GlobalRegime.js.map +1 -1
- package/dist/cjs/types/Enum/InternalService.d.ts +12 -0
- package/dist/cjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InternalService.js +12 -0
- package/dist/cjs/types/Enum/InternalService.js.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts +5 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.js +25 -1
- package/dist/cjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts +2 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +20 -0
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts +4 -1
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +7 -2
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +15 -2
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +19 -6
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.d.ts +1 -0
- package/dist/cjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.js +67 -0
- package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/cjs/types/Enum/TimeCounterType.js +13 -13
- package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/cjs/types/Interface/models/IComment.d.ts +3 -0
- package/dist/cjs/types/Interface/models/IComment.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IComment.js.map +1 -1
- package/dist/cjs/types/Interface/models/IExercice.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IExercice.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IExercice.js.map +1 -1
- package/dist/cjs/utils/checkup.d.ts +1 -1
- package/dist/cjs/utils/checkup.d.ts.map +1 -1
- package/dist/cjs/utils/checkup.js +7 -5
- package/dist/cjs/utils/checkup.js.map +1 -1
- package/dist/cjs/utils/email/templates/signature.js +1 -1
- package/dist/cjs/utils/email/templates/signature.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +43 -5
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/cjs/utils/task.d.ts.map +1 -1
- package/dist/cjs/utils/task.js +12 -0
- package/dist/cjs/utils/task.js.map +1 -1
- package/dist/cjs/utils/webmail.d.ts.map +1 -1
- package/dist/cjs/utils/webmail.js +12 -0
- package/dist/cjs/utils/webmail.js.map +1 -1
- package/dist/mjs/api/resources/Comment.d.ts +1 -1
- package/dist/mjs/api/resources/Comment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Comment.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.d.ts +3 -0
- package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.js +1 -0
- package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts +4 -0
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.js +1 -0
- package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/Comment.d.ts +2 -1
- package/dist/mjs/types/Enum/Comment.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Comment.js +1 -0
- package/dist/mjs/types/Enum/Comment.js.map +1 -1
- package/dist/mjs/types/Enum/GlobalRegime.js +1 -1
- package/dist/mjs/types/Enum/GlobalRegime.js.map +1 -1
- package/dist/mjs/types/Enum/InternalService.d.ts +12 -0
- package/dist/mjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InternalService.js +12 -0
- package/dist/mjs/types/Enum/InternalService.js.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts +5 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.js +25 -1
- package/dist/mjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts +2 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +20 -0
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts +4 -1
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +7 -2
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +15 -2
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +19 -6
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.d.ts +1 -0
- package/dist/mjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.js +67 -0
- package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/mjs/types/Enum/TimeCounterType.js +13 -13
- package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/mjs/types/Interface/models/IComment.d.ts +3 -0
- package/dist/mjs/types/Interface/models/IComment.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IComment.js.map +1 -1
- package/dist/mjs/types/Interface/models/IExercice.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IExercice.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IExercice.js.map +1 -1
- package/dist/mjs/utils/checkup.d.ts +1 -1
- package/dist/mjs/utils/checkup.d.ts.map +1 -1
- package/dist/mjs/utils/checkup.js +7 -5
- package/dist/mjs/utils/checkup.js.map +1 -1
- package/dist/mjs/utils/email/templates/signature.js +1 -1
- package/dist/mjs/utils/email/templates/signature.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +46 -5
- package/dist/mjs/utils/email.js.map +1 -1
- package/dist/mjs/utils/task.d.ts.map +1 -1
- package/dist/mjs/utils/task.js +12 -0
- package/dist/mjs/utils/task.js.map +1 -1
- package/dist/mjs/utils/webmail.d.ts.map +1 -1
- package/dist/mjs/utils/webmail.js +12 -0
- package/dist/mjs/utils/webmail.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Comment.ts +1 -1
- package/ts/types/Enum/BalanceSheet.ts +3 -3
- package/ts/types/Enum/BrandClementine.ts +1 -0
- package/ts/types/Enum/BrandPourcentage.ts +1 -0
- package/ts/types/Enum/Comment.ts +1 -0
- package/ts/types/Enum/GlobalRegime.ts +1 -1
- package/ts/types/Enum/InternalService.ts +12 -0
- package/ts/types/Enum/JobTitle.ts +25 -1
- package/ts/types/Enum/PrestationType.ts +20 -0
- package/ts/types/Enum/Role.ts +7 -2
- package/ts/types/Enum/RoleDetail.ts +19 -6
- package/ts/types/Enum/TaskResponseType.ts +67 -0
- package/ts/types/Enum/TimeCounterType.ts +13 -13
- package/ts/types/Interface/models/IComment.ts +3 -0
- package/ts/types/Interface/models/IExercice.ts +2 -0
- package/ts/utils/checkup.ts +8 -4
- package/ts/utils/email/templates/signature.ts +1 -1
- package/ts/utils/email.ts +34 -6
- package/ts/utils/task.ts +8 -0
- package/ts/utils/webmail.ts +8 -0
|
@@ -5,42 +5,42 @@ export const TimeCounterType = {
|
|
|
5
5
|
id: 1,
|
|
6
6
|
label: 'OnBoarding',
|
|
7
7
|
aberrantTime: 60,
|
|
8
|
-
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
8
|
+
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
9
9
|
color: 'fire',
|
|
10
10
|
},
|
|
11
11
|
VAT: {
|
|
12
12
|
id: 2,
|
|
13
13
|
label: 'TVA',
|
|
14
14
|
aberrantTime: 60,
|
|
15
|
-
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
15
|
+
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
16
16
|
color: 'iris',
|
|
17
17
|
},
|
|
18
18
|
REVISION: {
|
|
19
19
|
id: 3,
|
|
20
20
|
label: 'Révision',
|
|
21
21
|
aberrantTime: 120,
|
|
22
|
-
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
22
|
+
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
23
23
|
color: 'bubblegum-light',
|
|
24
24
|
},
|
|
25
25
|
FOLDER_REVIEW: {
|
|
26
26
|
id: 4,
|
|
27
27
|
label: 'Revue dossier',
|
|
28
28
|
aberrantTime: 60,
|
|
29
|
-
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
29
|
+
limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
30
30
|
color: 'cerulean',
|
|
31
31
|
},
|
|
32
32
|
REPORTING: {
|
|
33
33
|
id: 5,
|
|
34
34
|
label: 'Signalement',
|
|
35
35
|
aberrantTime: 60,
|
|
36
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
36
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
37
37
|
color: 'lipstick-dark',
|
|
38
38
|
},
|
|
39
39
|
SYNCHRONISATION: {
|
|
40
40
|
id: 6,
|
|
41
41
|
label: 'Synchronisation',
|
|
42
42
|
aberrantTime: 30,
|
|
43
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
43
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
44
44
|
color: 'orange-dark',
|
|
45
45
|
},
|
|
46
46
|
UNDER_SUPERVISION: {
|
|
@@ -75,21 +75,21 @@ export const TimeCounterType = {
|
|
|
75
75
|
id: 11,
|
|
76
76
|
label: 'Prévisionnel',
|
|
77
77
|
aberrantTime: 20,
|
|
78
|
-
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
78
|
+
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
79
79
|
color: 'cerulean-light',
|
|
80
80
|
},
|
|
81
81
|
CERTIFICATE: {
|
|
82
82
|
id: 12,
|
|
83
83
|
label: 'Attestation',
|
|
84
84
|
aberrantTime: 20,
|
|
85
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
85
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
86
86
|
color: 'pink-salmon',
|
|
87
87
|
},
|
|
88
88
|
COMPLEMENTARY_MISSION: {
|
|
89
89
|
id: 13,
|
|
90
90
|
label: 'Mission complémentaire',
|
|
91
91
|
aberrantTime: 20,
|
|
92
|
-
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],
|
|
92
|
+
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER],
|
|
93
93
|
color: 'cerulean-light',
|
|
94
94
|
},
|
|
95
95
|
ORGANISATION: {
|
|
@@ -124,21 +124,21 @@ export const TimeCounterType = {
|
|
|
124
124
|
id: 18,
|
|
125
125
|
label: 'Traitement des courriers',
|
|
126
126
|
aberrantTime: 20,
|
|
127
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
127
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
128
128
|
color: 'pink-salmon',
|
|
129
129
|
},
|
|
130
130
|
SUPPORT_PROCESSING: {
|
|
131
131
|
id: 19,
|
|
132
132
|
label: 'Traitement support',
|
|
133
133
|
aberrantTime: 20,
|
|
134
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
134
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
135
135
|
color: 'error',
|
|
136
136
|
},
|
|
137
137
|
BILAN: {
|
|
138
138
|
id: 20,
|
|
139
139
|
label: 'Bilan',
|
|
140
140
|
aberrantTime: 120,
|
|
141
|
-
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.EXPERT_ACCOUNTANT],
|
|
141
|
+
limitedRoles: [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.EXPERT_ACCOUNTANT],
|
|
142
142
|
color: 'cerulean-dark',
|
|
143
143
|
},
|
|
144
144
|
PAYSLIP: {
|
|
@@ -250,7 +250,7 @@ export const TimeCounterType = {
|
|
|
250
250
|
id: 36,
|
|
251
251
|
label: 'Validation contrôle interne',
|
|
252
252
|
aberrantTime: 480,
|
|
253
|
-
limitedRoles: [Role.CUSTOMER_SUCCESS],
|
|
253
|
+
limitedRoles: [Role.CUSTOMER_SUCCESS, Role.ON_BOARDER, Role.TERMINATION, Role.LITIGE],
|
|
254
254
|
color: 'grey-dark',
|
|
255
255
|
},
|
|
256
256
|
CALENDLY: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ICommentType } from './ICommentType';
|
|
2
2
|
import { IChannelType } from './IChannelType';
|
|
3
3
|
import { IUser } from './IUser';
|
|
4
|
+
import { IExercice } from './IExercice';
|
|
4
5
|
import { ISupervision } from './ISupervision';
|
|
5
6
|
import { ICard, ITask } from '../..';
|
|
6
7
|
|
|
@@ -14,6 +15,7 @@ export interface IComment {
|
|
|
14
15
|
idReport?: number | null;
|
|
15
16
|
idTask?: number | null;
|
|
16
17
|
idUser?: number | null;
|
|
18
|
+
idExercice?: number | null;
|
|
17
19
|
idCard?: number | null;
|
|
18
20
|
idChecklist?: number | null;
|
|
19
21
|
isPing?: boolean;
|
|
@@ -25,6 +27,7 @@ export interface IComment {
|
|
|
25
27
|
commentType?: ICommentType;
|
|
26
28
|
channelType?: IChannelType;
|
|
27
29
|
user?: IUser;
|
|
30
|
+
exercice?: IExercice;
|
|
28
31
|
supervision?: ISupervision;
|
|
29
32
|
task?: ITask;
|
|
30
33
|
card?: ICard;
|
|
@@ -12,6 +12,7 @@ import { ISociety } from './ISociety';
|
|
|
12
12
|
import { IExerciceDetail } from './IExerciceDetail';
|
|
13
13
|
import { IBalanceSheetModule } from './IBalanceSheetModule';
|
|
14
14
|
import { IRegistration } from './IRegistration';
|
|
15
|
+
import { IComment } from './IComment';
|
|
15
16
|
|
|
16
17
|
// exercices
|
|
17
18
|
export interface IExercice {
|
|
@@ -62,4 +63,5 @@ export interface IExercice {
|
|
|
62
63
|
exerciceDetail?: IExerciceDetail;
|
|
63
64
|
exerciceBalanceSheetModule?: IBalanceSheetModule;
|
|
64
65
|
registrations: IRegistration[];
|
|
66
|
+
comments?: IComment[];
|
|
65
67
|
}
|
package/ts/utils/checkup.ts
CHANGED
|
@@ -16,12 +16,16 @@ export const getCheckupDetailForm = (
|
|
|
16
16
|
societyDetail: any, //FIXME: typage ???
|
|
17
17
|
brandName: string,
|
|
18
18
|
bankList: { id: number, name: number }[],
|
|
19
|
+
dateOfRegistration?: Date | null,
|
|
20
|
+
recoveryDate?: Date | null,
|
|
19
21
|
) => { //FIXME: typage ???
|
|
20
22
|
|
|
21
|
-
const isSocietyCreationCompute =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const isSocietyCreationCompute = !recoveryDate || !dateOfRegistration ||
|
|
24
|
+
(recoveryDate &&
|
|
25
|
+
dateOfRegistration &&
|
|
26
|
+
dayjs(dateOfRegistration).isBetween(dayjs(recoveryDate).subtract(1, 'month'), dayjs(recoveryDate).add(1, 'month')))
|
|
27
|
+
? true
|
|
28
|
+
: false;
|
|
25
29
|
|
|
26
30
|
return [
|
|
27
31
|
{
|
|
@@ -237,7 +237,7 @@ ${logoClementine}
|
|
|
237
237
|
<a href="https://www.smileyourpla.net/" style="display: inline-block; color:#6E6E71;" target="_blank"><img
|
|
238
238
|
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png"
|
|
239
239
|
alt="Initiative Smile your planet" height="36"></a>
|
|
240
|
-
<% if(user.calendlyUrl) { %>
|
|
240
|
+
<% if(user.calendlyUrl && !isDataOfficer) { %>
|
|
241
241
|
<a href="<%= user.calendlyUrl %>" style="display: inline-block; color:#6E6E71;" target="_blank">
|
|
242
242
|
<img
|
|
243
243
|
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png"
|
package/ts/utils/email.ts
CHANGED
|
@@ -21,6 +21,10 @@ function getRoleSignature(user:any) {
|
|
|
21
21
|
const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);
|
|
22
22
|
const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);
|
|
23
23
|
const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);
|
|
24
|
+
const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);
|
|
25
|
+
const isTermination = user.roles.map((r: any) => r.id).includes(Role.TERMINATION);
|
|
26
|
+
const isLitige = user.roles.map((r: any) => r.id).includes(Role.LITIGE);
|
|
27
|
+
const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);
|
|
24
28
|
const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);
|
|
25
29
|
const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);
|
|
26
30
|
const isFront = !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS]]).length;
|
|
@@ -31,6 +35,18 @@ function getRoleSignature(user:any) {
|
|
|
31
35
|
if (isCS && isManager) { return 'Responsable relations clients'; }
|
|
32
36
|
if (isCS) { return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`; }
|
|
33
37
|
|
|
38
|
+
if (isOnBoarder && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`; }
|
|
39
|
+
if (isOnBoarder) { return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`; }
|
|
40
|
+
|
|
41
|
+
if (isTermination && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`; }
|
|
42
|
+
if (isTermination) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`; }
|
|
43
|
+
|
|
44
|
+
if (isLitige && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`; }
|
|
45
|
+
if (isLitige) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`; }
|
|
46
|
+
|
|
47
|
+
if (isDataOfficer && isManager) { return 'Responsable aide comptable'; }
|
|
48
|
+
if (isDataOfficer) { return 'Aide comptable'; }
|
|
49
|
+
|
|
34
50
|
if (isFacturation && isStagiaireOrAlternant) { return 'Assistant facturation'; }
|
|
35
51
|
if (isFacturation && isManager) { return 'Responsable facturation'; }
|
|
36
52
|
if (isFacturation) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de facturation`; }
|
|
@@ -110,13 +126,13 @@ function getMailSignature(user:any, idTypeBrand:number) {
|
|
|
110
126
|
}) as unknown as string;
|
|
111
127
|
|
|
112
128
|
if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) { return informatiqueMail; }
|
|
113
|
-
if (user && !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return user.email;
|
|
129
|
+
if (user && !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL]]).length) return user.email;
|
|
114
130
|
return bonjourMail;
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
function getPhoneSignature(user:any) {
|
|
118
134
|
if (user.phone !== '0383931414') { return user.phone.replace(/\B(?=(\d{2})+(?!\d))/g, ' '); }
|
|
119
|
-
return
|
|
135
|
+
return null;
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
export function generateSignature(params: any): string {
|
|
@@ -156,6 +172,10 @@ export function generateSignature(params: any): string {
|
|
|
156
172
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
157
173
|
objectWaited: 'listMails.social',
|
|
158
174
|
}) as unknown as string;
|
|
175
|
+
const dataOfficerMail = getBrandConfig({
|
|
176
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
177
|
+
objectWaited: 'listMails.gestion',
|
|
178
|
+
}) as unknown as string;
|
|
159
179
|
const supportMail = getBrandConfig({
|
|
160
180
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
161
181
|
objectWaited: 'listMails.support',
|
|
@@ -187,11 +207,18 @@ export function generateSignature(params: any): string {
|
|
|
187
207
|
|
|
188
208
|
let roleSignature: string | null;
|
|
189
209
|
let mailSignature: string | null;
|
|
190
|
-
let phoneSignature: string |
|
|
210
|
+
let phoneSignature: string | null;
|
|
191
211
|
let horaires: string | null;
|
|
192
|
-
[roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail,
|
|
212
|
+
[roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail, null, 'Du lundi au vendredi de 9h à 19h'];
|
|
193
213
|
|
|
194
|
-
if (
|
|
214
|
+
if (user.roles && user.roles.some((r: any) => r.id === Role.DATA_OFFICER)) { // Signature data_officer
|
|
215
|
+
user = {
|
|
216
|
+
firstname: `L'équipe ${commercialName}`,
|
|
217
|
+
isAll: true,
|
|
218
|
+
};
|
|
219
|
+
mailSignature = dataOfficerMail;
|
|
220
|
+
roleSignature = '';
|
|
221
|
+
} else if (forceRole === 'social') { // Signature social
|
|
195
222
|
user = {
|
|
196
223
|
firstname: 'Service social',
|
|
197
224
|
isAll: true,
|
|
@@ -238,6 +265,7 @@ export function generateSignature(params: any): string {
|
|
|
238
265
|
return ejs.render(signatureTemplate, {
|
|
239
266
|
forceRole,
|
|
240
267
|
isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,
|
|
268
|
+
isDataOfficer: user.roles ? user.roles.some((r: any) => r.id === Role.DATA_OFFICER) : true,
|
|
241
269
|
brandName,
|
|
242
270
|
idTypeBrand,
|
|
243
271
|
commercialName,
|
|
@@ -247,7 +275,7 @@ export function generateSignature(params: any): string {
|
|
|
247
275
|
user,
|
|
248
276
|
roleSignature,
|
|
249
277
|
mailSignature,
|
|
250
|
-
phoneSignature,
|
|
278
|
+
phoneSignature: phoneSignature ? phoneSignature.replace(/\s+/gm, ' ') : null,
|
|
251
279
|
standardPhoneSignature: standardPhoneSignature.replace(/\s+/gm, ' '),
|
|
252
280
|
horaires,
|
|
253
281
|
primaryColor,
|
package/ts/utils/task.ts
CHANGED
|
@@ -13,8 +13,16 @@ const getIdRoleUsedForTask = (listRoles: number[]): number => {
|
|
|
13
13
|
idRole = Role.FACTURATION;
|
|
14
14
|
} else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
|
|
15
15
|
idRole = Role.CUSTOMER_SUCCESS;
|
|
16
|
+
} else if (listRoles.includes(Role.ON_BOARDER)) {
|
|
17
|
+
idRole = Role.ON_BOARDER;
|
|
18
|
+
} else if (listRoles.includes(Role.TERMINATION)) {
|
|
19
|
+
idRole = Role.TERMINATION;
|
|
20
|
+
} else if (listRoles.includes(Role.LITIGE)) {
|
|
21
|
+
idRole = Role.LITIGE;
|
|
16
22
|
} else if (listRoles.includes(Role.FRONT_OFFICE)) {
|
|
17
23
|
idRole = Role.FRONT_OFFICE;
|
|
24
|
+
} else if (listRoles.includes(Role.DATA_OFFICER)) {
|
|
25
|
+
idRole = Role.DATA_OFFICER;
|
|
18
26
|
}
|
|
19
27
|
return idRole;
|
|
20
28
|
};
|
package/ts/utils/webmail.ts
CHANGED
|
@@ -8,6 +8,8 @@ const getIdRoleUsedForEmail = (listRoles: number[]): number => {
|
|
|
8
8
|
idRole = Role.FRONT_OFFICE;
|
|
9
9
|
} else if (listRoles.includes(Role.FRONT_OFFICE_EXPRESS)) {
|
|
10
10
|
idRole = Role.FRONT_OFFICE_EXPRESS;
|
|
11
|
+
} else if (listRoles.includes(Role.DATA_OFFICER)) {
|
|
12
|
+
idRole = Role.DATA_OFFICER;
|
|
11
13
|
} else if (listRoles.includes(Role.COMMERCIAL)) {
|
|
12
14
|
idRole = Role.COMMERCIAL;
|
|
13
15
|
} else if (listRoles.includes(Role.EXPERT_ACCOUNTANT)) {
|
|
@@ -18,6 +20,12 @@ const getIdRoleUsedForEmail = (listRoles: number[]): number => {
|
|
|
18
20
|
idRole = Role.JURIDIC;
|
|
19
21
|
} else if (listRoles.includes(Role.SOCIAL)) {
|
|
20
22
|
idRole = Role.SOCIAL;
|
|
23
|
+
} else if (listRoles.includes(Role.ON_BOARDER)) {
|
|
24
|
+
idRole = Role.ON_BOARDER;
|
|
25
|
+
} else if (listRoles.includes(Role.TERMINATION)) {
|
|
26
|
+
idRole = Role.TERMINATION;
|
|
27
|
+
} else if (listRoles.includes(Role.LITIGE)) {
|
|
28
|
+
idRole = Role.LITIGE;
|
|
21
29
|
}
|
|
22
30
|
return idRole;
|
|
23
31
|
};
|