@silexpert/core 1.1.272 → 1.1.274
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/Revision.d.ts +2 -1
- package/dist/cjs/api/resources/Revision.d.ts.map +1 -1
- package/dist/cjs/api/resources/Revision.js +3 -0
- package/dist/cjs/api/resources/Revision.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +1 -0
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +1 -0
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.d.ts +13 -7
- package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TimeSlot.js +50 -7
- package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/cjs/types/Interface/api/revision/Query.d.ts +7 -0
- package/dist/cjs/types/Interface/api/revision/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/revision/Query.js +33 -1
- package/dist/cjs/types/Interface/api/revision/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/revision/Read.d.ts +3 -0
- package/dist/cjs/types/Interface/api/revision/Read.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/revision/Read.js.map +1 -1
- package/dist/cjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.d.ts +2 -1
- package/dist/cjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.js +11 -4
- package/dist/cjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +10 -1
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/mjs/api/resources/Revision.d.ts +2 -1
- package/dist/mjs/api/resources/Revision.d.ts.map +1 -1
- package/dist/mjs/api/resources/Revision.js +3 -0
- package/dist/mjs/api/resources/Revision.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +1 -0
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +1 -0
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.d.ts +13 -7
- package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TimeSlot.js +50 -7
- package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
- package/dist/mjs/types/Interface/api/revision/Query.d.ts +7 -0
- package/dist/mjs/types/Interface/api/revision/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/revision/Query.js +36 -0
- package/dist/mjs/types/Interface/api/revision/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/revision/Read.d.ts +3 -0
- package/dist/mjs/types/Interface/api/revision/Read.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/revision/Read.js.map +1 -1
- package/dist/mjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.d.ts +2 -1
- package/dist/mjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.js +13 -5
- package/dist/mjs/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +9 -1
- package/dist/mjs/utils/email.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Revision.ts +5 -1
- package/ts/types/Enum/RoleDetail.ts +1 -0
- package/ts/types/Enum/TimeSlot.ts +61 -9
- package/ts/types/Interface/api/revision/Query.ts +26 -0
- package/ts/types/Interface/api/revision/Read.ts +4 -0
- package/ts/types/Interface/api/workingSchedule/QueryAvailableTimeSlot.ts +12 -6
- package/ts/types/Interface/models/IUser.ts +2 -0
- package/ts/utils/email.ts +10 -1
|
@@ -5,13 +5,27 @@ export enum TimeSlot {
|
|
|
5
5
|
ONBOARDING_SHORT = 2,
|
|
6
6
|
BILAN = 3,
|
|
7
7
|
TVA = 4,
|
|
8
|
+
TVA_MANAGER = 5,
|
|
9
|
+
BALANCESHEET_OR_TIP = 6,
|
|
10
|
+
ACCOUNTING_RDV = 7,
|
|
11
|
+
BILLING = 8,
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
export type TimeSlotDetailType = {
|
|
15
|
+
id: number;
|
|
16
|
+
name: string;
|
|
17
|
+
internalName: string;
|
|
18
|
+
duration: number;
|
|
19
|
+
idRole: number[];
|
|
20
|
+
forWholeService?: boolean
|
|
21
|
+
idRoleExcluded?: number[];
|
|
22
|
+
};
|
|
10
23
|
|
|
11
|
-
export const TimeSlotDetail = [
|
|
24
|
+
export const TimeSlotDetail:TimeSlotDetailType[] = [
|
|
12
25
|
{
|
|
13
26
|
id: TimeSlot.ONBOARDING,
|
|
14
27
|
name: 'OnBoarding',
|
|
28
|
+
internalName: 'OnBoarding',
|
|
15
29
|
duration: 45,
|
|
16
30
|
idRole: [Role.ON_BOARDER],
|
|
17
31
|
forWholeService: true,
|
|
@@ -19,22 +33,60 @@ export const TimeSlotDetail = [
|
|
|
19
33
|
{
|
|
20
34
|
id: TimeSlot.ONBOARDING_SHORT,
|
|
21
35
|
name: 'OnBoarding court',
|
|
36
|
+
internalName: 'OnBoarding',
|
|
22
37
|
duration: 45,
|
|
23
38
|
idRole: [Role.ON_BOARDER],
|
|
24
39
|
forWholeService: true,
|
|
25
40
|
},
|
|
41
|
+
// {
|
|
42
|
+
// id: TimeSlot.BILAN,
|
|
43
|
+
// name: 'Bilan',
|
|
44
|
+
// internalName: 'Bilan',
|
|
45
|
+
// duration: 60,
|
|
46
|
+
// idRole: [Role.ACCOUNTANT],
|
|
47
|
+
// forWholeService: false,
|
|
48
|
+
// },
|
|
49
|
+
// {
|
|
50
|
+
// id: TimeSlot.TVA,
|
|
51
|
+
// name: 'Tva',
|
|
52
|
+
// internalName: 'Tva',
|
|
53
|
+
// duration: 15,
|
|
54
|
+
// idRole:[Role.ACCOUNTANT],
|
|
55
|
+
// idRoleExcluded:[Role.MANAGER],
|
|
56
|
+
// forWholeService: false,
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// id: TimeSlot.TVA_MANAGER,
|
|
60
|
+
// name: 'Tva',
|
|
61
|
+
// internalName: 'Tva Manager',
|
|
62
|
+
// duration: 15,
|
|
63
|
+
// idRole:[Role.ACCOUNTANT, Role.MANAGER],
|
|
64
|
+
// forWholeService: false,
|
|
65
|
+
// },
|
|
66
|
+
// {
|
|
67
|
+
// id: TimeSlot.BALANCESHEET_OR_TIP,
|
|
68
|
+
// name: 'Bilan ou Conseil',
|
|
69
|
+
// internalName: 'Bilan ou Conseil',
|
|
70
|
+
// duration: 30,
|
|
71
|
+
// idRole:[Role.ACCOUNTANT],
|
|
72
|
+
// idRoleExcluded:[Role.MANAGER],
|
|
73
|
+
// forWholeService: false,
|
|
74
|
+
// },
|
|
26
75
|
{
|
|
27
|
-
id: TimeSlot.
|
|
28
|
-
name: '
|
|
29
|
-
|
|
30
|
-
|
|
76
|
+
id: TimeSlot.ACCOUNTING_RDV,
|
|
77
|
+
name: 'Rdv comptable',
|
|
78
|
+
internalName: 'Rdv comptable',
|
|
79
|
+
duration: 30,
|
|
80
|
+
idRole:[Role.ACCOUNTANT],
|
|
81
|
+
idRoleExcluded:[Role.MANAGER],
|
|
31
82
|
forWholeService: false,
|
|
32
83
|
},
|
|
33
84
|
{
|
|
34
|
-
id: TimeSlot.
|
|
35
|
-
name: '
|
|
36
|
-
|
|
37
|
-
|
|
85
|
+
id: TimeSlot.BILLING,
|
|
86
|
+
name: 'Facturation',
|
|
87
|
+
internalName: 'Facturation',
|
|
88
|
+
duration: 45,
|
|
89
|
+
idRole:[Role.FACTURATION],
|
|
38
90
|
forWholeService: false,
|
|
39
91
|
},
|
|
40
92
|
];
|
|
@@ -157,6 +157,32 @@ export class QueryRevisionMergeIntoAccount {
|
|
|
157
157
|
idAccountingEntries?: Array<number>;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
export class QueryRevisionMergeIntoThirdParty {
|
|
161
|
+
@ApiProperty()
|
|
162
|
+
@IsDate()
|
|
163
|
+
startDate: Date;
|
|
164
|
+
|
|
165
|
+
@ApiProperty()
|
|
166
|
+
@IsDate()
|
|
167
|
+
endDate: Date;
|
|
168
|
+
|
|
169
|
+
@ApiProperty()
|
|
170
|
+
@IsNumber()
|
|
171
|
+
idSociety: number;
|
|
172
|
+
|
|
173
|
+
@ApiPropertyOptional()
|
|
174
|
+
@IsArray()
|
|
175
|
+
@IsOptional()
|
|
176
|
+
@IsInt({ each:true })
|
|
177
|
+
idThirdParties?: Array<number>;
|
|
178
|
+
|
|
179
|
+
@ApiPropertyOptional()
|
|
180
|
+
@IsArray()
|
|
181
|
+
@IsOptional()
|
|
182
|
+
@IsInt({ each:true })
|
|
183
|
+
idAccountingEntries?: Array<number>;
|
|
184
|
+
}
|
|
185
|
+
|
|
160
186
|
export class QueryRevisionPaginate {
|
|
161
187
|
@ApiProperty()
|
|
162
188
|
@IsDate()
|
|
@@ -65,6 +65,10 @@ export interface ReadRevisionMergeIntoAccount {
|
|
|
65
65
|
updated: number;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
export interface ReadRevisionMergeIntoThirdParty {
|
|
69
|
+
updated: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
export interface ReadRevisionTransactionDetail {
|
|
69
73
|
id: number;
|
|
70
74
|
invoiceNumber: string | null;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IsDate,
|
|
3
|
-
|
|
3
|
+
IsInt,
|
|
4
4
|
IsOptional,
|
|
5
5
|
} from 'class-validator';
|
|
6
6
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
7
7
|
|
|
8
8
|
export class QueryAvailableTimeSlot {
|
|
9
|
-
@
|
|
10
|
-
@
|
|
11
|
-
|
|
9
|
+
@ApiPropertyOptional()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsInt()
|
|
12
|
+
idUser?: number;
|
|
13
|
+
|
|
14
|
+
@ApiPropertyOptional()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
@IsInt()
|
|
17
|
+
idSociety?: number ;
|
|
12
18
|
|
|
13
19
|
@ApiProperty()
|
|
14
20
|
@IsDate()
|
|
@@ -20,11 +26,11 @@ export class QueryAvailableTimeSlot {
|
|
|
20
26
|
|
|
21
27
|
@ApiPropertyOptional()
|
|
22
28
|
@IsOptional()
|
|
23
|
-
@
|
|
29
|
+
@IsInt()
|
|
24
30
|
duration?: number ;
|
|
25
31
|
|
|
26
32
|
@ApiPropertyOptional()
|
|
27
33
|
@IsOptional()
|
|
28
|
-
@
|
|
34
|
+
@IsInt()
|
|
29
35
|
idType?: number;
|
|
30
36
|
}
|
|
@@ -22,6 +22,7 @@ import { ICountry } from './ICountry';
|
|
|
22
22
|
import { INationality } from './INationality';
|
|
23
23
|
import { IUserBrand } from './IUserBrand';
|
|
24
24
|
import { ICollaboraterDetail } from './ICollaboraterDetail';
|
|
25
|
+
import { IUserTimeSlot } from './IUserTimeSlot';
|
|
25
26
|
|
|
26
27
|
type isAny<T> = T | any;
|
|
27
28
|
|
|
@@ -130,5 +131,6 @@ export interface IUser {
|
|
|
130
131
|
countryLiving?: ICountry;
|
|
131
132
|
nationality?: INationality;
|
|
132
133
|
usersBrands?: IUserBrand[];
|
|
134
|
+
usersTimeSlots?: IUserTimeSlot[];
|
|
133
135
|
collaboraterDetails?: ICollaboraterDetail;
|
|
134
136
|
}
|
package/ts/utils/email.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// import { orderBy as orderByLodash } from 'lodash';
|
|
3
3
|
import { EntityType } from '../types/Enum/EntityType';
|
|
4
4
|
import { Role } from '../types/Enum/Role';
|
|
5
|
+
import { TimeSlot } from '../types/Enum/TimeSlot';
|
|
5
6
|
import { IUser } from '../types/Interface/models/IUser';
|
|
6
7
|
import { getBrandConfig, isItThisEnv } from './brands';
|
|
7
8
|
import { signatureTemplate } from './email/templates/signature';
|
|
@@ -137,7 +138,7 @@ function getPhoneSignature(user:any) {
|
|
|
137
138
|
|
|
138
139
|
export function generateSignature(params: any): string {
|
|
139
140
|
const {
|
|
140
|
-
forceRole = null, idTypeBrand = 1, ...otherParams
|
|
141
|
+
forceRole = null, idTypeBrand = 1, society, ...otherParams
|
|
141
142
|
} = params;
|
|
142
143
|
let {
|
|
143
144
|
user,
|
|
@@ -270,6 +271,14 @@ export function generateSignature(params: any): string {
|
|
|
270
271
|
phoneSignature = getPhoneSignature(user);
|
|
271
272
|
}
|
|
272
273
|
|
|
274
|
+
// Si on a une société, alors on remplace le lien calendly de base par le lien calendly interne
|
|
275
|
+
// actuellement, géré uniquement pour les comptables
|
|
276
|
+
// on n'affiche uniquement si le comptable a bien des créneaux horaires dédiés à ce type de rdv
|
|
277
|
+
if (society?.id && user.roles.some((r: any) => r.id === Role.FRONT_OFFICE) && user?.usersTimeSlots?.length) {
|
|
278
|
+
const urlApp = getBrandConfig({ objectWaited: 'urlApp' }) as unknown as string;
|
|
279
|
+
user.calendlyUrl = `${urlApp}/appointment?uuid=${society?.externalId ? society.externalId : ''}&idType=${TimeSlot.ACCOUNTING_RDV}`;
|
|
280
|
+
}
|
|
281
|
+
|
|
273
282
|
return ejs.render(signatureTemplate, {
|
|
274
283
|
forceRole,
|
|
275
284
|
isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,
|