@silexpert/core 1.2.32 → 1.2.35

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 (187) hide show
  1. package/dist/cjs/api/resources/Brevo.d.ts +4 -4
  2. package/dist/cjs/api/resources/Brevo.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Brevo.js +2 -2
  4. package/dist/cjs/api/resources/Brevo.js.map +1 -1
  5. package/dist/cjs/api/resources/CommercialConditionOfSale.d.ts +9 -0
  6. package/dist/cjs/api/resources/CommercialConditionOfSale.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/CommercialConditionOfSale.js +20 -0
  8. package/dist/cjs/api/resources/CommercialConditionOfSale.js.map +1 -0
  9. package/dist/cjs/api/resources/CommercialDocumentTemplate.d.ts +9 -0
  10. package/dist/cjs/api/resources/CommercialDocumentTemplate.d.ts.map +1 -0
  11. package/dist/cjs/api/resources/CommercialDocumentTemplate.js +20 -0
  12. package/dist/cjs/api/resources/CommercialDocumentTemplate.js.map +1 -0
  13. package/dist/cjs/api/resources/CommercialEmail.d.ts +9 -0
  14. package/dist/cjs/api/resources/CommercialEmail.d.ts.map +1 -0
  15. package/dist/cjs/api/resources/CommercialEmail.js +20 -0
  16. package/dist/cjs/api/resources/CommercialEmail.js.map +1 -0
  17. package/dist/cjs/api/resources/Dashboard.d.ts +2 -1
  18. package/dist/cjs/api/resources/Dashboard.d.ts.map +1 -1
  19. package/dist/cjs/api/resources/Dashboard.js +3 -0
  20. package/dist/cjs/api/resources/Dashboard.js.map +1 -1
  21. package/dist/cjs/api/resources.d.ts +6 -0
  22. package/dist/cjs/api/resources.d.ts.map +1 -1
  23. package/dist/cjs/api/resources.js +6 -0
  24. package/dist/cjs/api/resources.js.map +1 -1
  25. package/dist/cjs/types/Enum/PaymentRecovery.d.ts +9 -0
  26. package/dist/cjs/types/Enum/PaymentRecovery.d.ts.map +1 -1
  27. package/dist/cjs/types/Enum/PaymentRecovery.js +150 -1
  28. package/dist/cjs/types/Enum/PaymentRecovery.js.map +1 -1
  29. package/dist/cjs/types/Enum/QualificationLead.d.ts +13 -0
  30. package/dist/cjs/types/Enum/QualificationLead.d.ts.map +1 -0
  31. package/dist/cjs/types/Enum/QualificationLead.js +39 -0
  32. package/dist/cjs/types/Enum/QualificationLead.js.map +1 -0
  33. package/dist/cjs/types/Enum/TimeSlot.d.ts +2 -1
  34. package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
  35. package/dist/cjs/types/Enum/TimeSlot.js +10 -0
  36. package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
  37. package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts +9 -3
  38. package/dist/cjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
  39. package/dist/cjs/types/Interface/api/brevo/BrevoElement.js +28 -11
  40. package/dist/cjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
  41. package/dist/cjs/types/Interface/api/brevo/Read.d.ts +12 -1
  42. package/dist/cjs/types/Interface/api/brevo/Read.d.ts.map +1 -1
  43. package/dist/cjs/types/Interface/api/brevo/Read.js.map +1 -1
  44. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts +4 -1
  45. package/dist/cjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  46. package/dist/cjs/types/Interface/api/commercialManagement/Create.js +26 -5
  47. package/dist/cjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  48. package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts +5 -0
  49. package/dist/cjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  50. package/dist/cjs/types/Interface/api/commercialManagement/Query.js +24 -1
  51. package/dist/cjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  52. package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts +7 -0
  53. package/dist/cjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  54. package/dist/cjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
  55. package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
  56. package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +4 -3
  57. package/dist/cjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
  58. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.d.ts +2 -0
  59. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -1
  60. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js +12 -0
  61. package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  62. package/dist/cjs/types/Interface/models/ITerminationList.d.ts +1 -0
  63. package/dist/cjs/types/Interface/models/ITerminationList.d.ts.map +1 -1
  64. package/dist/cjs/types/Interface/models/ITerminationList.js.map +1 -1
  65. package/dist/cjs/types/index.d.ts +1 -0
  66. package/dist/cjs/types/index.d.ts.map +1 -1
  67. package/dist/cjs/types/index.js +1 -0
  68. package/dist/cjs/types/index.js.map +1 -1
  69. package/dist/cjs/utils/commercialManagement/internationalization/choices.js +2 -2
  70. package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  71. package/dist/cjs/utils/commercialManagement/saleEmail.js.map +1 -1
  72. package/dist/cjs/utils/commercialManagement/templates/body.js +1 -1
  73. package/dist/cjs/utils/commercialManagement/templates/body.js.map +1 -1
  74. package/dist/cjs/utils/commercialManagement/templates/common.js +1 -1
  75. package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
  76. package/dist/cjs/utils/email/templates/signature.d.ts +1 -1
  77. package/dist/cjs/utils/email/templates/signature.js +1 -1
  78. package/dist/cjs/utils/email/templates/signature.js.map +1 -1
  79. package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
  80. package/dist/cjs/utils/vat/utils.js +1 -0
  81. package/dist/cjs/utils/vat/utils.js.map +1 -1
  82. package/dist/mjs/api/resources/Brevo.d.ts +4 -4
  83. package/dist/mjs/api/resources/Brevo.d.ts.map +1 -1
  84. package/dist/mjs/api/resources/Brevo.js +2 -2
  85. package/dist/mjs/api/resources/Brevo.js.map +1 -1
  86. package/dist/mjs/api/resources/CommercialConditionOfSale.d.ts +9 -0
  87. package/dist/mjs/api/resources/CommercialConditionOfSale.d.ts.map +1 -0
  88. package/dist/mjs/api/resources/CommercialConditionOfSale.js +16 -0
  89. package/dist/mjs/api/resources/CommercialConditionOfSale.js.map +1 -0
  90. package/dist/mjs/api/resources/CommercialDocumentTemplate.d.ts +9 -0
  91. package/dist/mjs/api/resources/CommercialDocumentTemplate.d.ts.map +1 -0
  92. package/dist/mjs/api/resources/CommercialDocumentTemplate.js +16 -0
  93. package/dist/mjs/api/resources/CommercialDocumentTemplate.js.map +1 -0
  94. package/dist/mjs/api/resources/CommercialEmail.d.ts +9 -0
  95. package/dist/mjs/api/resources/CommercialEmail.d.ts.map +1 -0
  96. package/dist/mjs/api/resources/CommercialEmail.js +16 -0
  97. package/dist/mjs/api/resources/CommercialEmail.js.map +1 -0
  98. package/dist/mjs/api/resources/Dashboard.d.ts +2 -1
  99. package/dist/mjs/api/resources/Dashboard.d.ts.map +1 -1
  100. package/dist/mjs/api/resources/Dashboard.js +3 -0
  101. package/dist/mjs/api/resources/Dashboard.js.map +1 -1
  102. package/dist/mjs/api/resources.d.ts +6 -0
  103. package/dist/mjs/api/resources.d.ts.map +1 -1
  104. package/dist/mjs/api/resources.js +6 -0
  105. package/dist/mjs/api/resources.js.map +1 -1
  106. package/dist/mjs/types/Enum/PaymentRecovery.d.ts +9 -0
  107. package/dist/mjs/types/Enum/PaymentRecovery.d.ts.map +1 -1
  108. package/dist/mjs/types/Enum/PaymentRecovery.js +149 -0
  109. package/dist/mjs/types/Enum/PaymentRecovery.js.map +1 -1
  110. package/dist/mjs/types/Enum/QualificationLead.d.ts +13 -0
  111. package/dist/mjs/types/Enum/QualificationLead.d.ts.map +1 -0
  112. package/dist/mjs/types/Enum/QualificationLead.js +36 -0
  113. package/dist/mjs/types/Enum/QualificationLead.js.map +1 -0
  114. package/dist/mjs/types/Enum/TimeSlot.d.ts +2 -1
  115. package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
  116. package/dist/mjs/types/Enum/TimeSlot.js +10 -0
  117. package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
  118. package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts +9 -3
  119. package/dist/mjs/types/Interface/api/brevo/BrevoElement.d.ts.map +1 -1
  120. package/dist/mjs/types/Interface/api/brevo/BrevoElement.js +28 -11
  121. package/dist/mjs/types/Interface/api/brevo/BrevoElement.js.map +1 -1
  122. package/dist/mjs/types/Interface/api/brevo/Read.d.ts +12 -1
  123. package/dist/mjs/types/Interface/api/brevo/Read.d.ts.map +1 -1
  124. package/dist/mjs/types/Interface/api/brevo/Read.js.map +1 -1
  125. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts +4 -1
  126. package/dist/mjs/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  127. package/dist/mjs/types/Interface/api/commercialManagement/Create.js +30 -6
  128. package/dist/mjs/types/Interface/api/commercialManagement/Create.js.map +1 -1
  129. package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts +5 -0
  130. package/dist/mjs/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  131. package/dist/mjs/types/Interface/api/commercialManagement/Query.js +26 -1
  132. package/dist/mjs/types/Interface/api/commercialManagement/Query.js.map +1 -1
  133. package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts +7 -0
  134. package/dist/mjs/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  135. package/dist/mjs/types/Interface/api/commercialManagement/Read.js.map +1 -1
  136. package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.d.ts.map +1 -1
  137. package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js +4 -3
  138. package/dist/mjs/types/Interface/api/previsionalForm/CreatePrevisionalForm.js.map +1 -1
  139. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.d.ts +2 -0
  140. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -1
  141. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js +14 -0
  142. package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
  143. package/dist/mjs/types/Interface/models/ITerminationList.d.ts +1 -0
  144. package/dist/mjs/types/Interface/models/ITerminationList.d.ts.map +1 -1
  145. package/dist/mjs/types/Interface/models/ITerminationList.js.map +1 -1
  146. package/dist/mjs/types/index.d.ts +1 -0
  147. package/dist/mjs/types/index.d.ts.map +1 -1
  148. package/dist/mjs/types/index.js +1 -0
  149. package/dist/mjs/types/index.js.map +1 -1
  150. package/dist/mjs/utils/commercialManagement/internationalization/choices.js +2 -2
  151. package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
  152. package/dist/mjs/utils/commercialManagement/saleEmail.js.map +1 -1
  153. package/dist/mjs/utils/commercialManagement/templates/body.js +1 -1
  154. package/dist/mjs/utils/commercialManagement/templates/body.js.map +1 -1
  155. package/dist/mjs/utils/commercialManagement/templates/common.js +1 -1
  156. package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
  157. package/dist/mjs/utils/email/templates/signature.d.ts +1 -1
  158. package/dist/mjs/utils/email/templates/signature.js +1 -1
  159. package/dist/mjs/utils/email/templates/signature.js.map +1 -1
  160. package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
  161. package/dist/mjs/utils/vat/utils.js +1 -0
  162. package/dist/mjs/utils/vat/utils.js.map +1 -1
  163. package/package.json +1 -1
  164. package/ts/api/resources/Brevo.ts +5 -5
  165. package/ts/api/resources/CommercialConditionOfSale.ts +20 -0
  166. package/ts/api/resources/CommercialDocumentTemplate.ts +20 -0
  167. package/ts/api/resources/CommercialEmail.ts +20 -0
  168. package/ts/api/resources/Dashboard.ts +6 -0
  169. package/ts/api/resources.ts +6 -0
  170. package/ts/types/Enum/PaymentRecovery.ts +150 -0
  171. package/ts/types/Enum/QualificationLead.ts +35 -0
  172. package/ts/types/Enum/TimeSlot.ts +20 -10
  173. package/ts/types/Interface/api/brevo/BrevoElement.ts +22 -8
  174. package/ts/types/Interface/api/brevo/Read.ts +13 -1
  175. package/ts/types/Interface/api/commercialManagement/Create.ts +22 -4
  176. package/ts/types/Interface/api/commercialManagement/Query.ts +21 -0
  177. package/ts/types/Interface/api/commercialManagement/Read.ts +10 -1
  178. package/ts/types/Interface/api/previsionalForm/CreatePrevisionalForm.ts +59 -58
  179. package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +10 -0
  180. package/ts/types/Interface/models/ITerminationList.ts +1 -0
  181. package/ts/types/index.ts +1 -0
  182. package/ts/utils/commercialManagement/internationalization/choices.ts +2 -2
  183. package/ts/utils/commercialManagement/saleEmail.ts +1 -1
  184. package/ts/utils/commercialManagement/templates/body.ts +1 -1
  185. package/ts/utils/commercialManagement/templates/common.ts +1 -1
  186. package/ts/utils/email/templates/signature.ts +1 -1
  187. package/ts/utils/vat/utils.ts +1 -0
@@ -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>`;"]}
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’à 600€ 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>`;"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,KAAK,UAAQ,GAAG,MAAM,CAc9I;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,2BAA2B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,OAAO,UAAQ,EAAE,KAAK,UAAQ,GAAG,MAAM,CAmBlK;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,GAAG,IAAI,CAetF;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAO,UAMvF;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAO,UAMxF"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,wBAAgB,wBAAwB,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,KAAK,UAAQ,GAAG,MAAM,CAc9I;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,2BAA2B,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,SAAI,EAAE,OAAO,UAAQ,EAAE,KAAK,UAAQ,GAAG,MAAM,CAmBlK;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,GAAG,IAAI,CAgBtF;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAO,UAMvF;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,UAAO,UAMxF"}
@@ -49,6 +49,7 @@ export function textFormatting(value, length = null) {
49
49
  formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début
50
50
  formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin
51
51
  formattedValue = formattedValue.replace(/€/g, 'EUR');
52
+ formattedValue = formattedValue.replace(/œ/g, 'oe');
52
53
  if (length)
53
54
  formattedValue = formattedValue.slice(0, length);
54
55
  return formattedValue;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,UAAU,wBAAwB,CAAC,iBAAqC,EAAE,cAAwB,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK;IACpI,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE;QAC1E,IAAI,MAAM,GAAG,GAAG,CAAC;QACjB,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YAC7B,IAAI,eAAe,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9H,MAAM,IAAI,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC;gBACzD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAClB,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MA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OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,KAAa,EAAE,SAAS,GAAG,IAAI;IACtF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAC1E,MAAM,gBAAgB,GAAG,QAAQ,GAAG,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAE5D,IAAI,CAAC,SAAS;QAAE,OAAO,gBAAgB,CAAC;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,SAAiB,EAAE,KAAa,EAAE,SAAS,GAAG,IAAI;IACvF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAC1E,MAAM,gBAAgB,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAE7D,IAAI,CAAC,SAAS;QAAE,OAAO,gBAAgB,CAAC;IACxC,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0), precision);\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, logging = false, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n\n // eslint-disable-next-line no-console\n if (logging) console.log('\\'\\'');\n // eslint-disable-next-line no-console\n if (logging) console.log(accountingEntry);\n\n accTmp += ((accountingEntry.debit - accountingEntry.credit) * (((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100)));\n return true;\n }\n return false;\n });\n return isAbs ? Math.abs(accTmp) : accTmp;\n }, precision));\n}\n\nexport function textFormatting(value: any, length: number | null = null): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n formattedValue = formattedValue.replace(/€/g, 'EUR');\n if (length) formattedValue = formattedValue.slice(0, length);\n return formattedValue;\n }\n return null;\n}\n\nexport function getTaxesIncludedAmount(amountHt: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find(v => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountHt * ((100 + vatRate) / 100);\n \n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find(v => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountTtc / ((100 + vatRate) / 100);\n \n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../ts/utils/vat/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,MAAM,UAAU,wBAAwB,CAAC,iBAAqC,EAAE,cAAwB,EAAE,SAAS,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK;IACpI,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE;QAC1E,IAAI,MAAM,GAAG,GAAG,CAAC;QACjB,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YAC7B,IAAI,eAAe,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9H,MAAM,IAAI,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC;g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K,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAClD,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0), precision);\n return isAbs ? Math.abs(result) : result;\n}\n\nexport function setZeroIfIsNegative(value: number): number {\n return value < 0 ? 0 : value;\n}\n\nexport function getTaxAmountByAccountNumber(accountingEntries: IAccountingEntry[], accountsNumber: string[], precision = 0, logging = false, isAbs = false): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (accountingEntry.account && accountingEntry.account.number && accountingEntry.account.number.toString().startsWith(number)) {\n\n // eslint-disable-next-line no-console\n if (logging) console.log('\\'\\'');\n // eslint-disable-next-line no-console\n if (logging) console.log(accountingEntry);\n\n accTmp += ((accountingEntry.debit - accountingEntry.credit) * (((Object.values(Vat).find((v) => v.id === accountingEntry.idVat)?.value ?? 0) / 100)));\n return true;\n }\n return false;\n });\n return isAbs ? Math.abs(accTmp) : accTmp;\n }, precision));\n}\n\nexport function textFormatting(value: any, length: number | null = null): string | null {\n if (value && typeof value === 'string') {\n let formattedValue = value.replace(/[\\u2018\\u2019]/g, '\\''); // Suppression des \"Curly Quotes\"\n formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &\n formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !\n formattedValue = formattedValue.replace(/[\\t]/g, ''); // Suppression des tabulations\n formattedValue = formattedValue.replace(/`/g, '\\''); // Suppression des `\n formattedValue = formattedValue.replace(/\"/g, ''); // Suppression des \"\n formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début\n formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin\n formattedValue = formattedValue.replace(/€/g, 'EUR');\n formattedValue = formattedValue.replace(/œ/g, 'oe');\n if (length) formattedValue = formattedValue.slice(0, length);\n return formattedValue;\n }\n return null;\n}\n\nexport function getTaxesIncludedAmount(amountHt: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find(v => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountHt * ((100 + vatRate) / 100);\n \n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}\n\nexport function getTaxesExcludedAmount(amountTtc: number, idVat: number, isRounded = true) {\n const vatRate = Object.values(Vat).find(v => v.id === idVat)?.value ?? 20;\n const amountNotRounded = amountTtc / ((100 + vatRate) / 100);\n \n if (!isRounded) return amountNotRounded;\n return Math.round(amountNotRounded * 100) / 100;\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.2.32",
3
+ "version": "1.2.35",
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,17 +1,17 @@
1
- import { CreateContact, ChangeContact, UpdateContact } from '../../types';
1
+ import { CreateContact, ChangeContact, UpdateContact, ReadGetContact, ReadCreateContact, ReadContactChange } from '../../types';
2
2
  import { Resource } from '../Resource';
3
3
 
4
4
  export class Brevo extends Resource {
5
- createContact(body: CreateContact): Promise<number> {
5
+ createContact(body: CreateContact): Promise<ReadCreateContact> {
6
6
  return this.axios.$post('brevo', body);
7
7
  }
8
8
 
9
- updateContact(params: UpdateContact): Promise<number> {
9
+ updateContact(params: UpdateContact): Promise<ReadGetContact> {
10
10
  return this.axios.$put('brevo', { params });
11
11
  }
12
12
 
13
- deleteContact(params: ChangeContact): Promise<number> {
14
- return this.axios.$delete('brevo', { params });
13
+ removeContactFromList(params: ChangeContact): Promise<ReadContactChange> {
14
+ return this.axios.$delete('brevo/list/contact/remove', { params });
15
15
  }
16
16
 
17
17
  }
@@ -0,0 +1,20 @@
1
+ import { Resource } from '../Resource';
2
+ import { CreateGeneralConditionOfSale, UpdateGeneralConditionOfSale, IGeneralConditionOfSale } from '../../types';
3
+
4
+ export class CommercialConditionOfSale extends Resource {
5
+ getAllBySociety(idSociety: number): Promise<IGeneralConditionOfSale[]> {
6
+ return this.axios.$get(`/societies/${idSociety}/general-conditions-of-sale`);
7
+ }
8
+
9
+ create(idSociety: number, payload: CreateGeneralConditionOfSale): Promise<IGeneralConditionOfSale> {
10
+ return this.axios.$post(`societies/${idSociety}/general-conditions-of-sale`, payload);
11
+ }
12
+
13
+ update(idSociety: number, id: number, payload: UpdateGeneralConditionOfSale): Promise<IGeneralConditionOfSale> {
14
+ return this.axios.$put(`/societies/${idSociety}/general-conditions-of-sale/${id}`, payload);
15
+ }
16
+
17
+ delete(idSociety: number, id: number): Promise<true> {
18
+ return this.axios.$delete(`/societies/${idSociety}/general-conditions-of-sale/${id}`);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import { Resource } from '../Resource';
2
+ import { UpdateSaleDocumentTemplate, CreateSaleDocumentTemplate, ISaleDocumentTemplate} from '../../types';
3
+
4
+ export class CommercialDocumentTemplate extends Resource {
5
+ getAllBySociety(idSociety: number): Promise<ISaleDocumentTemplate[]> {
6
+ return this.axios.$get(`/societies/${idSociety}/sales-documents-template`);
7
+ }
8
+
9
+ create(idSociety: number, payload: CreateSaleDocumentTemplate): Promise<ISaleDocumentTemplate> {
10
+ return this.axios.$post(`societies/${idSociety}/sales-documents-template`, payload);
11
+ }
12
+
13
+ update(idSociety: number, id: number, payload: UpdateSaleDocumentTemplate): Promise<ISaleDocumentTemplate> {
14
+ return this.axios.$put(`/societies/${idSociety}/sales-documents-template/${id}`, payload);
15
+ }
16
+
17
+ delete(idSociety: number, id: number): Promise<true> {
18
+ return this.axios.$delete(`/societies/${idSociety}/sales-documents-template/${id}`);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ import { Resource } from '../Resource';
2
+ import { CreateSaleEmail, ISaleEmail, ReadSaleEmail, UpdateSaleEmail } from '../../types';
3
+
4
+ export class CommercialEmail extends Resource {
5
+ getAllBySociety(idSociety: number): Promise<ReadSaleEmail[]> {
6
+ return this.axios.$get(`/societies/${idSociety}/sales-emails`);
7
+ }
8
+
9
+ create(idSociety: number, payload: CreateSaleEmail): Promise<ISaleEmail> {
10
+ return this.axios.$post(`/societies/${idSociety}/sales-emails`, payload);
11
+ }
12
+
13
+ update(idSociety: number, id: number, payload: UpdateSaleEmail): Promise<ISaleEmail> {
14
+ return this.axios.$put(`/societies/${idSociety}/sales-emails/${id}`, payload);
15
+ }
16
+
17
+ delete(idSociety: number, id: number): Promise<true> {
18
+ return this.axios.$delete(`/societies/${idSociety}/sales-emails/${id}`);
19
+ }
20
+ }
@@ -12,6 +12,8 @@ import {
12
12
  ReadTurnoverProfitAndLossAndVats,
13
13
  QueryVatDisbursed,
14
14
  ReadVatDisbursed,
15
+ QueryRecentActivity,
16
+ ReadRecentActivity,
15
17
  } from '../../types';
16
18
 
17
19
  const ROUTE = 'dashboard';
@@ -43,4 +45,8 @@ export class Dashboard extends Resource {
43
45
  getVatDisbursed(params: QueryVatDisbursed): Promise<ReadVatDisbursed> {
44
46
  return this.axios.$get(`${ROUTE}/vat-disbursed`, { params });
45
47
  }
48
+
49
+ getRecentSalesActivities(params: QueryRecentActivity): Promise<ReadRecentActivity[]> {
50
+ return this.axios.$get(`${ROUTE}/recent-sales-activities`, { params });
51
+ }
46
52
  }
@@ -172,6 +172,9 @@ import { Refund } from './resources/Refund';
172
172
  import { HumanResourceLibrary } from './resources/HumanResourceLibrary';
173
173
  import { YouSign } from './resources/YouSign';
174
174
  import { RegistrationForm } from './resources/RegistrationForm';
175
+ import { CommercialEmail } from './resources/CommercialEmail';
176
+ import { CommercialDocumentTemplate } from './resources/CommercialDocumentTemplate';
177
+ import { CommercialConditionOfSale } from './resources/CommercialConditionOfSale';
175
178
 
176
179
  export const resources = {
177
180
  simulation: Simulation,
@@ -348,4 +351,7 @@ export const resources = {
348
351
  humanResourceLibrary: HumanResourceLibrary,
349
352
  youSign: YouSign,
350
353
  registrationForm: RegistrationForm,
354
+ commercialEmail: CommercialEmail,
355
+ commercialDocumentTemplate: CommercialDocumentTemplate,
356
+ commercialConditionOfSale: CommercialConditionOfSale
351
357
  };
@@ -25,6 +25,108 @@ export enum PaymentRecoveryEvent {
25
25
  SUBMITTED = 'submitted',
26
26
  SENT_TO_AMICABLE_SETTLEMENT = 'sentToAmicableSettlement',
27
27
  }
28
+ export const PaymentRecoveryEventDetails = [
29
+ {
30
+ slug: PaymentRecoveryEvent.NEW_PAYMENT,
31
+ description: 'Versement reçu'
32
+ },
33
+ {
34
+ slug: PaymentRecoveryEvent.AROK,
35
+ description: 'Dossier pris en charge par l\'étude'
36
+ },
37
+ {
38
+ slug: PaymentRecoveryEvent.DISPUTE,
39
+ description: 'Le débiteur conteste la créance'
40
+ },
41
+ {
42
+ slug: PaymentRecoveryEvent.NO_ANSWER,
43
+ description: 'Le débiteur ne répond pas'
44
+ },
45
+ {
46
+ slug: PaymentRecoveryEvent.CLAIM_ENDED_RJ,
47
+ description: 'Le débiteur est en redressement judiciaire'
48
+ },
49
+ {
50
+ slug: PaymentRecoveryEvent.CLAIM_ENDED_LJ,
51
+ description: 'Le débiteur est en liquidation judiciaire'
52
+ },
53
+ {
54
+ slug: PaymentRecoveryEvent.CLAIM_ENDED_PAYED,
55
+ description: 'Les sommes dues ont été réglées'
56
+ },
57
+ {
58
+ slug: PaymentRecoveryEvent.CLAIM_ENDED,
59
+ description: 'Dossier clôturé en amiable'
60
+ },
61
+ {
62
+ slug: PaymentRecoveryEvent.PAY_SCHEDULE_SETUP,
63
+ description: 'Le débiteur accepte de régler'
64
+ },
65
+ {
66
+ slug: PaymentRecoveryEvent.PAY_SCHEDULE_ERROR,
67
+ description: 'Le débiteur n\'a pas respecté son échéance de paiement'
68
+ },
69
+ {
70
+ slug: PaymentRecoveryEvent.NEW_ACTION,
71
+ description: 'Nouvelle action réalisée'
72
+ },
73
+ {
74
+ slug: PaymentRecoveryEvent.COURT_SETTLEMENT_PAID,
75
+ description: 'Frais de recouvrement réglés : lancement procédure judiciaire'
76
+ },
77
+ {
78
+ slug: PaymentRecoveryEvent.NEW_PAYMENT_CLIENT,
79
+ description: 'Un nouveau versement a été effectué sur votre compte'
80
+ },
81
+ {
82
+ slug: PaymentRecoveryEvent.FILED_IP,
83
+ description: 'Votre facture a été déposée au tribunal'
84
+ },
85
+ {
86
+ slug: PaymentRecoveryEvent.IP_OK,
87
+ description: 'Votre injonction de payer a été obtenue'
88
+ },
89
+ {
90
+ slug: PaymentRecoveryEvent.IP_KO,
91
+ description: 'Votre injonction de payer a été refusée'
92
+ },
93
+ {
94
+ slug: PaymentRecoveryEvent.SIGNIFIED_IP,
95
+ description: 'Votre injonction de payer a été présentée et signifiée auprès de votre débiteur'
96
+ },
97
+ {
98
+ slug: PaymentRecoveryEvent.ON_GOING_NEGOCIAITION,
99
+ description: 'Négociation en cours'
100
+ },
101
+ {
102
+ slug: PaymentRecoveryEvent.IP_PARTIEL,
103
+ description: 'Votre injonction de payer a été obtenue partiellement'
104
+ },
105
+ {
106
+ slug: PaymentRecoveryEvent.DIRECT_PAYMENT_TO_DEBTOR,
107
+ description: 'Demande de suspension temporaire'
108
+ },
109
+ {
110
+ slug: PaymentRecoveryEvent.CLAIM_DELETION_REQUEST,
111
+ description: 'Demande de suspension définitive'
112
+ },
113
+ {
114
+ slug: PaymentRecoveryEvent.TEMPORARY_PAUSE_REQUEST,
115
+ description: 'Demande de suspension temporaire'
116
+ },
117
+ {
118
+ slug: PaymentRecoveryEvent.SENT_TO_COURT_SETTLEMENT,
119
+ description: 'Facture envoyée à l\'étude, en attente de paiement'
120
+ },
121
+ {
122
+ slug: PaymentRecoveryEvent.SUBMITTED,
123
+ description: 'Facture déposée'
124
+ },
125
+ {
126
+ slug: PaymentRecoveryEvent.SENT_TO_AMICABLE_SETTLEMENT,
127
+ description: 'Facture envoyée à l\'étude'
128
+ },
129
+ ];
28
130
 
29
131
  export enum PaymentRecoveryStatus {
30
132
  OPENED = 'opened',
@@ -38,6 +140,54 @@ export enum PaymentRecoveryStatus {
38
140
  SENT_TO_COURT = 'sent_to_court',
39
141
  }
40
142
 
143
+ export const PaymentRecoveryStatusDetails = [
144
+ {
145
+ slug: PaymentRecoveryStatus.OPENED,
146
+ shortLabel: 'En attente',
147
+ label: 'Facture déposée sur la plateforme'
148
+ },
149
+ {
150
+ slug: PaymentRecoveryStatus.SENT_TO_AMICABLE,
151
+ shortLabel: 'Envoyée',
152
+ label: 'Facture envoyée à l\'étude de Commissaires de Justice'
153
+ },
154
+ {
155
+ slug: PaymentRecoveryStatus.AMICABLE_SETTLEMENT,
156
+ shortLabel: 'Amiable',
157
+ label: 'Facture en recouvrement amiable'
158
+ },
159
+ {
160
+ slug: PaymentRecoveryStatus.RJ,
161
+ shortLabel: 'Red. jud.',
162
+ label: 'Dossier clôturé : le débiteur est en Redressement Judiciaire'
163
+ },
164
+ {
165
+ slug: PaymentRecoveryStatus.LJ,
166
+ shortLabel: 'Liq. jud.',
167
+ label: 'Dossier clôturé : le débiteur est en Liquidation Judiciaire'
168
+ },
169
+ {
170
+ slug: PaymentRecoveryStatus.PAYED,
171
+ shortLabel: 'Recouvré',
172
+ label: 'Les sommes dues ont été réglées'
173
+ },
174
+ {
175
+ slug: PaymentRecoveryStatus.CLOSED,
176
+ shortLabel: 'Clôturé',
177
+ label: 'Dossier clôturé'
178
+ },
179
+ {
180
+ slug: PaymentRecoveryStatus.JUDICIARY_PROCEDURE,
181
+ shortLabel: 'Judiciaire',
182
+ label: 'Facture en recouvrement judiciaire'
183
+ },
184
+ {
185
+ slug: PaymentRecoveryStatus.SENT_TO_COURT,
186
+ shortLabel: 'Env. jud.',
187
+ label: 'Facture envoyée à l\'étude de Commissaires de Justice pour procédure judiciaire'
188
+ },
189
+ ];
190
+
41
191
  export enum PaymentRecoveryTag {
42
192
  RECOVERED = 'recovered',
43
193
  WAITING = 'waiting',
@@ -0,0 +1,35 @@
1
+ export enum QualificationLead {
2
+ NOT_SUBSCRIBED = 1,
3
+ SMALL_INTEREST = 2,
4
+ NEUTRAL = 3,
5
+ INTERESSEMENT = 4,
6
+ VERY_INTERESSEMENT = 5,
7
+ PROMISE_CONTRACT = 6,
8
+ }
9
+
10
+ export const QualificationLeadType: Array<{ id: QualificationLead, label: string }> = [
11
+ {
12
+ id: QualificationLead.NOT_SUBSCRIBED,
13
+ label: 'Non souscris/abandon',
14
+ },
15
+ {
16
+ id: QualificationLead.SMALL_INTEREST,
17
+ label: 'Peu intéressé',
18
+ },
19
+ {
20
+ id: QualificationLead.NEUTRAL,
21
+ label: 'Neutre',
22
+ },
23
+ {
24
+ id: QualificationLead.INTERESSEMENT,
25
+ label: 'Intéressé',
26
+ },
27
+ {
28
+ id: QualificationLead.VERY_INTERESSEMENT,
29
+ label: 'Très intéressé',
30
+ },
31
+ {
32
+ id: QualificationLead.PROMISE_CONTRACT,
33
+ label: 'Promesse contrat',
34
+ },
35
+ ];
@@ -28,6 +28,7 @@ export enum TimeSlot {
28
28
  FINANCIAL_SOURCE = 22,
29
29
  FOLDER_LIFE = 23,
30
30
  CORPORATE_LAW_AND_MULTI_MODIFICATION_CONSULTANCY = 24,
31
+ HELP_PREVISIONAL = 25,
31
32
  }
32
33
  export enum TimeSlotCategory {
33
34
  ACCOUNTING = 1,
@@ -57,7 +58,7 @@ export type TimeSlotCategoryDetailType = {
57
58
  description: string;
58
59
  };
59
60
 
60
- export const TimeSlotCategoryDetail:TimeSlotCategoryDetailType[] = [
61
+ export const TimeSlotCategoryDetail: TimeSlotCategoryDetailType[] = [
61
62
  {
62
63
  id: TimeSlotCategory.ACCOUNTING,
63
64
  name: 'Comptable',
@@ -86,7 +87,7 @@ export const TimeSlotCategoryDetail:TimeSlotCategoryDetailType[] = [
86
87
  },
87
88
  ];
88
89
 
89
- export const TimeSlotDetail:TimeSlotDetailType[] = [
90
+ export const TimeSlotDetail: TimeSlotDetailType[] = [
90
91
  {
91
92
  id: TimeSlot.ONBOARDING,
92
93
  name: 'OnBoarding',
@@ -121,8 +122,8 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
121
122
  internalName: 'Rdv TVA',
122
123
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
123
124
  duration: 30,
124
- idRole:[Role.ACCOUNTANT],
125
- idRoleExcluded:[Role.MANAGER],
125
+ idRole: [Role.ACCOUNTANT],
126
+ idRoleExcluded: [Role.MANAGER],
126
127
  forWholeService: false,
127
128
  idTimeCounterType: TimeCounterType.CALENDLY.id,
128
129
  },
@@ -170,7 +171,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
170
171
  internalName: 'Rdv Commercial',
171
172
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.SALES)?.name,
172
173
  duration: 30,
173
- idRole:[Role.COMMERCIAL],
174
+ idRole: [Role.COMMERCIAL],
174
175
  forWholeService: false,
175
176
  idTimeCounterType: TimeCounterType.CALENDLY.id,
176
177
  },
@@ -228,7 +229,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
228
229
  name: 'Conseils fiscaux ou montages juridiques complexes',
229
230
  internalName: 'Rdv juridique',
230
231
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
231
- duration: 60,
232
+ duration: 60,
232
233
  idRole: [Role.JURIDIC, Role.DIRECTOR],
233
234
  forWholeService: false,
234
235
  idTimeCounterType: TimeCounterType.CALENDLY.id,
@@ -239,7 +240,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
239
240
  internalName: 'Rdv impayés',
240
241
  duration: 30,
241
242
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.BILLING)?.name,
242
- idRole:[Role.FACTURATION],
243
+ idRole: [Role.FACTURATION],
243
244
  forWholeService: true,
244
245
  idTimeCounterType: TimeCounterType.CALENDLY.id,
245
246
  },
@@ -299,7 +300,7 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
299
300
  internalName: 'Suivi de dossier',
300
301
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.ACCOUNTING)?.name,
301
302
  duration: 30,
302
- idRole:[Role.ACCOUNTANT],
303
+ idRole: [Role.ACCOUNTANT],
303
304
  forWholeService: false,
304
305
  idTimeCounterType: TimeCounterType.CALENDLY.id,
305
306
  },
@@ -308,10 +309,19 @@ export const TimeSlotDetail:TimeSlotDetailType[] = [
308
309
  name: 'Conseils en droit des sociétés et multi-modifications',
309
310
  internalName: 'Rdv droit des sociétés et multi-modifications',
310
311
  category: TimeSlotCategoryDetail.find(c => c.id === TimeSlotCategory.JURIDIC)?.name,
311
- duration: 60,
312
+ duration: 60,
312
313
  idRole: [Role.JURIDIC, Role.MANAGER],
313
- idRoleExcluded:[Role.DIRECTOR],
314
+ idRoleExcluded: [Role.DIRECTOR],
314
315
  forWholeService: false,
315
316
  idTimeCounterType: TimeCounterType.CALENDLY.id,
316
317
  },
318
+ {
319
+ id: TimeSlot.HELP_PREVISIONAL,
320
+ name: 'Accompagnement pour mon bilan prévisionnel',
321
+ internalName: 'Rdv prévisionnel simplifié',
322
+ duration: 45,
323
+ idRole: [Role.ON_BOARDER],
324
+ forWholeService: true,
325
+ idTimeCounterType: TimeCounterType.ONBOARDING.id,
326
+ }
317
327
  ];
@@ -1,4 +1,5 @@
1
1
  import {
2
+ IsArray,
2
3
  IsInt, IsNotEmpty, IsNumber, IsOptional, IsString,
3
4
  } from 'class-validator';
4
5
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
@@ -35,15 +36,10 @@ export class CreateContact {
35
36
 
36
37
  }
37
38
 
38
- export class ChangeContact {
39
+ export class GetContact {
39
40
  @ApiProperty()
40
- @IsString({ each: true })
41
- email: string[];
42
-
43
-
44
- @ApiProperty()
45
- @IsNumber()
46
- listId: number;
41
+ @IsString()
42
+ email: string;
47
43
  }
48
44
 
49
45
  export class UpdateContact {
@@ -54,4 +50,22 @@ export class UpdateContact {
54
50
 
55
51
  @ApiProperty()
56
52
  attributes: Partial<CreateContact>;
53
+ }
54
+
55
+ export class ChangeContact {
56
+ @ApiProperty()
57
+ @IsString({ each: true })
58
+ email: string[];
59
+
60
+
61
+ @ApiProperty()
62
+ @IsNumber()
63
+ listId: number;
64
+ }
65
+
66
+ export class BrevoTermination {
67
+ @ApiPropertyOptional()
68
+ @IsOptional()
69
+ @IsArray()
70
+ idSociety: number[];
57
71
  }
@@ -1,7 +1,19 @@
1
- export type ReadContact = {
1
+ export type ReadCreateContact = {
2
2
  id: number,
3
3
  }
4
4
 
5
+ export type ReadGetContact = {
6
+ email: string,
7
+ id: number,
8
+ emailBlacklisted: boolean,
9
+ smsBlacklisted: boolean,
10
+ createdAt: Date,
11
+ modifiedAt: Date,
12
+ attributes: object
13
+ listIds: number[],
14
+ statistics: object
15
+ }
16
+
5
17
  export type ReadContactChange = {
6
18
  contacts: {
7
19
  success: string[],