@silexpert/core 0.4.264 → 0.4.265

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.
Files changed (75) hide show
  1. package/es/api/resources/Exercice.d.ts +1 -0
  2. package/es/api/resources/Exercice.d.ts.map +1 -1
  3. package/es/api/resources/Exercice.js +3 -0
  4. package/es/api/resources/Exercice.js.map +1 -1
  5. package/es/api/resources/User.d.ts +2 -2
  6. package/es/api/resources/User.d.ts.map +1 -1
  7. package/es/api/resources/User.js +2 -11
  8. package/es/api/resources/User.js.map +1 -1
  9. package/es/types/Enum/BrandClementine.d.ts +3 -1
  10. package/es/types/Enum/BrandClementine.d.ts.map +1 -1
  11. package/es/types/Enum/BrandClementine.js +3 -0
  12. package/es/types/Enum/BrandClementine.js.map +1 -1
  13. package/es/types/Enum/Role.d.ts +6 -11
  14. package/es/types/Enum/Role.d.ts.map +1 -1
  15. package/es/types/Enum/Role.js +15 -10
  16. package/es/types/Enum/Role.js.map +1 -1
  17. package/es/types/Enum/RoleDetail.d.ts +40 -56
  18. package/es/types/Enum/RoleDetail.d.ts.map +1 -1
  19. package/es/types/Enum/RoleDetail.js +120 -64
  20. package/es/types/Enum/RoleDetail.js.map +1 -1
  21. package/es/types/Enum/TaskResponseType.d.ts +0 -1
  22. package/es/types/Enum/TaskResponseType.d.ts.map +1 -1
  23. package/es/types/Enum/TaskResponseType.js +25 -3
  24. package/es/types/Enum/TaskResponseType.js.map +1 -1
  25. package/es/types/Enum/TimeCounterType.js +7 -7
  26. package/es/types/Enum/TimeCounterType.js.map +1 -1
  27. package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts +1 -0
  28. package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts.map +1 -1
  29. package/es/types/Interface/api/user/ParamsGetAllCollaborators.js +10 -1
  30. package/es/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -1
  31. package/es/types/Interface/api/user/QueryGetAllCollaborators.d.ts +1 -0
  32. package/es/types/Interface/api/user/QueryGetAllCollaborators.d.ts.map +1 -1
  33. package/es/types/Interface/api/user/QueryGetAllCollaborators.js +11 -1
  34. package/es/types/Interface/api/user/QueryGetAllCollaborators.js.map +1 -1
  35. package/es/utils/task.d.ts +1 -2
  36. package/es/utils/task.d.ts.map +1 -1
  37. package/es/utils/task.js +17 -20
  38. package/es/utils/task.js.map +1 -1
  39. package/es/utils/webmail.d.ts.map +1 -1
  40. package/es/utils/webmail.js +1 -4
  41. package/es/utils/webmail.js.map +1 -1
  42. package/js/api/resources/Exercice.js +4 -0
  43. package/js/api/resources/Exercice.js.map +1 -1
  44. package/js/api/resources/User.js +5 -3
  45. package/js/api/resources/User.js.map +1 -1
  46. package/js/types/Enum/BrandClementine.js +3 -0
  47. package/js/types/Enum/BrandClementine.js.map +1 -1
  48. package/js/types/Enum/Role.js +18 -13
  49. package/js/types/Enum/Role.js.map +1 -1
  50. package/js/types/Enum/RoleDetail.js +142 -86
  51. package/js/types/Enum/RoleDetail.js.map +1 -1
  52. package/js/types/Enum/TaskResponseType.js +24 -4
  53. package/js/types/Enum/TaskResponseType.js.map +1 -1
  54. package/js/types/Enum/TimeCounterType.js +7 -7
  55. package/js/types/Enum/TimeCounterType.js.map +1 -1
  56. package/js/types/Interface/api/user/ParamsGetAllCollaborators.js +6 -0
  57. package/js/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -1
  58. package/js/types/Interface/api/user/QueryGetAllCollaborators.js +8 -0
  59. package/js/types/Interface/api/user/QueryGetAllCollaborators.js.map +1 -1
  60. package/js/utils/task.js +17 -21
  61. package/js/utils/task.js.map +1 -1
  62. package/js/utils/webmail.js +1 -3
  63. package/js/utils/webmail.js.map +1 -1
  64. package/package.json +1 -1
  65. package/ts/api/resources/Exercice.ts +4 -0
  66. package/ts/api/resources/User.ts +3 -12
  67. package/ts/types/Enum/BrandClementine.ts +3 -0
  68. package/ts/types/Enum/Role.ts +15 -10
  69. package/ts/types/Enum/RoleDetail.ts +120 -64
  70. package/ts/types/Enum/TaskResponseType.ts +25 -3
  71. package/ts/types/Enum/TimeCounterType.ts +7 -7
  72. package/ts/types/Interface/api/user/ParamsGetAllCollaborators.ts +9 -0
  73. package/ts/types/Interface/api/user/QueryGetAllCollaborators.ts +10 -1
  74. package/ts/utils/task.ts +17 -17
  75. package/ts/utils/webmail.ts +1 -3
@@ -31,7 +31,7 @@ export enum RoleAvailableForTask {
31
31
  CUSTOMER_SUCCESS = Role.CUSTOMER_SUCCESS,
32
32
  FRONT_OFFICE = Role.FRONT_OFFICE,
33
33
  COMMERCIAL = Role.COMMERCIAL,
34
- BACK_MANAGER = Role.BACK_MANAGER,
34
+ // BACK_MANAGER = Role.BACK_MANAGER,
35
35
  EXPERT_ACCOUNTANT = Role.EXPERT_ACCOUNTANT,
36
36
  }
37
37
 
@@ -142,7 +142,7 @@ export const TaskResponseType = {
142
142
  {
143
143
  id: 10,
144
144
  label: 'Préparation d\'un bilan',
145
- role: Role.BACK_MANAGER,
145
+ role: Role.MANAGER,
146
146
  deadline: Deadline,
147
147
  isForWholeRole: false,
148
148
  backToClient: false,
@@ -150,6 +150,17 @@ export const TaskResponseType = {
150
150
  responseType: null,
151
151
  description: 'Controle de la DADS.',
152
152
  },
153
+ {
154
+ id: 11,
155
+ label: 'Comptable express',
156
+ role: Role.FRONT_OFFICE_EXPRESS,
157
+ deadline: Deadline,
158
+ isForWholeRole: false,
159
+ backToClient: false,
160
+ goToCalendar: false,
161
+ responseType: null,
162
+ description: 'Est-ce que nous pouvons réaliser le bilan 2020 de ce client ?',
163
+ },
153
164
  ],
154
165
  },
155
166
  EXTERN: {
@@ -269,7 +280,7 @@ export const TaskResponseType = {
269
280
  {
270
281
  id: 14,
271
282
  label: 'Litige dossier',
272
- role: Role.BACK_MANAGER,
283
+ role: Role.MANAGER,
273
284
  deadline: Deadline,
274
285
  isForWholeRole: false,
275
286
  backToClient: true,
@@ -277,6 +288,17 @@ export const TaskResponseType = {
277
288
  responseType: ResponseType.MAIL,
278
289
  description: 'Le client veut avoir une explication de bilan par le responsable comptable',
279
290
  },
291
+ {
292
+ id: 15,
293
+ label: 'Comptable express',
294
+ role: Role.FRONT_OFFICE_EXPRESS,
295
+ deadline: Deadline,
296
+ isForWholeRole: false,
297
+ backToClient: true,
298
+ goToCalendar: false,
299
+ responseType: ResponseType.MAIL,
300
+ description: 'Bilan express à envoyer au SIE.',
301
+ },
280
302
  ],
281
303
 
282
304
  },
@@ -5,25 +5,25 @@ export const TimeCounterType = {
5
5
  id: 1,
6
6
  label: 'OnBoarding',
7
7
  aberrantTime: 60,
8
- limitedRoles: [Role.FRONT_OFFICE, Role.BACK_OFFICE],
8
+ limitedRoles: [Role.FRONT_OFFICE],
9
9
  },
10
10
  VAT: {
11
11
  id: 2,
12
12
  label: 'TVA',
13
13
  aberrantTime: 60,
14
- limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_OFFICE],
14
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],
15
15
  },
16
16
  REVISION: {
17
17
  id: 3,
18
18
  label: 'Révision',
19
19
  aberrantTime: 120,
20
- limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_OFFICE],
20
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],
21
21
  },
22
22
  FOLDER_REVIEW: {
23
23
  id: 4,
24
24
  label: 'Revue dossier',
25
25
  aberrantTime: 60,
26
- limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_OFFICE],
26
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],
27
27
  },
28
28
  REPORTING: {
29
29
  id: 5,
@@ -65,7 +65,7 @@ export const TimeCounterType = {
65
65
  id: 11,
66
66
  label: 'Prévisionnel',
67
67
  aberrantTime: null,
68
- limitedRoles: [Role.FRONT_OFFICE, Role.BACK_OFFICE],
68
+ limitedRoles: [Role.FRONT_OFFICE],
69
69
  },
70
70
  CERTIFICATE: {
71
71
  id: 12,
@@ -77,7 +77,7 @@ export const TimeCounterType = {
77
77
  id: 13,
78
78
  label: 'Mission complémentaire',
79
79
  aberrantTime: null,
80
- limitedRoles: [Role.FRONT_OFFICE, Role.BACK_OFFICE],
80
+ limitedRoles: [Role.FRONT_OFFICE],
81
81
  },
82
82
  ORGANISATION: {
83
83
  id: 14,
@@ -119,7 +119,7 @@ export const TimeCounterType = {
119
119
  id: 20,
120
120
  label: 'Bilan',
121
121
  aberrantTime: 120,
122
- limitedRoles: [Role.FRONT_OFFICE, Role.BACK_OFFICE, Role.FRONT_MANAGER, Role.BACK_MANAGER, Role.EXPERT_ACCOUNTANT],
122
+ limitedRoles: [Role.FRONT_OFFICE, Role.EXPERT_ACCOUNTANT],
123
123
  },
124
124
  PAYSLIP: {
125
125
  id: 21,
@@ -1,4 +1,5 @@
1
1
  import {
2
+ IsIn,
2
3
  IsNumber,
3
4
  IsOptional, IsString,
4
5
  } from 'class-validator';
@@ -26,4 +27,12 @@ export class ParamsGetAllCollaborators {
26
27
  @IsOptional()
27
28
  @IsNumber()
28
29
  idUser?: number[];
30
+
31
+ @ApiPropertyOptional()
32
+ @IsOptional()
33
+ @IsString({
34
+ each: true,
35
+ })
36
+ @IsIn(['avatar', 'teams', 'businessLines'], { each: true })
37
+ include?: string[];
29
38
  }
@@ -1,4 +1,5 @@
1
- import { ApiProperty } from '../../../../utils';
1
+ import { IsIn, IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
3
 
3
4
  export class QueryGetAllCollaborators {
4
5
  @ApiProperty({
@@ -8,4 +9,12 @@ export class QueryGetAllCollaborators {
8
9
  example: [1, 13],
9
10
  })
10
11
  idUser?: number[];
12
+
13
+ @ApiPropertyOptional()
14
+ @IsOptional()
15
+ @IsString({
16
+ each: true,
17
+ })
18
+ @IsIn(['avatar', 'teams', 'businessLines'], { each: true })
19
+ include?: string[];
11
20
  }
package/ts/utils/task.ts CHANGED
@@ -3,7 +3,7 @@ import { TaskResponseType, RoleAvailableForTask } from '../types/Enum/TaskRespon
3
3
 
4
4
  const getIdRoleUsedForTask = (listRoles: number[]): number => {
5
5
  let idRole = 0;
6
- if (listRoles.includes(Role.COMMERCIAL) || listRoles.includes(Role.COMMERCIAL_MANAGER)) {
6
+ if (listRoles.includes(Role.COMMERCIAL)) {
7
7
  idRole = Role.COMMERCIAL;
8
8
  } else if (listRoles.includes(Role.JURIDIC)) {
9
9
  idRole = Role.JURIDIC;
@@ -11,27 +11,27 @@ const getIdRoleUsedForTask = (listRoles: number[]): number => {
11
11
  idRole = Role.SOCIAL;
12
12
  } else if (listRoles.includes(Role.FACTURATION)) {
13
13
  idRole = Role.FACTURATION;
14
- } else if (listRoles.includes(Role.CUSTOMER_SUCCESS) || listRoles.includes(Role.CUSTOMER_SUCCESS_MANAGER)) {
14
+ } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
15
15
  idRole = Role.CUSTOMER_SUCCESS;
16
- } else if (listRoles.includes(Role.FRONT_OFFICE) || listRoles.includes(Role.FRONT_MANAGER)) {
16
+ } else if (listRoles.includes(Role.FRONT_OFFICE)) {
17
17
  idRole = Role.FRONT_OFFICE;
18
18
  }
19
19
  return idRole;
20
20
  };
21
21
 
22
- const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {
23
- let idRole = 0;
24
- if (listRoles.includes(Role.COMMERCIAL)) {
25
- idRole = Role.COMMERCIAL_MANAGER;
26
- } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {
27
- idRole = Role.MANAGER;
28
- } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
29
- idRole = Role.CUSTOMER_SUCCESS_MANAGER;
30
- } else if (listRoles.includes(Role.FRONT_OFFICE)) {
31
- idRole = Role.FRONT_MANAGER;
32
- }
33
- return idRole;
34
- };
22
+ // const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {
23
+ // let idRole = 0;
24
+ // if (listRoles.includes(Role.COMMERCIAL)) {
25
+ // idRole = Role.MANAGER;
26
+ // } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {
27
+ // idRole = Role.MANAGER;
28
+ // } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
29
+ // idRole = Role.MANAGER;
30
+ // } else if (listRoles.includes(Role.FRONT_OFFICE)) {
31
+ // idRole = Role.MANAGER;
32
+ // }
33
+ // return idRole;
34
+ // };
35
35
 
36
36
  const getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): number | undefined => {
37
37
  const taskTypeList = isIntern ? TaskResponseType.INTERN.types : TaskResponseType.EXTERN.types;
@@ -41,5 +41,5 @@ const getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): num
41
41
  const getIdRoleUsedForGetTaskOfUser = (idRole: number): boolean => !!Object.values(RoleAvailableForTask).find((role) => role === idRole);
42
42
 
43
43
  export {
44
- getIdRoleUsedForTask, getIdRoleUsedForManagerTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser,
44
+ getIdRoleUsedForTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser,
45
45
  };
@@ -4,13 +4,11 @@ const getIdRoleUsedForEmail = (listRoles: number[]): number => {
4
4
  let idRole = Role.CUSTOMER_SUCCESS;
5
5
  if (listRoles.includes(Role.FACTURATION)) {
6
6
  idRole = Role.FACTURATION;
7
- } else if (listRoles.includes(Role.BACK_MANAGER)) {
8
- idRole = Role.BACK_MANAGER;
9
7
  } else if (listRoles.includes(Role.FRONT_OFFICE)) {
10
8
  idRole = Role.FRONT_OFFICE;
11
9
  } else if (listRoles.includes(Role.FRONT_OFFICE_EXPRESS)) {
12
10
  idRole = Role.FRONT_OFFICE_EXPRESS;
13
- } else if (listRoles.includes(Role.COMMERCIAL) || listRoles.includes(Role.COMMERCIAL_MANAGER)) {
11
+ } else if (listRoles.includes(Role.COMMERCIAL)) {
14
12
  idRole = Role.COMMERCIAL;
15
13
  } else if (listRoles.includes(Role.EXPERT_ACCOUNTANT)) {
16
14
  idRole = Role.EXPERT_ACCOUNTANT;