@silexpert/core 1.3.126 → 1.3.128-checklist-2

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 (134) hide show
  1. package/dist/cjs/types/Enum/AbsenceType.d.ts +1 -0
  2. package/dist/cjs/types/Enum/AbsenceType.d.ts.map +1 -1
  3. package/dist/cjs/types/Enum/AbsenceType.js +11 -1
  4. package/dist/cjs/types/Enum/AbsenceType.js.map +1 -1
  5. package/dist/cjs/types/Enum/ChecklistType.d.ts +8 -1
  6. package/dist/cjs/types/Enum/ChecklistType.d.ts.map +1 -1
  7. package/dist/cjs/types/Enum/ChecklistType.js +8 -0
  8. package/dist/cjs/types/Enum/ChecklistType.js.map +1 -1
  9. package/dist/cjs/types/Enum/ConstitutionState.js +1 -1
  10. package/dist/cjs/types/Enum/ConstitutionState.js.map +1 -1
  11. package/dist/cjs/types/Interface/api/absenceRequest/ReadAbsenceRequest.d.ts +1 -1
  12. package/dist/cjs/types/Interface/api/absenceRequest/ReadAbsenceRequest.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/checklist/Query.d.ts +3 -0
  14. package/dist/cjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/checklist/Query.js +10 -1
  16. package/dist/cjs/types/Interface/api/checklist/Query.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/checklist/Update.d.ts +11 -1
  18. package/dist/cjs/types/Interface/api/checklist/Update.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/checklist/Update.js +50 -1
  20. package/dist/cjs/types/Interface/api/checklist/Update.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.d.ts +0 -1
  22. package/dist/cjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +0 -1
  25. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +0 -7
  27. package/dist/cjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  28. package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts +1 -0
  29. package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
  30. package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js +3 -1
  31. package/dist/cjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
  32. package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts +4 -2
  33. package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  34. package/dist/cjs/types/Interface/api/library/QueryLibrary.js +6 -2
  35. package/dist/cjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
  36. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
  37. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  38. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js +11 -1
  39. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  40. package/dist/cjs/types/Interface/models/IChecklist.d.ts +2 -2
  41. package/dist/cjs/types/Interface/models/IChecklist.d.ts.map +1 -1
  42. package/dist/cjs/types/Interface/models/IChecklist.js.map +1 -1
  43. package/dist/cjs/types/Interface/models/IChecklistDetail.d.ts +3 -3
  44. package/dist/cjs/types/Interface/models/IChecklistDetail.d.ts.map +1 -1
  45. package/dist/cjs/types/Interface/models/IChecklistDetail.js.map +1 -1
  46. package/dist/cjs/types/Interface/models/IDocumentRequest.d.ts +19 -0
  47. package/dist/cjs/types/Interface/models/IDocumentRequest.d.ts.map +1 -0
  48. package/dist/cjs/types/Interface/models/IDocumentRequest.js +3 -0
  49. package/dist/cjs/types/Interface/models/IDocumentRequest.js.map +1 -0
  50. package/dist/cjs/types/Interface/models/IGedFile.d.ts +3 -1
  51. package/dist/cjs/types/Interface/models/IGedFile.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/models/IGedFile.js.map +1 -1
  53. package/dist/cjs/types/index.d.ts +1 -0
  54. package/dist/cjs/types/index.d.ts.map +1 -1
  55. package/dist/cjs/types/index.js +1 -0
  56. package/dist/cjs/types/index.js.map +1 -1
  57. package/dist/cjs/utils/vat/utils.js +3 -3
  58. package/dist/cjs/utils/vat/utils.js.map +1 -1
  59. package/dist/mjs/types/Enum/AbsenceType.d.ts +1 -0
  60. package/dist/mjs/types/Enum/AbsenceType.d.ts.map +1 -1
  61. package/dist/mjs/types/Enum/AbsenceType.js +11 -1
  62. package/dist/mjs/types/Enum/AbsenceType.js.map +1 -1
  63. package/dist/mjs/types/Enum/ChecklistType.d.ts +8 -1
  64. package/dist/mjs/types/Enum/ChecklistType.d.ts.map +1 -1
  65. package/dist/mjs/types/Enum/ChecklistType.js +8 -0
  66. package/dist/mjs/types/Enum/ChecklistType.js.map +1 -1
  67. package/dist/mjs/types/Enum/ConstitutionState.js +1 -1
  68. package/dist/mjs/types/Enum/ConstitutionState.js.map +1 -1
  69. package/dist/mjs/types/Interface/api/absenceRequest/ReadAbsenceRequest.d.ts +1 -1
  70. package/dist/mjs/types/Interface/api/absenceRequest/ReadAbsenceRequest.js.map +1 -1
  71. package/dist/mjs/types/Interface/api/checklist/Query.d.ts +3 -0
  72. package/dist/mjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
  73. package/dist/mjs/types/Interface/api/checklist/Query.js +9 -0
  74. package/dist/mjs/types/Interface/api/checklist/Query.js.map +1 -1
  75. package/dist/mjs/types/Interface/api/checklist/Update.d.ts +11 -1
  76. package/dist/mjs/types/Interface/api/checklist/Update.d.ts.map +1 -1
  77. package/dist/mjs/types/Interface/api/checklist/Update.js +57 -2
  78. package/dist/mjs/types/Interface/api/checklist/Update.js.map +1 -1
  79. package/dist/mjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.d.ts +0 -1
  80. package/dist/mjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.d.ts.map +1 -1
  81. package/dist/mjs/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.js.map +1 -1
  82. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts +0 -1
  83. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.d.ts.map +1 -1
  84. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js +0 -8
  85. package/dist/mjs/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.js.map +1 -1
  86. package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts +1 -0
  87. package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
  88. package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js +4 -1
  89. package/dist/mjs/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
  90. package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts +4 -2
  91. package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  92. package/dist/mjs/types/Interface/api/library/QueryLibrary.js +9 -3
  93. package/dist/mjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
  94. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts +3 -0
  95. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  96. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js +10 -0
  97. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  98. package/dist/mjs/types/Interface/models/IChecklist.d.ts +2 -2
  99. package/dist/mjs/types/Interface/models/IChecklist.d.ts.map +1 -1
  100. package/dist/mjs/types/Interface/models/IChecklist.js.map +1 -1
  101. package/dist/mjs/types/Interface/models/IChecklistDetail.d.ts +3 -3
  102. package/dist/mjs/types/Interface/models/IChecklistDetail.d.ts.map +1 -1
  103. package/dist/mjs/types/Interface/models/IChecklistDetail.js.map +1 -1
  104. package/dist/mjs/types/Interface/models/IDocumentRequest.d.ts +19 -0
  105. package/dist/mjs/types/Interface/models/IDocumentRequest.d.ts.map +1 -0
  106. package/dist/mjs/types/Interface/models/IDocumentRequest.js +2 -0
  107. package/dist/mjs/types/Interface/models/IDocumentRequest.js.map +1 -0
  108. package/dist/mjs/types/Interface/models/IGedFile.d.ts +3 -1
  109. package/dist/mjs/types/Interface/models/IGedFile.d.ts.map +1 -1
  110. package/dist/mjs/types/Interface/models/IGedFile.js.map +1 -1
  111. package/dist/mjs/types/index.d.ts +1 -0
  112. package/dist/mjs/types/index.d.ts.map +1 -1
  113. package/dist/mjs/types/index.js +1 -0
  114. package/dist/mjs/types/index.js.map +1 -1
  115. package/dist/mjs/utils/vat/utils.js +3 -3
  116. package/dist/mjs/utils/vat/utils.js.map +1 -1
  117. package/package.json +1 -1
  118. package/ts/types/Enum/AbsenceType.ts +12 -2
  119. package/ts/types/Enum/ChecklistType.ts +9 -0
  120. package/ts/types/Enum/ConstitutionState.ts +1 -1
  121. package/ts/types/Interface/api/absenceRequest/ReadAbsenceRequest.ts +1 -1
  122. package/ts/types/Interface/api/checklist/Query.ts +7 -0
  123. package/ts/types/Interface/api/checklist/Update.ts +44 -2
  124. package/ts/types/Interface/api/companyCreationForm/CompanyCreationFormPayload.ts +0 -1
  125. package/ts/types/Interface/api/companyCreationForm/CreateCompanyCreationForm.ts +0 -6
  126. package/ts/types/Interface/api/gedFile/createFileAndGed.ts +1 -0
  127. package/ts/types/Interface/api/library/QueryLibrary.ts +4 -2
  128. package/ts/types/Interface/api/stripe/QueryStripe.ts +8 -0
  129. package/ts/types/Interface/models/IChecklist.ts +2 -2
  130. package/ts/types/Interface/models/IChecklistDetail.ts +3 -3
  131. package/ts/types/Interface/models/IDocumentRequest.ts +21 -0
  132. package/ts/types/Interface/models/IGedFile.ts +3 -1
  133. package/ts/types/index.ts +1 -0
  134. package/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AAC,IAAI,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAClG,OAAO,GAAG,CAAC,YAAY,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC;AACnB,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat, VatType } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0),\n precision,\n );\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(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n logging = false,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n 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 +=\n (accountingEntry.debit - accountingEntry.credit) *\n ((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}\n\nexport function textFormatting(value: any, length: number | null = null, start?: number): 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\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(start ?? 0, (start ?? 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}\n\nexport function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {\n if (zipCode?.startsWith('971') || zipCode?.startsWith('972') || zipCode?.startsWith('974')) {\n return Vat.TX_8_5;\n } else if (zipCode?.startsWith('973') || zipCode?.startsWith('976') || zipCode?.startsWith('977')) {\n return Vat.WITHOUT_TAXE;\n }\n return Vat.TX_20;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceR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AAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAClG,OAAO,GAAG,CAAC,YAAY,CAAC;IAC1B,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC;AACnB,CAAC","sourcesContent":["import { round as _round, uniqBy as _uniqBy } from 'lodash';\nimport { IAccountingEntry } from '../../types/Interface/models/IAccountingEntry';\nimport { Vat, VatType } from '../../types/Enum/Vat';\n\nexport function getAmountByAccountNumber(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n const result = _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n accountingEntry.account.number.toString().startsWith(number)\n ) {\n accTmp += accountingEntry.debit - accountingEntry.credit;\n return true;\n }\n return false;\n });\n return accTmp;\n }, 0),\n precision,\n );\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(\n accountingEntries: IAccountingEntry[],\n accountsNumber: string[],\n precision = 0,\n logging = false,\n isAbs = false,\n): number {\n const accountingEntriesUniq = _uniqBy(accountingEntries, 'id');\n return _round(\n accountingEntriesUniq.reduce((acc, accountingEntry) => {\n let accTmp = acc;\n accountsNumber.some((number) => {\n if (\n accountingEntry.account &&\n accountingEntry.account.number &&\n 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 +=\n (accountingEntry.debit - accountingEntry.credit) *\n ((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}\n\nexport function textFormatting(value: any, length: number | null = null, start?: number): 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\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(start ?? 0, (start ?? 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}\n\nexport function getInternalInvoicingVatByZipCode(zipCode: string | null): VatType {\n if (zipCode?.startsWith('971') || zipCode?.startsWith('972') || zipCode?.startsWith('974')) {\n return Vat.TX_8_5;\n } else if (zipCode?.startsWith('973') || zipCode?.startsWith('976') || zipCode?.startsWith('977')) {\n return Vat.WITHOUT_TAXE;\n }\n return Vat.TX_20;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.126",
3
+ "version": "1.3.128-checklist-2",
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",
@@ -11,45 +11,55 @@ export enum AbsenceType {
11
11
  JUSTIFIED_LEAVE = 10,
12
12
  }
13
13
 
14
- export const AbsenceTypeList: Array<{ id: AbsenceType; label: string }> = [
14
+ export const AbsenceTypeList: Array<{ id: AbsenceType; label: string; class: string }> = [
15
15
  {
16
16
  id: AbsenceType.DAY_OFF,
17
17
  label: 'Jours de congé',
18
+ class: 'day_off',
18
19
  },
19
20
  {
20
21
  id: AbsenceType.RTT,
21
22
  label: 'RTT',
23
+ class: 'rtt',
22
24
  },
23
25
  {
24
26
  id: AbsenceType.HOUR_CHANGE,
25
- label: 'Changement d\'heures',
27
+ label: "Changement d'heures",
28
+ class: 'hour_change',
26
29
  },
27
30
  {
28
31
  id: AbsenceType.ABSENCE,
29
32
  label: 'Arrêt maladie',
33
+ class: 'absence',
30
34
  },
31
35
  {
32
36
  id: AbsenceType.OVERTIME,
33
37
  label: 'Heures supplémentaires',
38
+ class: 'overtime',
34
39
  },
35
40
  {
36
41
  id: AbsenceType.REMOTE,
37
42
  label: 'Télétravail',
43
+ class: 'remote',
38
44
  },
39
45
  {
40
46
  id: AbsenceType.SCHOOL,
41
47
  label: 'École/Cours',
48
+ class: 'school',
42
49
  },
43
50
  {
44
51
  id: AbsenceType.UNJUSTIFIED,
45
52
  label: 'Absence non justifiée',
53
+ class: 'unjustified',
46
54
  },
47
55
  {
48
56
  id: AbsenceType.UNPAID_LEAVE,
49
57
  label: 'Congés sans solde',
58
+ class: 'unpaid_leave',
50
59
  },
51
60
  {
52
61
  id: AbsenceType.JUSTIFIED_LEAVE,
53
62
  label: 'Absence justifié',
63
+ class: 'justified_leave',
54
64
  },
55
65
  ];
@@ -43,6 +43,15 @@ export enum ChecklistDetailName {
43
43
  HAS_REVIEWED_IMMOBILISATIONS = 'hasReviewedImmobilisations',
44
44
  HAS_SEND_TECHNICAL_DOCUMENT = 'hasSendTechnicalDocument',
45
45
  COMMENTS = 'comments',
46
+
47
+ // New questions for V3
48
+ HAS_INTEGRATED_LAST_YEAR_ELEMENTS = 'hasIntegratedLastYearElements',
49
+ HAS_DEBIT_CURRENT_ACCOUNT = 'hasDebitCurrentAccount',
50
+ HAS_NEGATIVE_EQUITY = 'hasNegativeEquity',
51
+ HAS_TAX_EXEMPTIONS = 'hasTaxExemptions',
52
+ HAS_FUEL_WITHOUT_PROFESSIONAL_VEHICLE = 'hasFuelWithoutProfessionalVehicle',
53
+ HAS_TWELVE_INSTALLMENTS = 'hasTwelveInstallments',
54
+ HAS_LARGEST_OPERATIONS_SURVEY = 'hasLargestOperationsSurvey',
46
55
  }
47
56
 
48
57
  export enum ChecklistDetailValue {
@@ -80,7 +80,7 @@ export const ConstitutionStateDetail: ConstitutionStateType = {
80
80
  },
81
81
  BEING_ABANDONED: {
82
82
  value: ConstitutionState.BEING_ABANDONED,
83
- text: "Dossier en cours d'abandon",
83
+ text: 'Dossier en cours d\'abandon',
84
84
  color: 'primary',
85
85
  },
86
86
  FINISHED: {
@@ -2,5 +2,5 @@ export class ReadAbsenceRequest {
2
2
  class: string;
3
3
  end: string;
4
4
  start: string;
5
- title: number;
5
+ title: string;
6
6
  }
@@ -167,6 +167,13 @@ export class QueryGetToComplete {
167
167
  idSociety: number;
168
168
  }
169
169
 
170
+ export class QueryChecklistQuestions {
171
+ @ApiProperty()
172
+ @IsNumber()
173
+ @IsPositive()
174
+ idExercice: number;
175
+ }
176
+
170
177
  export class QueryChecklistUpdate {
171
178
  @ApiProperty()
172
179
  @IsBoolean()
@@ -1,6 +1,9 @@
1
- import { IsEnum, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
2
2
  import { ApiProperty } from '../../../../utils';
3
- import { ChecklistDetailValue } from '../../../Enum/ChecklistType';
3
+ import { ChecklistDetailValue, ChecklistTypeEnum } from '../../../Enum/ChecklistType';
4
+ import { IChecklist } from '../../models/IChecklist';
5
+ import { ApiPropertyOptional } from '@nestjs/swagger';
6
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
7
 
5
8
  export class UpdateAnswer {
6
9
  @ApiProperty()
@@ -11,3 +14,42 @@ export class UpdateAnswer {
11
14
  @IsEnum(ChecklistDetailValue)
12
15
  value: ChecklistDetailValue;
13
16
  }
17
+
18
+ export class UpdateChecklist implements Partial<IChecklist> {
19
+ @ApiPropertyOptional()
20
+ @IsOptional()
21
+ @IsDate()
22
+ revisionDate?: Date;
23
+
24
+ @ApiPropertyOptional()
25
+ @IsOptional()
26
+ @IsInt()
27
+ idUserWhoValidate?: number;
28
+
29
+ @ApiPropertyOptional()
30
+ @IsOptional()
31
+ @IsDate()
32
+ validateDate?: Date;
33
+
34
+ @ApiProperty()
35
+ @IsOptional()
36
+ @IsInt()
37
+ idUserFront?: number;
38
+
39
+ @ApiProperty()
40
+ @IsOptional()
41
+ @IsBoolean()
42
+ @ToBoolean()
43
+ isConfirmed?: boolean;
44
+
45
+ @ApiPropertyOptional()
46
+ @IsOptional()
47
+ @IsEnum(ChecklistTypeEnum)
48
+ type?: ChecklistTypeEnum;
49
+
50
+ @ApiPropertyOptional()
51
+ @IsOptional()
52
+ @IsBoolean()
53
+ @ToBoolean()
54
+ force?: boolean;
55
+ }
@@ -53,7 +53,6 @@ export interface CompanyCreationFormPayload {
53
53
  additionalActivityAddress?: string;
54
54
  zipCodeActivity?: string;
55
55
  cityActivity?: string;
56
- wantToBeContactedForHeadOffice: boolean;
57
56
  /**
58
57
  * Calendrier
59
58
  */
@@ -445,12 +445,6 @@ export class CreateCompanyCreationFormData implements CompanyCreationFormPayload
445
445
  @IsString()
446
446
  cityActivity?: string;
447
447
 
448
- @ApiPropertyOptional()
449
- @IsOptional()
450
- @IsBoolean()
451
- @ToBoolean()
452
- wantToBeContactedForHeadOffice: boolean;
453
-
454
448
  /**
455
449
  * Calendrier
456
450
  */
@@ -22,6 +22,7 @@ export class CreateFileAndGed {
22
22
  @ApiPropertyOptional()
23
23
  @IsNumber()
24
24
  @IsOptional()
25
+ /** @deprecated use TypeFile enum with GedFile.typeFile field */
25
26
  idTypeGedFile?: number;
26
27
 
27
28
  @ApiProperty()
@@ -1,6 +1,6 @@
1
1
  import { IsIn, IsOptional, IsString, IsNumber, IsBoolean, IsInt, IsDateString, IsArray } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
- import { GedFolder, GedFileType, GedCategory } from '../../../Enum/Ged';
3
+ import { GedFolder, GedFileType, GedCategory, TypeFile } from '../../../Enum/Ged';
4
4
  import { RequiredQueryPaginate } from '../BasePaginate';
5
5
  import { TFile } from '../file/TFile';
6
6
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
@@ -13,6 +13,7 @@ export class QueryLibraryFile {
13
13
  idGedFolder?: GedFolder;
14
14
 
15
15
  @ApiPropertyOptional()
16
+ /** @deprecated use TypeFile enum with GedFile.typeFile field */
16
17
  idTypeGedFile?: GedFileType | GedFileType[];
17
18
 
18
19
  @ApiPropertyOptional()
@@ -36,7 +37,7 @@ export class QueryLibraryFile {
36
37
  @ApiPropertyOptional()
37
38
  @IsNumber()
38
39
  @IsOptional()
39
- typeFile?: number;
40
+ typeFile?: TypeFile;
40
41
 
41
42
  @ApiPropertyOptional()
42
43
  @IsBoolean()
@@ -149,6 +150,7 @@ export class QueryLastFileOfType {
149
150
  idSociety: number;
150
151
 
151
152
  @ApiProperty()
153
+ /** @deprecated Use TypeFile enum instead with GedFile.typeFile field */
152
154
  idTypeGedFile: GedFileType;
153
155
 
154
156
  @ApiPropertyOptional()
@@ -40,3 +40,11 @@ export class QueryStripePurchaseHook {
40
40
  @ToBoolean()
41
41
  isSoftware: boolean;
42
42
  }
43
+
44
+ export class QueryStripePaymentHook {
45
+ @ApiPropertyOptional()
46
+ @IsOptional()
47
+ @IsBoolean()
48
+ @ToBoolean()
49
+ isSoftware?: boolean;
50
+ }
@@ -20,8 +20,8 @@ export interface IChecklist {
20
20
  startDate?: Date | null;
21
21
  endDate?: Date | null;
22
22
  notifyFront?: boolean;
23
- idExercice: number | null;
24
- idCustomerVat: number | null;
23
+ idExercice?: number | null;
24
+ idCustomerVat?: number | null;
25
25
  createdAt?: Date | null;
26
26
  updatedAt?: Date | null;
27
27
 
@@ -6,13 +6,13 @@ export interface IChecklistDetail {
6
6
  id?: number;
7
7
  value: string;
8
8
  isAutomatic: boolean;
9
- idBankAccount: number | null;
9
+ idBankAccount?: number | null;
10
10
  idTypeChecklist: number;
11
11
  idChecklist: number;
12
12
  createdAt?: Date | null;
13
13
  updatedAt?: Date | null;
14
14
 
15
15
  // Associations
16
- typeChecklist: IChecklistType;
17
- detailHasOneChecklist: IChecklist;
16
+ typeChecklist?: IChecklistType;
17
+ detailHasOneChecklist?: IChecklist;
18
18
  }
@@ -0,0 +1,21 @@
1
+ import { TypeFile } from '../../Enum/Ged';
2
+ import { ISociety } from './ISociety';
3
+ import { IExercice } from './IExercice';
4
+ import { IBalanceSheet } from './IBalanceSheet';
5
+ import { IUser } from './IUser';
6
+
7
+ export interface IDocumentRequest {
8
+ id: number;
9
+ idSociety: number;
10
+ idExercice?: number | null;
11
+ idBalanceSheet?: number | null;
12
+ idRequestedBy: number;
13
+ typeFile: TypeFile;
14
+ comment?: string | null;
15
+
16
+ // Associations
17
+ society?: ISociety;
18
+ exercice?: IExercice;
19
+ balanceSheet?: IBalanceSheet;
20
+ requestedBy?: IUser;
21
+ }
@@ -8,18 +8,20 @@ import { ICustomerSignature } from './ICustomerSignature';
8
8
  import { IBalanceSheet } from './IBalanceSheet';
9
9
  import { IBusinessPartner } from './IBusinessPartner';
10
10
  import { IBankAccount } from './IBankAccount';
11
+ import { TypeFile } from '../../Enum/Ged';
11
12
 
12
13
  // gedFile
13
14
  export interface IGedFile {
14
15
  id?: number;
15
16
  emissionDate?: Date | null;
16
17
  statutFile?: number | null;
18
+ /** @deprecated Use typeFile field instead with TypeFile enum */
17
19
  idTypeGedFile?: number | null;
18
20
  idUser?: number | null;
19
21
  idGedFolder: number;
20
22
  idSociety: number;
21
23
  idFile: number;
22
- typeFile?: number | null;
24
+ typeFile?: TypeFile | null;
23
25
  startDate?: Date | null;
24
26
  endDate?: Date | null;
25
27
  idExercice?: number | null;
package/ts/types/index.ts CHANGED
@@ -324,6 +324,7 @@ export * from './Interface/models/IStateBankAccount';
324
324
  export * from './Interface/models/IAIQuestion';
325
325
  export * from './Interface/models/IAIConversation';
326
326
  export * from './Interface/models/IPaymentAttempt';
327
+ export * from './Interface/models/IDocumentRequest';
327
328
 
328
329
  // Schemas
329
330
  export * from './Interface/schemas/IRegistrationDetail';
@@ -52,7 +52,7 @@ export function getTaxAmountByAccountNumber(
52
52
  accountingEntry.account.number.toString().startsWith(number)
53
53
  ) {
54
54
  // eslint-disable-next-line no-console
55
- if (logging) console.log("''");
55
+ if (logging) console.log('\'\'');
56
56
  // eslint-disable-next-line no-console
57
57
  if (logging) console.log(accountingEntry);
58
58
 
@@ -70,12 +70,12 @@ export function getTaxAmountByAccountNumber(
70
70
 
71
71
  export function textFormatting(value: any, length: number | null = null, start?: number): string | null {
72
72
  if (value && typeof value === 'string') {
73
- let formattedValue = value.replace(/[\u2018\u2019]/g, "'"); // Suppression des "Curly Quotes"
73
+ let formattedValue = value.replace(/[\u2018\u2019]/g, '\''); // Suppression des "Curly Quotes"
74
74
  formattedValue = formattedValue.replace(/&/g, ''); // Suppression des &
75
75
  formattedValue = formattedValue.replace(/!/g, ''); // Suppression des !
76
76
  formattedValue = formattedValue.replace(/[\t]/g, ''); // Suppression des tabulations
77
77
 
78
- formattedValue = formattedValue.replace(/`/g, "'"); // Suppression des `
78
+ formattedValue = formattedValue.replace(/`/g, '\''); // Suppression des `
79
79
  formattedValue = formattedValue.replace(/"/g, ''); // Suppression des "
80
80
  formattedValue = formattedValue.replace(/^ */, ''); // Suppression des espaces de début
81
81
  formattedValue = formattedValue.replace(/ *$/, ''); // Suppression des espaces de fin