@silexpert/core 1.3.190 → 1.3.192-0

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 (162) hide show
  1. package/dist/cjs/api/resources/Comment.d.ts +2 -2
  2. package/dist/cjs/api/resources/Comment.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Comment.js.map +1 -1
  4. package/dist/cjs/api/resources/Report.d.ts +4 -3
  5. package/dist/cjs/api/resources/Report.d.ts.map +1 -1
  6. package/dist/cjs/api/resources/Report.js +15 -1
  7. package/dist/cjs/api/resources/Report.js.map +1 -1
  8. package/dist/cjs/api/resources/ReportHistory.d.ts +13 -0
  9. package/dist/cjs/api/resources/ReportHistory.d.ts.map +1 -0
  10. package/dist/cjs/api/resources/ReportHistory.js +18 -0
  11. package/dist/cjs/api/resources/ReportHistory.js.map +1 -0
  12. package/dist/cjs/api/resources/Society.d.ts +2 -1
  13. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  14. package/dist/cjs/api/resources/Society.js +3 -0
  15. package/dist/cjs/api/resources/Society.js.map +1 -1
  16. package/dist/cjs/api/resources.d.ts +4 -0
  17. package/dist/cjs/api/resources.d.ts.map +1 -1
  18. package/dist/cjs/api/resources.js +4 -0
  19. package/dist/cjs/api/resources.js.map +1 -1
  20. package/dist/cjs/types/Enum/ReportService.d.ts +4 -1
  21. package/dist/cjs/types/Enum/ReportService.d.ts.map +1 -1
  22. package/dist/cjs/types/Enum/ReportService.js +39 -18
  23. package/dist/cjs/types/Enum/ReportService.js.map +1 -1
  24. package/dist/cjs/types/Enum/ReportSource.d.ts +13 -0
  25. package/dist/cjs/types/Enum/ReportSource.d.ts.map +1 -0
  26. package/dist/cjs/types/Enum/ReportSource.js +29 -0
  27. package/dist/cjs/types/Enum/ReportSource.js.map +1 -0
  28. package/dist/cjs/types/Enum/ReportType.d.ts +9 -1
  29. package/dist/cjs/types/Enum/ReportType.d.ts.map +1 -1
  30. package/dist/cjs/types/Enum/ReportType.js +41 -1
  31. package/dist/cjs/types/Enum/ReportType.js.map +1 -1
  32. package/dist/cjs/types/Enum/TaskResponseType.d.ts.map +1 -1
  33. package/dist/cjs/types/Enum/TaskResponseType.js +33 -0
  34. package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
  35. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +17 -0
  36. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
  37. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +4 -1
  38. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
  39. package/dist/cjs/types/Interface/api/report/CreateReport.d.ts +3 -1
  40. package/dist/cjs/types/Interface/api/report/CreateReport.d.ts.map +1 -1
  41. package/dist/cjs/types/Interface/api/report/CreateReport.js +11 -2
  42. package/dist/cjs/types/Interface/api/report/CreateReport.js.map +1 -1
  43. package/dist/cjs/types/Interface/api/report/QueryReports.d.ts +5 -1
  44. package/dist/cjs/types/Interface/api/report/QueryReports.d.ts.map +1 -1
  45. package/dist/cjs/types/Interface/api/report/QueryReports.js +21 -1
  46. package/dist/cjs/types/Interface/api/report/QueryReports.js.map +1 -1
  47. package/dist/cjs/types/Interface/api/report/QueryReportsForLetter.d.ts +1 -1
  48. package/dist/cjs/types/Interface/api/report/QueryReportsForLetter.d.ts.map +1 -1
  49. package/dist/cjs/types/Interface/api/report/QueryReportsForLetter.js +4 -3
  50. package/dist/cjs/types/Interface/api/report/QueryReportsForLetter.js.map +1 -1
  51. package/dist/cjs/types/Interface/api/report/UpdateReport.d.ts +13 -6
  52. package/dist/cjs/types/Interface/api/report/UpdateReport.d.ts.map +1 -1
  53. package/dist/cjs/types/Interface/api/report/UpdateReport.js +120 -0
  54. package/dist/cjs/types/Interface/api/report/UpdateReport.js.map +1 -1
  55. package/dist/cjs/types/Interface/api/reportHistory/Query.d.ts +4 -0
  56. package/dist/cjs/types/Interface/api/reportHistory/Query.d.ts.map +1 -0
  57. package/dist/cjs/types/Interface/api/reportHistory/Query.js +23 -0
  58. package/dist/cjs/types/Interface/api/reportHistory/Query.js.map +1 -0
  59. package/dist/cjs/types/Interface/models/IReport.d.ts +10 -1
  60. package/dist/cjs/types/Interface/models/IReport.d.ts.map +1 -1
  61. package/dist/cjs/types/Interface/models/IReport.js.map +1 -1
  62. package/dist/cjs/types/Interface/models/IReportHistory.d.ts +19 -0
  63. package/dist/cjs/types/Interface/models/IReportHistory.d.ts.map +1 -0
  64. package/dist/cjs/types/Interface/models/IReportHistory.js +3 -0
  65. package/dist/cjs/types/Interface/models/IReportHistory.js.map +1 -0
  66. package/dist/cjs/types/index.d.ts +3 -0
  67. package/dist/cjs/types/index.d.ts.map +1 -1
  68. package/dist/cjs/types/index.js +3 -0
  69. package/dist/cjs/types/index.js.map +1 -1
  70. package/dist/cjs/utils/societyApproval.js +1 -1
  71. package/dist/cjs/utils/societyApproval.js.map +1 -1
  72. package/dist/mjs/api/resources/Comment.d.ts +2 -2
  73. package/dist/mjs/api/resources/Comment.d.ts.map +1 -1
  74. package/dist/mjs/api/resources/Comment.js.map +1 -1
  75. package/dist/mjs/api/resources/Report.d.ts +4 -3
  76. package/dist/mjs/api/resources/Report.d.ts.map +1 -1
  77. package/dist/mjs/api/resources/Report.js +17 -1
  78. package/dist/mjs/api/resources/Report.js.map +1 -1
  79. package/dist/mjs/api/resources/ReportHistory.d.ts +13 -0
  80. package/dist/mjs/api/resources/ReportHistory.d.ts.map +1 -0
  81. package/dist/mjs/api/resources/ReportHistory.js +17 -0
  82. package/dist/mjs/api/resources/ReportHistory.js.map +1 -0
  83. package/dist/mjs/api/resources/Society.d.ts +2 -1
  84. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  85. package/dist/mjs/api/resources/Society.js +3 -0
  86. package/dist/mjs/api/resources/Society.js.map +1 -1
  87. package/dist/mjs/api/resources.d.ts +4 -0
  88. package/dist/mjs/api/resources.d.ts.map +1 -1
  89. package/dist/mjs/api/resources.js +4 -0
  90. package/dist/mjs/api/resources.js.map +1 -1
  91. package/dist/mjs/types/Enum/ReportService.d.ts +4 -1
  92. package/dist/mjs/types/Enum/ReportService.d.ts.map +1 -1
  93. package/dist/mjs/types/Enum/ReportService.js +39 -18
  94. package/dist/mjs/types/Enum/ReportService.js.map +1 -1
  95. package/dist/mjs/types/Enum/ReportSource.d.ts +13 -0
  96. package/dist/mjs/types/Enum/ReportSource.d.ts.map +1 -0
  97. package/dist/mjs/types/Enum/ReportSource.js +26 -0
  98. package/dist/mjs/types/Enum/ReportSource.js.map +1 -0
  99. package/dist/mjs/types/Enum/ReportType.d.ts +9 -1
  100. package/dist/mjs/types/Enum/ReportType.d.ts.map +1 -1
  101. package/dist/mjs/types/Enum/ReportType.js +41 -1
  102. package/dist/mjs/types/Enum/ReportType.js.map +1 -1
  103. package/dist/mjs/types/Enum/TaskResponseType.d.ts.map +1 -1
  104. package/dist/mjs/types/Enum/TaskResponseType.js +33 -0
  105. package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
  106. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +17 -0
  107. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
  108. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +7 -0
  109. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
  110. package/dist/mjs/types/Interface/api/report/CreateReport.d.ts +3 -1
  111. package/dist/mjs/types/Interface/api/report/CreateReport.d.ts.map +1 -1
  112. package/dist/mjs/types/Interface/api/report/CreateReport.js +13 -2
  113. package/dist/mjs/types/Interface/api/report/CreateReport.js.map +1 -1
  114. package/dist/mjs/types/Interface/api/report/QueryReports.d.ts +5 -1
  115. package/dist/mjs/types/Interface/api/report/QueryReports.d.ts.map +1 -1
  116. package/dist/mjs/types/Interface/api/report/QueryReports.js +24 -2
  117. package/dist/mjs/types/Interface/api/report/QueryReports.js.map +1 -1
  118. package/dist/mjs/types/Interface/api/report/QueryReportsForLetter.d.ts +1 -1
  119. package/dist/mjs/types/Interface/api/report/QueryReportsForLetter.d.ts.map +1 -1
  120. package/dist/mjs/types/Interface/api/report/QueryReportsForLetter.js +5 -3
  121. package/dist/mjs/types/Interface/api/report/QueryReportsForLetter.js.map +1 -1
  122. package/dist/mjs/types/Interface/api/report/UpdateReport.d.ts +13 -6
  123. package/dist/mjs/types/Interface/api/report/UpdateReport.d.ts.map +1 -1
  124. package/dist/mjs/types/Interface/api/report/UpdateReport.js +135 -1
  125. package/dist/mjs/types/Interface/api/report/UpdateReport.js.map +1 -1
  126. package/dist/mjs/types/Interface/api/reportHistory/Query.d.ts +4 -0
  127. package/dist/mjs/types/Interface/api/reportHistory/Query.d.ts.map +1 -0
  128. package/dist/mjs/types/Interface/api/reportHistory/Query.js +20 -0
  129. package/dist/mjs/types/Interface/api/reportHistory/Query.js.map +1 -0
  130. package/dist/mjs/types/Interface/models/IReport.d.ts +10 -1
  131. package/dist/mjs/types/Interface/models/IReport.d.ts.map +1 -1
  132. package/dist/mjs/types/Interface/models/IReport.js.map +1 -1
  133. package/dist/mjs/types/Interface/models/IReportHistory.d.ts +19 -0
  134. package/dist/mjs/types/Interface/models/IReportHistory.d.ts.map +1 -0
  135. package/dist/mjs/types/Interface/models/IReportHistory.js +2 -0
  136. package/dist/mjs/types/Interface/models/IReportHistory.js.map +1 -0
  137. package/dist/mjs/types/index.d.ts +3 -0
  138. package/dist/mjs/types/index.d.ts.map +1 -1
  139. package/dist/mjs/types/index.js +3 -0
  140. package/dist/mjs/types/index.js.map +1 -1
  141. package/dist/mjs/utils/societyApproval.js +1 -1
  142. package/dist/mjs/utils/societyApproval.js.map +1 -1
  143. package/package.json +1 -1
  144. package/ts/api/resources/Comment.ts +2 -2
  145. package/ts/api/resources/Report.ts +19 -4
  146. package/ts/api/resources/ReportHistory.ts +18 -0
  147. package/ts/api/resources/Society.ts +5 -0
  148. package/ts/api/resources.ts +4 -0
  149. package/ts/types/Enum/ReportService.ts +24 -3
  150. package/ts/types/Enum/ReportSource.ts +30 -0
  151. package/ts/types/Enum/ReportType.ts +41 -1
  152. package/ts/types/Enum/TaskResponseType.ts +33 -0
  153. package/ts/types/Interface/api/authentification/ReadAuthenticateCollaborater.ts +18 -0
  154. package/ts/types/Interface/api/report/CreateReport.ts +9 -2
  155. package/ts/types/Interface/api/report/QueryReports.ts +18 -2
  156. package/ts/types/Interface/api/report/QueryReportsForLetter.ts +2 -2
  157. package/ts/types/Interface/api/report/UpdateReport.ts +85 -6
  158. package/ts/types/Interface/api/reportHistory/Query.ts +8 -0
  159. package/ts/types/Interface/models/IReport.ts +10 -1
  160. package/ts/types/Interface/models/IReportHistory.ts +22 -0
  161. package/ts/types/index.ts +3 -0
  162. package/ts/utils/societyApproval.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAGL,mCAAmC,GAEpC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;IACpF,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,IAAI,IAAI,QAAQ,CAAC;AACxF,CA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QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,CACpG,EAAE,KAAK;SACT;QACD,6BAA6B;QAC7B,GAAG,gBAAgB;QACnB,eAAe,EAAE;YACf,GAAG,gBAAgB,EAAE,eAAe;YACpC,GAAG,CAAC,gBAAgB,EAAE,eAAe,EAAE,YAAY;gBACjD,CAAC,CAAC;oBACE,YAAY,EAAE,KAAK,CAAC,gBAAgB,EAAE,eAAe,EAAE,YAAY,CAAC;yBACjE,MAAM,CAAC,IAAI,CAAC;yBACZ,MAAM,CAAC,cAAc,CAAC;yBACtB,WAAW,EAAE;iBACjB;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,QAAQ,EAAE;YACR,GAAG,gBAAgB,EAAE,QAAQ;YAC7B,OAAO,EAAE;gBACP,GAAG,gBAAgB,EAAE,QAAQ,EAAE,OAAO;gBACtC,YAAY,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC;aACvF;YACD,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;SACtG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe),\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format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B,EAAE,QAAQ;YAC7B,OAAO,EAAE;gBACP,GAAG,gBAAgB,EAAE,QAAQ,EAAE,OAAO;gBACtC,YAAY,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,WAAW,EAAE;aACrG;YACD,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;SACtG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.190",
3
+ "version": "1.3.192-0",
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",
@@ -2,7 +2,7 @@ import { Resource } from '../Resource';
2
2
  import { IComment } from '../../types';
3
3
 
4
4
  export class Comment extends Resource {
5
- getAll(params: Partial<IComment>): Promise<Comment[]> {
5
+ getAll(params: Partial<IComment>): Promise<IComment[]> {
6
6
  return this.axios.$get('/comments', { params });
7
7
  }
8
8
 
@@ -10,7 +10,7 @@ export class Comment extends Resource {
10
10
  return this.axios.$post('/comments', payload);
11
11
  }
12
12
 
13
- update(idComment: number, payload: Partial<IComment>): Promise<Comment> {
13
+ update(idComment: number, payload: Partial<IComment>): Promise<IComment> {
14
14
  return this.axios.$put(`/comments/${idComment}`, payload);
15
15
  }
16
16
  }
@@ -45,11 +45,26 @@ export class Report extends Resource {
45
45
  ...(signal ? { signal } : {}),
46
46
  });
47
47
  }
48
- update(params: UpdateReport): Promise<[number, Report[]]> {
48
+ update(params: UpdateReport): Promise<[number, IReport[]]> {
49
49
  return this.axios.$put('/reports', params);
50
50
  }
51
- create(params: CreateReport): Promise<Report> {
52
- return this.axios.$post('/reports', params);
51
+ updateV2(id: number, data: Partial<IReport>): Promise<IReport> {
52
+ return this.axios.$put(`/reports/${id}`, {
53
+ ...data,
54
+ });
55
+ }
56
+ create(params: CreateReport): Promise<IReport> {
57
+ const formData = new FormData();
58
+
59
+ Object.entries(params).forEach(([key, value]) => {
60
+ if (value || value === false || value === 0) {
61
+ if (key === 'file') formData.append('file', value);
62
+ else if (key === 'metadata') formData.append('metadata', JSON.stringify(value));
63
+ else formData.append(key, value);
64
+ }
65
+ });
66
+
67
+ return this.axios.$post('/reports', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
53
68
  }
54
69
  createExternal(params: CreateExternalReport): Promise<true> {
55
70
  const formData = new FormData();
@@ -65,7 +80,7 @@ export class Report extends Resource {
65
80
  return this.axios.$post('/reports/external', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
66
81
  }
67
82
 
68
- delete(params: DeleteReport): Promise<Report> {
83
+ delete(params: DeleteReport): Promise<IReport> {
69
84
  return this.axios.$delete(`/reports/${params.id}`);
70
85
  }
71
86
  }
@@ -0,0 +1,18 @@
1
+ import { IReportHistory, QueryAllReportHistory } from '../../types';
2
+ import { Resource } from '../Resource';
3
+
4
+ export class ReportHistory extends Resource {
5
+ /**
6
+ * Report Message Get All
7
+ * @param { QueryAllReportHistory } params
8
+ * @param { CancelToken } cancelToken
9
+ * @param { AbortSignal } signal
10
+ * @returns { Promise<IReportHistory[]> }
11
+ */
12
+ getAll(params: QueryAllReportHistory, signal?: AbortSignal): Promise<IReportHistory[]> {
13
+ return this.axios.$get('/report-history/all', {
14
+ params,
15
+ ...(signal ? { signal } : {}),
16
+ });
17
+ }
18
+ }
@@ -30,6 +30,7 @@ import {
30
30
  DataCustomersCsv,
31
31
  ReadCurrentPrestations,
32
32
  QueryToArchivedSociety,
33
+ ReadFeatureAccess,
33
34
  } from '../../types';
34
35
  import { CancelToken } from 'axios';
35
36
 
@@ -205,4 +206,8 @@ export class Society extends Resource {
205
206
  },
206
207
  });
207
208
  }
209
+
210
+ getAllFeatures(idSociety: number): Promise<ReadFeatureAccess> {
211
+ return this.axios.$get(`/societies/${idSociety}/features`);
212
+ }
208
213
  }
@@ -188,7 +188,9 @@ import { BalanceSheetReport } from './resources/BalanceSheetReport';
188
188
  import { Revenue } from './resources/Revenue';
189
189
  import { InformationRequest } from './resources/InformationRequest';
190
190
  import { AutomaticRegistration } from './resources/AutomaticRegistration';
191
+ import { LoginApproval } from './resources/LoginApproval';
191
192
  import { SocietyApproval } from './resources/SocietyApproval';
193
+ import { ReportHistory } from './resources/ReportHistory';
192
194
 
193
195
  export const resources = {
194
196
  budgetInsight: BudgetInsight,
@@ -381,5 +383,7 @@ export const resources = {
381
383
  revenue: Revenue,
382
384
  informationRequest: InformationRequest,
383
385
  automaticRegistration: AutomaticRegistration,
386
+ loginApproval: LoginApproval,
384
387
  societyApproval: SocietyApproval,
388
+ reportHistory: ReportHistory,
385
389
  };
@@ -8,10 +8,13 @@ export enum ReportService {
8
8
  CUSTOMER_SUCCESS = 3,
9
9
  EXPERT_ACCOUNTANT = 4,
10
10
  REFERENT_CLIENT = 5,
11
+ SOCIAL = 6,
12
+ JURIDICAL = 7,
13
+ INVOICING = 8,
11
14
  }
12
15
 
13
16
  export const ReportServiceList: ListReport = [
14
- {
17
+ /* {
15
18
  id: ReportService.REFERENT_LITIGE,
16
19
  label: 'Référent litige',
17
20
  idRole: RoleDetail.REFERENT_LITIGE.id,
@@ -22,6 +25,24 @@ export const ReportServiceList: ListReport = [
22
25
  label: 'Comptable',
23
26
  idRole: RoleDetail.FRONT_OFFICE.id,
24
27
  idTaskType: 16,
28
+ }, */
29
+ {
30
+ id: ReportService.SOCIAL,
31
+ label: 'Social',
32
+ idRole: RoleDetail.SOCIAL.id,
33
+ idTaskType: 28,
34
+ },
35
+ {
36
+ id: ReportService.JURIDICAL,
37
+ label: 'Juridique',
38
+ idRole: RoleDetail.JURIDIC.id,
39
+ idTaskType: 29,
40
+ },
41
+ {
42
+ id: ReportService.INVOICING,
43
+ label: 'Facturation',
44
+ idRole: RoleDetail.FACTURATION.id,
45
+ idTaskType: 30,
25
46
  },
26
47
  {
27
48
  id: ReportService.CUSTOMER_SUCCESS,
@@ -29,7 +50,7 @@ export const ReportServiceList: ListReport = [
29
50
  idRole: RoleDetail.CUSTOMER_SUCCESS.id,
30
51
  idTaskType: 14,
31
52
  },
32
- {
53
+ /* {
33
54
  id: ReportService.EXPERT_ACCOUNTANT,
34
55
  label: 'Expert Comptable',
35
56
  idRole: RoleDetail.EXPERT_ACCOUNTANT.id,
@@ -40,5 +61,5 @@ export const ReportServiceList: ListReport = [
40
61
  label: 'Référent client',
41
62
  idRole: RoleDetail.REFERENT_CLIENT.id,
42
63
  idTaskType: 13,
43
- },
64
+ }, */
44
65
  ];
@@ -0,0 +1,30 @@
1
+ export enum ReportSource {
2
+ LETTER = 1,
3
+ MAIL = 2,
4
+ INTERNAL = 3,
5
+ CLIENT = 4,
6
+ }
7
+
8
+ interface ReportSourceInterface {
9
+ id: ReportSource;
10
+ name: string;
11
+ }
12
+
13
+ export const ReportSourceDetails: ReportSourceInterface[] = [
14
+ {
15
+ id: ReportSource.LETTER,
16
+ name: 'Courrier',
17
+ },
18
+ {
19
+ id: ReportSource.MAIL,
20
+ name: 'Mail',
21
+ },
22
+ {
23
+ id: ReportSource.INTERNAL,
24
+ name: 'Interne',
25
+ },
26
+ {
27
+ id: ReportSource.CLIENT,
28
+ name: 'Client',
29
+ },
30
+ ];
@@ -22,6 +22,14 @@ export enum ReportTypeEnum {
22
22
  VOLONTARY_UNPAID = 19,
23
23
  LACK_OF_COMMUNICATION = 20,
24
24
  LACK_OF_ADVICE = 21,
25
+ LAWYER = 22,
26
+ JURIDICAL_PROTECTION = 23,
27
+ TAXES = 24,
28
+ VAT = 25,
29
+ VAT_DELAYS = 26,
30
+ BALANCE_SHEET = 27,
31
+ THREAT = 28,
32
+ LOGICIEL = 29,
25
33
  }
26
34
 
27
35
  interface ReportTypeInterface {
@@ -32,7 +40,7 @@ interface ReportTypeInterface {
32
40
  export const ReportType: { [key: string]: ReportTypeInterface } = {
33
41
  LETTER: {
34
42
  id: ReportTypeEnum.LETTER,
35
- name: 'Lettre à l\'ordre',
43
+ name: "Lettre à l'ordre",
36
44
  },
37
45
  FRAUD: {
38
46
  id: ReportTypeEnum.FRAUD,
@@ -114,6 +122,38 @@ export const ReportType: { [key: string]: ReportTypeInterface } = {
114
122
  id: ReportTypeEnum.LACK_OF_ADVICE,
115
123
  name: 'Manque de conseil',
116
124
  },
125
+ LAWYER: {
126
+ id: ReportTypeEnum.LAWYER,
127
+ name: 'Avocat',
128
+ },
129
+ JURIDICAL_PROTECTION: {
130
+ id: ReportTypeEnum.JURIDICAL_PROTECTION,
131
+ name: 'Protection juridique',
132
+ },
133
+ TAXES: {
134
+ id: ReportTypeEnum.TAXES,
135
+ name: 'Impôts',
136
+ },
137
+ VAT: {
138
+ id: ReportTypeEnum.VAT,
139
+ name: 'TVA',
140
+ },
141
+ VAT_DELAYS: {
142
+ id: ReportTypeEnum.VAT_DELAYS,
143
+ name: 'Retard de TVA',
144
+ },
145
+ BALANCE_SHEET: {
146
+ id: ReportTypeEnum.BALANCE_SHEET,
147
+ name: 'Bilan',
148
+ },
149
+ THREAT: {
150
+ id: ReportTypeEnum.THREAT,
151
+ name: 'Menace de poursuite (Ordre, Avocats, etc...)',
152
+ },
153
+ LOGICIEL: {
154
+ id: ReportTypeEnum.LOGICIEL,
155
+ name: 'Logiciel',
156
+ },
117
157
  } as const;
118
158
 
119
159
  export interface ReportExternalCategoryInterface {
@@ -342,6 +342,39 @@ export const TaskResponseType = {
342
342
  responseType: null,
343
343
  description: "la société à été mise à jour sur l'INPI",
344
344
  },
345
+ {
346
+ id: 28,
347
+ label: 'Social',
348
+ role: Role.SOCIAL,
349
+ deadline: Deadline,
350
+ isForWholeRole: true,
351
+ backToClient: false,
352
+ goToCalendar: false,
353
+ responseType: null,
354
+ description: 'Signalement pour Social',
355
+ },
356
+ {
357
+ id: 29,
358
+ label: 'Juridique',
359
+ role: Role.JURIDIC,
360
+ deadline: Deadline,
361
+ isForWholeRole: true,
362
+ backToClient: false,
363
+ goToCalendar: false,
364
+ responseType: null,
365
+ description: 'Signalement pour Juridique',
366
+ },
367
+ {
368
+ id: 30,
369
+ label: 'Facturation',
370
+ role: Role.FACTURATION,
371
+ deadline: Deadline,
372
+ isForWholeRole: true,
373
+ backToClient: false,
374
+ goToCalendar: false,
375
+ responseType: null,
376
+ description: 'Signalement pour facturation',
377
+ },
345
378
  ],
346
379
  },
347
380
  EXTERN: {
@@ -1,3 +1,5 @@
1
+ import { Feature } from '../../../Enum/Feature';
2
+ import { PrestationTypeDetail } from '../../../Enum/PrestationType';
1
3
  import { IUser } from '../../models/IUser';
2
4
 
3
5
  export class ReadAuthenticateCollaborater {
@@ -16,3 +18,19 @@ export class ReadByExternalId {
16
18
  idTypeBrand: number;
17
19
  token: string;
18
20
  }
21
+
22
+ export type ExerciceFeatures = {
23
+ id: number;
24
+ startDate: Date | string;
25
+ endDate: Date | string;
26
+ isDefault: boolean;
27
+ subscriptionType: PrestationTypeDetail;
28
+ features: Feature[];
29
+ };
30
+ export class ReadFeatureAccess {
31
+ isOwner: boolean;
32
+ /** @returns default features */
33
+ features: Feature[];
34
+ exercices: ExerciceFeatures[];
35
+ isInTrialPeriod: boolean;
36
+ }
@@ -4,10 +4,13 @@ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
4
4
  import { TFile } from '../file/TFile';
5
5
 
6
6
  export class CreateReport implements IReport {
7
+ @ApiProperty()
8
+ @IsInt()
9
+ idSource: number;
10
+
7
11
  @ApiPropertyOptional()
8
12
  @IsOptional()
9
- @IsInt()
10
- idReportType?: number;
13
+ idReportType?: number[];
11
14
 
12
15
  @ApiPropertyOptional()
13
16
  @IsOptional()
@@ -68,6 +71,10 @@ export class CreateReport implements IReport {
68
71
  @IsOptional()
69
72
  letterDate?: Date;
70
73
 
74
+ @ApiPropertyOptional()
75
+ @IsOptional()
76
+ receivedAt?: Date;
77
+
71
78
  @ApiPropertyOptional()
72
79
  @IsOptional()
73
80
  receivedFile?: TFile;
@@ -1,10 +1,13 @@
1
- import { IsBoolean, IsOptional } from 'class-validator';
1
+ import { IsBoolean, IsDateString, IsOptional } from 'class-validator';
2
2
  import { ApiPropertyOptional } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
 
5
5
  export class QueryReports {
6
6
  @ApiPropertyOptional()
7
- idReportType?: number;
7
+ idSource?: number[];
8
+
9
+ @ApiPropertyOptional()
10
+ idReportType?: number[];
8
11
 
9
12
  @ApiPropertyOptional()
10
13
  idSociety?: number;
@@ -12,6 +15,9 @@ export class QueryReports {
12
15
  @ApiPropertyOptional()
13
16
  idService?: number;
14
17
 
18
+ @ApiPropertyOptional()
19
+ idUserConcerned?: number;
20
+
15
21
  @ApiPropertyOptional()
16
22
  idServiceConcerned?: number;
17
23
 
@@ -35,4 +41,14 @@ export class QueryReports {
35
41
  @IsBoolean()
36
42
  @ToBoolean()
37
43
  onlyClient?: boolean;
44
+
45
+ @ApiPropertyOptional()
46
+ @IsOptional()
47
+ @IsDateString()
48
+ declare startDate?: string;
49
+
50
+ @ApiPropertyOptional()
51
+ @IsOptional()
52
+ @IsDateString()
53
+ declare endDate?: string;
38
54
  }
@@ -3,8 +3,8 @@ import { ApiProperty } from '../../../../utils';
3
3
 
4
4
  export class QueryReportsForLetter {
5
5
  @ApiProperty()
6
- @IsInt()
7
- idReportType: number;
6
+ //@IsInt({ each: true })
7
+ idReportType: number[];
8
8
 
9
9
  @ApiProperty()
10
10
  @IsInt()
@@ -1,14 +1,93 @@
1
- import { IReport, IUser } from '../../..';
1
+ import { IReport } from '../../..';
2
+ import { ApiPropertyOptional } from '../../../../utils';
3
+ import { IsBoolean, IsDateString, IsInt, IsOptional, IsString } from 'class-validator';
4
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
2
5
 
3
- export interface UpdateReport extends IReport {
6
+ export class UpdateReport implements IReport {
7
+ @ApiPropertyOptional()
8
+ @IsOptional()
9
+ @IsInt()
10
+ idSource: number;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ idReportType?: number[];
15
+
16
+ @ApiPropertyOptional()
17
+ @IsOptional()
18
+ @IsInt()
19
+ idSociety?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ @IsOptional()
23
+ @IsInt()
24
+ idFile?: number;
25
+
26
+ @ApiPropertyOptional()
27
+ @IsOptional()
28
+ @IsInt()
4
29
  idUser: number;
5
- comment?: string;
6
- note?: string;
30
+
31
+ @ApiPropertyOptional()
32
+ @IsOptional()
33
+ @IsInt()
34
+ idServiceConcerned?: number;
35
+
36
+ @ApiPropertyOptional()
37
+ @IsOptional()
38
+ @IsString()
39
+ comment: string;
40
+
41
+ @ApiPropertyOptional()
42
+ @IsOptional()
43
+ @IsString()
44
+ search?: string;
45
+
46
+ @ApiPropertyOptional()
47
+ @IsOptional()
48
+ @IsBoolean()
49
+ @ToBoolean()
7
50
  declareSoupcons?: boolean;
51
+
52
+ @ApiPropertyOptional()
53
+ @IsOptional()
54
+ @IsInt()
8
55
  state?: number;
56
+
57
+ @ApiPropertyOptional()
58
+ @IsOptional()
59
+ @IsBoolean()
60
+ @ToBoolean()
9
61
  informerjlb?: boolean;
62
+
63
+ @ApiPropertyOptional()
64
+ @IsOptional()
65
+ @IsInt()
10
66
  ressenti?: number;
67
+
68
+ @ApiPropertyOptional()
69
+ @IsOptional()
70
+ @IsInt()
11
71
  action?: number;
12
- idReport?: number;
13
- societyUsers?: IUser[];
72
+
73
+ @ApiPropertyOptional()
74
+ @IsOptional()
75
+ @IsBoolean()
76
+ @ToBoolean()
77
+ processed?: boolean;
78
+
79
+ @ApiPropertyOptional()
80
+ @IsOptional()
81
+ @IsDateString()
82
+ letterDate?: Date;
83
+
84
+ @ApiPropertyOptional()
85
+ @IsOptional()
86
+ @IsDateString()
87
+ receivedAt?: Date;
88
+
89
+ @ApiPropertyOptional()
90
+ @IsOptional()
91
+ @IsString()
92
+ token?: string;
14
93
  }
@@ -0,0 +1,8 @@
1
+ import { IsInt } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class QueryAllReportHistory {
5
+ @ApiProperty()
6
+ @IsInt()
7
+ idReport: number;
8
+ }
@@ -4,18 +4,23 @@ import { IComment } from './IComment';
4
4
  import { ICustomerAcceptance } from './ICustomerAcceptance';
5
5
  import { IFile } from './IFile';
6
6
  import { ILetter } from './ILetter';
7
+ import { IReportHistory } from './IReportHistory';
7
8
  import { IReportMessage } from './IReportMessage';
8
9
  import { ISociety } from './ISociety';
10
+ import { IUser } from './IUser';
9
11
 
10
12
  // report
11
13
  export interface IReport {
12
14
  id?: number;
13
15
  idSociety?: number | null;
14
- idReportType?: ReportTypeEnum | null;
16
+ idSource?: number | null;
17
+ idReportType?: ReportTypeEnum[] | null;
15
18
  idCalendarEvent?: number;
19
+ idUserConcerned?: number | null;
16
20
  idServiceConcerned?: number | null;
17
21
  idService?: number | null;
18
22
  idFile?: number | null;
23
+ fileLink?: string;
19
24
  idLetterType?: number | null;
20
25
  declareSoupcons?: boolean | null;
21
26
  token?: string | null;
@@ -27,15 +32,19 @@ export interface IReport {
27
32
  ressenti?: number | null;
28
33
  action?: number | null;
29
34
  processed?: boolean | null;
35
+ receivedAt?: Date | null;
30
36
  createdAt?: Date | null;
31
37
  updatedAt?: Date | null;
38
+ deletedAt?: Date | null;
32
39
 
33
40
  // Associations
34
41
  society?: ISociety;
35
42
  file?: IFile;
36
43
  calendarEvent?: ICalendarEvent;
44
+ userConcerned?: IUser;
37
45
  comments?: IComment[];
38
46
  messages?: IReportMessage[];
39
47
  customerAcceptance?: ICustomerAcceptance;
40
48
  letter?: ILetter;
49
+ history?: IReportHistory[];
41
50
  }
@@ -0,0 +1,22 @@
1
+ import { ReportTypeEnum } from '../../Enum/ReportType';
2
+ import { IReport } from './IReport';
3
+ import { IUser } from './IUser';
4
+
5
+ // reportHistory
6
+ export interface IReportHistory {
7
+ id?: number;
8
+ idSource?: number | null;
9
+ idReportType?: ReportTypeEnum[] | null;
10
+ state?: number | null;
11
+ idUserConcerned?: number | null;
12
+ idServiceConcerned?: number | null;
13
+ idReport?: number;
14
+ idUser?: number | null;
15
+ createdAt?: Date | null;
16
+ updatedAt?: Date | null;
17
+
18
+ // Associations
19
+ userConcerned?: IUser;
20
+ report?: IReport;
21
+ user?: IUser;
22
+ }
package/ts/types/index.ts CHANGED
@@ -147,6 +147,7 @@ export * from './Interface/models/IRegisterCategory';
147
147
  export * from './Interface/models/IRegulate';
148
148
  export * from './Interface/models/IRegulation';
149
149
  export * from './Interface/models/IReport';
150
+ export * from './Interface/models/IReportHistory';
150
151
  export * from './Interface/models/IReportMessage';
151
152
  export * from './Interface/models/IRole';
152
153
  export * from './Interface/models/IRoleUser';
@@ -393,6 +394,7 @@ export * from './Enum/SurveyType';
393
394
  export * from './Enum/SurveyTypeDatas';
394
395
  export * from './Enum/PaymentMethod';
395
396
  export * from './Enum/ReportType';
397
+ export * from './Enum/ReportSource';
396
398
  export * from './Enum/IssueType';
397
399
  export * from './Enum/AdjustmentType';
398
400
  export * from './Enum/ReportState';
@@ -803,6 +805,7 @@ export * from './Interface/api/report/DeleteReport';
803
805
  export * from './Interface/api/report/QueryReports';
804
806
  export * from './Interface/api/report/QueryReportsStats';
805
807
  export * from './Interface/api/report/QueryReportsForLetter';
808
+ export * from './Interface/api/reportHistory/Query';
806
809
  export * from './Interface/api/reportMessage/Query';
807
810
  export * from './Interface/api/letter/CreateLetter';
808
811
  export * from './Interface/api/mailInvoice/CreateInvoiceMail';
@@ -121,7 +121,7 @@ export function buildApprovalTemplateData(existingApproval: ISocietyApproval, st
121
121
  ...existingApproval?.exercice,
122
122
  society: {
123
123
  ...existingApproval?.exercice?.society,
124
- cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe),
124
+ cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),
125
125
  },
126
126
  endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),
127
127
  },