@silexpert/core 1.1.206 → 1.1.207

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 (192) hide show
  1. package/dist/cjs/api/resources/Journal.js +1 -1
  2. package/dist/cjs/api/resources/Journal.js.map +1 -1
  3. package/dist/cjs/api/resources/ReportMessage.d.ts +47 -0
  4. package/dist/cjs/api/resources/ReportMessage.d.ts.map +1 -0
  5. package/dist/cjs/api/resources/ReportMessage.js +59 -0
  6. package/dist/cjs/api/resources/ReportMessage.js.map +1 -0
  7. package/dist/cjs/api/resources.d.ts +2 -0
  8. package/dist/cjs/api/resources.d.ts.map +1 -1
  9. package/dist/cjs/api/resources.js +2 -0
  10. package/dist/cjs/api/resources.js.map +1 -1
  11. package/dist/cjs/types/Enum/Constants.d.ts +24 -0
  12. package/dist/cjs/types/Enum/Constants.d.ts.map +1 -0
  13. package/dist/cjs/types/Enum/Constants.js +35 -0
  14. package/dist/cjs/types/Enum/Constants.js.map +1 -0
  15. package/dist/cjs/types/Enum/MailAuto.d.ts +3 -1
  16. package/dist/cjs/types/Enum/MailAuto.d.ts.map +1 -1
  17. package/dist/cjs/types/Enum/MailAuto.js +2 -0
  18. package/dist/cjs/types/Enum/MailAuto.js.map +1 -1
  19. package/dist/cjs/types/Enum/ReportType.d.ts +32 -0
  20. package/dist/cjs/types/Enum/ReportType.d.ts.map +1 -1
  21. package/dist/cjs/types/Enum/ReportType.js +32 -0
  22. package/dist/cjs/types/Enum/ReportType.js.map +1 -1
  23. package/dist/cjs/types/Enum/RoleDetail.d.ts +32 -0
  24. package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
  25. package/dist/cjs/types/Enum/RoleDetail.js +32 -0
  26. package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
  27. package/dist/cjs/types/Interface/api/OnBoarding.d.ts +13 -1
  28. package/dist/cjs/types/Interface/api/OnBoarding.d.ts.map +1 -1
  29. package/dist/cjs/types/Interface/api/OnBoarding.js +45 -3
  30. package/dist/cjs/types/Interface/api/OnBoarding.js.map +1 -1
  31. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.d.ts +1 -0
  32. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.js +7 -0
  34. package/dist/cjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.js.map +1 -1
  35. package/dist/cjs/types/Interface/api/equipment/Query.d.ts +1 -0
  36. package/dist/cjs/types/Interface/api/equipment/Query.d.ts.map +1 -1
  37. package/dist/cjs/types/Interface/api/equipment/Query.js +6 -0
  38. package/dist/cjs/types/Interface/api/equipment/Query.js.map +1 -1
  39. package/dist/cjs/types/Interface/api/prestation/Query.d.ts +2 -0
  40. package/dist/cjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  41. package/dist/cjs/types/Interface/api/prestation/Query.js +12 -0
  42. package/dist/cjs/types/Interface/api/prestation/Query.js.map +1 -1
  43. package/dist/cjs/types/Interface/api/report/CreateReport.d.ts +1 -0
  44. package/dist/cjs/types/Interface/api/report/CreateReport.d.ts.map +1 -1
  45. package/dist/cjs/types/Interface/api/report/CreateReport.js +4 -0
  46. package/dist/cjs/types/Interface/api/report/CreateReport.js.map +1 -1
  47. package/dist/cjs/types/Interface/api/report/QueryReports.d.ts +1 -0
  48. package/dist/cjs/types/Interface/api/report/QueryReports.d.ts.map +1 -1
  49. package/dist/cjs/types/Interface/api/report/QueryReports.js +4 -0
  50. package/dist/cjs/types/Interface/api/report/QueryReports.js.map +1 -1
  51. package/dist/cjs/types/Interface/api/report/UpdateReport.d.ts +1 -0
  52. package/dist/cjs/types/Interface/api/report/UpdateReport.d.ts.map +1 -1
  53. package/dist/cjs/types/Interface/api/report/UpdateReport.js.map +1 -1
  54. package/dist/cjs/types/Interface/api/reportMessage/Query.d.ts +4 -0
  55. package/dist/cjs/types/Interface/api/reportMessage/Query.d.ts.map +1 -0
  56. package/dist/cjs/types/Interface/api/reportMessage/Query.js +23 -0
  57. package/dist/cjs/types/Interface/api/reportMessage/Query.js.map +1 -0
  58. package/dist/cjs/types/Interface/models/ICustomerAcceptance.d.ts +1 -0
  59. package/dist/cjs/types/Interface/models/ICustomerAcceptance.d.ts.map +1 -1
  60. package/dist/cjs/types/Interface/models/ICustomerAcceptance.js.map +1 -1
  61. package/dist/cjs/types/Interface/models/IEquipment.d.ts +1 -0
  62. package/dist/cjs/types/Interface/models/IEquipment.d.ts.map +1 -1
  63. package/dist/cjs/types/Interface/models/IEquipment.js.map +1 -1
  64. package/dist/cjs/types/Interface/models/IPrestation.d.ts +3 -2
  65. package/dist/cjs/types/Interface/models/IPrestation.d.ts.map +1 -1
  66. package/dist/cjs/types/Interface/models/IPrestation.js.map +1 -1
  67. package/dist/cjs/types/Interface/models/IReport.d.ts +3 -0
  68. package/dist/cjs/types/Interface/models/IReport.d.ts.map +1 -1
  69. package/dist/cjs/types/Interface/models/IReport.js.map +1 -1
  70. package/dist/cjs/types/Interface/models/IReportMessage.d.ts +13 -0
  71. package/dist/cjs/types/Interface/models/IReportMessage.d.ts.map +1 -0
  72. package/dist/cjs/types/Interface/models/IReportMessage.js +3 -0
  73. package/dist/cjs/types/Interface/models/IReportMessage.js.map +1 -0
  74. package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts +12 -0
  75. package/dist/cjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  76. package/dist/cjs/types/Interface/models/ISocietyDetail.js.map +1 -1
  77. package/dist/cjs/types/index.d.ts +4 -0
  78. package/dist/cjs/types/index.d.ts.map +1 -1
  79. package/dist/cjs/types/index.js +4 -0
  80. package/dist/cjs/types/index.js.map +1 -1
  81. package/dist/cjs/utils/checkup.d.ts +544 -0
  82. package/dist/cjs/utils/checkup.d.ts.map +1 -0
  83. package/dist/cjs/utils/checkup.js +765 -0
  84. package/dist/cjs/utils/checkup.js.map +1 -0
  85. package/dist/mjs/api/resources/Journal.js +1 -1
  86. package/dist/mjs/api/resources/Journal.js.map +1 -1
  87. package/dist/mjs/api/resources/ReportMessage.d.ts +47 -0
  88. package/dist/mjs/api/resources/ReportMessage.d.ts.map +1 -0
  89. package/dist/mjs/api/resources/ReportMessage.js +73 -0
  90. package/dist/mjs/api/resources/ReportMessage.js.map +1 -0
  91. package/dist/mjs/api/resources.d.ts +2 -0
  92. package/dist/mjs/api/resources.d.ts.map +1 -1
  93. package/dist/mjs/api/resources.js +2 -0
  94. package/dist/mjs/api/resources.js.map +1 -1
  95. package/dist/mjs/types/Enum/Constants.d.ts +24 -0
  96. package/dist/mjs/types/Enum/Constants.d.ts.map +1 -0
  97. package/dist/mjs/types/Enum/Constants.js +32 -0
  98. package/dist/mjs/types/Enum/Constants.js.map +1 -0
  99. package/dist/mjs/types/Enum/MailAuto.d.ts +3 -1
  100. package/dist/mjs/types/Enum/MailAuto.d.ts.map +1 -1
  101. package/dist/mjs/types/Enum/MailAuto.js +2 -0
  102. package/dist/mjs/types/Enum/MailAuto.js.map +1 -1
  103. package/dist/mjs/types/Enum/ReportType.d.ts +32 -0
  104. package/dist/mjs/types/Enum/ReportType.d.ts.map +1 -1
  105. package/dist/mjs/types/Enum/ReportType.js +32 -0
  106. package/dist/mjs/types/Enum/ReportType.js.map +1 -1
  107. package/dist/mjs/types/Enum/RoleDetail.d.ts +32 -0
  108. package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
  109. package/dist/mjs/types/Enum/RoleDetail.js +32 -0
  110. package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
  111. package/dist/mjs/types/Interface/api/OnBoarding.d.ts +13 -1
  112. package/dist/mjs/types/Interface/api/OnBoarding.d.ts.map +1 -1
  113. package/dist/mjs/types/Interface/api/OnBoarding.js +48 -3
  114. package/dist/mjs/types/Interface/api/OnBoarding.js.map +1 -1
  115. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.d.ts +1 -0
  116. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.d.ts.map +1 -1
  117. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.js +8 -0
  118. package/dist/mjs/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.js.map +1 -1
  119. package/dist/mjs/types/Interface/api/equipment/Query.d.ts +1 -0
  120. package/dist/mjs/types/Interface/api/equipment/Query.d.ts.map +1 -1
  121. package/dist/mjs/types/Interface/api/equipment/Query.js +7 -0
  122. package/dist/mjs/types/Interface/api/equipment/Query.js.map +1 -1
  123. package/dist/mjs/types/Interface/api/prestation/Query.d.ts +2 -0
  124. package/dist/mjs/types/Interface/api/prestation/Query.d.ts.map +1 -1
  125. package/dist/mjs/types/Interface/api/prestation/Query.js +15 -1
  126. package/dist/mjs/types/Interface/api/prestation/Query.js.map +1 -1
  127. package/dist/mjs/types/Interface/api/report/CreateReport.d.ts +1 -0
  128. package/dist/mjs/types/Interface/api/report/CreateReport.d.ts.map +1 -1
  129. package/dist/mjs/types/Interface/api/report/CreateReport.js +5 -0
  130. package/dist/mjs/types/Interface/api/report/CreateReport.js.map +1 -1
  131. package/dist/mjs/types/Interface/api/report/QueryReports.d.ts +1 -0
  132. package/dist/mjs/types/Interface/api/report/QueryReports.d.ts.map +1 -1
  133. package/dist/mjs/types/Interface/api/report/QueryReports.js +5 -0
  134. package/dist/mjs/types/Interface/api/report/QueryReports.js.map +1 -1
  135. package/dist/mjs/types/Interface/api/report/UpdateReport.d.ts +1 -0
  136. package/dist/mjs/types/Interface/api/report/UpdateReport.d.ts.map +1 -1
  137. package/dist/mjs/types/Interface/api/report/UpdateReport.js.map +1 -1
  138. package/dist/mjs/types/Interface/api/reportMessage/Query.d.ts +4 -0
  139. package/dist/mjs/types/Interface/api/reportMessage/Query.d.ts.map +1 -0
  140. package/dist/mjs/types/Interface/api/reportMessage/Query.js +20 -0
  141. package/dist/mjs/types/Interface/api/reportMessage/Query.js.map +1 -0
  142. package/dist/mjs/types/Interface/models/ICustomerAcceptance.d.ts +1 -0
  143. package/dist/mjs/types/Interface/models/ICustomerAcceptance.d.ts.map +1 -1
  144. package/dist/mjs/types/Interface/models/ICustomerAcceptance.js.map +1 -1
  145. package/dist/mjs/types/Interface/models/IEquipment.d.ts +1 -0
  146. package/dist/mjs/types/Interface/models/IEquipment.d.ts.map +1 -1
  147. package/dist/mjs/types/Interface/models/IEquipment.js.map +1 -1
  148. package/dist/mjs/types/Interface/models/IPrestation.d.ts +3 -2
  149. package/dist/mjs/types/Interface/models/IPrestation.d.ts.map +1 -1
  150. package/dist/mjs/types/Interface/models/IPrestation.js.map +1 -1
  151. package/dist/mjs/types/Interface/models/IReport.d.ts +3 -0
  152. package/dist/mjs/types/Interface/models/IReport.d.ts.map +1 -1
  153. package/dist/mjs/types/Interface/models/IReport.js.map +1 -1
  154. package/dist/mjs/types/Interface/models/IReportMessage.d.ts +13 -0
  155. package/dist/mjs/types/Interface/models/IReportMessage.d.ts.map +1 -0
  156. package/dist/mjs/types/Interface/models/IReportMessage.js +2 -0
  157. package/dist/mjs/types/Interface/models/IReportMessage.js.map +1 -0
  158. package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts +12 -0
  159. package/dist/mjs/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
  160. package/dist/mjs/types/Interface/models/ISocietyDetail.js.map +1 -1
  161. package/dist/mjs/types/index.d.ts +4 -0
  162. package/dist/mjs/types/index.d.ts.map +1 -1
  163. package/dist/mjs/types/index.js +4 -0
  164. package/dist/mjs/types/index.js.map +1 -1
  165. package/dist/mjs/utils/checkup.d.ts +544 -0
  166. package/dist/mjs/utils/checkup.d.ts.map +1 -0
  167. package/dist/mjs/utils/checkup.js +760 -0
  168. package/dist/mjs/utils/checkup.js.map +1 -0
  169. package/package.json +1 -1
  170. package/ts/api/resources/Journal.ts +1 -1
  171. package/ts/api/resources/ReportMessage.ts +81 -0
  172. package/ts/api/resources.ts +2 -0
  173. package/ts/types/Enum/Constants.ts +35 -0
  174. package/ts/types/Enum/MailAuto.ts +2 -0
  175. package/ts/types/Enum/ReportType.ts +32 -0
  176. package/ts/types/Enum/RoleDetail.ts +32 -0
  177. package/ts/types/Interface/api/OnBoarding.ts +35 -3
  178. package/ts/types/Interface/api/commercial/QueryPaginatedSocietyWithStatsCa.ts +6 -0
  179. package/ts/types/Interface/api/equipment/Query.ts +5 -0
  180. package/ts/types/Interface/api/prestation/Query.ts +11 -1
  181. package/ts/types/Interface/api/report/CreateReport.ts +3 -0
  182. package/ts/types/Interface/api/report/QueryReports.ts +3 -0
  183. package/ts/types/Interface/api/report/UpdateReport.ts +1 -0
  184. package/ts/types/Interface/api/reportMessage/Query.ts +8 -0
  185. package/ts/types/Interface/models/ICustomerAcceptance.ts +1 -0
  186. package/ts/types/Interface/models/IEquipment.ts +1 -0
  187. package/ts/types/Interface/models/IPrestation.ts +3 -2
  188. package/ts/types/Interface/models/IReport.ts +3 -0
  189. package/ts/types/Interface/models/IReportMessage.ts +16 -0
  190. package/ts/types/Interface/models/ISocietyDetail.ts +12 -0
  191. package/ts/types/index.ts +4 -0
  192. package/ts/utils/checkup.ts +774 -0
@@ -0,0 +1,774 @@
1
+ import { AverageTimeItems, SelectYesNoStatementBool, ClementineSources } from '../types/Enum/Constants';
2
+ import { QualityList } from '../types/Enum/Quality';
3
+ import { Vat } from '../types/Enum/Vat';
4
+ import * as dayjs from 'dayjs';
5
+
6
+
7
+ export const setRangeItems = (maxRange:number) => {
8
+ const res = [];
9
+ for (let i = 0; i < maxRange; i += 1) {
10
+ res.push({ text: i, value: i });
11
+ }
12
+ return res;
13
+ };
14
+
15
+ export const getCheckupDetailForm = (
16
+ societyDetail: any, //FIXME: typage ???
17
+ brandName: string,
18
+ bankList: { id: number, name: number }[],
19
+ ) => { //FIXME: typage ???
20
+
21
+ const isSocietyCreationCompute = societyDetail.isSocietyCreation !== null &&
22
+ societyDetail.isSocietyCreation !== undefined
23
+ ? societyDetail.isSocietyCreation
24
+ : true;
25
+
26
+ return [
27
+ {
28
+ name: 'Découverte de l\'entreprise',
29
+ questions: [
30
+ {
31
+ value: 'detailActivity',
32
+ component: 'FormInputTextArea',
33
+ text: 'Pouvez vous m’expliquer le fonctionnement de votre activité ?',
34
+ //TODO: conseil à afficher
35
+ meta: {
36
+ placeholder: 'E-commerce, ventes de produits finis, artisanat...',
37
+ hideDetails:true,
38
+ },
39
+ },
40
+ {
41
+ value: 'nbBankaccounts',
42
+ component: 'FormInputSelect',
43
+ text: 'Combien de comptes bancaires avez-vous ?',
44
+ meta: {
45
+ items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
46
+ hideDetails: true,
47
+ },
48
+ lg: societyDetail.nbBankaccounts > 0 ? 8 : 12,
49
+ },
50
+ {
51
+ //TODO: champ à créer
52
+ component: 'FormInputSelect',
53
+ text: 'Lesquelles ?',
54
+ value: 'listBanks',
55
+ meta: {
56
+ multiple: true,
57
+ items: [...bankList, { id: 'hors-ue', name: 'Hors UE' }],
58
+ itemText: 'name',
59
+ itemValue: 'id',
60
+ hideDetails: true,
61
+ },
62
+ lg: societyDetail.nbBankaccounts > 0 ? 4 : 12,
63
+ condition: societyDetail.nbBankaccounts > 0,
64
+ },
65
+ {
66
+ component: 'FormInputSelect',
67
+ text: 'Combien d\'associés êtes-vous ?',
68
+ // lg: 4,
69
+ value: 'nbAssociates',
70
+ meta: {
71
+ items: setRangeItems(20),
72
+ hideDetails: true,
73
+ },
74
+ lg: 4,
75
+ },
76
+ {
77
+ component: 'FormInputSelect',
78
+ text: 'Combien d\'associés travaillent dans la société ?',
79
+ // lg: 4,
80
+ value: 'nbAssociatesInCompany',
81
+ meta: {
82
+ items: setRangeItems(20),
83
+ hideDetails: true,
84
+ },
85
+ lg: 4,
86
+ },
87
+ {
88
+ component: 'FormInputSelect',
89
+ text: 'Combien de salariés êtes-vous ?',
90
+ value: 'nbEmployees',
91
+ meta: {
92
+ items: setRangeItems(20),
93
+ hideDetails: true,
94
+ },
95
+ lg: 4,
96
+ },
97
+ {
98
+ component: 'FormInputSelect', //'FormInputRadio',
99
+ text: 'Avez-vous des prévisions d’embauches ?',
100
+ value: 'hiringPromess',
101
+ meta: {
102
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
103
+ hideDetails: true,
104
+ },
105
+ lg: 4,
106
+ },
107
+ {
108
+ component: 'FormInputSelect',
109
+ text: 'Le siège social est-il au domicile ?',
110
+ // lg: 4,
111
+ value: 'isPersoAdress',
112
+ meta: {
113
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
114
+ hideDetails: true,
115
+ },
116
+ lg: 4,
117
+ },
118
+ {
119
+ component: 'FormInputSelect', //'FormInputRadio',
120
+ text: 'Êtes-vous propriétaire ?',
121
+ value: 'professionnalRent',
122
+ meta: {
123
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
124
+ hideDetails: true,
125
+ },
126
+ condition: societyDetail.isPersoAdress === '1',
127
+ lg: societyDetail.isPersoAdress === '1' ? 4 : 8,
128
+ },
129
+ {
130
+ component: 'FormInputSelect', //'FormInputRadio',
131
+ text: 'Si non, avez-vous un bail commercial ?',
132
+ value: 'hasCommercialLease',
133
+ meta: {
134
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
135
+ hideDetails: true,
136
+ },
137
+ //TODO: conseil à afficher
138
+ condition: societyDetail.isPersoAdress === '1',
139
+ lg: societyDetail.isPersoAdress === '1' ? 4 : 8,
140
+ },
141
+ {
142
+ component: 'FormInputText',
143
+ text: 'Quelle est la surface approximative du local ?',
144
+ value: 'commercialArea',
145
+ type: 'number',
146
+ meta: {
147
+ suffix: 'm²',
148
+ hideDetails:true,
149
+ },
150
+ condition: societyDetail.isPersoAdress === '1',
151
+ lg: societyDetail.isPersoAdress === '1' ? 4 : 8,
152
+ },
153
+ {
154
+ component: 'FormInputText',
155
+ text: 'Quel est le montant du loyer mensuel',
156
+ value: 'commercialRentAmount',
157
+ type: 'number',
158
+ meta: {
159
+ suffix: '€',
160
+ hideDetails:true,
161
+ },
162
+ condition: societyDetail.isPersoAdress === '1',
163
+ lg: societyDetail.isPersoAdress === '1' ? 4 : 8,
164
+ },
165
+ {
166
+ component: 'FormInputSelect',
167
+ text: 'Utilisez-vous votre véhicule personnel dans le cadre de votre activité ?',
168
+ value: 'vehicle',
169
+ required: false,
170
+ meta: {
171
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
172
+ hideDetails: true,
173
+ },
174
+ lg: 4,
175
+ //TODO: conseil à afficher
176
+ },
177
+ {
178
+ component: 'FormInputSelect',
179
+ text: 'Votre structure a-t-elle des participations dans d\'autres sociétés ?',
180
+ value: 'interestOtherCompanies',
181
+ meta: {
182
+ items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
183
+ hideDetails: true,
184
+ },
185
+ lg: parseInt(societyDetail.interestOtherCompanies, 10) > 0 ? 4 : 12,
186
+ },
187
+ {
188
+ component: 'FormInputText',
189
+ text: 'Si oui, quels sont les noms des sociétés ?',
190
+ value: 'commercialRentAmount',
191
+ condition: parseInt(societyDetail.interestOtherCompanies, 10) > 0,
192
+ lg: parseInt(societyDetail.interestOtherCompanies, 10) > 0 ? 4 : 12,
193
+ },
194
+ {
195
+ //TODO: champ à créer
196
+ component: 'FormInputSelect', //'FormInputRadio',
197
+ text: `Sont-elles clientes chez ${brandName}`,
198
+ value: 'areOtherCompaniesOnOurBrand',
199
+ meta: {
200
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
201
+ hideDetails: true,
202
+ },
203
+ condition: parseInt(societyDetail.interestOtherCompanies, 10) > 0,
204
+ lg: parseInt(societyDetail.interestOtherCompanies, 10) > 0 ? 4 : 12,
205
+ //TODO: si non, conseil à afficher
206
+ },
207
+ {
208
+ //TODO: champ à créer
209
+ component: 'FormInputSelect',
210
+ text: 'Quels sont vos taux de TVA ?',
211
+ value: 'listTva',
212
+ meta: {
213
+ multiple: true,
214
+ items: Object.values(Vat)
215
+ .filter(v => !v.isVatIntracom && !v.isVatImportation && v.immobilization)
216
+ .sort((a, b) => b.displayOrder - a.displayOrder),
217
+ itemText: 'name',
218
+ itemValue: 'id',
219
+ hideDetails: true,
220
+ },
221
+ lg: 4,
222
+ },
223
+ {
224
+ //TODO: champ à créer
225
+ component: 'FormInputSelect', //'FormInputRadio',
226
+ text:
227
+ 'Votre compte impôts.gouv.fr a t-il été paramétré avec le RIB transmis au service facturation ?',
228
+ value: 'ribSentToTaxDepartment',
229
+ meta: {
230
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
231
+ hideDetails: true,
232
+ },
233
+ lg: 8,
234
+ },
235
+ {
236
+ //TRICK: insertion du bloc de DropBox de RIB
237
+ value: 'rib',
238
+ condition: societyDetail.ribSentToTaxDepartment === '0',
239
+ //TODO: conseil à afficher
240
+ lg: 4,
241
+ },
242
+ {
243
+ component: 'FormInputTextArea',
244
+ text: 'Remarques',
245
+ value: 'historyComments',
246
+ required: false,
247
+ meta: {
248
+ hideDetails:true,
249
+ },
250
+ lg: 12,
251
+ },
252
+ {
253
+ //TODO: champ à créer
254
+ component: 'FormInputSelect', //'FormInputRadio',
255
+ text: 'Avez-vous un logiciel de facturation ?',
256
+ value: 'hasBillingSoftware',
257
+ meta: {
258
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
259
+ hideDetails: true,
260
+ },
261
+ lg: 4,
262
+ },
263
+ {
264
+ component: 'FormInputText',
265
+ text: 'Lequel ?',
266
+ value: 'billingSoftware',
267
+ //TODO: si non, conseil à afficher
268
+ lg: 4,
269
+ meta: {
270
+ hideDetails:true,
271
+ },
272
+ condition: societyDetail.hasBillingSoftware === '1',
273
+ },
274
+ {
275
+ component: 'FormInputSelect',
276
+ text: 'Quels sont les modes de réglements dont vous disposez ?',
277
+ value: 'collectionSystem',
278
+ meta: {
279
+ items: [
280
+ //TODO: ajouter PayPal et Stripe ?
281
+ { text: 'Chèque', value: 'cheque' },
282
+ { text: 'Espèce', value: 'espece' },
283
+ { text: 'Intermédiaire', value: 'intermediaire' },
284
+ { text: 'Virement', value: 'virement' },
285
+ ],
286
+ hideDetails: true,
287
+ },
288
+ lg: 4,
289
+ },
290
+ {
291
+ //TODO: champ à créer
292
+ component: 'FormInputSelect',
293
+ text: 'Où est situé le siège de l’entreprise ?',
294
+ value: 'officeType',
295
+ meta: {
296
+ items: [
297
+ { text: 'Domicile', value: 'domicile' },
298
+ { text: 'Boîte de Domiciliation', value: 'boite de Domiciliation' },
299
+ { text: 'Local ou Bureau', value: 'local/bureau' },
300
+ ],
301
+ hideDetails: true,
302
+ },
303
+ //TODO: 3 conseils à afficher
304
+ lg: 4,
305
+ },
306
+ ],
307
+ },
308
+ {
309
+ name: 'Création d\'entreprise',
310
+ display: isSocietyCreationCompute === true,
311
+ questions: [
312
+ {
313
+ component: 'FormInputSelect', //'FormInputRadio',
314
+ text: 'Avez-vous utilisé des apports personnels en capital lors de la création ?',
315
+ value: 'personnalContributionCapital',
316
+ meta: {
317
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
318
+ hideDetails: true,
319
+ },
320
+ lg: 4,
321
+ },
322
+ {
323
+ component: 'FormInputSelect', //'FormInputRadio',
324
+ text:
325
+ 'Avez-vous utilisé des apports personnels en compte courant lors de la création ?',
326
+ value: 'personnalContributionCurrentBankAccount',
327
+ meta: {
328
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
329
+ hideDetails: true,
330
+ },
331
+ lg: 4,
332
+ },
333
+ {
334
+ component: 'FormInputSelect', //'FormInputRadio',
335
+ text:
336
+ 'Avez-vous utilisé des apports personnels en nature lors de la création ?',
337
+ value: 'personnalContributionInKind',
338
+ meta: {
339
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
340
+ hideDetails: true,
341
+ },
342
+ lg: 4,
343
+ },
344
+ {
345
+ component: 'FormInputText',
346
+ text: 'Quelle activité exerciez-vous auparavant ?',
347
+ value: 'oldActivite',
348
+ meta: {
349
+ hideDetails:true,
350
+ },
351
+ },
352
+ {
353
+ component: 'FormInputSelect', //'FormInputRadio',
354
+ text:
355
+ 'Avez-vous bénéficié d\'une rupture conventionnelle ou du versement d\'une indemnité de licenciement dans le cadre de votre installation ?',
356
+ value: 'indemnite',
357
+ required: false,
358
+ meta: {
359
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
360
+ hideDetails: true,
361
+ },
362
+ },
363
+ {
364
+ component: 'FormInputSelect', //'FormInputRadio',
365
+ text: 'Bénéficiez vous de l\'aide de Pôle Emploi ?',
366
+ value: 'poleEmploiAid',
367
+ required: false,
368
+ meta: {
369
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
370
+ hideDetails: true,
371
+ },
372
+ lg: societyDetail.poleEmploiAid === '1' ? 6 : 12,
373
+ },
374
+ {
375
+ component: 'FormInputText',
376
+ text: 'Si oui, option retenue ?',
377
+ value: 'poleEmploiAidType',
378
+ required: false,
379
+ meta: {
380
+ hideDetails:true,
381
+ },
382
+ condition: societyDetail.poleEmploiAid === '1',
383
+ lg: societyDetail.poleEmploiAid === '1' ? 6 : 12,
384
+ },
385
+ {
386
+ component: 'FormInputSelect', //'FormInputRadio',
387
+ text: 'Avez-vous bénéficié d\'un prêt d\'honneur ?',
388
+ value: 'honorLoan',
389
+ required: false,
390
+ meta: {
391
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
392
+ hideDetails: true,
393
+ },
394
+ lg: societyDetail.honorLoan === '1' ? 6 : 12,
395
+ },
396
+ {
397
+ component: 'FormInputText',
398
+ text: 'Si oui, quel est le montant du prêt d\'honneur ?',
399
+ value: 'honorLoanAmount',
400
+ type: 'number',
401
+ required: false,
402
+ meta: {
403
+ suffix: '€',
404
+ hideDetails:true,
405
+ },
406
+ condition: societyDetail.honorLoan === '1',
407
+ lg: societyDetail.honorLoan === '1' ? 6 : 12,
408
+ },
409
+ {
410
+ component: 'FormInputSelect', //'FormInputRadio',
411
+ text: 'Allez-vous travailler à l\'international ? (import ou export)',
412
+ value: 'workInternationnal',
413
+ required: false,
414
+ meta: {
415
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
416
+ hideDetails: true,
417
+ },
418
+ lg: 4,
419
+ },
420
+ {
421
+ component: 'FormInputSelect', //'FormInputRadio',
422
+ text: 'Avez-vous dû financer un stock de départ ?',
423
+ value: 'financingStartingStock',
424
+ required: false,
425
+ meta: {
426
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
427
+ hideDetails: true,
428
+ },
429
+ lg: societyDetail.financingStartingStock === '1' ? 4 : 8,
430
+ },
431
+ {
432
+ component: 'FormInputText',
433
+ text: 'Si oui, montant approximatif',
434
+ value: 'financingStartingStockAmount',
435
+ type: 'number',
436
+ required: false,
437
+ meta: {
438
+ suffix: '€',
439
+ hideDetails:true,
440
+ },
441
+ condition: societyDetail.financingStartingStock === '1',
442
+ lg: societyDetail.financingStartingStock === '1' ? 4 : 8,
443
+ },
444
+ {
445
+ //TODO: champ à créer
446
+ component: 'FormInputSelect',
447
+ text: 'Quels sont vos types d\'apport ?',
448
+ value: 'contributionTypes',
449
+ meta: {
450
+ multiple: true,
451
+ items: [
452
+ { text: 'Nature', value: 'nature' }, //TODO: créer un ENUM
453
+ { text: 'Numéraire', value: 'numeraire' },
454
+ { text: 'Industriel', value: 'industriel' },
455
+ ],
456
+ hideDetails: true,
457
+ },
458
+ lg: 4,
459
+ },
460
+ {
461
+ component: 'FormInputText',
462
+ text: 'Chiffre d\'affaires Prévisionnel ?',
463
+ value: 'previsionCa',
464
+ meta: {
465
+ suffix: '€',
466
+ hideDetails:true,
467
+ },
468
+ lg: 4,
469
+ },
470
+ {
471
+ component: 'FormInputSelect',
472
+ text: 'Existe-t-il des emprunts en cours ?',
473
+ value: 'isLoans',
474
+ meta: {
475
+ items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
476
+ hideDetails: true,
477
+ },
478
+ lg: 4,
479
+ },
480
+ ],
481
+ },
482
+ {
483
+ name: 'Entreprise existante',
484
+ display: isSocietyCreationCompute === false,
485
+ questions: [
486
+ {
487
+ component: 'FormInputSelect', //'FormInputRadio',
488
+ text:
489
+ 'Aviez-vous fait des investissements dans le cadre de la création de votre entreprise ?',
490
+ value: 'investissement',
491
+ meta: {
492
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
493
+ hideDetails: true,
494
+ },
495
+ lg: societyDetail.investissement === '1' ? 4 : 8,
496
+ },
497
+ {
498
+ //TODO: champ à créer
499
+ component: 'FormInputSelect',
500
+ text: 'De quelles natures ?',
501
+ value: 'investissementTypes',
502
+ meta: {
503
+ multiple: true,
504
+ items: [
505
+ { text: 'Nature', value: 'nature' }, //TODO: créer un ENUM
506
+ { text: 'Numéraire', value: 'numeraire' },
507
+ { text: 'Industriel', value: 'industriel' },
508
+ ],
509
+ hideDetails: true,
510
+ },
511
+ condition: societyDetail.investissement === '1',
512
+ lg: societyDetail.investissement === '1' ? 4 : 8,
513
+ },
514
+ {
515
+ component: 'FormInputSelect', //'FormInputRadio',
516
+ text: 'Avez-vous des projets d\'investissement à court ou moyen terme ?',
517
+ value: 'investissementCTMT',
518
+ meta: {
519
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
520
+ hideDetails: true,
521
+ },
522
+ lg: 4,
523
+ },
524
+ {
525
+ component: 'FormInputSelect', //'FormInputRadio',
526
+ text: 'Avez-vous déjà eu des contrôles fiscaux ?',
527
+ value: 'fiscalControl',
528
+ meta: {
529
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
530
+ hideDetails: true,
531
+ },
532
+ lg: 4,
533
+ },
534
+ {
535
+ component: 'FormInputSelect',
536
+ text: 'Existe-t-il des emprunts en cours ?',
537
+ value: 'borrowingInProgress',
538
+ meta: {
539
+ items: setRangeItems(15).map(i => ({ ...i, value: i.value.toString() })),
540
+ hideDetails: true,
541
+ },
542
+ lg: 4,
543
+ },
544
+ {
545
+ //TODO: champ à créer
546
+ component: 'FormInputSelect',
547
+ text: 'Quel(s) est/sont le(s) motif(s) de votre changement d\'Expert-Comptable ?',
548
+ value: 'listReasonsWhyChangingEC',
549
+ meta: {
550
+ multiple: true,
551
+ items: [
552
+ { text: 'Litige', value: 'litige' },
553
+ { text: 'Impayé', value: 'impayé' },
554
+ { text: 'Pas réactif', value: 'pas réactif' },
555
+ { text: 'Manque de conseil', value: 'manque de conseil' },
556
+ { text: 'proximité', value: 'proximité' },
557
+ { text: 'pPrix', value: 'prix' },
558
+ ],
559
+ hideDetails: true,
560
+ },
561
+ lg: 4,
562
+ },
563
+ ],
564
+ },
565
+ {
566
+ name: 'Découverte chef d\'entreprise',
567
+ questions: [
568
+ {
569
+ component: 'FormInputSelect', //'FormInputRadio',
570
+ text: 'Avez-vous suivi une formation particulière en lien avec votre activité ?',
571
+ value: 'descriptionFormation',
572
+ meta: {
573
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
574
+ hideDetails: true,
575
+ },
576
+ lg: 6,
577
+ //TODO: si non, conseil à afficher
578
+ },
579
+ {
580
+ component: 'FormInputSelect', //'FormInputRadio',
581
+ text: 'Avez-vous des connaissances de gestion ?',
582
+ value: 'managementKnowledge',
583
+ meta: {
584
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
585
+ hideDetails: true,
586
+ },
587
+ lg: 6,
588
+ },
589
+ {
590
+ component: 'FormInputSelect', //'FormInputRadio',
591
+ text: 'Avez-vous des responsabilités politiques ?',
592
+ value: 'politicalResponsability',
593
+ meta: {
594
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
595
+ hideDetails: true,
596
+ },
597
+ lg: 6,
598
+ },
599
+ {
600
+ component: 'FormInputSelect', //'FormInputRadio',
601
+ text: 'Avez-vous des participations dans d\'autres sociétés ?',
602
+ value: 'participationsInOtherSociety',
603
+ meta: {
604
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
605
+ hideDetails: true,
606
+ },
607
+ lg: 6,
608
+ },
609
+ {
610
+ component: 'FormInputSelect', //'FormInputRadio',
611
+ text: 'Êtes-vous résident fiscal français ?',
612
+ value: 'frenchTaxResident',
613
+ meta: {
614
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
615
+ hideDetails: true,
616
+ },
617
+ lg: 6,
618
+ },
619
+ {
620
+ component: 'FormInputSelect', //'FormInputRadio',
621
+ text: 'Êtes-vous interdit bancaire ?',
622
+ value: 'prohibitedBanking',
623
+ meta: {
624
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
625
+ hideDetails: true,
626
+ },
627
+ lg: 6,
628
+ },
629
+ {
630
+ component: 'FormInputSelect', //'FormInputRadio',
631
+ text: 'Êtes-vous en redressement judiciaire ?',
632
+ value: 'judiciaryRecovery',
633
+ meta: {
634
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
635
+ hideDetails: true,
636
+ },
637
+ lg: 6,
638
+ },
639
+ {
640
+ component: 'FormInputSelect', //'FormInputRadio',
641
+ text: `Êtes-vous imposable au titre de l'IR ${dayjs()
642
+ .subtract(2, 'year')
643
+ .format('YYYY')}/${dayjs()
644
+ .subtract(1, 'year')
645
+ .format('YYYY')} ?`,
646
+ value: 'isIrTaxable',
647
+ meta: {
648
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
649
+ hideDetails: true,
650
+ },
651
+ lg: 6,
652
+ },
653
+ {
654
+ //TODO: champ à créer
655
+ component: 'FormInputSelect',
656
+ text: 'Quelle est votre fonction dans l\'entreprise ?',
657
+ value: 'listQualities',
658
+ meta: {
659
+ multiple: true,
660
+ items: Object.values(QualityList).sort((a, b) =>
661
+ a.label > b.label ? 1 : -1,
662
+ ),
663
+ itemText: 'label',
664
+ itemValue: 'id',
665
+ hideDetails: true,
666
+ },
667
+ lg: 6,
668
+ },
669
+ ],
670
+ },
671
+ {
672
+ name: 'Organisation',
673
+ questions: [
674
+ {
675
+ //TODO: champ à créer
676
+ component: 'FormInputSelect',
677
+ text: 'En combien de temps vos clients vous règlent-ils ?',
678
+ value: 'averageCustomerRegulationTime',
679
+ meta: {
680
+ items: AverageTimeItems,
681
+ hideDetails: true,
682
+ },
683
+ },
684
+ {
685
+ //TODO: champ à créer
686
+ component: 'FormInputSelect',
687
+ text: 'En combien de temps réglez-vous vos fournisseurs ?',
688
+ value: 'averageSupplierRegulationTime',
689
+ meta: {
690
+ items: AverageTimeItems,
691
+ hideDetails: true,
692
+ },
693
+ },
694
+ {
695
+ component: 'FormInputSelect', //'FormInputRadio',
696
+ text: 'Classez-vous vos pièces comptables (factures d’achats par mois, etc ...) ?',
697
+ value: 'rankFiles',
698
+ meta: {
699
+ items: SelectYesNoStatementBool.map(i => ({ ...i, value: i.value.toString() })),
700
+ hideDetails: true,
701
+ },
702
+ },
703
+ //FIXME: on garde ? On supprime ?
704
+ // {
705
+ // name: "Myclementine",
706
+ // display: isItThisEnv("Clementine", process.env.NODE_ENV),
707
+ // questions: [
708
+ // {
709
+ // component: "FormInputSelect",
710
+ // text: "Nous allons synchroniser votre banque à présent :",
711
+ // meta: {
712
+ // items: bankSynchronisationItems,
713
+ // classes: "rounded noBorder",
714
+ // flat: true
715
+ // },
716
+ // value: "bankSynchronisationState",
717
+ // type: "number"
718
+ // },
719
+ // {
720
+ // component: "FormInputSelect",
721
+ // text: "Avez-vous besoin d'une explication de la plateforme :",
722
+ // meta: {
723
+ // items: SelectYesNoStatementBool,
724
+ // classes: "rounded noBorder",
725
+ // flat: true
726
+ // },
727
+ // value: "platformExplanation",
728
+ // type: "number"
729
+ // },
730
+ // {
731
+ // component: "FormInputSelect",
732
+ // text: "Avez-vous proposé à votre client d’installer l'application mobile :",
733
+ // meta: {
734
+ // items: SelectYesNoStatementBool,
735
+ // classes: "rounded noBorder",
736
+ // flat: true
737
+ // },
738
+ // value: "mobileAppInstallationProposal",
739
+ // type: "number"
740
+ // }
741
+ ],
742
+ },
743
+ {
744
+ name: 'Conclusion',
745
+ questions: [
746
+ {
747
+ component: 'FormInputText',
748
+ text: 'Avez-vous des besoins spécifiques ?',
749
+ value: 'specificNeeds',
750
+ meta: {
751
+ hideDetails:true,
752
+ },
753
+ },
754
+ {
755
+ component: 'FormInputTextArea',
756
+ text: 'Commentaires généraux',
757
+ value: 'remarqueComment',
758
+ meta: {
759
+ hideDetails:true,
760
+ },
761
+ },
762
+ {
763
+ component: 'FormInputSelect',
764
+ text: 'Comment nous avez-vous connu ?',
765
+ meta: {
766
+ items: ClementineSources,
767
+ hideDetails: true,
768
+ },
769
+ value: 'idFindClementine',
770
+ },
771
+ ],
772
+ },
773
+ ];
774
+ };