@silexpert/core 0.4.246 → 0.4.249

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 (82) hide show
  1. package/es/api/resources/Loan.d.ts +2 -1
  2. package/es/api/resources/Loan.d.ts.map +1 -1
  3. package/es/api/resources/Loan.js +3 -0
  4. package/es/api/resources/Loan.js.map +1 -1
  5. package/es/api/resources/Revision.d.ts +2 -1
  6. package/es/api/resources/Revision.d.ts.map +1 -1
  7. package/es/api/resources/Revision.js +2 -2
  8. package/es/api/resources/Revision.js.map +1 -1
  9. package/es/types/Enum/PrestationOption.d.ts +27 -0
  10. package/es/types/Enum/PrestationOption.d.ts.map +1 -0
  11. package/es/types/Enum/PrestationOption.js +27 -0
  12. package/es/types/Enum/PrestationOption.js.map +1 -0
  13. package/es/types/Enum/TimeCounterType.d.ts +48 -0
  14. package/es/types/Enum/TimeCounterType.d.ts.map +1 -1
  15. package/es/types/Enum/TimeCounterType.js +54 -6
  16. package/es/types/Enum/TimeCounterType.js.map +1 -1
  17. package/es/types/Interface/api/bankAccount/DeleteTransaction.d.ts.map +1 -1
  18. package/es/types/Interface/api/bankAccount/DeleteTransaction.js +1 -4
  19. package/es/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
  20. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts +0 -1
  21. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts.map +1 -1
  22. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
  23. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
  24. package/es/types/Interface/api/mail/CreateMailParams.d.ts +1 -0
  25. package/es/types/Interface/api/mail/CreateMailParams.d.ts.map +1 -1
  26. package/es/types/Interface/api/mail/CreateMailParams.js.map +1 -1
  27. package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -0
  28. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  29. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  30. package/es/types/Interface/models/IChecklist.d.ts +2 -0
  31. package/es/types/Interface/models/IChecklist.d.ts.map +1 -1
  32. package/es/types/Interface/models/IChecklist.js.map +1 -1
  33. package/es/types/Interface/models/IMailRelation.d.ts +12 -0
  34. package/es/types/Interface/models/IMailRelation.d.ts.map +1 -0
  35. package/es/types/Interface/models/IMailRelation.js +2 -0
  36. package/es/types/Interface/models/IMailRelation.js.map +1 -0
  37. package/es/types/Interface/models/IPrestationOption.d.ts +10 -0
  38. package/es/types/Interface/models/IPrestationOption.d.ts.map +1 -0
  39. package/es/types/Interface/models/IPrestationOption.js +2 -0
  40. package/es/types/Interface/models/IPrestationOption.js.map +1 -0
  41. package/es/types/index.d.ts +3 -0
  42. package/es/types/index.d.ts.map +1 -1
  43. package/es/types/index.js +3 -0
  44. package/es/types/index.js.map +1 -1
  45. package/es/utils/date.d.ts +3 -3
  46. package/es/utils/date.d.ts.map +1 -1
  47. package/es/utils/date.js +7 -5
  48. package/es/utils/date.js.map +1 -1
  49. package/js/api/resources/Loan.js +4 -0
  50. package/js/api/resources/Loan.js.map +1 -1
  51. package/js/api/resources/Revision.js +5 -3
  52. package/js/api/resources/Revision.js.map +1 -1
  53. package/js/types/Enum/PrestationOption.js +32 -0
  54. package/js/types/Enum/PrestationOption.js.map +1 -0
  55. package/js/types/Enum/TimeCounterType.js +54 -6
  56. package/js/types/Enum/TimeCounterType.js.map +1 -1
  57. package/js/types/Interface/api/bankAccount/DeleteTransaction.js +1 -5
  58. package/js/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
  59. package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
  60. package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
  61. package/js/types/Interface/models/IMailRelation.js +6 -0
  62. package/js/types/Interface/models/IMailRelation.js.map +1 -0
  63. package/js/types/Interface/models/IPrestationOption.js +6 -0
  64. package/js/types/Interface/models/IPrestationOption.js.map +1 -0
  65. package/js/types/index.js +36 -0
  66. package/js/types/index.js.map +1 -1
  67. package/js/utils/date.js +7 -5
  68. package/js/utils/date.js.map +1 -1
  69. package/package.json +1 -1
  70. package/ts/api/resources/Loan.ts +7 -1
  71. package/ts/api/resources/Revision.ts +3 -2
  72. package/ts/types/Enum/PrestationOption.ts +26 -0
  73. package/ts/types/Enum/TimeCounterType.ts +54 -6
  74. package/ts/types/Interface/api/bankAccount/DeleteTransaction.ts +1 -3
  75. package/ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts +0 -3
  76. package/ts/types/Interface/api/mail/CreateMailParams.ts +1 -0
  77. package/ts/types/Interface/models/IAccountingTransaction.ts +1 -0
  78. package/ts/types/Interface/models/IChecklist.ts +2 -0
  79. package/ts/types/Interface/models/IMailRelation.ts +15 -0
  80. package/ts/types/Interface/models/IPrestationOption.ts +13 -0
  81. package/ts/types/index.ts +3 -0
  82. package/ts/utils/date.ts +10 -8
@@ -5,25 +5,25 @@ export const TimeCounterType = {
5
5
  id: 1,
6
6
  label: 'OnBoarding',
7
7
  aberrantTime: 60,
8
- limitedRoles: [Role.FRONT_OFFICE],
8
+ limitedRoles: [Role.FRONT_OFFICE, Role.BACK_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],
14
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_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],
20
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_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],
26
+ limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE, Role.BACK_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],
68
+ limitedRoles: [Role.FRONT_OFFICE, Role.BACK_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],
80
+ limitedRoles: [Role.FRONT_OFFICE, Role.BACK_OFFICE],
81
81
  },
82
82
  ORGANISATION: {
83
83
  id: 14,
@@ -115,4 +115,52 @@ export const TimeCounterType = {
115
115
  aberrantTime: null,
116
116
  limitedRoles: [Role.CUSTOMER_SUCCESS],
117
117
  },
118
+ BILAN: {
119
+ id: 20,
120
+ label: 'Bilan',
121
+ aberrantTime: 120,
122
+ limitedRoles: [Role.FRONT_OFFICE, Role.BACK_MANAGER, Role.FRONT_MANAGER, Role.BACK_MANAGER, Role.EXPERT_ACCOUNTANT],
123
+ },
124
+ PAYSLIP: {
125
+ id: 21,
126
+ label: 'Bulletin de paie/DSN',
127
+ aberrantTime: 30,
128
+ limitedRoles: [Role.SOCIAL],
129
+ },
130
+ SOCIAL_PARAMETER: {
131
+ id: 22,
132
+ label: 'Paramétrage social',
133
+ aberrantTime: 40,
134
+ limitedRoles: [Role.SOCIAL],
135
+ },
136
+ WORK_CONTRACT: {
137
+ id: 23,
138
+ label: 'Contrat de travail',
139
+ aberrantTime: 60,
140
+ limitedRoles: [Role.SOCIAL],
141
+ },
142
+ DPAE: {
143
+ id: 24,
144
+ label: 'DPAE',
145
+ aberrantTime: 25,
146
+ limitedRoles: [Role.SOCIAL],
147
+ },
148
+ FACTURATION: {
149
+ id: 25,
150
+ label: 'Facturation',
151
+ aberrantTime: 180,
152
+ limitedRoles: null,
153
+ },
154
+ LEGAL_DOCUMENT: {
155
+ id: 26,
156
+ label: 'Rédaction documents juridiques',
157
+ aberrantTime: 30,
158
+ limitedRoles: [Role.JURIDIC],
159
+ },
160
+ INFOGREFFE: {
161
+ id: 27,
162
+ label: 'Dépôt infogreffe ou autre',
163
+ aberrantTime: 15,
164
+ limitedRoles: [Role.JURIDIC],
165
+ },
118
166
  };
@@ -1,4 +1,4 @@
1
- import { IsEnum, IsOptional, IsPositive } from 'class-validator';
1
+ import { IsOptional } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { PartnerTransactionType } from '../../../Enum/PartnerTransactionType';
4
4
 
@@ -22,8 +22,6 @@ export class DeleteTransactions {
22
22
  deleteBankAccount?: boolean;
23
23
 
24
24
  @ApiPropertyOptional()
25
- @IsEnum(PartnerTransactionType)
26
- @IsPositive({ each: true })
27
25
  @IsOptional()
28
26
  partnerTransactionTypes?: PartnerTransactionType[];
29
27
  }
@@ -4,9 +4,6 @@ export class GetAllCalendarEvent {
4
4
  @ApiProperty()
5
5
  idUser: number;
6
6
 
7
- @ApiPropertyOptional({ default: false })
8
- areEventsEditable?: boolean;
9
-
10
7
  @ApiProperty()
11
8
  startDate: Date;
12
9
 
@@ -13,6 +13,7 @@ export interface CreateMailParams extends IMail{
13
13
  hourEvent?: string;
14
14
  idAccountantEvent?: number;
15
15
  idReport?: number;
16
+ idChecklist?: number;
16
17
  idLetter?: number;
17
18
  filesToken?: string[];
18
19
  }
@@ -16,6 +16,7 @@ import { IMachineLearningResult } from '../..';
16
16
  export interface IAccountingTransaction {
17
17
  id?: number;
18
18
  label: string | null;
19
+ originalLabel?: string | null;
19
20
  invoiceNumber: string | null;
20
21
  reference: string | null;
21
22
  dateValue: Date;
@@ -3,6 +3,7 @@ import { IUser } from './IUser';
3
3
  import { IExercice } from './IExercice';
4
4
  import { ICustomerTva } from './ICustomerTva';
5
5
  import { ChecklistTypeEnum } from '../../Enum/ChecklistType';
6
+ import { IMailRelation } from '../..';
6
7
 
7
8
  // checklist
8
9
  export interface IChecklist {
@@ -25,4 +26,5 @@ export interface IChecklist {
25
26
  checklistHasOneSupervisor?: IUser;
26
27
  exercice?: IExercice;
27
28
  checklistHasOneCustomerVat?: ICustomerTva;
29
+ mailRelation?: IMailRelation[];
28
30
  }
@@ -0,0 +1,15 @@
1
+ import { IChecklist } from './IChecklist';
2
+ import { IMail } from './IMail';
3
+
4
+ // jobs
5
+ export interface IMailRelation {
6
+ id?: number;
7
+ idChecklist?: number | null;
8
+ idMail: number;
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+
12
+ // Associations
13
+ checklist?: IChecklist;
14
+ mail?: IMail;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { IPrestation } from './IPrestation';
2
+
3
+ // prestationsOptions
4
+ export interface IPrestationOption {
5
+ id?: number;
6
+ idPrestation: number;
7
+ idOption: number;
8
+ createdAt?: Date | null;
9
+ updatedAt?: Date | null;
10
+
11
+ // Associations
12
+ prestation?: IPrestation;
13
+ }
package/ts/types/index.ts CHANGED
@@ -109,6 +109,7 @@ export * from './Interface/models/ILogBi';
109
109
  export * from './Interface/models/ILog';
110
110
  export * from './Interface/models/IMailSociety';
111
111
  export * from './Interface/models/IMailAuto';
112
+ export * from './Interface/models/IMailRelation';
112
113
  export * from './Interface/models/IMailAutoType';
113
114
  export * from './Interface/models/IMonth';
114
115
  export * from './Interface/models/INationality';
@@ -144,6 +145,7 @@ export * from './Interface/models/IPhonePrefixChild';
144
145
  export * from './Interface/models/IPrestation';
145
146
  export * from './Interface/models/IPrestationComplementary';
146
147
  export * from './Interface/models/IPrestationList';
148
+ export * from './Interface/models/IPrestationOption';
147
149
  export * from './Interface/models/IProcedure';
148
150
  export * from './Interface/models/IProduct';
149
151
  export * from './Interface/models/IQuality';
@@ -325,6 +327,7 @@ export * from './Enum/Quality';
325
327
  export * from './Enum/AbsenceType';
326
328
  export * from './Enum/Role';
327
329
  export * from './Enum/RoleDetail';
330
+ export * from './Enum/PrestationOption';
328
331
  export * from './Enum/TimeCounterType';
329
332
  export * from './Enum/MailAuto';
330
333
  export * from './Enum/Simulation';
package/ts/utils/date.ts CHANGED
@@ -1,25 +1,27 @@
1
1
  /**
2
- * @param dateStart (format YYYY-MM-DD)
3
- * @param dateEnd (format YYYY-MM-DD)
4
- * @returns object of date (09:00-10:00, 12:00-13:00 et 14:00-17:00)
2
+ * @param dateStart Date format YYYY-MM-DD HH:mm:ss
3
+ * @param dateEnd Date format YYYY-MM-DD HH:mm:ss
4
+ * @returns object of time (09:00-10:00, 12:00-13:00 et 14:00-17:00)
5
5
  */
6
6
  import {
7
7
  DateInterval, TimeInterval,
8
8
  } from '../types';
9
9
 
10
+ // TODO:UT
10
11
  export function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours:TimeInterval[]):DateInterval {
11
12
  const res:DateInterval = { ...customPayload };
12
13
  if (listHours.length > 0 && customPayload?.dateStart && customPayload?.dateEnd) {
13
14
  const dateToCompareStart = new Date(customPayload.dateStart).getTime();
14
15
  const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();
15
- const realHoursObject = listHours;
16
+ const hoursObject = listHours;
17
+ const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;
16
18
 
17
19
  // on cherche la bonne specialhour pour comparer les horaires
18
- const realHoursOfPeriod = realHoursObject.filter((sh) => (sh.endTime && (dateToCompareStart - new Date(sh.endTime).getTime() <= 0)) && (sh.startTime && (dateToCompareEnd - new Date(sh.startTime).getTime() >= 0)));
20
+ const hoursOfPeriod = hoursObject.filter((h) => (h.endTime && (dateToCompareStart - new Date(`${textDate} ${h.endTime}`).getTime() <= 0)) && (h.startTime && (dateToCompareEnd - new Date(`${textDate} ${h.startTime}`).getTime() >= 0)));
19
21
 
20
- if (realHoursOfPeriod?.length > 0 && realHoursOfPeriod[0].startTime && realHoursOfPeriod[0].endTime) {
21
- const dateStart = new Date(realHoursOfPeriod[0].startTime).getTime();
22
- const dateEnd = new Date(realHoursOfPeriod[0].endTime).getTime();
22
+ if (hoursOfPeriod?.length > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
23
+ const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
24
+ const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();
23
25
 
24
26
  // on check si les horaires de l'event sont dans les horaires du collab sinon on les fait commencer à l'heure à laquelle il s'est connecté
25
27
  res.dateStart = !((dateToCompareStart - dateStart) >= 0 && (dateToCompareStart - dateEnd) <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);