@silexpert/core 1.0.123 → 1.0.126

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 (127) hide show
  1. package/es/api/resources/Employee.d.ts.map +1 -1
  2. package/es/api/resources/Employee.js +3 -2
  3. package/es/api/resources/Employee.js.map +1 -1
  4. package/es/api/resources/Mail.d.ts +2 -1
  5. package/es/api/resources/Mail.d.ts.map +1 -1
  6. package/es/api/resources/Mail.js +3 -0
  7. package/es/api/resources/Mail.js.map +1 -1
  8. package/es/api/resources/SocietyConfigBalanceSheet.d.ts +1 -1
  9. package/es/api/resources/SocietyConfigBalanceSheet.d.ts.map +1 -1
  10. package/es/api/resources/SocietyConfigBalanceSheet.js +2 -2
  11. package/es/api/resources/SocietyConfigBalanceSheet.js.map +1 -1
  12. package/es/types/Enum/BalanceSheet.d.ts +1 -1
  13. package/es/types/Enum/BalanceSheet.js +1 -1
  14. package/es/types/Enum/BalanceSheet.js.map +1 -1
  15. package/es/types/Enum/BrandComptalib.js +1 -1
  16. package/es/types/Enum/BrandComptalib.js.map +1 -1
  17. package/es/types/Enum/DepositDocumentType.d.ts +10 -0
  18. package/es/types/Enum/DepositDocumentType.d.ts.map +1 -1
  19. package/es/types/Enum/DepositDocumentType.js +12 -0
  20. package/es/types/Enum/DepositDocumentType.js.map +1 -1
  21. package/es/types/Enum/Ged.d.ts +4 -0
  22. package/es/types/Enum/Ged.d.ts.map +1 -1
  23. package/es/types/Enum/Ged.js +26 -0
  24. package/es/types/Enum/Ged.js.map +1 -1
  25. package/es/types/Enum/MailAuto.d.ts +17 -7
  26. package/es/types/Enum/MailAuto.d.ts.map +1 -1
  27. package/es/types/Enum/MailAuto.js +28 -6
  28. package/es/types/Enum/MailAuto.js.map +1 -1
  29. package/es/types/Enum/RevisionGuide.d.ts +3 -3
  30. package/es/types/Enum/RevisionGuide.d.ts.map +1 -1
  31. package/es/types/Enum/RevisionGuide.js +3 -3
  32. package/es/types/Enum/RevisionGuide.js.map +1 -1
  33. package/es/types/Interface/api/mail/QueryGetSignature.d.ts +6 -0
  34. package/es/types/Interface/api/mail/QueryGetSignature.d.ts.map +1 -0
  35. package/es/types/Interface/api/mail/QueryGetSignature.js +32 -0
  36. package/es/types/Interface/api/mail/QueryGetSignature.js.map +1 -0
  37. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js +1 -1
  38. package/es/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js.map +1 -1
  39. package/es/types/Interface/models/IGedFile.d.ts +2 -0
  40. package/es/types/Interface/models/IGedFile.d.ts.map +1 -1
  41. package/es/types/Interface/models/IGedFile.js.map +1 -1
  42. package/es/types/Interface/models/IPaymentExpectation.d.ts +1 -0
  43. package/es/types/Interface/models/IPaymentExpectation.d.ts.map +1 -1
  44. package/es/types/Interface/models/IPaymentExpectation.js.map +1 -1
  45. package/es/types/Interface/models/ISociety.d.ts +2 -1
  46. package/es/types/Interface/models/ISociety.d.ts.map +1 -1
  47. package/es/types/Interface/models/ISociety.js.map +1 -1
  48. package/es/types/Interface/models/ISocietyConfigBalanceSheet.d.ts +6 -2
  49. package/es/types/Interface/models/ISocietyConfigBalanceSheet.d.ts.map +1 -1
  50. package/es/types/Interface/models/ISocietyConfigBalanceSheet.js.map +1 -1
  51. package/es/types/index.d.ts +1 -0
  52. package/es/types/index.d.ts.map +1 -1
  53. package/es/types/index.js +1 -0
  54. package/es/types/index.js.map +1 -1
  55. package/es/utils/commercialManagement/templates/body.d.ts.map +1 -1
  56. package/es/utils/commercialManagement/templates/body.js +2 -1
  57. package/es/utils/commercialManagement/templates/body.js.map +1 -1
  58. package/es/utils/commercialManagement/templates/common.js +1 -1
  59. package/es/utils/commercialManagement/templates/common.js.map +1 -1
  60. package/es/utils/email/templates/signature.d.ts +2 -0
  61. package/es/utils/email/templates/signature.d.ts.map +1 -0
  62. package/es/utils/email/templates/signature.js +196 -0
  63. package/es/utils/email/templates/signature.js.map +1 -0
  64. package/es/utils/email.d.ts +2 -0
  65. package/es/utils/email.d.ts.map +1 -0
  66. package/es/utils/email.js +223 -0
  67. package/es/utils/email.js.map +1 -0
  68. package/es/utils/index.d.ts +1 -0
  69. package/es/utils/index.d.ts.map +1 -1
  70. package/es/utils/index.js +1 -0
  71. package/es/utils/index.js.map +1 -1
  72. package/js/api/resources/Employee.js +4 -2
  73. package/js/api/resources/Employee.js.map +1 -1
  74. package/js/api/resources/Mail.js +6 -0
  75. package/js/api/resources/Mail.js.map +1 -1
  76. package/js/api/resources/SocietyConfigBalanceSheet.js +2 -2
  77. package/js/api/resources/SocietyConfigBalanceSheet.js.map +1 -1
  78. package/js/types/Enum/BalanceSheet.js +1 -1
  79. package/js/types/Enum/BalanceSheet.js.map +1 -1
  80. package/js/types/Enum/BrandComptalib.js +1 -1
  81. package/js/types/Enum/BrandComptalib.js.map +1 -1
  82. package/js/types/Enum/DepositDocumentType.js +17 -1
  83. package/js/types/Enum/DepositDocumentType.js.map +1 -1
  84. package/js/types/Enum/Ged.js +19 -0
  85. package/js/types/Enum/Ged.js.map +1 -1
  86. package/js/types/Enum/MailAuto.js +34 -6
  87. package/js/types/Enum/MailAuto.js.map +1 -1
  88. package/js/types/Enum/RevisionGuide.js +3 -3
  89. package/js/types/Enum/RevisionGuide.js.map +1 -1
  90. package/js/types/Interface/api/mail/QueryGetSignature.js +33 -0
  91. package/js/types/Interface/api/mail/QueryGetSignature.js.map +1 -0
  92. package/js/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js +1 -1
  93. package/js/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.js.map +1 -1
  94. package/js/types/index.js +12 -0
  95. package/js/types/index.js.map +1 -1
  96. package/js/utils/commercialManagement/templates/body.js +2 -1
  97. package/js/utils/commercialManagement/templates/body.js.map +1 -1
  98. package/js/utils/commercialManagement/templates/common.js +1 -1
  99. package/js/utils/commercialManagement/templates/common.js.map +1 -1
  100. package/js/utils/email/templates/signature.js +201 -0
  101. package/js/utils/email/templates/signature.js.map +1 -0
  102. package/js/utils/email.js +317 -0
  103. package/js/utils/email.js.map +1 -0
  104. package/js/utils/index.js +12 -0
  105. package/js/utils/index.js.map +1 -1
  106. package/package.json +1 -1
  107. package/ts/api/resources/Employee.ts +3 -2
  108. package/ts/api/resources/Mail.ts +5 -0
  109. package/ts/api/resources/SocietyConfigBalanceSheet.ts +2 -2
  110. package/ts/types/Enum/BalanceSheet.ts +1 -1
  111. package/ts/types/Enum/BrandComptalib.ts +1 -1
  112. package/ts/types/Enum/DepositDocumentType.ts +12 -0
  113. package/ts/types/Enum/Ged.ts +27 -0
  114. package/ts/types/Enum/MailAuto.ts +30 -7
  115. package/ts/types/Enum/RevisionGuide.ts +3 -3
  116. package/ts/types/Interface/api/mail/QueryGetSignature.ts +21 -0
  117. package/ts/types/Interface/api/societyConfigBalanceSheet/QueryGetAllSocietyConfigBalanceSheet.ts +1 -1
  118. package/ts/types/Interface/models/IGedFile.ts +2 -0
  119. package/ts/types/Interface/models/IPaymentExpectation.ts +1 -0
  120. package/ts/types/Interface/models/ISociety.ts +2 -0
  121. package/ts/types/Interface/models/ISocietyConfigBalanceSheet.ts +6 -2
  122. package/ts/types/index.ts +1 -0
  123. package/ts/utils/commercialManagement/templates/body.ts +2 -1
  124. package/ts/utils/commercialManagement/templates/common.ts +1 -1
  125. package/ts/utils/email/templates/signature.ts +198 -0
  126. package/ts/utils/email.ts +230 -0
  127. package/ts/utils/index.ts +1 -0
@@ -1,5 +1,6 @@
1
1
  import { CancelToken } from 'axios';
2
2
  import { forEach } from 'lodash';
3
+ import { isDefined } from 'class-validator';
3
4
  import {
4
5
  BasePaginate,
5
6
  IEmployee,
@@ -15,7 +16,7 @@ export class Employee extends Resource {
15
16
  public create(payload: Partial<CreateEmployee>): Promise<IEmployee> {
16
17
  const formData = new FormData();
17
18
  forEach(payload, (value, key) => {
18
- if (value) {
19
+ if (isDefined(value) || key === 'writeDpae') {
19
20
  if (['dpaeFile', 'contractFile'].includes(key)) {
20
21
  formData.append(key, value as File);
21
22
  } else {
@@ -42,7 +43,7 @@ export class Employee extends Resource {
42
43
  ): Promise<IEmployee> {
43
44
  const formData = new FormData();
44
45
  forEach(payload, (value, key) => {
45
- if (value) {
46
+ if (isDefined(value) || key === 'writeDpae') {
46
47
  if (['dpaeFile', 'contractFile'].includes(key)) {
47
48
  formData.append(key, value as File);
48
49
  } else {
@@ -7,6 +7,7 @@ import {
7
7
  IMail,
8
8
  CreateMailParams,
9
9
  QueryAllMail,
10
+ QueryGetSignature,
10
11
  } from '../../types';
11
12
 
12
13
  export class Mail extends Resource {
@@ -199,4 +200,8 @@ export class Mail extends Resource {
199
200
  migrateUsersMailAddresses(limit: number, idUser?: number): Promise<{ ok: number, ko: number, error?:string }> {
200
201
  return this.axios.$post('/mails/migrate-users-mail-addresses', { limit, idUser });
201
202
  }
203
+
204
+ getUserSignature(idUser: number, params: QueryGetSignature): Promise<string> {
205
+ return this.axios.$get(`/mails/${idUser}/signature`, { params });
206
+ }
202
207
  }
@@ -17,8 +17,8 @@ export class SocietyConfigBalanceSheet extends Resource {
17
17
  return this.axios.$get(`/societies/${id}/balance-sheets/settings/list`, { params });
18
18
  }
19
19
 
20
- public update(id: number, idBalanceSheet: number, payload: Partial<ISocietyConfigBalanceSheet>): Promise<SocietyConfigBalanceSheet> {
21
- return this.axios.$put(`/societies/${id}/balance-sheets/${idBalanceSheet}/setting`, payload);
20
+ public update(idSociety: number, id: number, payload: Partial<ISocietyConfigBalanceSheet>): Promise<SocietyConfigBalanceSheet> {
21
+ return this.axios.$put(`/societies/${idSociety}/balance-sheets/settings/${id}`, payload);
22
22
  }
23
23
 
24
24
  public delete(id: number): Promise<true> {
@@ -108,7 +108,7 @@ export const BalanceSheetDetails = [
108
108
  {
109
109
  value: BalanceSheetState.ACCEPTED_BY_SIE,
110
110
  text: 'Accepté au SIE',
111
- color: 'grey darken-1',
111
+ color: 'green darken-1',
112
112
  textColor: 'green--text',
113
113
  forRoles: [['front_office'], ['front_office_express'], ['expert']],
114
114
  },
@@ -56,7 +56,7 @@ export const BrandComptalib = [
56
56
  recaptchaSecretKey: '6Le0o3kaAAAAAIEcSOib77JdK_W3cyIilK-p2yOG',
57
57
  urlApp: 'https://app.comptalib.com',
58
58
  urlExpert: 'https://pro.comptalib.com',
59
- urlClient: '',
59
+ urlClient: 'https://www.comptalib.com',
60
60
  webmail: {
61
61
  domain: '@comptalib.com',
62
62
  },
@@ -1,5 +1,17 @@
1
1
  import { GedFolder, TypeFile } from './Ged';
2
2
 
3
+ export enum StateDepositDocument {
4
+ NOT_ASKED = 0,
5
+ ASKED = 1,
6
+ }
7
+
8
+ export enum StateClientDepositDocument {
9
+ ACCEPTED = 0,
10
+ REFUSED = 1,
11
+ WAITING = 2,
12
+ PENDING_CLIENT = 3,
13
+ }
14
+
3
15
  export const DepositDocumentType = [
4
16
  {
5
17
  name: 'Contrats & échéanciers',
@@ -103,6 +103,33 @@ export enum GedFileType {
103
103
  PERSONNAL_RIB = 21, // RIB PERSO
104
104
  }
105
105
 
106
+ export const SignFileDetail = [
107
+ {
108
+ id: TypeFile.CA_TO_SIGN,
109
+ name: 'CA',
110
+ },
111
+ {
112
+ id: TypeFile.CCA_TO_SIGN,
113
+ name: 'CCA',
114
+ },
115
+ {
116
+ id: TypeFile.INVENTORY_TO_SIGN,
117
+ name: 'Inventaire',
118
+ },
119
+ {
120
+ id: TypeFile.FUND_TO_SIGN,
121
+ name: 'Caisse',
122
+ },
123
+ {
124
+ id: TypeFile.SUPPLIER_BOOK_TO_SIGN,
125
+ name: 'Grand Livre fournisseur',
126
+ },
127
+ {
128
+ id: TypeFile.CLIENT_BOOK_TO_SIGN,
129
+ name: 'Grand Livre client',
130
+ },
131
+ ];
132
+
106
133
  export const GedFileTypeDetail = {
107
134
  STATUTES: {
108
135
  id: GedFileType.STATUTES,
@@ -37,14 +37,11 @@ export enum MailAuto {
37
37
  REPLY_GRACEFUL_DELIVERY = 36,
38
38
  ACCOUNTING_IMPLEMENTATION = 37,
39
39
  INFORM_CUSTOMER_DRG_DONE = 38,
40
- ASK_CERTIFICATE_NON_REMUNERATION = 39,
41
40
  UNSYNC = 40,
42
41
  NEW_CUSTOMER_SOCIAL = 41,
43
42
  JURIDICAL_KBIS = 42,
44
43
  HOME = 43,
45
44
  HOME_SYNTHESIS = 44,
46
- DOCUMENTS_WAITING = 45,
47
- DOCUMENTS_TO_SIGN = 46,
48
45
  OPINION_RECEIVED = 47,
49
46
  RESPONSE_RECAP = 48,
50
47
  RESPONSE_CALL_DIRECTLY_NOTATION_ECHEC = 49,
@@ -58,7 +55,6 @@ export enum MailAuto {
58
55
  MEMO_RELANCE_ANNOTATION = 57,
59
56
  APPROBATION_DIVIDEND = 58,
60
57
  APPROBATION_JURIDICAL_DOCUMENTS = 59,
61
- APPROBATION_ACCOUNTS_DEPOSIT = 60,
62
58
  APPROBATION_ACCOUNTS_DEPOSIT_BACK = 61,
63
59
  VAT_DECLARATION = 62,
64
60
  TAKE_BACK_LETTER = 63,
@@ -73,7 +69,6 @@ export enum MailAuto {
73
69
  TICKET_SUPPORT_CONSTATATION = 76,
74
70
  TICKET_SUPPORT_RESOLUTION = 77,
75
71
  SCHEDULE = 78,
76
- STOP_WORKING_ACCOUNTANT = 79,
77
72
  TERMINATION_FOR_MISSING_DOCUMENTS = 80,
78
73
  TERMINATION = 81,
79
74
  LAST_RELANCE_CHECK_UP = 82,
@@ -110,10 +105,38 @@ export enum MailAuto {
110
105
  REPORTING_PHONE_RDV_UNAVAILABLE_6_TIMES = 116,
111
106
  TASK_EXTERNAL_CALL_NOT_MAKE = 120,
112
107
  MISSING_ELEMENT_FOR_CHECKLIST = 122,
113
- CHECKLIST_CONFIRMED = 123,
114
108
  MONTHLY_REPORT = 124,
115
109
  WELCOME_TO_CLEMENTINE = 134,
116
110
  MEETING_WITH_CLEMENTINE = 135,
117
111
  DONT_MISS_CLEMENTINE = 136,
118
112
  CLEMENTINE_ADVENTURE_DOES_NOT_END = 137,
119
- }
113
+ ASK_DOCUMENTS_FOR_BALANCE_SHEET = 138,
114
+ ASK_SIGNED_DOCUMENTS_FOR_BALANCE_SHEET = 139,
115
+ }
116
+
117
+ export const MailAutoList = [
118
+ {
119
+ id: MailAuto.ASK_DOCUMENTS_FOR_BALANCE_SHEET,
120
+ onlyforRoles: null,
121
+ alias: 'ask-documents-for-balance-sheet',
122
+ title: 'Demande de document pour votre bilan comptable',
123
+ subject: 'Demande de document pour votre bilan comptable',
124
+ fields: [
125
+ { name: 'to', lg: 'xs12 sm5' },
126
+ { name: 'subject', lg: 'xs12 sm7' },
127
+ { name: 'contentHtml' },
128
+ ],
129
+ },
130
+ {
131
+ id: MailAuto.ASK_SIGNED_DOCUMENTS_FOR_BALANCE_SHEET,
132
+ onlyforRoles: null,
133
+ alias: 'ask-signed-documents-for-balance-sheet',
134
+ title: 'Signer vos documents pour mon bilan comptable',
135
+ subject: 'Signer vos documents pour mon bilan comptable',
136
+ fields: [
137
+ { name: 'to', lg: 'xs12 sm5' },
138
+ { name: 'subject', lg: 'xs12 sm7' },
139
+ { name: 'contentHtml' },
140
+ ],
141
+ },
142
+ ];
@@ -135,11 +135,11 @@ export enum RevisionGuideLabel {
135
135
  N1ELEMENT = '<b>Reprise du dossier</b>: Eléments N-1 à intégrer ?',
136
136
  N1ELEMENTJUSTIF = '<b>Reprise du dossier</b> : Soldes fournisseurs/clients N-1 traités et justifiés ?',
137
137
  IMMON1 = '<b>Reprise du dossier</b> : Immobilisations N-1 revues (HS/mise au rebut, ventes) avec le client ?',
138
- FECN1 = '<b>Reprise du dossier</b> : rapprochement plaquette & liasse avec FEC N-1',
138
+ FECN1 = '<b>Reprise du dossier</b> : rapprochement plaquette & liasse avec FEC N-1 ?',
139
139
  CAPITAUX_PERTE = '<b>Capitaux</b> : La perte est-elle supérieur au capital social ?',
140
- CONTRAT_EMPRUNT = '<b>Emprunt</b> : Contrat et échéancier d\'emprunts obtenus',
140
+ CONTRAT_EMPRUNT = '<b>Emprunt</b> : Contrat et échéancier d\'emprunts obtenus ?',
141
141
  SOLDE_RAPPRO = '<b>Banque :</b> le solde bancaire a t-il pu être rapproché PDF ou budget ?',
142
- CAISSE_OK = '<b>Caisse :</b> avez vous une caisse certifiée conforme : ',
142
+ CAISSE_OK = '<b>Caisse :</b> avez vous une caisse certifiée conforme ?',
143
143
  BAIL_COMMERCIAL = '<b>Charges :</b> Bail commercial et quittances de loyers obtenus sur l’ensemble de l’exercice comptable ?',
144
144
  TICKET_Z = '<b>Ticket Z :</b> Avez vous obtenu le ticket Z annuel ?',
145
145
  COMPTE_SOLDE = '<b>Etats :</b> Compte d\'attente soldé ?',
@@ -0,0 +1,21 @@
1
+ import {
2
+ IsOptional, IsInt, IsString,
3
+ } from 'class-validator';
4
+ import { ApiPropertyOptional } from '../../../../utils/decorators';
5
+
6
+ export class QueryGetSignature {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsInt()
10
+ idSociety?: number;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsInt()
15
+ idTypeBrand?: number;
16
+
17
+ @ApiPropertyOptional()
18
+ @IsOptional()
19
+ @IsString()
20
+ forceRole?: string;
21
+ }
@@ -20,6 +20,6 @@ export class QueryGetAllSocietyConfigBalanceSheet {
20
20
  @IsString({
21
21
  each: true,
22
22
  })
23
- @IsIn(['society'], { each: true })
23
+ @IsIn(['society', 'user'], { each: true })
24
24
  include?: string[];
25
25
  }
@@ -4,6 +4,7 @@ import { IExercice } from './IExercice';
4
4
  import { IGedFileType } from './IGedFileType';
5
5
  import { IGedFolder } from './IGedFolder';
6
6
  import { IUser } from './IUser';
7
+ import { ICustomerSignature } from './ICustomerSignature';
7
8
 
8
9
  // gedFile
9
10
  export interface IGedFile {
@@ -28,4 +29,5 @@ export interface IGedFile {
28
29
  typeGedFile?: IGedFileType;
29
30
  gedFolder?: IGedFolder;
30
31
  businessPartner?: IUser;
32
+ customerSignature?: ICustomerSignature;
31
33
  }
@@ -7,6 +7,7 @@ export interface IPaymentExpectation {
7
7
  id?: number;
8
8
  label: string;
9
9
  amount: number;
10
+ payload: string;
10
11
  ref: string;
11
12
  archive: boolean;
12
13
  idCodeErreur: number | null;
@@ -49,6 +49,7 @@ import { IUser } from './IUser';
49
49
  import { ISocietyEvent } from './ISocietyEvent';
50
50
  import {
51
51
  ComptaType, CountryId, INafCode, IPartneredAccountantCompanyService, Sector, UnpaidDetail, IPartneredAccountantToSociety, IMail, IAccountingTransaction, IFecFile, IGedFile, IBusinessPartner, IPaymentSchedule, IRegulate, IUserSocietyPermission,
52
+ ISocietyConfigBalanceSheet,
52
53
  } from '../..';
53
54
  import { IBrandType } from './IBrandType';
54
55
 
@@ -158,6 +159,7 @@ export interface ISociety {
158
159
  connectors?: IConnector[];
159
160
  bankConnections?: IBankConnection[];
160
161
  societiesFollowedQualityMail?: IFollowedQualityMail[];
162
+ societyConfigBalanceSheet?: ISocietyConfigBalanceSheet[];
161
163
  societyFollow?: IFollow[];
162
164
  paymentsExpectations?: IPaymentExpectation[];
163
165
  paymentSchedules?: IPaymentSchedule[];
@@ -2,18 +2,21 @@ import { IDocumentWaitingType } from './IDocumentWaitingType';
2
2
  import { IExercice } from './IExercice';
3
3
  import { IBalanceSheet } from './IBalanceSheet';
4
4
  import { ISociety } from './ISociety';
5
+ import { IUser } from './IUser';
6
+ import { StateDepositDocument, StateClientDepositDocument } from '../../Enum/DepositDocumentType';
5
7
 
6
8
  // societyConfigBalanceSheet
7
9
  export interface ISocietyConfigBalanceSheet {
8
10
  id?: number;
9
- state: number;
10
- stateClient: number;
11
+ state: StateDepositDocument;
12
+ stateClient: StateClientDepositDocument;
11
13
  idSociety: number | null;
12
14
  comment: string | null;
13
15
  amount: number | null;
14
16
  idTypeDocumentsWaiting?: number | null;
15
17
  idExercice: number | null;
16
18
  idBalanceSheet: number | null;
19
+ idUser?: number | null;
17
20
  idDepositDocumentType: number | null,
18
21
  createdAt?: Date | null;
19
22
  updatedAt?: Date | null;
@@ -23,4 +26,5 @@ export interface ISocietyConfigBalanceSheet {
23
26
  exercice?: IExercice;
24
27
  society?: ISociety;
25
28
  balanceSheet?: IBalanceSheet;
29
+ user?: IUser;
26
30
  }
package/ts/types/index.ts CHANGED
@@ -525,6 +525,7 @@ export * from './Interface/api/customerProviderOperation/CreateCustomerProviderO
525
525
  export * from './Interface/api/mail/QueryMail';
526
526
  export * from './Interface/api/mail/QueryAllMail';
527
527
  export * from './Interface/api/mail/QueryPaginatedMail';
528
+ export * from './Interface/api/mail/QueryGetSignature';
528
529
  export * from './Interface/api/mail/QueryCountProcessedByUser';
529
530
  export * from './Interface/api/mail/QueryGetAnsweringTimeByUser';
530
531
  export * from './Interface/api/mail/QueryCountUnprocessedMail';
@@ -102,7 +102,8 @@ export const bodyTemplate = `<html class="pdf-content">
102
102
  <% if (settings && (settings.iban || settings.bic)) { %>
103
103
  <div class="row mt-30 space-between" style="page-break-inside: avoid !important;">
104
104
  <div>
105
- <% if (settings && (settings.iban || settings.bic)) { %>
105
+ <% if (settings && (settings.iban || settings.bic || settings.bank)) { %>
106
+ <% if(settings.bank) { %>BANQUE : <%= settings.bank %><br/><% } %>
106
107
  <% if(settings.iban) { %>IBAN : <%= settings.iban %><br/><% } %>
107
108
  <% if(settings.bic) { %>BIC : <%= settings.bic %><% } %>
108
109
  <% } %>
@@ -406,7 +406,7 @@ export class CommercialDocumentMailHTML {
406
406
  </div>
407
407
  <% if (!shouldHideBrandName) { %>
408
408
  <div style="margin-top: 20px; margin-bottom: -8px; width: fit-content; white-space: nowrap; margin-left: auto; margin-right: auto; font-size: 14px;">
409
- <div class="brand-tag" style="display: flex; line-height: 18px; height: 18px;">
409
+ <div class="brand-tag" style="display: flex; line-height: 18px; height: 14px;">
410
410
  Généré par <% if (hostS3) { %><img src="<%= hostS3 %>config/logo-brand.png" alt="logo" style="max-height: 18px; margin-left: 5px;" /><% } %>
411
411
  </div>
412
412
  </div>
@@ -0,0 +1,198 @@
1
+ const logoClementine = `<% if (brandName === 'Clementine') { %><tr>
2
+ <td
3
+ colspan="3"
4
+ class="logo"
5
+ style=""
6
+ width="850">
7
+ <img
8
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png"
9
+ alt="Logo"
10
+ height="32"
11
+ style="padding-bottom: 10px;">
12
+ </td>
13
+ </tr><% } %>`;
14
+
15
+ const avatar = `<% if (!forceRole && user?.avatar?.token) { %>
16
+ <td
17
+ class="avatar"
18
+ style="text-align:center; padding: 20px 0 20px 20px; position: relative;"
19
+ 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: 1Opx"
23
+ src="
24
+ <%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>
25
+ "
26
+ />
27
+ </p>
28
+ </td>
29
+ <% } %>`;
30
+
31
+ const footer = `<% if(brandName === 'Clementine') { %>
32
+ <tr>
33
+ <td
34
+ style="clear:both; padding-top: 20px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;"
35
+ colspan="4">
36
+ <table style="width: 100%" width="100%">
37
+ <tr>
38
+ <td style="padding:0 10px 0 0" width="120">
39
+ <a href="https://app.compta-clementine.fr/" target="_blank" style="text-decoration: none; color: #6E6E71; white-space: nowrap;">
40
+ <img
41
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png"
42
+ style="vertical-align: text-top;"
43
+ width="20"
44
+ alt="Connexion"> Connexion
45
+ </a>
46
+ </td>
47
+ <td style="padding:0 10px 0 0" width="170">
48
+ <a href="mailto:<%= supportMail %>" target="_blank" style="text-decoration: none; color: #6E6E71; white-space: nowrap;">
49
+ <img
50
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png"
51
+ style="vertical-align: text-top;"
52
+ width="17"
53
+ alt="Support technique"> Support technique
54
+ </a>
55
+ </td>
56
+ <td style="padding:0 5px 0 0" width="24">
57
+ <a href="https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/" target="_blank" style="vertical-align: middle;"><img
58
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png"
59
+ alt="YouTube"
60
+ style="width: 20px"></a>
61
+ </td>
62
+ <td style="padding:0 5px 0 0" width="24">
63
+ <a href="https://www.linkedin.com/company/compta-cl%C3%A9mentine/" target="_blank" style="vertical-align: middle;"><img
64
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png"
65
+ alt="LinkedIn"
66
+ style="width: 20px"></a>
67
+ </td>
68
+ <td style="padding:0 5px 0 0" width="24">
69
+ <a href="https://www.instagram.com/comptaclementine/" target="_blank" style="vertical-align: middle;"><img
70
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png"
71
+ alt="Instagram"
72
+ style="width: 20px"></a>
73
+ </td>
74
+ <td style="text-align: right; vertical-align: middle; color: #6E6E71" width="430">
75
+ <span>Télécharger l'app</span>
76
+ <a href="https://apps.apple.com/fr/app/clementine/id1119493780" target="_blank" style="vertical-align: middle; margin-left: 10px"><img
77
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png"
78
+ alt="App Store"
79
+ style="width: 20px"></a>
80
+ <a href="https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr" target="_blank" style="vertical-align: middle; margin-left: 10px"><img
81
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png"
82
+ alt="Play Store"
83
+ style="width: 20px"></a>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td colspan="7" style="padding-top: 12px">
88
+ <span style="text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;">
89
+ Une question ? Découvrez votre <a href="https://www.compta-clementine.fr/aide/" style="color: #FF7E3C">centre d'aide</a>
90
+ </span>
91
+ <span style="text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;">
92
+ Jusqu’à 500€ avec notre <a href="https://www.compta-clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta" style="color: #FF7E3C">programme de parrainage</a>
93
+ </span>
94
+ </td>
95
+ </tr>
96
+ </table>
97
+ </td>
98
+ </tr>
99
+ <% } else if(brandName === 'Pourcentage') { %>
100
+ <tr>
101
+ <td
102
+ style="clear:both; padding-top: 20px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;"
103
+ colspan="4">
104
+ <table style="width: 100%" width="100%">
105
+ <tr>
106
+ <td style="padding:0 10px 0 0" width="120">
107
+ <a href="https://app.pourcentage.fr/" target="_blank" style="text-decoration: none; color: #6E6E71; white-space: nowrap;">
108
+ <img
109
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png"
110
+ style="vertical-align: text-top;"
111
+ width="20"
112
+ alt="Connexion"> Connexion
113
+ </a>
114
+ </td>
115
+ </table>
116
+ </td>
117
+ </tr>
118
+ <% } %>
119
+ `;
120
+
121
+ export const signatureTemplate = `<table
122
+ border="0"
123
+ cellpadding="0"
124
+ cellspacing="0"
125
+ width="850"
126
+ class="signatureClementine">
127
+
128
+ ${logoClementine}
129
+
130
+ <tr style="background: #F4F8FB">
131
+ ${avatar}
132
+ <td
133
+ class="infos"
134
+ style=" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000"
135
+ width="290"
136
+ colspan="2">
137
+ <table
138
+ border="0"
139
+ cellpadding="0"
140
+ cellspacing="0"
141
+ width="290">
142
+ <tr>
143
+ <td width="290">
144
+ <p style="font-size: 17px; margin:0px 0; padding:0">
145
+ <strong><span style="color:<%= primaryColor %>; font-weight: bold;"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>
146
+ </p>
147
+
148
+ <% if(roleSignature) { %>
149
+ <p style="font-size: 17px; margin:0px 0; padding:0">
150
+ <span style="color: #6E6E71; font-weight: bold;"><%= roleSignature %></span></p>
151
+ </p>
152
+ <% } %>
153
+ </td>
154
+ </tr>
155
+ </table>
156
+
157
+ <p style="margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2"><!-- --></p><p style="margin:0; padding:0px 0 4px; color:#6E6E71;"><%= user.roles.map((r) => r.idRoles).includes(22) || (user && user.isAll === true) ? 'Nos' : 'Mes' %> horaires :<br/><%= horaires %></p>
158
+ </td>
159
+
160
+ <td class="infos" style="padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>"
161
+ width="370">
162
+ <p style="margin:0px 0; padding:2px 0; color:#6E6E71; padding-left: 10px">
163
+ <span style="float:right">Standard : <%= standardPhoneSignature %></span><br/>
164
+ <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>
165
+ <span style="float:right">Ligne directe : <%- phoneSignature %></span><br/>
166
+ <% } %>
167
+ </p>
168
+
169
+ <p style="margin:20px 60px 0 0; padding:0px 0 4px; color:#6E6E71; text-align: right; height: 54px;">
170
+ <% if(user.calendlyUrl) { %>
171
+ <img
172
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rightArrow.png"
173
+ alt="Prenez rendez-vous ici !">
174
+ <% } %>
175
+ </p>
176
+
177
+ <p style="margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right"><a href="https://www.smileyourpla.net/" style="display: inline-block; color:#6E6E71;" target="_blank"><img
178
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png"
179
+ alt="Initiative Smile your planet" height="36"></a>
180
+ <% if(user.calendlyUrl) { %>
181
+ <a href="<%= user.calendlyUrl %>" style="display: inline-block; color:#6E6E71;" target="_blank"><img
182
+ src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel.png"
183
+ alt="Demande de rdv téléphonique"></a>
184
+ <% } %>
185
+ </p>
186
+ </td>
187
+ </tr>
188
+
189
+ ${footer}
190
+
191
+ <tr>
192
+ <td
193
+ style="clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;"
194
+ colspan="4">
195
+ Les informations contenues dans ce courrier électronique et ses pièces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'êtes pas le(s) destinataire(s) ou avez reçu ce courrier électronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'expéditeur dès que possible. Ce courrier électronique ne peut pas être divulgué, utilisé ou copié par quelqu'un d'autre que le(s) destinataire(s).
196
+ </td>
197
+ </tr>
198
+ </table>`;