@silexpert/core 1.1.184 → 1.1.186
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/Card.d.ts +2 -2
- package/dist/cjs/api/resources/Card.d.ts.map +1 -1
- package/dist/cjs/api/resources/Card.js +4 -4
- package/dist/cjs/api/resources/Card.js.map +1 -1
- package/dist/cjs/api/resources/Contest.d.ts +12 -0
- package/dist/cjs/api/resources/Contest.d.ts.map +1 -0
- package/dist/cjs/api/resources/Contest.js +43 -0
- package/dist/cjs/api/resources/Contest.js.map +1 -0
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.d.ts +7 -0
- package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.js +3 -0
- package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.js +29 -28
- package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +3 -3
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Enum/PriceGridPourcentage.js +48 -48
- package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/cjs/types/Interface/api/contest/Create.d.ts +26 -0
- package/dist/cjs/types/Interface/api/contest/Create.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Create.js +102 -0
- package/dist/cjs/types/Interface/api/contest/Create.js.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Query.d.ts +7 -0
- package/dist/cjs/types/Interface/api/contest/Query.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Query.js +38 -0
- package/dist/cjs/types/Interface/api/contest/Query.js.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Read.d.ts +6 -0
- package/dist/cjs/types/Interface/api/contest/Read.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/contest/Read.js +3 -0
- package/dist/cjs/types/Interface/api/contest/Read.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUserContest.d.ts +20 -0
- package/dist/cjs/types/Interface/models/IUserContest.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IUserContest.js +3 -0
- package/dist/cjs/types/Interface/models/IUserContest.js.map +1 -0
- package/dist/cjs/types/Interface/models/IVoteContest.d.ts +14 -0
- package/dist/cjs/types/Interface/models/IVoteContest.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IVoteContest.js +3 -0
- package/dist/cjs/types/Interface/models/IVoteContest.js.map +1 -0
- package/dist/cjs/types/index.d.ts +5 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/email/templates/signature.d.ts.map +1 -1
- package/dist/cjs/utils/email/templates/signature.js +42 -10
- 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 +9 -1
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/cjs/utils/prestation.js +1 -1
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/mjs/api/resources/Card.d.ts +2 -2
- package/dist/mjs/api/resources/Card.d.ts.map +1 -1
- package/dist/mjs/api/resources/Card.js +10 -4
- package/dist/mjs/api/resources/Card.js.map +1 -1
- package/dist/mjs/api/resources/Contest.d.ts +12 -0
- package/dist/mjs/api/resources/Contest.d.ts.map +1 -0
- package/dist/mjs/api/resources/Contest.js +39 -0
- package/dist/mjs/api/resources/Contest.js.map +1 -0
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.d.ts +7 -0
- package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.js +3 -0
- package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.js +29 -28
- package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +3 -3
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Enum/PriceGridPourcentage.js +48 -48
- package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
- package/dist/mjs/types/Interface/api/contest/Create.d.ts +26 -0
- package/dist/mjs/types/Interface/api/contest/Create.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Create.js +114 -0
- package/dist/mjs/types/Interface/api/contest/Create.js.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Query.d.ts +7 -0
- package/dist/mjs/types/Interface/api/contest/Query.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Query.js +38 -0
- package/dist/mjs/types/Interface/api/contest/Query.js.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Read.d.ts +6 -0
- package/dist/mjs/types/Interface/api/contest/Read.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/contest/Read.js +2 -0
- package/dist/mjs/types/Interface/api/contest/Read.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUserContest.d.ts +20 -0
- package/dist/mjs/types/Interface/models/IUserContest.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IUserContest.js +2 -0
- package/dist/mjs/types/Interface/models/IUserContest.js.map +1 -0
- package/dist/mjs/types/Interface/models/IVoteContest.d.ts +14 -0
- package/dist/mjs/types/Interface/models/IVoteContest.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IVoteContest.js +2 -0
- package/dist/mjs/types/Interface/models/IVoteContest.js.map +1 -0
- package/dist/mjs/types/index.d.ts +5 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +5 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/email/templates/signature.d.ts.map +1 -1
- package/dist/mjs/utils/email/templates/signature.js +42 -10
- 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 +18 -1
- package/dist/mjs/utils/email.js.map +1 -1
- package/dist/mjs/utils/prestation.js +1 -1
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Card.ts +10 -4
- package/ts/api/resources/Contest.ts +47 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/BrandClementine.ts +3 -0
- package/ts/types/Enum/BrandPourcentage.ts +29 -28
- package/ts/types/Enum/PrestationType.ts +3 -3
- package/ts/types/Enum/PriceGridPourcentage.ts +48 -48
- package/ts/types/Interface/api/contest/Create.ts +69 -0
- package/ts/types/Interface/api/contest/Query.ts +20 -0
- package/ts/types/Interface/api/contest/Read.ts +6 -0
- package/ts/types/Interface/models/IUserContest.ts +22 -0
- package/ts/types/Interface/models/IVoteContest.ts +16 -0
- package/ts/types/index.ts +6 -1
- package/ts/utils/email/templates/signature.ts +43 -10
- package/ts/utils/email.ts +18 -1
- package/ts/utils/prestation.ts +1 -1
|
@@ -100,20 +100,20 @@ export const PriceGridPourcentage = [
|
|
|
100
100
|
],
|
|
101
101
|
turnoverMonthly: [
|
|
102
102
|
{
|
|
103
|
-
turnoverValue:
|
|
104
|
-
price:
|
|
103
|
+
turnoverValue: 150000,
|
|
104
|
+
price: 149,
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
turnoverValue:
|
|
108
|
-
price:
|
|
107
|
+
turnoverValue: 300000,
|
|
108
|
+
price: 209,
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
turnoverValue:
|
|
112
|
-
price:
|
|
111
|
+
turnoverValue: 500000,
|
|
112
|
+
price: 269,
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
turnoverValue:
|
|
116
|
-
price:
|
|
115
|
+
turnoverValue: 750000,
|
|
116
|
+
price: 349,
|
|
117
117
|
},
|
|
118
118
|
],
|
|
119
119
|
vatRegimeMonthly: [
|
|
@@ -286,20 +286,20 @@ export const PriceGridPourcentage = [
|
|
|
286
286
|
],
|
|
287
287
|
turnoverMonthly: [
|
|
288
288
|
{
|
|
289
|
-
turnoverValue:
|
|
290
|
-
price:
|
|
289
|
+
turnoverValue: 150000,
|
|
290
|
+
price: 149,
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
|
-
turnoverValue:
|
|
294
|
-
price:
|
|
293
|
+
turnoverValue: 300000,
|
|
294
|
+
price: 209,
|
|
295
295
|
},
|
|
296
296
|
{
|
|
297
|
-
turnoverValue:
|
|
298
|
-
price:
|
|
297
|
+
turnoverValue: 500000,
|
|
298
|
+
price: 269,
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
turnoverValue:
|
|
302
|
-
price:
|
|
301
|
+
turnoverValue: 750000,
|
|
302
|
+
price: 349,
|
|
303
303
|
},
|
|
304
304
|
],
|
|
305
305
|
vatRegimeMonthly: [
|
|
@@ -472,20 +472,20 @@ export const PriceGridPourcentage = [
|
|
|
472
472
|
],
|
|
473
473
|
turnoverMonthly: [
|
|
474
474
|
{
|
|
475
|
-
turnoverValue:
|
|
476
|
-
price:
|
|
475
|
+
turnoverValue: 150000,
|
|
476
|
+
price: 149,
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
|
-
turnoverValue:
|
|
480
|
-
price:
|
|
479
|
+
turnoverValue: 300000,
|
|
480
|
+
price: 209,
|
|
481
481
|
},
|
|
482
482
|
{
|
|
483
|
-
turnoverValue:
|
|
484
|
-
price:
|
|
483
|
+
turnoverValue: 500000,
|
|
484
|
+
price: 269,
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
|
-
turnoverValue:
|
|
488
|
-
price:
|
|
487
|
+
turnoverValue: 750000,
|
|
488
|
+
price: 349,
|
|
489
489
|
},
|
|
490
490
|
],
|
|
491
491
|
vatRegimeMonthly: [
|
|
@@ -658,20 +658,20 @@ export const PriceGridPourcentage = [
|
|
|
658
658
|
],
|
|
659
659
|
turnoverMonthly: [
|
|
660
660
|
{
|
|
661
|
-
turnoverValue:
|
|
662
|
-
price:
|
|
661
|
+
turnoverValue: 150000,
|
|
662
|
+
price: 149,
|
|
663
663
|
},
|
|
664
664
|
{
|
|
665
|
-
turnoverValue:
|
|
666
|
-
price:
|
|
665
|
+
turnoverValue: 300000,
|
|
666
|
+
price: 209,
|
|
667
667
|
},
|
|
668
668
|
{
|
|
669
|
-
turnoverValue:
|
|
670
|
-
price:
|
|
669
|
+
turnoverValue: 500000,
|
|
670
|
+
price: 269,
|
|
671
671
|
},
|
|
672
672
|
{
|
|
673
|
-
turnoverValue:
|
|
674
|
-
price:
|
|
673
|
+
turnoverValue: 750000,
|
|
674
|
+
price: 349,
|
|
675
675
|
},
|
|
676
676
|
],
|
|
677
677
|
vatRegimeMonthly: [
|
|
@@ -844,20 +844,20 @@ export const PriceGridPourcentage = [
|
|
|
844
844
|
],
|
|
845
845
|
turnoverMonthly: [
|
|
846
846
|
{
|
|
847
|
-
turnoverValue:
|
|
848
|
-
price:
|
|
847
|
+
turnoverValue: 150000,
|
|
848
|
+
price: 149,
|
|
849
849
|
},
|
|
850
850
|
{
|
|
851
|
-
turnoverValue:
|
|
852
|
-
price:
|
|
851
|
+
turnoverValue: 300000,
|
|
852
|
+
price: 209,
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
|
-
turnoverValue:
|
|
856
|
-
price:
|
|
855
|
+
turnoverValue: 500000,
|
|
856
|
+
price: 269,
|
|
857
857
|
},
|
|
858
858
|
{
|
|
859
|
-
turnoverValue:
|
|
860
|
-
price:
|
|
859
|
+
turnoverValue: 750000,
|
|
860
|
+
price: 349,
|
|
861
861
|
},
|
|
862
862
|
],
|
|
863
863
|
vatRegimeMonthly: [
|
|
@@ -1030,20 +1030,20 @@ export const PriceGridPourcentage = [
|
|
|
1030
1030
|
],
|
|
1031
1031
|
turnoverMonthly: [
|
|
1032
1032
|
{
|
|
1033
|
-
turnoverValue:
|
|
1034
|
-
price:
|
|
1033
|
+
turnoverValue: 150000,
|
|
1034
|
+
price: 149,
|
|
1035
1035
|
},
|
|
1036
1036
|
{
|
|
1037
|
-
turnoverValue:
|
|
1038
|
-
price:
|
|
1037
|
+
turnoverValue: 300000,
|
|
1038
|
+
price: 209,
|
|
1039
1039
|
},
|
|
1040
1040
|
{
|
|
1041
|
-
turnoverValue:
|
|
1042
|
-
price:
|
|
1041
|
+
turnoverValue: 500000,
|
|
1042
|
+
price: 269,
|
|
1043
1043
|
},
|
|
1044
1044
|
{
|
|
1045
|
-
turnoverValue:
|
|
1046
|
-
price:
|
|
1045
|
+
turnoverValue: 750000,
|
|
1046
|
+
price: 349,
|
|
1047
1047
|
},
|
|
1048
1048
|
],
|
|
1049
1049
|
vatRegimeMonthly: [
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IsOptional, IsBoolean } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { TFile } from '../file/TFile';
|
|
4
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
5
|
+
|
|
6
|
+
export class CreateUserContest {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
firstname: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
lastname: string;
|
|
12
|
+
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
email: string;
|
|
15
|
+
|
|
16
|
+
@ApiProperty()
|
|
17
|
+
phone: string;
|
|
18
|
+
|
|
19
|
+
@ApiProperty()
|
|
20
|
+
societyName: string;
|
|
21
|
+
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
siren: string;
|
|
24
|
+
|
|
25
|
+
@ApiPropertyOptional()
|
|
26
|
+
productDescription?: string;
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional()
|
|
29
|
+
societyDescription?: string;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
photo?: TFile;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
logo?: TFile;
|
|
38
|
+
|
|
39
|
+
@ApiPropertyOptional()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@IsBoolean()
|
|
42
|
+
@ToBoolean()
|
|
43
|
+
isTestMode?: boolean;
|
|
44
|
+
|
|
45
|
+
@ApiPropertyOptional()
|
|
46
|
+
recaptcha?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class CreateCheckVote {
|
|
50
|
+
@ApiProperty()
|
|
51
|
+
email: string;
|
|
52
|
+
|
|
53
|
+
@ApiProperty()
|
|
54
|
+
ipAddress: string;
|
|
55
|
+
|
|
56
|
+
@ApiProperty()
|
|
57
|
+
idVoter: number;
|
|
58
|
+
|
|
59
|
+
@ApiPropertyOptional()
|
|
60
|
+
recaptcha?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export class CreateVoteContest {
|
|
64
|
+
@ApiProperty()
|
|
65
|
+
emailHash: string;
|
|
66
|
+
|
|
67
|
+
@ApiProperty()
|
|
68
|
+
userHash: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IsBoolean, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
|
|
5
|
+
export class QueryFetchUserContest {
|
|
6
|
+
@ApiPropertyOptional()
|
|
7
|
+
search?: string;
|
|
8
|
+
|
|
9
|
+
@ApiPropertyOptional()
|
|
10
|
+
orderBy?: string;
|
|
11
|
+
|
|
12
|
+
@ApiPropertyOptional()
|
|
13
|
+
@IsBoolean()
|
|
14
|
+
@ToBoolean()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
top?: boolean | null;
|
|
17
|
+
|
|
18
|
+
@ApiPropertyOptional()
|
|
19
|
+
idToExclude?: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IVoteContest } from './IVoteContest';
|
|
2
|
+
|
|
3
|
+
export interface IUserContest {
|
|
4
|
+
id?: number;
|
|
5
|
+
firstname: string;
|
|
6
|
+
lastname: string;
|
|
7
|
+
email: string;
|
|
8
|
+
hash: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
societyName: string;
|
|
11
|
+
siren: string;
|
|
12
|
+
productDescription?: string | null;
|
|
13
|
+
societyDescription?: string | null;
|
|
14
|
+
tokenPhoto?: string | null;
|
|
15
|
+
tokenLogo?: string | null;
|
|
16
|
+
createdAt?: Date | null;
|
|
17
|
+
updatedAt?: Date | null;
|
|
18
|
+
deletedAt?: Date | null;
|
|
19
|
+
|
|
20
|
+
// associations
|
|
21
|
+
voteContests: IVoteContest[]
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUser } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface IVoteContest {
|
|
4
|
+
id?: number;
|
|
5
|
+
emailVoter: string;
|
|
6
|
+
emailHash: string;
|
|
7
|
+
ipAddress: string;
|
|
8
|
+
hasVoteBeenCompleted: boolean
|
|
9
|
+
idUserVoteFor?: number | null;
|
|
10
|
+
createdAt?: Date | null;
|
|
11
|
+
updatedAt?: Date | null;
|
|
12
|
+
deletedAt?: Date | null;
|
|
13
|
+
|
|
14
|
+
// Associations
|
|
15
|
+
userVoteFor?: IUser;
|
|
16
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -320,6 +320,9 @@ export * from './Interface/models/IBalanceSheetHistory';
|
|
|
320
320
|
export * from './Interface/models/ICard';
|
|
321
321
|
export * from './Interface/models/ICardHistory';
|
|
322
322
|
export * from './Interface/models/IDubiousCustomer';
|
|
323
|
+
export * from './Interface/models/IUserContest';
|
|
324
|
+
export * from './Interface/models/IVoteContest';
|
|
325
|
+
|
|
323
326
|
|
|
324
327
|
// Schemas
|
|
325
328
|
export * from './Interface/schemas/IRegistrationDetail';
|
|
@@ -998,7 +1001,9 @@ export * from './Interface/api/card/QueryUserCardsStats';
|
|
|
998
1001
|
export * from './Interface/api/card/UpdateCard';
|
|
999
1002
|
export * from './Interface/api/notion/NotionResponse';
|
|
1000
1003
|
export * from './Interface/api/IntermediateManagementRebate';
|
|
1001
|
-
|
|
1004
|
+
export * from './Interface/api/contest/Create';
|
|
1005
|
+
export * from './Interface/api/contest/Query';
|
|
1006
|
+
export * from './Interface/api/contest/Read';
|
|
1002
1007
|
// Enums types
|
|
1003
1008
|
export * from './Interface/enum/Util';
|
|
1004
1009
|
export * from './Interface/enum/Date';
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>
|
|
2
|
+
<p style="font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;">
|
|
3
|
+
<span style="color: #A0A0A0">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>
|
|
4
|
+
</p>
|
|
5
|
+
<% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %>
|
|
6
|
+
<p style="font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;">
|
|
7
|
+
<span style="color: #A0A0A0">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>
|
|
8
|
+
</p>
|
|
9
|
+
<% } %>
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
const logoClementine = `<% if (commercialName === 'Clementine') { %><tr>
|
|
2
13
|
<td
|
|
3
14
|
colspan="3"
|
|
4
15
|
class="logo"
|
|
@@ -17,17 +28,27 @@ const avatar = `<% if (!forceRole && user?.avatar?.token) { %>
|
|
|
17
28
|
class="avatar"
|
|
18
29
|
style="text-align:center; padding: 20px 0 20px 20px; position: relative;"
|
|
19
30
|
width="100">
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
31
|
+
<% if(commercialName === 'Clementine') { %>
|
|
32
|
+
<p style="padding: 20px;background-image: url('https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_quotes.png');background-size: 26%;background-position: 81% -3%;background-repeat: no-repeat;">
|
|
33
|
+
<img
|
|
34
|
+
style="max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px"
|
|
35
|
+
alt="Avatar"
|
|
36
|
+
src="<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>"
|
|
37
|
+
/>
|
|
38
|
+
</p>
|
|
39
|
+
<% } else { %>
|
|
40
|
+
<p style="padding: 20px;">
|
|
41
|
+
<img
|
|
42
|
+
style="max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px"
|
|
23
43
|
alt="Avatar"
|
|
24
44
|
src="<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>"
|
|
25
|
-
|
|
26
|
-
|
|
45
|
+
/>
|
|
46
|
+
</p>
|
|
47
|
+
<% } %>
|
|
27
48
|
</td>
|
|
28
49
|
<% } %>`;
|
|
29
50
|
|
|
30
|
-
const footer = `<% if(
|
|
51
|
+
const footer = `<% if(commercialName === 'Clementine') { %>
|
|
31
52
|
<tr>
|
|
32
53
|
<td
|
|
33
54
|
style="clear:both; padding-top: 20px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;"
|
|
@@ -95,7 +116,7 @@ const footer = `<% if(brandName === 'Clementine') { %>
|
|
|
95
116
|
</table>
|
|
96
117
|
</td>
|
|
97
118
|
</tr>
|
|
98
|
-
<% } else if(
|
|
119
|
+
<% } else if(commercialName === 'Pourcentage') { %>
|
|
99
120
|
<tr>
|
|
100
121
|
<td
|
|
101
122
|
style="clear:both; padding-top: 20px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;"
|
|
@@ -111,13 +132,25 @@ const footer = `<% if(brandName === 'Clementine') { %>
|
|
|
111
132
|
alt="Connexion"> Connexion
|
|
112
133
|
</a>
|
|
113
134
|
</td>
|
|
135
|
+
<td style="text-align: right; vertical-align: middle; color: #6E6E71" width="430">
|
|
136
|
+
<span>Télécharger l'app</span>
|
|
137
|
+
<a href="https://apps.apple.com/fr/app/pourcentage-fr/id1631156043" target="_blank" style="vertical-align: middle; margin-left: 10px"><img
|
|
138
|
+
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png"
|
|
139
|
+
alt="App Store"
|
|
140
|
+
style="width: 20px"></a>
|
|
141
|
+
<a href="https://play.google.com/store/apps/details?id=com.clementine.pourcentage" target="_blank" style="vertical-align: middle; margin-left: 10px"><img
|
|
142
|
+
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png"
|
|
143
|
+
alt="Play Store"
|
|
144
|
+
style="width: 20px"></a>
|
|
145
|
+
</td>
|
|
146
|
+
</tr>
|
|
114
147
|
</table>
|
|
115
148
|
</td>
|
|
116
149
|
</tr>
|
|
117
150
|
<% } %>
|
|
118
151
|
`;
|
|
119
152
|
|
|
120
|
-
export const signatureTemplate =
|
|
153
|
+
export const signatureTemplate = `${newIban}<table
|
|
121
154
|
border="0"
|
|
122
155
|
cellpadding="0"
|
|
123
156
|
cellspacing="0"
|
|
@@ -179,7 +212,7 @@ ${logoClementine}
|
|
|
179
212
|
<% if(user.calendlyUrl) { %>
|
|
180
213
|
<a href="<%= user.calendlyUrl %>" style="display: inline-block; color:#6E6E71;" target="_blank">
|
|
181
214
|
<img
|
|
182
|
-
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%=
|
|
215
|
+
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png"
|
|
183
216
|
alt="Demande de rdv téléphonique">
|
|
184
217
|
</a>
|
|
185
218
|
<% } %>
|
package/ts/utils/email.ts
CHANGED
|
@@ -166,6 +166,18 @@ export function generateSignature(params: any): string {
|
|
|
166
166
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
167
167
|
objectWaited: 'name',
|
|
168
168
|
}) as unknown as string;
|
|
169
|
+
const commercialName = getBrandConfig({
|
|
170
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
171
|
+
objectWaited: 'commercialName',
|
|
172
|
+
}) as unknown as string;
|
|
173
|
+
const iban = getBrandConfig({
|
|
174
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
175
|
+
objectWaited: 'bank.IBAN',
|
|
176
|
+
}) as unknown as string;
|
|
177
|
+
const bic = getBrandConfig({
|
|
178
|
+
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
179
|
+
objectWaited: 'bank.BIC',
|
|
180
|
+
}) as unknown as string;
|
|
169
181
|
const bonjourMail = getBrandConfig({
|
|
170
182
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
171
183
|
objectWaited: 'listMails.bonjour',
|
|
@@ -242,7 +254,7 @@ export function generateSignature(params: any): string {
|
|
|
242
254
|
phoneSignature = standardPhoneSignature;
|
|
243
255
|
} else if (!user) { // Signature Clementine
|
|
244
256
|
user = {
|
|
245
|
-
firstname: `L'équipe ${
|
|
257
|
+
firstname: `L'équipe ${commercialName}`,
|
|
246
258
|
isAll: true,
|
|
247
259
|
};
|
|
248
260
|
roleSignature = '';
|
|
@@ -255,7 +267,12 @@ export function generateSignature(params: any): string {
|
|
|
255
267
|
|
|
256
268
|
return ejs.render(signatureTemplate, {
|
|
257
269
|
forceRole,
|
|
270
|
+
isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,
|
|
258
271
|
brandName,
|
|
272
|
+
idTypeBrand,
|
|
273
|
+
commercialName,
|
|
274
|
+
iban,
|
|
275
|
+
bic,
|
|
259
276
|
hostS3,
|
|
260
277
|
user,
|
|
261
278
|
roleSignature,
|
package/ts/utils/prestation.ts
CHANGED
|
@@ -190,7 +190,7 @@ const calculatePrestationPriceWithPriceGrid = (idPrestationList: number, endDate
|
|
|
190
190
|
const calculatePrestationPriceWithPrestationList = (prestationList: IPrestationList): number => {
|
|
191
191
|
let totalPrestation: number = 0;
|
|
192
192
|
|
|
193
|
-
totalPrestation = prestationList
|
|
193
|
+
totalPrestation = prestationList?.price || 0;
|
|
194
194
|
|
|
195
195
|
return totalPrestation;
|
|
196
196
|
};
|