@silexpert/core 1.1.250 → 1.1.252

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/dist/cjs/api/resources/User.d.ts +2 -2
  2. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/User.js.map +1 -1
  4. package/dist/cjs/types/Enum/Aspone.d.ts +4 -1
  5. package/dist/cjs/types/Enum/Aspone.d.ts.map +1 -1
  6. package/dist/cjs/types/Enum/Aspone.js +3 -0
  7. package/dist/cjs/types/Enum/Aspone.js.map +1 -1
  8. package/dist/cjs/types/Enum/BrandClementine.js +3 -3
  9. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  10. package/dist/cjs/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts +2 -1
  11. package/dist/cjs/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts.map +1 -1
  12. package/dist/cjs/types/Interface/api/society/CreateUserToSocietyWithPermission.js +22 -2
  13. package/dist/cjs/types/Interface/api/society/CreateUserToSocietyWithPermission.js.map +1 -1
  14. package/dist/cjs/types/Interface/api/society/UpdateSociety.d.ts +1 -0
  15. package/dist/cjs/types/Interface/api/society/UpdateSociety.d.ts.map +1 -1
  16. package/dist/cjs/types/Interface/api/society/UpdateSociety.js +4 -0
  17. package/dist/cjs/types/Interface/api/society/UpdateSociety.js.map +1 -1
  18. package/dist/cjs/types/Interface/models/ICollaboraterDetail.d.ts +1 -0
  19. package/dist/cjs/types/Interface/models/ICollaboraterDetail.d.ts.map +1 -1
  20. package/dist/cjs/types/Interface/models/ICollaboraterDetail.js.map +1 -1
  21. package/dist/cjs/types/Interface/models/ISociety.d.ts +1 -0
  22. package/dist/cjs/types/Interface/models/ISociety.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
  24. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +1 -0
  25. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  27. package/dist/cjs/utils/bankAccount.d.ts.map +1 -1
  28. package/dist/cjs/utils/bankAccount.js +9 -3
  29. package/dist/cjs/utils/bankAccount.js.map +1 -1
  30. package/dist/cjs/utils/cerfa.d.ts +12 -1
  31. package/dist/cjs/utils/cerfa.d.ts.map +1 -1
  32. package/dist/cjs/utils/cerfa.js +29 -4
  33. package/dist/cjs/utils/cerfa.js.map +1 -1
  34. package/dist/cjs/utils/email/templates/signature.js +2 -2
  35. package/dist/cjs/utils/email/templates/signature.js.map +1 -1
  36. package/dist/mjs/api/resources/User.d.ts +2 -2
  37. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  38. package/dist/mjs/api/resources/User.js.map +1 -1
  39. package/dist/mjs/types/Enum/Aspone.d.ts +4 -1
  40. package/dist/mjs/types/Enum/Aspone.d.ts.map +1 -1
  41. package/dist/mjs/types/Enum/Aspone.js +3 -0
  42. package/dist/mjs/types/Enum/Aspone.js.map +1 -1
  43. package/dist/mjs/types/Enum/BrandClementine.js +3 -3
  44. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  45. package/dist/mjs/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts +2 -1
  46. package/dist/mjs/types/Interface/api/society/CreateUserToSocietyWithPermission.d.ts.map +1 -1
  47. package/dist/mjs/types/Interface/api/society/CreateUserToSocietyWithPermission.js +23 -2
  48. package/dist/mjs/types/Interface/api/society/CreateUserToSocietyWithPermission.js.map +1 -1
  49. package/dist/mjs/types/Interface/api/society/UpdateSociety.d.ts +1 -0
  50. package/dist/mjs/types/Interface/api/society/UpdateSociety.d.ts.map +1 -1
  51. package/dist/mjs/types/Interface/api/society/UpdateSociety.js +5 -0
  52. package/dist/mjs/types/Interface/api/society/UpdateSociety.js.map +1 -1
  53. package/dist/mjs/types/Interface/models/ICollaboraterDetail.d.ts +1 -0
  54. package/dist/mjs/types/Interface/models/ICollaboraterDetail.d.ts.map +1 -1
  55. package/dist/mjs/types/Interface/models/ICollaboraterDetail.js.map +1 -1
  56. package/dist/mjs/types/Interface/models/ISociety.d.ts +1 -0
  57. package/dist/mjs/types/Interface/models/ISociety.d.ts.map +1 -1
  58. package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
  59. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +1 -0
  60. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
  61. package/dist/mjs/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  62. package/dist/mjs/utils/bankAccount.d.ts.map +1 -1
  63. package/dist/mjs/utils/bankAccount.js +9 -3
  64. package/dist/mjs/utils/bankAccount.js.map +1 -1
  65. package/dist/mjs/utils/cerfa.d.ts +12 -1
  66. package/dist/mjs/utils/cerfa.d.ts.map +1 -1
  67. package/dist/mjs/utils/cerfa.js +29 -3
  68. package/dist/mjs/utils/cerfa.js.map +1 -1
  69. package/dist/mjs/utils/email/templates/signature.js +2 -2
  70. package/dist/mjs/utils/email/templates/signature.js.map +1 -1
  71. package/package.json +1 -1
  72. package/ts/api/resources/User.ts +2 -1
  73. package/ts/types/Enum/Aspone.ts +3 -0
  74. package/ts/types/Enum/BrandClementine.ts +3 -3
  75. package/ts/types/Interface/api/society/CreateUserToSocietyWithPermission.ts +28 -3
  76. package/ts/types/Interface/api/society/UpdateSociety.ts +3 -0
  77. package/ts/types/Interface/models/ICollaboraterDetail.ts +1 -0
  78. package/ts/types/Interface/models/ISociety.ts +1 -0
  79. package/ts/types/Interface/models/IVatDeclarationSocietyDetail.ts +1 -0
  80. package/ts/utils/bankAccount.ts +10 -3
  81. package/ts/utils/cerfa.ts +32 -5
  82. package/ts/utils/email/templates/signature.ts +2 -2
@@ -1,12 +1,38 @@
1
1
  import { GlobalRegime } from '../types/Enum/GlobalRegime';
2
+ import { Code, ErrorType } from '../types';
3
+ import { isDefined } from 'class-validator';
4
+ export class ServiceException extends Error {
5
+ code;
6
+ type;
7
+ constructor(params) {
8
+ if (typeof params === 'string') {
9
+ super(params);
10
+ return;
11
+ }
12
+ super(params.message);
13
+ this.code = params.code;
14
+ this.type = params.type;
15
+ }
16
+ }
2
17
  export function retrieveCerfaFromSocietyInformations(idLegalForm, idTaxSystem, idFiscalRegime, profitsType) {
3
18
  const globalRegimes = Object.values(GlobalRegime);
4
19
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
5
20
  if (!selectedGlobalRegime)
6
- throw new Error('Missing informations to retrieve CERFA informations');
21
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });
22
+ if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {
23
+ const missingData = [];
24
+ if (!isDefined(idFiscalRegime))
25
+ missingData.push('Régime de droit commun');
26
+ if (!isDefined(profitsType))
27
+ missingData.push('Régime d\'imposition');
28
+ if (!isDefined(idTaxSystem))
29
+ missingData.push('Activité (BNC, BIC)');
30
+ const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;
31
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });
32
+ }
7
33
  const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
8
34
  if (choiceIndex < 0)
9
- throw new Error('Missing informations to retrieve CERFA informations');
35
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\'incapacité de générer votre bilan chez nous' });
10
36
  const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
11
37
  return { declaration, annex: annexe ?? null };
12
38
  }
@@ -14,7 +40,7 @@ export function retreiveChoicesDependingLegalForm(idLegalForm) {
14
40
  const globalRegimes = Object.values(GlobalRegime);
15
41
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
16
42
  if (!selectedGlobalRegime)
17
- throw new Error(`LegalForm #${idLegalForm} not implemented`);
43
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });
18
44
  return selectedGlobalRegime;
19
45
  }
20
46
  //# sourceMappingURL=cerfa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cerfa.js","sourceRoot":"","sources":["../../../ts/utils/cerfa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAA2B,MAAM,4BAA4B,CAAC;AAGnF,MAAM,UAAU,oCAAoC,CAAC,WAAmB,EAAE,WAAsB,EAAE,cAA4B,EAAE,WAAwB;IACtJ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,oBAAoB;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IAElG,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,cAAc,KAAK,cAAc,IAAI,GAAG,CAAC,WAAW,KAAK,WAAW,IAAI,GAAG,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;IAEjL,IAAI,WAAW,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IAE5F,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1E,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,WAAmB;IACnE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,oBAAoB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,oBAAoB;QAAE,MAAM,IAAI,KAAK,CAAC,cAAc,WAAW,kBAAkB,CAAC,CAAC;IACxF,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem } from '../types';\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');\n\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);\n return selectedGlobalRegime;\n}"]}
1
+ {"version":3,"file":"cerfa.js","sourceRoot":"","sources":["../../../ts/utils/cerfa.ts"],"names":[],"mappings":"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","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem, Code, ErrorType } from '../types';\nimport { isDefined } from 'class-validator';\n\ntype ErrorParams = { code: Code, type: ErrorType, message?: string } | string;\n\nexport class ServiceException extends Error {\n private readonly code: Code;\n\n private readonly type: ErrorType;\n\n constructor(params: ErrorParams) {\n if (typeof params === 'string') {\n super(params);\n return;\n }\n super(params.message);\n this.code = params.code;\n this.type = params.type;\n }\n}\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });\n\n if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {\n const missingData: string[] = [];\n if (!isDefined(idFiscalRegime)) missingData.push('Régime de droit commun');\n if (!isDefined(profitsType)) missingData.push('Régime d\\'imposition');\n if (!isDefined(idTaxSystem)) missingData.push('Activité (BNC, BIC)');\n const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;\n throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });\n }\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\\'incapacité de générer votre bilan chez nous' });\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });\n return selectedGlobalRegime;\n}"]}
@@ -189,8 +189,8 @@ ${logoClementine}
189
189
  <% } %>
190
190
  Nos horaires : <%= horaires %>
191
191
 
192
- <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
193
- Adresse : <%- brandPostalAddress %> - <%- brandCity %>
192
+ <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
193
+ <br/>Adresse : <%- brandPostalAddress %> - <%- brandCity %>
194
194
  <% } %>
195
195
  </p>
196
196
 
@@ -1 +1 @@
1
- {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <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;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <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\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n\n <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>\n Adresse : <%- brandPostalAddress %> - <%- brandCity %>\n <% } %>\n </p>\n\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <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\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl && !isDataOfficer) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n 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).\n </td>\n</tr>\n</table>`;"]}
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <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;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <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\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n\n <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>\n <br/>Adresse : <%- brandPostalAddress %> - <%- brandCity %>\n <% } %>\n </p>\n\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <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\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl && !isDataOfficer) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n 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).\n </td>\n</tr>\n</table>`;"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.250",
3
+ "version": "1.1.252",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -1,6 +1,7 @@
1
1
  import { Resource } from '../Resource';
2
2
  import {
3
3
  IUser, QueryConfirm, QueryResendConfirmationLink, CreateUser, CreateCoworker, QueryUserSmsConfirmation, QueryGetAllFromSociety, ISociety, Role, TimeCounterType, QueryGetAllCollaborators, QueryGetAllCollaboratorsByRoles, QueryUserSociety, QueryGetAllWithoutBp,
4
+ CollaboratorsByRoles,
4
5
  } from '../../types';
5
6
 
6
7
  export class User extends Resource {
@@ -31,7 +32,7 @@ export class User extends Resource {
31
32
  allCollaborators(params: QueryGetAllCollaborators): Promise<IUser[]> {
32
33
  return this.axios.$get('user/all-collaborators', { params });
33
34
  }
34
- allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<IUser> {
35
+ allCollaboratorsByRoles(data: QueryGetAllCollaboratorsByRoles): Promise<CollaboratorsByRoles[]> {
35
36
  const { idTimeCounterType, idRoles } = data;
36
37
  let params = { idRoles };
37
38
  if (idTimeCounterType) {
@@ -8,9 +8,12 @@ export enum RedactorDesignation {
8
8
  export enum Rof {
9
9
  TVA = 'TVA1',
10
10
  BNC = 'BNC1',
11
+ BNC2 = 'BNC2',
12
+ BNC3 = 'BNC3',
11
13
  IS = 'IS1',
12
14
  BIC = 'BIC1',
13
15
  BIC2 = 'BIC2',
16
+ BIC3 = 'BIC3',
14
17
  }
15
18
 
16
19
  export enum AsponeTaxSystem {
@@ -314,9 +314,9 @@ export const BrandClementine = [
314
314
  footerColor: '#f3692f',
315
315
  },
316
316
  listPhones: {
317
- contact: '01 76 39 00 60',
318
- qualite: '01 76 39 00 60',
319
- juridique: '01 76 39 00 60',
317
+ contact: '03 83 93 14 14',
318
+ qualite: '03 83 93 14 14',
319
+ juridique: '03 83 93 14 14',
320
320
  },
321
321
  listMails: {
322
322
  contact: 'comptastart@legalstart.fr',
@@ -1,19 +1,44 @@
1
+ import { IsBoolean, IsEmail, IsOptional, IsString } from 'class-validator';
1
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
3
  import { Permissions } from '../user/Permissions';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
3
5
 
4
6
  export class CreateUserToSocietyWithPermission {
5
7
  @ApiProperty()
8
+ @IsEmail()
6
9
  email: string;
10
+
7
11
  @ApiProperty()
12
+ @IsString()
8
13
  firstname: string;
14
+
9
15
  @ApiProperty()
16
+ @IsString()
10
17
  lastname: string;
11
- @ApiProperty()
18
+
19
+ @ApiPropertyOptional()
20
+ @IsBoolean()
21
+ @ToBoolean()
22
+ @IsOptional()
12
23
  acceptCgv?: boolean; // not sure if needed (maybe more a front notion)
13
- @ApiProperty()
14
- permissions: Partial<Permissions>;
24
+
25
+ @ApiPropertyOptional()
26
+ permissions?: Partial<Permissions>;
15
27
  @ApiPropertyOptional()
28
+ @IsBoolean()
29
+ @ToBoolean()
30
+ @IsOptional()
16
31
  acceptNewsletter?: boolean;
32
+
17
33
  @ApiPropertyOptional()
34
+ @IsString()
35
+ @IsOptional()
18
36
  phone?: string;
37
+
38
+ @ApiPropertyOptional()
39
+ @IsBoolean()
40
+ @ToBoolean()
41
+ @IsOptional()
42
+ withoutPermissions?: boolean;
43
+
19
44
  }
@@ -67,6 +67,9 @@ export class UpdateSociety {
67
67
  @ApiPropertyOptional()
68
68
  canceledFirstStepTourAt?: Date;
69
69
 
70
+ @ApiPropertyOptional()
71
+ passwordIsuite?: string | null;
72
+
70
73
  @ApiPropertyOptional()
71
74
  @IsBoolean()
72
75
  @ToBoolean()
@@ -7,6 +7,7 @@ export interface ICollaboraterDetail {
7
7
  idNationality: number;
8
8
  idCountryOfBirth: number;
9
9
  maidenName?: string | null;
10
+ birthdate: Date;
10
11
  socialSecurityNumber: string;
11
12
  cityOfBirth: string;
12
13
  address: string;
@@ -165,6 +165,7 @@ export interface ISociety {
165
165
  hidePartneredAccountantsBubbleLink?: boolean | null;
166
166
  cancelCompleteCreationModal?: Date | null;
167
167
  isCreatedInApp?: boolean;
168
+ passwordIsuite?: string | null;
168
169
 
169
170
  // Associations
170
171
  accounts?: IAccount[];
@@ -5,6 +5,7 @@ import { ISociety } from './ISociety';
5
5
  export interface IVatDeclarationSocietyDetail {
6
6
  id?: number;
7
7
  companyTaxRof: Rof | null;
8
+ balanceSheetRof: Rof | null;
8
9
  rof: Rof | null;
9
10
  ogaName: string | null;
10
11
  ogaId: string | null;
@@ -18,10 +18,17 @@ export function isSynchro(params: IBankAccount, dateOfTermination?: Date, bankCo
18
18
  // // Si JE DECLARE ou AUTRE alors tjs synchro
19
19
  if (params.idPartnerType && [PartnerTransactionType.JE_DECLARE, PartnerTransactionType.OTHER].includes(params.idPartnerType)) return StateSynchro.SYNCHRONIZED;
20
20
 
21
- // // Si budget et lastUpdate = la date du jour alors synchro
21
+ /** Si budget lastUpdate = la date du jour alors synchro
22
+ * Ou si lastupdate = inProgressImport et lastupdate est après lastTryImport
23
+ *
24
+ *
25
+ */
22
26
  if (params.idPartnerType && params.lastUpdate &&
23
- [PartnerTransactionType.QONTO, PartnerTransactionType.SHINE, PartnerTransactionType.BUDGET_INSIGHT].includes(params.idPartnerType) &&
24
- dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs().format('YYYY-MM-DD')
27
+ [PartnerTransactionType.QONTO, PartnerTransactionType.SHINE, PartnerTransactionType.BUDGET_INSIGHT].includes(params.idPartnerType)
28
+ && ((dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs().format('YYYY-MM-DD') ) ||
29
+ (dayjs(params.lastUpdate).format('YYYY-MM-DD') === dayjs(params.inProgressImport).format('YYYY-MM-DD') &&
30
+ (!params.lastTryImport || dayjs(params.lastUpdate).format('YYYYMMDD') >= dayjs(params.lastTryImport).format('YYYYMMDD')) )
31
+ )
25
32
  && (!bankConnection || bankConnection?.errorCode === null)
26
33
  ) return StateSynchro.SYNCHRONIZED;
27
34
 
package/ts/utils/cerfa.ts CHANGED
@@ -1,17 +1,44 @@
1
1
  import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';
2
2
  import { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';
3
- import { ProfitsType, FiscalRegime, TaxSystem } from '../types';
3
+ import { ProfitsType, FiscalRegime, TaxSystem, Code, ErrorType } from '../types';
4
+ import { isDefined } from 'class-validator';
5
+
6
+ type ErrorParams = { code: Code, type: ErrorType, message?: string } | string;
7
+
8
+ export class ServiceException extends Error {
9
+ private readonly code: Code;
10
+
11
+ private readonly type: ErrorType;
12
+
13
+ constructor(params: ErrorParams) {
14
+ if (typeof params === 'string') {
15
+ super(params);
16
+ return;
17
+ }
18
+ super(params.message);
19
+ this.code = params.code;
20
+ this.type = params.type;
21
+ }
22
+ }
4
23
 
5
24
  export function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {
6
25
  const globalRegimes = Object.values(GlobalRegime);
7
26
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
8
27
 
9
- if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');
28
+ if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Votre raison sociale ne vous permet pas de générer votre bilan chez nous' });
10
29
 
11
- const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
30
+ if (!isDefined(idFiscalRegime) || !isDefined(profitsType) || !isDefined(idTaxSystem)) {
31
+ const missingData: string[] = [];
32
+ if (!isDefined(idFiscalRegime)) missingData.push('Régime de droit commun');
33
+ if (!isDefined(profitsType)) missingData.push('Régime d\'imposition');
34
+ if (!isDefined(idTaxSystem)) missingData.push('Activité (BNC, BIC)');
35
+ const errorMEssage = `Les informations suivantes sont manquantes pour déterminer votre régime ficscal: ${missingData.join(', ')}`;
36
+ throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: errorMEssage });
37
+ }
12
38
 
13
- if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');
39
+ const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
14
40
 
41
+ if (choiceIndex < 0) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: 'Au vu des informations remplis, nous somme dans l\'incapacité de générer votre bilan chez nous' });
15
42
  const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
16
43
 
17
44
  return { declaration, annex: annexe ?? null };
@@ -21,6 +48,6 @@ export function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRe
21
48
  const globalRegimes = Object.values(GlobalRegime);
22
49
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
23
50
 
24
- if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);
51
+ if (!selectedGlobalRegime) throw new ServiceException({ code: Code.validationError, type: ErrorType.resourceError, message: `LegalForm #${idLegalForm} not implemented` });
25
52
  return selectedGlobalRegime;
26
53
  }
@@ -193,8 +193,8 @@ ${logoClementine}
193
193
  <% } %>
194
194
  Nos horaires : <%= horaires %>
195
195
 
196
- <% if(!['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
197
- Adresse : <%- brandPostalAddress %> - <%- brandCity %>
196
+ <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
197
+ <br/>Adresse : <%- brandPostalAddress %> - <%- brandCity %>
198
198
  <% } %>
199
199
  </p>
200
200