@silexpert/core 1.3.169-3 → 1.3.169

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