@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.
Files changed (129) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +2 -2
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +4 -4
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/api/resources/Contest.d.ts +12 -0
  6. package/dist/cjs/api/resources/Contest.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/Contest.js +43 -0
  8. package/dist/cjs/api/resources/Contest.js.map +1 -0
  9. package/dist/cjs/api/resources.d.ts +2 -0
  10. package/dist/cjs/api/resources.d.ts.map +1 -1
  11. package/dist/cjs/api/resources.js +2 -0
  12. package/dist/cjs/api/resources.js.map +1 -1
  13. package/dist/cjs/types/Enum/BrandClementine.d.ts +7 -0
  14. package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/BrandClementine.js +3 -0
  16. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  17. package/dist/cjs/types/Enum/BrandPourcentage.d.ts +1 -1
  18. package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  19. package/dist/cjs/types/Enum/BrandPourcentage.js +29 -28
  20. package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
  21. package/dist/cjs/types/Enum/PrestationType.js +3 -3
  22. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  23. package/dist/cjs/types/Enum/PriceGridPourcentage.js +48 -48
  24. package/dist/cjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  25. package/dist/cjs/types/Interface/api/contest/Create.d.ts +26 -0
  26. package/dist/cjs/types/Interface/api/contest/Create.d.ts.map +1 -0
  27. package/dist/cjs/types/Interface/api/contest/Create.js +102 -0
  28. package/dist/cjs/types/Interface/api/contest/Create.js.map +1 -0
  29. package/dist/cjs/types/Interface/api/contest/Query.d.ts +7 -0
  30. package/dist/cjs/types/Interface/api/contest/Query.d.ts.map +1 -0
  31. package/dist/cjs/types/Interface/api/contest/Query.js +38 -0
  32. package/dist/cjs/types/Interface/api/contest/Query.js.map +1 -0
  33. package/dist/cjs/types/Interface/api/contest/Read.d.ts +6 -0
  34. package/dist/cjs/types/Interface/api/contest/Read.d.ts.map +1 -0
  35. package/dist/cjs/types/Interface/api/contest/Read.js +3 -0
  36. package/dist/cjs/types/Interface/api/contest/Read.js.map +1 -0
  37. package/dist/cjs/types/Interface/models/IUserContest.d.ts +20 -0
  38. package/dist/cjs/types/Interface/models/IUserContest.d.ts.map +1 -0
  39. package/dist/cjs/types/Interface/models/IUserContest.js +3 -0
  40. package/dist/cjs/types/Interface/models/IUserContest.js.map +1 -0
  41. package/dist/cjs/types/Interface/models/IVoteContest.d.ts +14 -0
  42. package/dist/cjs/types/Interface/models/IVoteContest.d.ts.map +1 -0
  43. package/dist/cjs/types/Interface/models/IVoteContest.js +3 -0
  44. package/dist/cjs/types/Interface/models/IVoteContest.js.map +1 -0
  45. package/dist/cjs/types/index.d.ts +5 -0
  46. package/dist/cjs/types/index.d.ts.map +1 -1
  47. package/dist/cjs/types/index.js +5 -0
  48. package/dist/cjs/types/index.js.map +1 -1
  49. package/dist/cjs/utils/email/templates/signature.d.ts.map +1 -1
  50. package/dist/cjs/utils/email/templates/signature.js +42 -10
  51. package/dist/cjs/utils/email/templates/signature.js.map +1 -1
  52. package/dist/cjs/utils/email.d.ts.map +1 -1
  53. package/dist/cjs/utils/email.js +9 -1
  54. package/dist/cjs/utils/email.js.map +1 -1
  55. package/dist/cjs/utils/prestation.js +1 -1
  56. package/dist/cjs/utils/prestation.js.map +1 -1
  57. package/dist/mjs/api/resources/Card.d.ts +2 -2
  58. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  59. package/dist/mjs/api/resources/Card.js +10 -4
  60. package/dist/mjs/api/resources/Card.js.map +1 -1
  61. package/dist/mjs/api/resources/Contest.d.ts +12 -0
  62. package/dist/mjs/api/resources/Contest.d.ts.map +1 -0
  63. package/dist/mjs/api/resources/Contest.js +39 -0
  64. package/dist/mjs/api/resources/Contest.js.map +1 -0
  65. package/dist/mjs/api/resources.d.ts +2 -0
  66. package/dist/mjs/api/resources.d.ts.map +1 -1
  67. package/dist/mjs/api/resources.js +2 -0
  68. package/dist/mjs/api/resources.js.map +1 -1
  69. package/dist/mjs/types/Enum/BrandClementine.d.ts +7 -0
  70. package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
  71. package/dist/mjs/types/Enum/BrandClementine.js +3 -0
  72. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  73. package/dist/mjs/types/Enum/BrandPourcentage.d.ts +1 -1
  74. package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
  75. package/dist/mjs/types/Enum/BrandPourcentage.js +29 -28
  76. package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
  77. package/dist/mjs/types/Enum/PrestationType.js +3 -3
  78. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  79. package/dist/mjs/types/Enum/PriceGridPourcentage.js +48 -48
  80. package/dist/mjs/types/Enum/PriceGridPourcentage.js.map +1 -1
  81. package/dist/mjs/types/Interface/api/contest/Create.d.ts +26 -0
  82. package/dist/mjs/types/Interface/api/contest/Create.d.ts.map +1 -0
  83. package/dist/mjs/types/Interface/api/contest/Create.js +114 -0
  84. package/dist/mjs/types/Interface/api/contest/Create.js.map +1 -0
  85. package/dist/mjs/types/Interface/api/contest/Query.d.ts +7 -0
  86. package/dist/mjs/types/Interface/api/contest/Query.d.ts.map +1 -0
  87. package/dist/mjs/types/Interface/api/contest/Query.js +38 -0
  88. package/dist/mjs/types/Interface/api/contest/Query.js.map +1 -0
  89. package/dist/mjs/types/Interface/api/contest/Read.d.ts +6 -0
  90. package/dist/mjs/types/Interface/api/contest/Read.d.ts.map +1 -0
  91. package/dist/mjs/types/Interface/api/contest/Read.js +2 -0
  92. package/dist/mjs/types/Interface/api/contest/Read.js.map +1 -0
  93. package/dist/mjs/types/Interface/models/IUserContest.d.ts +20 -0
  94. package/dist/mjs/types/Interface/models/IUserContest.d.ts.map +1 -0
  95. package/dist/mjs/types/Interface/models/IUserContest.js +2 -0
  96. package/dist/mjs/types/Interface/models/IUserContest.js.map +1 -0
  97. package/dist/mjs/types/Interface/models/IVoteContest.d.ts +14 -0
  98. package/dist/mjs/types/Interface/models/IVoteContest.d.ts.map +1 -0
  99. package/dist/mjs/types/Interface/models/IVoteContest.js +2 -0
  100. package/dist/mjs/types/Interface/models/IVoteContest.js.map +1 -0
  101. package/dist/mjs/types/index.d.ts +5 -0
  102. package/dist/mjs/types/index.d.ts.map +1 -1
  103. package/dist/mjs/types/index.js +5 -0
  104. package/dist/mjs/types/index.js.map +1 -1
  105. package/dist/mjs/utils/email/templates/signature.d.ts.map +1 -1
  106. package/dist/mjs/utils/email/templates/signature.js +42 -10
  107. package/dist/mjs/utils/email/templates/signature.js.map +1 -1
  108. package/dist/mjs/utils/email.d.ts.map +1 -1
  109. package/dist/mjs/utils/email.js +18 -1
  110. package/dist/mjs/utils/email.js.map +1 -1
  111. package/dist/mjs/utils/prestation.js +1 -1
  112. package/dist/mjs/utils/prestation.js.map +1 -1
  113. package/package.json +1 -1
  114. package/ts/api/resources/Card.ts +10 -4
  115. package/ts/api/resources/Contest.ts +47 -0
  116. package/ts/api/resources.ts +2 -0
  117. package/ts/types/Enum/BrandClementine.ts +3 -0
  118. package/ts/types/Enum/BrandPourcentage.ts +29 -28
  119. package/ts/types/Enum/PrestationType.ts +3 -3
  120. package/ts/types/Enum/PriceGridPourcentage.ts +48 -48
  121. package/ts/types/Interface/api/contest/Create.ts +69 -0
  122. package/ts/types/Interface/api/contest/Query.ts +20 -0
  123. package/ts/types/Interface/api/contest/Read.ts +6 -0
  124. package/ts/types/Interface/models/IUserContest.ts +22 -0
  125. package/ts/types/Interface/models/IVoteContest.ts +16 -0
  126. package/ts/types/index.ts +6 -1
  127. package/ts/utils/email/templates/signature.ts +43 -10
  128. package/ts/utils/email.ts +18 -1
  129. package/ts/utils/prestation.ts +1 -1
@@ -100,20 +100,20 @@ export const PriceGridPourcentage = [
100
100
  ],
101
101
  turnoverMonthly: [
102
102
  {
103
- turnoverValue: 50000,
104
- price: 79,
103
+ turnoverValue: 150000,
104
+ price: 149,
105
105
  },
106
106
  {
107
- turnoverValue: 100000,
108
- price: 99,
107
+ turnoverValue: 300000,
108
+ price: 209,
109
109
  },
110
110
  {
111
- turnoverValue: 150000,
112
- price: 109,
111
+ turnoverValue: 500000,
112
+ price: 269,
113
113
  },
114
114
  {
115
- turnoverValue: 200000,
116
- price: 129,
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: 50000,
290
- price: 79,
289
+ turnoverValue: 150000,
290
+ price: 149,
291
291
  },
292
292
  {
293
- turnoverValue: 100000,
294
- price: 99,
293
+ turnoverValue: 300000,
294
+ price: 209,
295
295
  },
296
296
  {
297
- turnoverValue: 150000,
298
- price: 109,
297
+ turnoverValue: 500000,
298
+ price: 269,
299
299
  },
300
300
  {
301
- turnoverValue: 200000,
302
- price: 129,
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: 50000,
476
- price: 79,
475
+ turnoverValue: 150000,
476
+ price: 149,
477
477
  },
478
478
  {
479
- turnoverValue: 100000,
480
- price: 99,
479
+ turnoverValue: 300000,
480
+ price: 209,
481
481
  },
482
482
  {
483
- turnoverValue: 150000,
484
- price: 109,
483
+ turnoverValue: 500000,
484
+ price: 269,
485
485
  },
486
486
  {
487
- turnoverValue: 200000,
488
- price: 129,
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: 50000,
662
- price: 79,
661
+ turnoverValue: 150000,
662
+ price: 149,
663
663
  },
664
664
  {
665
- turnoverValue: 100000,
666
- price: 99,
665
+ turnoverValue: 300000,
666
+ price: 209,
667
667
  },
668
668
  {
669
- turnoverValue: 150000,
670
- price: 109,
669
+ turnoverValue: 500000,
670
+ price: 269,
671
671
  },
672
672
  {
673
- turnoverValue: 200000,
674
- price: 129,
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: 50000,
848
- price: 79,
847
+ turnoverValue: 150000,
848
+ price: 149,
849
849
  },
850
850
  {
851
- turnoverValue: 100000,
852
- price: 99,
851
+ turnoverValue: 300000,
852
+ price: 209,
853
853
  },
854
854
  {
855
- turnoverValue: 150000,
856
- price: 109,
855
+ turnoverValue: 500000,
856
+ price: 269,
857
857
  },
858
858
  {
859
- turnoverValue: 200000,
860
- price: 129,
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: 50000,
1034
- price: 79,
1033
+ turnoverValue: 150000,
1034
+ price: 149,
1035
1035
  },
1036
1036
  {
1037
- turnoverValue: 100000,
1038
- price: 99,
1037
+ turnoverValue: 300000,
1038
+ price: 209,
1039
1039
  },
1040
1040
  {
1041
- turnoverValue: 150000,
1042
- price: 109,
1041
+ turnoverValue: 500000,
1042
+ price: 269,
1043
1043
  },
1044
1044
  {
1045
- turnoverValue: 200000,
1046
- price: 129,
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,6 @@
1
+ import { IUserContest } from '../../models/IUserContest';
2
+
3
+ export type ReadVoteChecking = {
4
+ success: boolean;
5
+ existingVoteUser: IUserContest | null
6
+ };
@@ -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 logoClementine = `<% if (brandName === 'Clementine') { %><tr>
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
- <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;">
21
- <img
22
- style="max-height: 90px;max-width: 90px; border-radius: 100%; padding-top: 10px"
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
- </p>
45
+ />
46
+ </p>
47
+ <% } %>
27
48
  </td>
28
49
  <% } %>`;
29
50
 
30
- const footer = `<% if(brandName === 'Clementine') { %>
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(brandName === 'Pourcentage') { %>
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 = `<table
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<%= brandName === 'Pourcentage' ? '_pourcentage' : '' %>.png"
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 ${brandName}`,
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,
@@ -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.price || 0;
193
+ totalPrestation = prestationList?.price || 0;
194
194
 
195
195
  return totalPrestation;
196
196
  };