@silexpert/core 2.0.3 → 2.0.4

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 (42) hide show
  1. package/dist/api/resources/CustomerActivity.d.ts +1 -1
  2. package/dist/api/resources/CustomerActivity.d.ts.map +1 -1
  3. package/dist/api/resources/CustomerActivity.js.map +1 -1
  4. package/dist/types/Enum/AIPrompt.js +1 -1
  5. package/dist/types/Enum/AIPrompt.js.map +1 -1
  6. package/dist/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts +2 -2
  7. package/dist/types/Interface/api/oldExportInfo/OldExpertInfos.d.ts.map +1 -1
  8. package/dist/types/Interface/api/oldExportInfo/OldExpertInfos.js +3 -3
  9. package/dist/types/Interface/api/oldExportInfo/OldExpertInfos.js.map +1 -1
  10. package/dist/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts +2 -0
  11. package/dist/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts.map +1 -1
  12. package/dist/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +14 -0
  13. package/dist/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -1
  14. package/dist/types/Interface/api/statutsGeneration/CreatePrestationPayload.d.ts +6 -0
  15. package/dist/types/Interface/api/statutsGeneration/CreatePrestationPayload.d.ts.map +1 -0
  16. package/dist/types/Interface/api/statutsGeneration/CreatePrestationPayload.js +2 -0
  17. package/dist/types/Interface/api/statutsGeneration/CreatePrestationPayload.js.map +1 -0
  18. package/dist/types/Interface/api/statutsGeneration/UpsertBusinessPartnerResult.d.ts +8 -0
  19. package/dist/types/Interface/api/statutsGeneration/UpsertBusinessPartnerResult.d.ts.map +1 -0
  20. package/dist/types/Interface/api/statutsGeneration/UpsertBusinessPartnerResult.js +2 -0
  21. package/dist/types/Interface/api/statutsGeneration/UpsertBusinessPartnerResult.js.map +1 -0
  22. package/dist/types/index.d.ts +2 -0
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/dist/types/index.js +2 -0
  25. package/dist/types/index.js.map +1 -1
  26. package/dist/utils/email/templates/signature.d.ts +1 -1
  27. package/dist/utils/email/templates/signature.js +1 -1
  28. package/dist/utils/email/templates/signature.js.map +1 -1
  29. package/dist/utils/email.d.ts +1 -1
  30. package/dist/utils/email.d.ts.map +1 -1
  31. package/dist/utils/email.js +4 -1
  32. package/dist/utils/email.js.map +1 -1
  33. package/package.json +1 -1
  34. package/ts/api/resources/CustomerActivity.ts +1 -1
  35. package/ts/types/Enum/AIPrompt.ts +1 -1
  36. package/ts/types/Interface/api/oldExportInfo/OldExpertInfos.ts +5 -5
  37. package/ts/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.ts +10 -0
  38. package/ts/types/Interface/api/statutsGeneration/CreatePrestationPayload.ts +6 -0
  39. package/ts/types/Interface/api/statutsGeneration/UpsertBusinessPartnerResult.ts +7 -0
  40. package/ts/types/index.ts +2 -0
  41. package/ts/utils/email/templates/signature.ts +1 -1
  42. package/ts/utils/email.ts +6 -1
@@ -1,2 +1,2 @@
1
- export declare const signatureTemplate = "<% 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\u00E9es 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 <table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n<tr style=\"background: #F4F8FB\">\n <% 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 <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 : 35, avenue Jean M\u00E9decin - 06000 NICE\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\u00E9l\u00E9charger 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\u00E9l\u00E9charger 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\u00E9l\u00E9phonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n <% 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\u00E9couvrez 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\u2019\u00E0 500\u20AC 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\u00E9l\u00E9charger 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\u00E9l\u00E9charger 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\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 \u00E9lectronique et ses pi\u00E8ces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'\u00EAtes pas le(s) destinataire(s) ou avez re\u00E7u ce courrier \u00E9lectronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'exp\u00E9diteur d\u00E8s que possible. Ce courrier \u00E9lectronique ne peut pas \u00EAtre divulgu\u00E9, utilis\u00E9 ou copi\u00E9 par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>";
1
+ export declare const signatureTemplate = "<% 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\u00E9es 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 <table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n<tr style=\"background: #F4F8FB\">\n <% 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 <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 : 35, avenue Jean M\u00E9decin - 06000 NICE\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\u00E9l\u00E9charger 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\u00E9l\u00E9charger 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\u00E9l\u00E9phonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n <% 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\u00E9couvrez 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\u2019\u00E0 500\u20AC 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\u00E9l\u00E9charger 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\u00E9l\u00E9charger 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\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 \u00E9lectronique et ses pi\u00E8ces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'\u00EAtes pas le(s) destinataire(s) ou avez re\u00E7u ce courrier \u00E9lectronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'exp\u00E9diteur d\u00E8s que possible. Ce courrier \u00E9lectronique ne peut pas \u00EAtre divulgu\u00E9, utilis\u00E9 ou copi\u00E9 par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>";
2
2
  //# sourceMappingURL=signature.d.ts.map
@@ -172,7 +172,7 @@ class="signatureClementine">
172
172
  <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>
173
173
  Ligne directe : <%- phoneSignature %><br/>
174
174
  <% } %>
175
- Nos horaires : <%= horaires %>
175
+ Nos horaires : <%- horaires %>
176
176
 
177
177
  <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
178
178
  <br/>Adresse : 35, avenue Jean Médecin - 06000 NICE
@@ -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,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;;IAQvC,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 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<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 : 35, avenue Jean Médecin - 06000 NICE\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>`;\n"]}
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,OAAO;;;;;;;;IAQvC,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 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<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 : 35, avenue Jean Médecin - 06000 NICE\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>`;\n"]}
@@ -1,4 +1,4 @@
1
1
  import { IUser } from '../types/Interface/models/IUser.js';
2
- export declare function getHoraires(user: IUser): string;
2
+ export declare function getHoraires(user: IUser): "Du lundi au vendredi de 9h à 18h" | "Du lundi au jeudi de 9h à 17h<br/>Le vendredi de 9h à 12h";
3
3
  export declare function generateSignature(params: any): string;
4
4
  //# sourceMappingURL=email.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../ts/utils/email.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAgI3D,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,UAiDtC;AAsCD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAuLrD"}
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../ts/utils/email.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAiI3D,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,oGAqDtC;AAsCD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAuLrD"}
@@ -122,7 +122,10 @@ export function getHoraires(user) {
122
122
  // ) {
123
123
  // return 'Du lundi au vendredi de 9h à 18h';
124
124
  // }
125
- return 'Du lundi au vendredi de 9h à 18h';
125
+ if (user?.roles?.map((r) => r.id).includes(Role.COMMERCIAL)) {
126
+ return 'Du lundi au vendredi de 9h à 18h';
127
+ }
128
+ return 'Du lundi au jeudi de 9h à 17h<br/>Le vendredi de 9h à 12h';
126
129
  // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 18h';
127
130
  // if (!user.workingSchedules.length) return 'Du lundi au vendredi de 9h à 18h';
128
131
  // let reducedSchedules = user.workingSchedules.reduce((acc: any, e:any, index: number) => {
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../ts/utils/email.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,SAAS,gBAAgB,CAAC,IAAS;IACjC,+DAA+D;IAC/D,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC,aAAa,CAAC;IAElD,MAAM,sBAAsB;IAC1B,+DAA+D;IAC/D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtH,+DAA+D;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E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AI;QACJ,aAAa;QACb,aAAa;QACb,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;QACjF,sBAAsB,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;QACzE,QAAQ;QACR,YAAY;QACZ,WAAW;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import ejs from 'ejs';\nimport { Role } from '../types/Enum/Role.js';\nimport { TimeSlot } from '../types/Enum/TimeSlot.js';\nimport { IUser } from '../types/Interface/models/IUser.js';\nimport { getBrand, getBrandConfig } from './brands.js';\nimport { signatureTemplate } from './email/templates/signature.js';\nimport { intersection } from './noLodash.js';\n\nfunction getRoleSignature(user: any) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (user.positionLabel) return user.positionLabel;\n\n const isStagiaireOrAlternant =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSatisfaction = user.roles.map((r: any) => r.id).includes(Role.SATISFACTION);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isTechnicalAdvisor = user.roles.map((r: any) => r.id).includes(Role.TECHNICAL_ADVISOR);\n\n const isFront = !!intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],\n ).length;\n\n if (isSales && isManager) {\n return 'Responsable commercial';\n }\n if (isSales) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de clientèle`;\n }\n\n if (isCS && isManager) {\n return 'Responsable relations clients';\n }\n if (isCS) {\n return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`;\n }\n\n if (isTechnicalAdvisor) {\n return `Référent${user.idCivility === 2 ? 'e' : ''} technique`;\n }\n\n if (isOnBoarder && isManager) {\n return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;\n }\n if (isOnBoarder) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;\n }\n\n if (isSatisfaction && isManager) {\n return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;\n }\n if (isSatisfaction) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;\n }\n\n if (isDataOfficer && isManager) {\n return 'Responsable aide comptable';\n }\n if (isDataOfficer) {\n return 'Aide comptable';\n }\n\n if (isFacturation && isStagiaireOrAlternant) {\n return 'Assistant facturation';\n }\n if (isFacturation && isManager) {\n return 'Responsable facturation';\n }\n if (isFacturation) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de facturation`;\n }\n\n if (isJuridic && isStagiaireOrAlternant) {\n return 'Assistant juridique';\n }\n if (isJuridic && isManager) {\n return 'Responsable juridique';\n }\n if (isJuridic) {\n return 'Juriste';\n }\n\n if (isSocial && isStagiaireOrAlternant) {\n return 'Assistant paie';\n }\n if (isSocial && isManager) {\n return 'Responsable paie';\n }\n if (isSocial) {\n return 'Gestionnaire de paie';\n }\n\n if (isExpert) {\n return `Expert${user.idCivility === 2 ? 'e' : ''}-comptable`;\n }\n\n if (isAdmin) {\n return 'Développeur web';\n }\n\n if (isFront && isManager) return 'Responsable comptable';\n if (isFront && isStagiaireOrAlternant) return 'Assistant comptable';\n // if (isFront) return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n // return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n // if (isFront) return `Comptable`;\n return 'Comptable';\n}\n\nexport function getHoraires(user: IUser) {\n // On affiche les horaires uniquement pour les front, et pas pour les TVA\n\n // if (\n // isItThisEnv('Pourcentage') &&\n // user?.entity &&\n // [EntityType.COMPTALIB, EntityType.AMEX, EntityType.CABINET_RONCHIERI_LANDRA].includes(user.entity)\n // ) {\n // return 'Du lundi au vendredi de 9h à 18h';\n // }\n\n return 'Du lundi au vendredi de 9h à 18h';\n\n // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 18h';\n\n // if (!user.workingSchedules.length) return 'Du lundi au vendredi de 9h à 18h';\n\n // let reducedSchedules = user.workingSchedules.reduce((acc: any, e:any, index: number) => {\n // const name = `${dayjs(e.morningStart, 'HH:mm:ss').format('HH:mm')}-${dayjs(e.afternoonEnd || e.morningEnd, 'HH:mm:ss').format('HH:mm')}`;\n // if (!acc[name]) acc[name] = [index];\n // else acc[name].push(index);\n // return acc;\n // }, {});\n\n // reducedSchedules = orderByLodash(reducedSchedules, (elem) => elem.length, ['desc']);\n\n // let resultHoraire = '';\n // let startH;\n // let startM;\n // let endH;\n // let endM;\n // let firstDayOfWeek;\n // let lastDayOfWeek;\n\n // reducedSchedules.forEach((schedule: any, index: number) => {\n // startH = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('hour');\n // startM = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('minute');\n // endH = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('hour');\n // endM = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('minute');\n // firstDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[schedule[0]].idDay).format('dddd');\n // if (!index) {\n // // pour le premier index, on affiche l'amplitude horaire la plus commune, du XX au XX de Xh à Xh\n // lastDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[user.workingSchedules.length - 1].idDay).format('dddd');\n // resultHoraire += `Du ${firstDayOfWeek} au ${lastDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // } else { // Fonctionnel si uniquement un jour par semaine avec des horaires différents\n // resultHoraire += `<br/>Le ${firstDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // }\n // });\n // return resultHoraire;\n}\n\nfunction getMailSignature(user: any, idTypeBrand: number) {\n const informatiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.informatique',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) {\n return informatiqueMail;\n }\n\n if (\n user &&\n !!intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL, Role.TECHNICAL_ADVISOR],\n ).length\n )\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return user.email;\n return bonjourMail;\n}\n\nfunction getPhoneSignature(user: any) {\n if (user.phone && user.phone !== '0383931414') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return user.phone.replace(/\\B(?=(\\d{2})+(?!\\d))/g, '&nbsp;');\n }\n return null;\n}\n\nexport function generateSignature(params: any): string {\n const { fromAddress = null, idTypeBrand = 1, society, ...otherParams } = params;\n let { user, forceRole = null } = otherParams;\n\n const brand = getBrand({ idTypeBrand });\n\n const hostS3 = brand.urlS3;\n\n const brandName = brand.name;\n const brandCity = brand.companyInformation?.city;\n const brandPostalAddress = brand.companyInformation?.postalAddress || '';\n const commercialName = brand.commercialName;\n const iban = brand.bank?.IBAN;\n const bic = brand.bank?.BIC;\n const bonjourMail = brand.listMails?.bonjour || '';\n const socialMail = brand.listMails?.social || '';\n const dataOfficerMail = brand.listMails?.gestion || '';\n const satisfactionMail = brand.listMails?.satisfaction || '';\n const resiliationMail = brand.listMails?.resiliation || '';\n const supportMail = brand.listMails?.support || '';\n const juridiqueMail = brand.listMails?.juridique || '';\n const facturationMail = brand.listMails?.facturation || '';\n const primaryColor = brand.colors?.primary || '';\n const standardPhoneSignature = brand.listPhones?.contact || '';\n const juridiquePhoneSignature = brand.listPhones?.juridique || '';\n const socialPhoneSignature = brand.listPhones?.social || '';\n\n // Pour les cas hybrides des personnes ayant plusieurs rôles\n // Comme Morgane (Facturation + Satisfaction) et qui peut choisir plusieurs emails d'expédition\n // Il faut que la signature corresponde à l'adresse d'expédition\n // donc actuellement, on ne gère que satisfaction/resiliation/facturation\n const listGenericEmails: { email: string; forceRole: string }[] = [\n { email: satisfactionMail, forceRole: 'satisfaction' },\n { email: resiliationMail, forceRole: 'resiliation' },\n { email: facturationMail, forceRole: 'facturation' },\n ];\n const genericEmailUsed = listGenericEmails.find((e) => e.email === fromAddress);\n if (genericEmailUsed) {\n forceRole = genericEmailUsed.forceRole;\n }\n\n let roleSignature: string | null;\n let mailSignature: string | null;\n let phoneSignature: string | null;\n let horaires: string | null;\n [roleSignature, mailSignature, phoneSignature, horaires] = [\n 'Expert-Comptable',\n bonjourMail,\n null,\n 'Du lundi au vendredi de 9h à 18h',\n ];\n\n if (user?.roles && user.roles.some((r: any) => r.id === Role.DATA_OFFICER)) {\n // Signature data_officer\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n mailSignature = dataOfficerMail;\n roleSignature = '';\n } else if (\n intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n (user?.roles ?? []).map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.SENIOR],\n ).length === 2\n ) {\n // Signature front senior\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n mailSignature = bonjourMail;\n roleSignature = '';\n } else if (forceRole === 'satisfaction') {\n // Signature satisfaction\n user = {\n firstname: 'Service satisfaction clients',\n isAll: true,\n };\n mailSignature = satisfactionMail;\n roleSignature = '';\n phoneSignature = standardPhoneSignature;\n } else if (forceRole === 'resiliation') {\n // Signature resiliation\n user = {\n firstname: 'Service satisfaction clients',\n isAll: true,\n };\n mailSignature = resiliationMail;\n roleSignature = '';\n phoneSignature = standardPhoneSignature;\n } else if (forceRole === 'social') {\n // Signature social\n user = {\n firstname: 'Service social',\n isAll: true,\n };\n mailSignature = socialMail;\n roleSignature = '';\n phoneSignature = socialPhoneSignature;\n } else if (forceRole === 'support') {\n // Signature support\n user = {\n firstname: 'Service Support',\n isAll: true,\n };\n mailSignature = supportMail;\n roleSignature = null;\n } else if (forceRole === 'juridique') {\n // Signature juridique\n user = {\n firstname: 'Service juridique',\n isAll: true,\n };\n mailSignature = juridiqueMail;\n roleSignature = null;\n phoneSignature = juridiquePhoneSignature;\n } else if (forceRole === 'facturation') {\n // Signature facturation\n user = {\n firstname: 'Service facturation',\n isAll: true,\n };\n mailSignature = facturationMail;\n roleSignature = null;\n phoneSignature = standardPhoneSignature;\n } else if (!user || forceRole === 'generique') {\n // Signature Clementine\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n roleSignature = '';\n } else if (user !== 0) {\n // Signature par défaut\n roleSignature = getRoleSignature(user);\n mailSignature = getMailSignature(user, idTypeBrand);\n horaires = getHoraires(user);\n phoneSignature = getPhoneSignature(user);\n }\n\n // Si on a une société, alors on remplace le lien calendly de base par le lien calendly interne\n // on n'affiche uniquement si le collaboreatur a bien des créneaux horaires\n if (\n society?.id &&\n user?.roles?.some((r: any) =>\n [Role.FRONT_OFFICE, Role.FACTURATION, Role.JURIDIC, Role.COMMERCIAL].includes(r.id),\n ) &&\n user?.usersTimeSlots?.length\n ) {\n const isJuridic = user?.roles?.some((r: any) => [Role.JURIDIC].includes(r.id));\n const isFactu = user?.roles?.some((r: any) => [Role.FACTURATION].includes(r.id));\n const isCommercial = user?.roles?.some((r: any) => [Role.COMMERCIAL].includes(r.id));\n let idType = TimeSlot.BILAN;\n if (isJuridic) idType = TimeSlot.EDIT_SOCIETY;\n if (isFactu) idType = TimeSlot.BILLING;\n if (isCommercial) idType = TimeSlot.SALES;\n const urlApp = brand.urlApp || '';\n user.calendlyUrl = `${urlApp}/appointment?uuid=${society?.externalId ? society.externalId : ''}&idType=${idType}`;\n }\n\n return ejs.render(signatureTemplate, {\n forceRole,\n isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,\n isDataOfficer: user.roles ? user.roles.some((r: any) => r.id === Role.DATA_OFFICER) : true,\n brandName,\n brandPostalAddress,\n brandCity,\n idTypeBrand,\n commercialName,\n iban,\n bic,\n hostS3,\n user,\n roleSignature,\n mailSignature,\n phoneSignature: phoneSignature ? phoneSignature.replace(/\\s+/gm, '&nbsp;') : null,\n standardPhoneSignature: standardPhoneSignature.replace(/\\s+/gm, '&nbsp;'),\n horaires,\n primaryColor,\n supportMail,\n });\n}\n"]}
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../../ts/utils/email.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,SAAS,gBAAgB,CAAC,IAAS;IACjC,+DAA+D;IAC/D,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC,aAAa,CAAC;IAElD,MAAM,sBAAsB;IAC1B,+DAA+D;IAC/D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtH,+DAA+D;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,C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AAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;QAC1F,SAAS;QACT,kBAAkB;QAClB,SAAS;QACT,WAAW;QACX,cAAc;QACd,IAAI;QACJ,GAAG;QACH,MAAM;QACN,IAAI;QACJ,aAAa;QACb,aAAa;QACb,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;QACjF,sBAAsB,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;QACzE,QAAQ;QACR,YAAY;QACZ,WAAW;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import ejs from 'ejs';\nimport { Role } from '../types/Enum/Role.js';\nimport { TimeSlot } from '../types/Enum/TimeSlot.js';\nimport { IUser } from '../types/Interface/models/IUser.js';\nimport { getBrand, getBrandConfig } from './brands.js';\nimport { signatureTemplate } from './email/templates/signature.js';\nimport { intersection } from './noLodash.js';\nimport { IRole } from '../types/Interface/models/IRole.js';\n\nfunction getRoleSignature(user: any) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (user.positionLabel) return user.positionLabel;\n\n const isStagiaireOrAlternant =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSatisfaction = user.roles.map((r: any) => r.id).includes(Role.SATISFACTION);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n const isTechnicalAdvisor = user.roles.map((r: any) => r.id).includes(Role.TECHNICAL_ADVISOR);\n\n const isFront = !!intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS],\n ).length;\n\n if (isSales && isManager) {\n return 'Responsable commercial';\n }\n if (isSales) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de clientèle`;\n }\n\n if (isCS && isManager) {\n return 'Responsable relations clients';\n }\n if (isCS) {\n return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`;\n }\n\n if (isTechnicalAdvisor) {\n return `Référent${user.idCivility === 2 ? 'e' : ''} technique`;\n }\n\n if (isOnBoarder && isManager) {\n return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;\n }\n if (isOnBoarder) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;\n }\n\n if (isSatisfaction && isManager) {\n return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;\n }\n if (isSatisfaction) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;\n }\n\n if (isDataOfficer && isManager) {\n return 'Responsable aide comptable';\n }\n if (isDataOfficer) {\n return 'Aide comptable';\n }\n\n if (isFacturation && isStagiaireOrAlternant) {\n return 'Assistant facturation';\n }\n if (isFacturation && isManager) {\n return 'Responsable facturation';\n }\n if (isFacturation) {\n return `Chargé${user.idCivility === 2 ? 'e' : ''} de facturation`;\n }\n\n if (isJuridic && isStagiaireOrAlternant) {\n return 'Assistant juridique';\n }\n if (isJuridic && isManager) {\n return 'Responsable juridique';\n }\n if (isJuridic) {\n return 'Juriste';\n }\n\n if (isSocial && isStagiaireOrAlternant) {\n return 'Assistant paie';\n }\n if (isSocial && isManager) {\n return 'Responsable paie';\n }\n if (isSocial) {\n return 'Gestionnaire de paie';\n }\n\n if (isExpert) {\n return `Expert${user.idCivility === 2 ? 'e' : ''}-comptable`;\n }\n\n if (isAdmin) {\n return 'Développeur web';\n }\n\n if (isFront && isManager) return 'Responsable comptable';\n if (isFront && isStagiaireOrAlternant) return 'Assistant comptable';\n // if (isFront) return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n // return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n // if (isFront) return `Comptable`;\n return 'Comptable';\n}\n\nexport function getHoraires(user: IUser) {\n // On affiche les horaires uniquement pour les front, et pas pour les TVA\n\n // if (\n // isItThisEnv('Pourcentage') &&\n // user?.entity &&\n // [EntityType.COMPTALIB, EntityType.AMEX, EntityType.CABINET_RONCHIERI_LANDRA].includes(user.entity)\n // ) {\n // return 'Du lundi au vendredi de 9h à 18h';\n // }\n\n if (user?.roles?.map((r: IRole) => r.id).includes(Role.COMMERCIAL)) {\n return 'Du lundi au vendredi de 9h à 18h';\n }\n\n return 'Du lundi au jeudi de 9h à 17h<br/>Le vendredi de 9h à 12h';\n\n // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 18h';\n\n // if (!user.workingSchedules.length) return 'Du lundi au vendredi de 9h à 18h';\n\n // let reducedSchedules = user.workingSchedules.reduce((acc: any, e:any, index: number) => {\n // const name = `${dayjs(e.morningStart, 'HH:mm:ss').format('HH:mm')}-${dayjs(e.afternoonEnd || e.morningEnd, 'HH:mm:ss').format('HH:mm')}`;\n // if (!acc[name]) acc[name] = [index];\n // else acc[name].push(index);\n // return acc;\n // }, {});\n\n // reducedSchedules = orderByLodash(reducedSchedules, (elem) => elem.length, ['desc']);\n\n // let resultHoraire = '';\n // let startH;\n // let startM;\n // let endH;\n // let endM;\n // let firstDayOfWeek;\n // let lastDayOfWeek;\n\n // reducedSchedules.forEach((schedule: any, index: number) => {\n // startH = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('hour');\n // startM = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('minute');\n // endH = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('hour');\n // endM = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('minute');\n // firstDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[schedule[0]].idDay).format('dddd');\n // if (!index) {\n // // pour le premier index, on affiche l'amplitude horaire la plus commune, du XX au XX de Xh à Xh\n // lastDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[user.workingSchedules.length - 1].idDay).format('dddd');\n // resultHoraire += `Du ${firstDayOfWeek} au ${lastDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // } else { // Fonctionnel si uniquement un jour par semaine avec des horaires différents\n // resultHoraire += `<br/>Le ${firstDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // }\n // });\n // return resultHoraire;\n}\n\nfunction getMailSignature(user: any, idTypeBrand: number) {\n const informatiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.informatique',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) {\n return informatiqueMail;\n }\n\n if (\n user &&\n !!intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n user.roles.map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL, Role.TECHNICAL_ADVISOR],\n ).length\n )\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return user.email;\n return bonjourMail;\n}\n\nfunction getPhoneSignature(user: any) {\n if (user.phone && user.phone !== '0383931414') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return user.phone.replace(/\\B(?=(\\d{2})+(?!\\d))/g, '&nbsp;');\n }\n return null;\n}\n\nexport function generateSignature(params: any): string {\n const { fromAddress = null, idTypeBrand = 1, society, ...otherParams } = params;\n let { user, forceRole = null } = otherParams;\n\n const brand = getBrand({ idTypeBrand });\n\n const hostS3 = brand.urlS3;\n\n const brandName = brand.name;\n const brandCity = brand.companyInformation?.city;\n const brandPostalAddress = brand.companyInformation?.postalAddress || '';\n const commercialName = brand.commercialName;\n const iban = brand.bank?.IBAN;\n const bic = brand.bank?.BIC;\n const bonjourMail = brand.listMails?.bonjour || '';\n const socialMail = brand.listMails?.social || '';\n const dataOfficerMail = brand.listMails?.gestion || '';\n const satisfactionMail = brand.listMails?.satisfaction || '';\n const resiliationMail = brand.listMails?.resiliation || '';\n const supportMail = brand.listMails?.support || '';\n const juridiqueMail = brand.listMails?.juridique || '';\n const facturationMail = brand.listMails?.facturation || '';\n const primaryColor = brand.colors?.primary || '';\n const standardPhoneSignature = brand.listPhones?.contact || '';\n const juridiquePhoneSignature = brand.listPhones?.juridique || '';\n const socialPhoneSignature = brand.listPhones?.social || '';\n\n // Pour les cas hybrides des personnes ayant plusieurs rôles\n // Comme Morgane (Facturation + Satisfaction) et qui peut choisir plusieurs emails d'expédition\n // Il faut que la signature corresponde à l'adresse d'expédition\n // donc actuellement, on ne gère que satisfaction/resiliation/facturation\n const listGenericEmails: { email: string; forceRole: string }[] = [\n { email: satisfactionMail, forceRole: 'satisfaction' },\n { email: resiliationMail, forceRole: 'resiliation' },\n { email: facturationMail, forceRole: 'facturation' },\n ];\n const genericEmailUsed = listGenericEmails.find((e) => e.email === fromAddress);\n if (genericEmailUsed) {\n forceRole = genericEmailUsed.forceRole;\n }\n\n let roleSignature: string | null;\n let mailSignature: string | null;\n let phoneSignature: string | null;\n let horaires: string | null;\n [roleSignature, mailSignature, phoneSignature, horaires] = [\n 'Expert-Comptable',\n bonjourMail,\n null,\n 'Du lundi au vendredi de 9h à 18h',\n ];\n\n if (user?.roles && user.roles.some((r: any) => r.id === Role.DATA_OFFICER)) {\n // Signature data_officer\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n mailSignature = dataOfficerMail;\n roleSignature = '';\n } else if (\n intersection(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n (user?.roles ?? []).map((r: any) => r.id),\n [Role.FRONT_OFFICE, Role.SENIOR],\n ).length === 2\n ) {\n // Signature front senior\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n mailSignature = bonjourMail;\n roleSignature = '';\n } else if (forceRole === 'satisfaction') {\n // Signature satisfaction\n user = {\n firstname: 'Service satisfaction clients',\n isAll: true,\n };\n mailSignature = satisfactionMail;\n roleSignature = '';\n phoneSignature = standardPhoneSignature;\n } else if (forceRole === 'resiliation') {\n // Signature resiliation\n user = {\n firstname: 'Service satisfaction clients',\n isAll: true,\n };\n mailSignature = resiliationMail;\n roleSignature = '';\n phoneSignature = standardPhoneSignature;\n } else if (forceRole === 'social') {\n // Signature social\n user = {\n firstname: 'Service social',\n isAll: true,\n };\n mailSignature = socialMail;\n roleSignature = '';\n phoneSignature = socialPhoneSignature;\n } else if (forceRole === 'support') {\n // Signature support\n user = {\n firstname: 'Service Support',\n isAll: true,\n };\n mailSignature = supportMail;\n roleSignature = null;\n } else if (forceRole === 'juridique') {\n // Signature juridique\n user = {\n firstname: 'Service juridique',\n isAll: true,\n };\n mailSignature = juridiqueMail;\n roleSignature = null;\n phoneSignature = juridiquePhoneSignature;\n } else if (forceRole === 'facturation') {\n // Signature facturation\n user = {\n firstname: 'Service facturation',\n isAll: true,\n };\n mailSignature = facturationMail;\n roleSignature = null;\n phoneSignature = standardPhoneSignature;\n } else if (!user || forceRole === 'generique') {\n // Signature Clementine\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n roleSignature = '';\n } else if (user !== 0) {\n // Signature par défaut\n roleSignature = getRoleSignature(user);\n mailSignature = getMailSignature(user, idTypeBrand);\n horaires = getHoraires(user);\n phoneSignature = getPhoneSignature(user);\n }\n\n // Si on a une société, alors on remplace le lien calendly de base par le lien calendly interne\n // on n'affiche uniquement si le collaboreatur a bien des créneaux horaires\n if (\n society?.id &&\n user?.roles?.some((r: any) =>\n [Role.FRONT_OFFICE, Role.FACTURATION, Role.JURIDIC, Role.COMMERCIAL].includes(r.id),\n ) &&\n user?.usersTimeSlots?.length\n ) {\n const isJuridic = user?.roles?.some((r: any) => [Role.JURIDIC].includes(r.id));\n const isFactu = user?.roles?.some((r: any) => [Role.FACTURATION].includes(r.id));\n const isCommercial = user?.roles?.some((r: any) => [Role.COMMERCIAL].includes(r.id));\n let idType = TimeSlot.BILAN;\n if (isJuridic) idType = TimeSlot.EDIT_SOCIETY;\n if (isFactu) idType = TimeSlot.BILLING;\n if (isCommercial) idType = TimeSlot.SALES;\n const urlApp = brand.urlApp || '';\n user.calendlyUrl = `${urlApp}/appointment?uuid=${society?.externalId ? society.externalId : ''}&idType=${idType}`;\n }\n\n return ejs.render(signatureTemplate, {\n forceRole,\n isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,\n isDataOfficer: user.roles ? user.roles.some((r: any) => r.id === Role.DATA_OFFICER) : true,\n brandName,\n brandPostalAddress,\n brandCity,\n idTypeBrand,\n commercialName,\n iban,\n bic,\n hostS3,\n user,\n roleSignature,\n mailSignature,\n phoneSignature: phoneSignature ? phoneSignature.replace(/\\s+/gm, '&nbsp;') : null,\n standardPhoneSignature: standardPhoneSignature.replace(/\\s+/gm, '&nbsp;'),\n horaires,\n primaryColor,\n supportMail,\n });\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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
  "type": "module",
@@ -24,7 +24,7 @@ export class CustomerActivity extends Resource {
24
24
  return this.axios.$post('/customers-acceptances', params);
25
25
  }
26
26
 
27
- annualReporting(idSociety: number, idExercice: number): Promise<void> {
27
+ annualReporting(idSociety: number, idExercice: number): Promise<Buffer> {
28
28
  return this.axios.$get(`/customer-activities/societies/${idSociety}/exercices/${idExercice}/annual-report`, {
29
29
  responseType: 'arraybuffer',
30
30
  });
@@ -19,7 +19,7 @@ export const AIPrompt: Record<AIPromptKey, AIPromptInfo> = {
19
19
  Analysez ce relevé de compte bancaire et extrayez toutes les transactions sous forme d'un objet JSON structuré.
20
20
  Le relevé peut contenir des informations telles que la date de la transaction, le libellé, le montant débité et le montant crédité (ou alors un montant en positif pour le crédit et un montant en négatif pour le débit).
21
21
  Garder exactement le même ordre de transaction que dans le relevé.
22
- Le format attendu est le suivant :
22
+ Le format attendu est le suivant (sans mettre de clé "transactions" devant) :
23
23
  [
24
24
  {
25
25
  "dateValue": string (format : YYYY-MM-DD correspondant à la date de la transaction),
@@ -1,4 +1,4 @@
1
- import { IsBoolean, IsDate, IsInt, IsOptional, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDateString, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform.js';
4
4
 
@@ -40,8 +40,8 @@ export class CreateOldExpertInfo {
40
40
 
41
41
  @ApiPropertyOptional()
42
42
  @IsOptional()
43
- @IsDate()
44
- recoveryDate: Date | null;
43
+ @IsDateString()
44
+ recoveryDate: string | null;
45
45
 
46
46
  @ApiPropertyOptional()
47
47
  @IsOptional()
@@ -50,8 +50,8 @@ export class CreateOldExpertInfo {
50
50
 
51
51
  @ApiPropertyOptional()
52
52
  @IsOptional()
53
- @IsDate()
54
- dateSendReprise: Date | null;
53
+ @IsDateString()
54
+ dateSendReprise: string | null;
55
55
 
56
56
  @ApiProperty()
57
57
  @IsBoolean()
@@ -81,6 +81,16 @@ export class CreateBusinessPartnersAndUsersParams {
81
81
  @ToBoolean()
82
82
  isPhysical?: boolean;
83
83
 
84
+ @ApiPropertyOptional()
85
+ @IsOptional()
86
+ @IsInt()
87
+ idBusinessPartner?: number;
88
+
89
+ @ApiPropertyOptional()
90
+ @IsOptional()
91
+ @IsInt()
92
+ idDirectorBusinessPartner?: number;
93
+
84
94
  @ApiPropertyOptional()
85
95
  @IsOptional()
86
96
  @IsString()
@@ -0,0 +1,6 @@
1
+ import { IPrestation } from '../../models/IPrestation.js';
2
+
3
+ export interface CreatePrestationPayload extends IPrestation {
4
+ idExercice: number;
5
+ amount?: number;
6
+ }
@@ -0,0 +1,7 @@
1
+ export interface UpsertBusinessPartnerResult {
2
+ index: number;
3
+ idBusinessPartner: number;
4
+ action: 'created' | 'updated';
5
+ idDirectorBusinessPartner?: number;
6
+ isPhysical: boolean;
7
+ }
package/ts/types/index.ts CHANGED
@@ -731,6 +731,8 @@ export * from './Interface/api/statutsGeneration/QueryGetUser.js';
731
731
  export * from './Interface/api/statutsGeneration/IntentToPayPrestationParams.js';
732
732
  export * from './Interface/api/statutsGeneration/SendInviteMailParams.js';
733
733
  export * from './Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js';
734
+ export * from './Interface/api/statutsGeneration/CreatePrestationPayload.js';
735
+ export * from './Interface/api/statutsGeneration/UpsertBusinessPartnerResult.js';
734
736
  export * from './Interface/api/accountingIncome/ReadAccountingIncome.js';
735
737
  export * from './Interface/api/ocr/OcrTransactions.js';
736
738
  export * from './Interface/api/bankStatement/QueryBankStatement.js';
@@ -175,7 +175,7 @@ class="signatureClementine">
175
175
  <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>
176
176
  Ligne directe : <%- phoneSignature %><br/>
177
177
  <% } %>
178
- Nos horaires : <%= horaires %>
178
+ Nos horaires : <%- horaires %>
179
179
 
180
180
  <% if(['Pourcentage ECE - AMEX', 'Pourcentage ECF'].includes(brandName)) { %>
181
181
  <br/>Adresse : 35, avenue Jean Médecin - 06000 NICE
package/ts/utils/email.ts CHANGED
@@ -5,6 +5,7 @@ import { IUser } from '../types/Interface/models/IUser.js';
5
5
  import { getBrand, getBrandConfig } from './brands.js';
6
6
  import { signatureTemplate } from './email/templates/signature.js';
7
7
  import { intersection } from './noLodash.js';
8
+ import { IRole } from '../types/Interface/models/IRole.js';
8
9
 
9
10
  function getRoleSignature(user: any) {
10
11
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
@@ -140,7 +141,11 @@ export function getHoraires(user: IUser) {
140
141
  // return 'Du lundi au vendredi de 9h à 18h';
141
142
  // }
142
143
 
143
- return 'Du lundi au vendredi de 9h à 18h';
144
+ if (user?.roles?.map((r: IRole) => r.id).includes(Role.COMMERCIAL)) {
145
+ return 'Du lundi au vendredi de 9h à 18h';
146
+ }
147
+
148
+ return 'Du lundi au jeudi de 9h à 17h<br/>Le vendredi de 9h à 12h';
144
149
 
145
150
  // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 18h';
146
151