@silexpert/core 0.4.207 → 0.4.209

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 (149) hide show
  1. package/es/api/resources/Comment.d.ts +6 -0
  2. package/es/api/resources/Comment.d.ts.map +1 -0
  3. package/es/api/resources/Comment.js +7 -0
  4. package/es/api/resources/Comment.js.map +1 -0
  5. package/es/api/resources/Task.d.ts +16 -0
  6. package/es/api/resources/Task.d.ts.map +1 -0
  7. package/es/api/resources/Task.js +67 -0
  8. package/es/api/resources/Task.js.map +1 -0
  9. package/es/api/resources/User.d.ts +1 -0
  10. package/es/api/resources/User.d.ts.map +1 -1
  11. package/es/api/resources/User.js +3 -0
  12. package/es/api/resources/User.js.map +1 -1
  13. package/es/api/resources.d.ts +4 -0
  14. package/es/api/resources.d.ts.map +1 -1
  15. package/es/api/resources.js +4 -0
  16. package/es/api/resources.js.map +1 -1
  17. package/es/types/Enum/InternalService.d.ts +31 -0
  18. package/es/types/Enum/InternalService.d.ts.map +1 -0
  19. package/es/types/Enum/InternalService.js +31 -0
  20. package/es/types/Enum/InternalService.js.map +1 -0
  21. package/es/types/Enum/TaskResponseType.d.ts +360 -0
  22. package/es/types/Enum/TaskResponseType.d.ts.map +1 -0
  23. package/es/types/Enum/TaskResponseType.js +362 -0
  24. package/es/types/Enum/TaskResponseType.js.map +1 -0
  25. package/es/types/Interface/api/task/QueryCountTask.d.ts +6 -0
  26. package/es/types/Interface/api/task/QueryCountTask.d.ts.map +1 -0
  27. package/es/types/Interface/api/task/QueryCountTask.js +32 -0
  28. package/es/types/Interface/api/task/QueryCountTask.js.map +1 -0
  29. package/es/types/Interface/api/task/QueryCreateTask.d.ts +8 -0
  30. package/es/types/Interface/api/task/QueryCreateTask.d.ts.map +1 -0
  31. package/es/types/Interface/api/task/QueryCreateTask.js +38 -0
  32. package/es/types/Interface/api/task/QueryCreateTask.js.map +1 -0
  33. package/es/types/Interface/api/task/QueryGetAllTask.d.ts +8 -0
  34. package/es/types/Interface/api/task/QueryGetAllTask.d.ts.map +1 -0
  35. package/es/types/Interface/api/task/QueryGetAllTask.js +52 -0
  36. package/es/types/Interface/api/task/QueryGetAllTask.js.map +1 -0
  37. package/es/types/Interface/api/task/QueryGetTask.d.ts +5 -0
  38. package/es/types/Interface/api/task/QueryGetTask.d.ts.map +1 -0
  39. package/es/types/Interface/api/task/QueryGetTask.js +31 -0
  40. package/es/types/Interface/api/task/QueryGetTask.js.map +1 -0
  41. package/es/types/Interface/api/task/QueryPaginatedTask.d.ts +20 -0
  42. package/es/types/Interface/api/task/QueryPaginatedTask.d.ts.map +1 -0
  43. package/es/types/Interface/api/task/QueryPaginatedTask.js +131 -0
  44. package/es/types/Interface/api/task/QueryPaginatedTask.js.map +1 -0
  45. package/es/types/Interface/api/task/QueryStatsByManager.d.ts +6 -0
  46. package/es/types/Interface/api/task/QueryStatsByManager.d.ts.map +1 -0
  47. package/es/types/Interface/api/task/QueryStatsByManager.js +2 -0
  48. package/es/types/Interface/api/task/QueryStatsByManager.js.map +1 -0
  49. package/es/types/Interface/api/task/QueryStatsByRolesInCsv.d.ts +7 -0
  50. package/es/types/Interface/api/task/QueryStatsByRolesInCsv.d.ts.map +1 -0
  51. package/es/types/Interface/api/task/QueryStatsByRolesInCsv.js +40 -0
  52. package/es/types/Interface/api/task/QueryStatsByRolesInCsv.js.map +1 -0
  53. package/es/types/Interface/api/task/QueryStatsByServiceInCsv.d.ts +5 -0
  54. package/es/types/Interface/api/task/QueryStatsByServiceInCsv.d.ts.map +1 -0
  55. package/es/types/Interface/api/task/QueryStatsByServiceInCsv.js +26 -0
  56. package/es/types/Interface/api/task/QueryStatsByServiceInCsv.js.map +1 -0
  57. package/es/types/Interface/api/task/QueryStatsByTaskTypeInCsv.d.ts +5 -0
  58. package/es/types/Interface/api/task/QueryStatsByTaskTypeInCsv.d.ts.map +1 -0
  59. package/es/types/Interface/api/task/QueryStatsByTaskTypeInCsv.js +26 -0
  60. package/es/types/Interface/api/task/QueryStatsByTaskTypeInCsv.js.map +1 -0
  61. package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts +4 -0
  62. package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts.map +1 -0
  63. package/es/types/Interface/api/user/ParamsGetAllCollaborators.js +22 -0
  64. package/es/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -0
  65. package/es/types/Interface/models/ICalendarEvent.d.ts +3 -0
  66. package/es/types/Interface/models/ICalendarEvent.d.ts.map +1 -1
  67. package/es/types/Interface/models/ICalendarEvent.js.map +1 -1
  68. package/es/types/Interface/models/IComment.d.ts +3 -0
  69. package/es/types/Interface/models/IComment.d.ts.map +1 -1
  70. package/es/types/Interface/models/IComment.js.map +1 -1
  71. package/es/types/Interface/models/ITask.d.ts +33 -0
  72. package/es/types/Interface/models/ITask.d.ts.map +1 -0
  73. package/es/types/Interface/models/ITask.js +2 -0
  74. package/es/types/Interface/models/ITask.js.map +1 -0
  75. package/es/types/index.d.ts +13 -0
  76. package/es/types/index.d.ts.map +1 -1
  77. package/es/types/index.js +13 -0
  78. package/es/types/index.js.map +1 -1
  79. package/es/utils/index.d.ts +1 -0
  80. package/es/utils/index.d.ts.map +1 -1
  81. package/es/utils/index.js +1 -0
  82. package/es/utils/index.js.map +1 -1
  83. package/es/utils/task.d.ts +4 -0
  84. package/es/utils/task.d.ts.map +1 -0
  85. package/es/utils/task.js +41 -0
  86. package/es/utils/task.js.map +1 -0
  87. package/js/api/resources/Comment.js +18 -0
  88. package/js/api/resources/Comment.js.map +1 -0
  89. package/js/api/resources/Task.js +129 -0
  90. package/js/api/resources/Task.js.map +1 -0
  91. package/js/api/resources/User.js +4 -0
  92. package/js/api/resources/User.js.map +1 -1
  93. package/js/api/resources.js +7 -1
  94. package/js/api/resources.js.map +1 -1
  95. package/js/types/Enum/InternalService.js +36 -0
  96. package/js/types/Enum/InternalService.js.map +1 -0
  97. package/js/types/Enum/TaskResponseType.js +371 -0
  98. package/js/types/Enum/TaskResponseType.js.map +1 -0
  99. package/js/types/Interface/api/task/QueryCountTask.js +33 -0
  100. package/js/types/Interface/api/task/QueryCountTask.js.map +1 -0
  101. package/js/types/Interface/api/task/QueryCreateTask.js +37 -0
  102. package/js/types/Interface/api/task/QueryCreateTask.js.map +1 -0
  103. package/js/types/Interface/api/task/QueryGetAllTask.js +45 -0
  104. package/js/types/Interface/api/task/QueryGetAllTask.js.map +1 -0
  105. package/js/types/Interface/api/task/QueryGetTask.js +37 -0
  106. package/js/types/Interface/api/task/QueryGetTask.js.map +1 -0
  107. package/js/types/Interface/api/task/QueryPaginatedTask.js +87 -0
  108. package/js/types/Interface/api/task/QueryPaginatedTask.js.map +1 -0
  109. package/js/types/Interface/api/task/QueryStatsByManager.js +6 -0
  110. package/js/types/Interface/api/task/QueryStatsByManager.js.map +1 -0
  111. package/js/types/Interface/api/task/QueryStatsByRolesInCsv.js +39 -0
  112. package/js/types/Interface/api/task/QueryStatsByRolesInCsv.js.map +1 -0
  113. package/js/types/Interface/api/task/QueryStatsByServiceInCsv.js +31 -0
  114. package/js/types/Interface/api/task/QueryStatsByServiceInCsv.js.map +1 -0
  115. package/js/types/Interface/api/task/QueryStatsByTaskTypeInCsv.js +31 -0
  116. package/js/types/Interface/api/task/QueryStatsByTaskTypeInCsv.js.map +1 -0
  117. package/js/types/Interface/api/user/ParamsGetAllCollaborators.js +31 -0
  118. package/js/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -0
  119. package/js/types/Interface/models/ITask.js +6 -0
  120. package/js/types/Interface/models/ITask.js.map +1 -0
  121. package/js/types/index.js +156 -0
  122. package/js/types/index.js.map +1 -1
  123. package/js/utils/index.js +12 -0
  124. package/js/utils/index.js.map +1 -1
  125. package/js/utils/task.js +48 -0
  126. package/js/utils/task.js.map +1 -0
  127. package/package.json +1 -1
  128. package/ts/api/resources/Comment.ts +10 -0
  129. package/ts/api/resources/Task.ts +68 -0
  130. package/ts/api/resources/User.ts +3 -0
  131. package/ts/api/resources.ts +4 -0
  132. package/ts/types/Enum/InternalService.ts +30 -0
  133. package/ts/types/Enum/TaskResponseType.ts +361 -0
  134. package/ts/types/Interface/api/task/QueryCountTask.ts +23 -0
  135. package/ts/types/Interface/api/task/QueryCreateTask.ts +23 -0
  136. package/ts/types/Interface/api/task/QueryGetAllTask.ts +39 -0
  137. package/ts/types/Interface/api/task/QueryGetTask.ts +21 -0
  138. package/ts/types/Interface/api/task/QueryPaginatedTask.ts +100 -0
  139. package/ts/types/Interface/api/task/QueryStatsByManager.ts +5 -0
  140. package/ts/types/Interface/api/task/QueryStatsByRolesInCsv.ts +28 -0
  141. package/ts/types/Interface/api/task/QueryStatsByServiceInCsv.ts +16 -0
  142. package/ts/types/Interface/api/task/QueryStatsByTaskTypeInCsv.ts +16 -0
  143. package/ts/types/Interface/api/user/ParamsGetAllCollaborators.ts +13 -0
  144. package/ts/types/Interface/models/ICalendarEvent.ts +3 -0
  145. package/ts/types/Interface/models/IComment.ts +3 -0
  146. package/ts/types/Interface/models/ITask.ts +35 -0
  147. package/ts/types/index.ts +13 -0
  148. package/ts/utils/index.ts +1 -0
  149. package/ts/utils/task.ts +37 -0
@@ -3,6 +3,7 @@ import { IRoom } from './IRoom';
3
3
  import { ISociety } from './ISociety';
4
4
  import { IExercice } from './IExercice';
5
5
  import { IUser } from './IUser';
6
+ import { ITask } from './ITask';
6
7
 
7
8
  // calendarEvents
8
9
  export interface ICalendarEvent {
@@ -21,6 +22,7 @@ export interface ICalendarEvent {
21
22
  isDone: boolean;
22
23
  callState: number | null;
23
24
  idRecurrence: number | null;
25
+ idTask?: number;
24
26
  idPlace: number | null;
25
27
  createdAt?: Date | null;
26
28
  updatedAt?: Date | null;
@@ -31,4 +33,5 @@ export interface ICalendarEvent {
31
33
  society: ISociety;
32
34
  exercice: IExercice;
33
35
  calendarsEventsHasUsers: IUser[];
36
+ task?: ITask;
34
37
  }
@@ -2,6 +2,7 @@ import { ICommentType } from './ICommentType';
2
2
  import { IChannelType } from './IChannelType';
3
3
  import { IUser } from './IUser';
4
4
  import { ISupervision } from './ISupervision';
5
+ import { ITask } from '../..';
5
6
 
6
7
  // comments
7
8
  export interface IComment {
@@ -11,6 +12,7 @@ export interface IComment {
11
12
  idCommentType: number;
12
13
  idSociety?: number | null;
13
14
  idReport?: number | null;
15
+ idTask?: number | null;
14
16
  idUser?: number | null;
15
17
  idChecklist?: number | null;
16
18
  isPing?: boolean;
@@ -23,4 +25,5 @@ export interface IComment {
23
25
  channelType?: IChannelType;
24
26
  user?: IUser;
25
27
  supervision?: ISupervision;
28
+ task?: ITask;
26
29
  }
@@ -0,0 +1,35 @@
1
+ import { ICalendarEvent } from './ICalendarEvent';
2
+ import { IComment } from './IComment';
3
+ import { IMail } from './IMail';
4
+ import { INotification } from './INotification';
5
+ import { IRole } from './IRole';
6
+ import { ISociety } from './ISociety';
7
+ import { IUser } from './IUser';
8
+
9
+ export interface ITask {
10
+ id?: number,
11
+ idTaskType: number,
12
+ idUserWhoCreated: number,
13
+ idSociety: number,
14
+ description?: string | null,
15
+ idRole?: number,
16
+ idUser?: number,
17
+ idMail?: number,
18
+ deadlineAt: Date,
19
+ idUserWhoProcessed?: number,
20
+ idUserWhoRefused?: number,
21
+ processedAt?: Date,
22
+ responseType?: number,
23
+
24
+ // Associations
25
+ userWhoCreated?: IUser;
26
+ society?: ISociety;
27
+ role?: IRole;
28
+ user?: IUser;
29
+ userWhoProcessed?: IUser;
30
+ userWhoRefused?: IUser;
31
+ calendarEvent?: ICalendarEvent;
32
+ comments?: IComment[];
33
+ mail?: IMail;
34
+ notifications?: INotification[];
35
+ }
package/ts/types/index.ts CHANGED
@@ -304,6 +304,7 @@ export * from './Interface/models/IDefaultPromotion';
304
304
  export * from './Interface/models/INafCode';
305
305
  export * from './Interface/models/IMobile';
306
306
  export * from './Interface/models/ISocietyEvent';
307
+ export * from './Interface/models/ITask';
307
308
 
308
309
  // Forms
309
310
  export * from './Form/FormAuthenticate';
@@ -412,6 +413,8 @@ export * from './Enum/SalariesType';
412
413
  export * from './Enum/SheetMonthScheduleDetailType';
413
414
  export * from './Enum/ChecklistType';
414
415
  export * from './Enum/NotificationType';
416
+ export * from './Enum/TaskResponseType';
417
+ export * from './Enum/InternalService';
415
418
  export * from './Enum/SocietyTypeEvent';
416
419
 
417
420
  // Interfaces API
@@ -448,6 +451,7 @@ export * from './Interface/api/user/QueryResendConfirmationLink';
448
451
  export * from './Interface/api/user/CreateUser';
449
452
  export * from './Interface/api/user/ParamsGetAll';
450
453
  export * from './Interface/api/user/ParamsGetAllUserWithRoles';
454
+ export * from './Interface/api/user/ParamsGetAllCollaborators';
451
455
  export * from './Interface/api/user/CreateCoworker';
452
456
  export * from './Interface/api/user/QueryUserSmsConfirmation';
453
457
  export * from './Interface/api/user/Permissions';
@@ -708,6 +712,15 @@ export * from './Interface/api/mobile/UpdateMobile';
708
712
  export * from './Interface/api/mobile/QueryMobileMigration';
709
713
  export * from './Interface/api/societyEvent/QuerySocietyEvent';
710
714
  export * from './Interface/api/societyEvent/CreateSocietyEvent';
715
+ export * from './Interface/api/task/QueryGetAllTask';
716
+ export * from './Interface/api/task/QueryPaginatedTask';
717
+ export * from './Interface/api/task/QueryCreateTask';
718
+ export * from './Interface/api/task/QueryGetTask';
719
+ export * from './Interface/api/task/QueryStatsByManager';
720
+ export * from './Interface/api/task/QueryCountTask';
721
+ export * from './Interface/api/task/QueryStatsByRolesInCsv';
722
+ export * from './Interface/api/task/QueryStatsByServiceInCsv';
723
+ export * from './Interface/api/task/QueryStatsByTaskTypeInCsv';
711
724
 
712
725
  // Enums types
713
726
  export * from './Interface/enum/Util';
package/ts/utils/index.ts CHANGED
@@ -5,3 +5,4 @@ export * from './webmail';
5
5
  export * from './decorators';
6
6
  export * from './balanceSheetModule';
7
7
  export * from './siretValidation';
8
+ export * from './task';
@@ -0,0 +1,37 @@
1
+ import { Role } from '../types/Enum/Role';
2
+
3
+ const getIdRoleUsedForTask = (listRoles: number[]): number => {
4
+ let idRole = 0;
5
+ if (listRoles.includes(Role.COMMERCIAL) || listRoles.includes(Role.COMMERCIAL_MANAGER)) {
6
+ idRole = Role.COMMERCIAL;
7
+ } else if (listRoles.includes(Role.JURIDIC)) {
8
+ idRole = Role.JURIDIC;
9
+ } else if (listRoles.includes(Role.SOCIAL)) {
10
+ idRole = Role.SOCIAL;
11
+ } else if (listRoles.includes(Role.FACTURATION)) {
12
+ idRole = Role.FACTURATION;
13
+ } else if (listRoles.includes(Role.CUSTOMER_SUCCESS) || listRoles.includes(Role.CUSTOMER_SUCCESS_MANAGER)) {
14
+ idRole = Role.CUSTOMER_SUCCESS;
15
+ } else if (listRoles.includes(Role.FRONT_OFFICE) || listRoles.includes(Role.FRONT_MANAGER)) {
16
+ idRole = Role.FRONT_OFFICE;
17
+ }
18
+ return idRole;
19
+ };
20
+
21
+ const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {
22
+ let idRole = 0;
23
+ if (listRoles.includes(Role.COMMERCIAL)) {
24
+ idRole = Role.COMMERCIAL_MANAGER;
25
+ } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {
26
+ idRole = Role.MANAGER;
27
+ } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
28
+ idRole = Role.CUSTOMER_SUCCESS_MANAGER;
29
+ } else if (listRoles.includes(Role.FRONT_OFFICE)) {
30
+ idRole = Role.FRONT_MANAGER;
31
+ }
32
+ return idRole;
33
+ };
34
+
35
+ export {
36
+ getIdRoleUsedForTask, getIdRoleUsedForManagerTask,
37
+ };