@nextsparkjs/theme-crm 0.1.0-beta.1

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 (140) hide show
  1. package/CRM_PLAN.md +343 -0
  2. package/about.md +122 -0
  3. package/config/app.config.ts +185 -0
  4. package/config/billing.config.ts +187 -0
  5. package/config/dashboard.config.ts +372 -0
  6. package/config/dev.config.ts +55 -0
  7. package/config/features.config.ts +336 -0
  8. package/config/flows.config.ts +511 -0
  9. package/config/permissions.config.ts +297 -0
  10. package/config/theme.config.ts +111 -0
  11. package/entities/activities/activities.config.ts +61 -0
  12. package/entities/activities/activities.fields.ts +362 -0
  13. package/entities/activities/activities.service.ts +503 -0
  14. package/entities/activities/activities.types.ts +117 -0
  15. package/entities/activities/messages/en.json +123 -0
  16. package/entities/activities/messages/es.json +123 -0
  17. package/entities/activities/migrations/020_activities_table.sql +123 -0
  18. package/entities/activities/migrations/021_activities_metas.sql +114 -0
  19. package/entities/activities/migrations/022_activities_sample_data.sql +420 -0
  20. package/entities/campaigns/campaigns.config.ts +61 -0
  21. package/entities/campaigns/campaigns.fields.ts +413 -0
  22. package/entities/campaigns/campaigns.service.ts +426 -0
  23. package/entities/campaigns/campaigns.types.ts +124 -0
  24. package/entities/campaigns/messages/en.json +145 -0
  25. package/entities/campaigns/messages/es.json +145 -0
  26. package/entities/campaigns/migrations/001_campaigns_table.sql +127 -0
  27. package/entities/campaigns/migrations/002_campaigns_metas.sql +114 -0
  28. package/entities/campaigns/migrations/003_campaigns_sample_data.sql +364 -0
  29. package/entities/companies/companies.config.ts +61 -0
  30. package/entities/companies/companies.fields.ts +429 -0
  31. package/entities/companies/companies.service.ts +566 -0
  32. package/entities/companies/companies.types.ts +125 -0
  33. package/entities/companies/messages/en.json +146 -0
  34. package/entities/companies/messages/es.json +146 -0
  35. package/entities/companies/migrations/001_companies_table.sql +150 -0
  36. package/entities/companies/migrations/002_companies_metas.sql +114 -0
  37. package/entities/companies/migrations/003_companies_sample_data.sql +246 -0
  38. package/entities/contacts/contacts.config.ts +61 -0
  39. package/entities/contacts/contacts.fields.ts +359 -0
  40. package/entities/contacts/contacts.service.ts +509 -0
  41. package/entities/contacts/contacts.types.ts +108 -0
  42. package/entities/contacts/messages/en.json +117 -0
  43. package/entities/contacts/messages/es.json +117 -0
  44. package/entities/contacts/migrations/001_contacts_table.sql +134 -0
  45. package/entities/contacts/migrations/002_contacts_metas.sql +114 -0
  46. package/entities/contacts/migrations/003_contacts_sample_data.sql +421 -0
  47. package/entities/leads/leads.config.ts +61 -0
  48. package/entities/leads/leads.fields.ts +336 -0
  49. package/entities/leads/leads.service.ts +496 -0
  50. package/entities/leads/leads.types.ts +114 -0
  51. package/entities/leads/messages/en.json +132 -0
  52. package/entities/leads/messages/es.json +132 -0
  53. package/entities/leads/migrations/001_leads_table.sql +150 -0
  54. package/entities/leads/migrations/002_leads_metas.sql +120 -0
  55. package/entities/leads/migrations/003_leads_sample_data.sql +242 -0
  56. package/entities/notes/messages/en.json +114 -0
  57. package/entities/notes/messages/es.json +114 -0
  58. package/entities/notes/migrations/020_notes_table.sql +118 -0
  59. package/entities/notes/migrations/021_notes_metas.sql +114 -0
  60. package/entities/notes/migrations/022_notes_sample_data.sql +275 -0
  61. package/entities/notes/notes.config.ts +61 -0
  62. package/entities/notes/notes.fields.ts +283 -0
  63. package/entities/notes/notes.service.ts +320 -0
  64. package/entities/notes/notes.types.ts +102 -0
  65. package/entities/opportunities/messages/en.json +107 -0
  66. package/entities/opportunities/messages/es.json +107 -0
  67. package/entities/opportunities/migrations/010_opportunities_table.sql +145 -0
  68. package/entities/opportunities/migrations/011_opportunities_metas.sql +114 -0
  69. package/entities/opportunities/migrations/012_opportunities_sample_data.sql +438 -0
  70. package/entities/opportunities/opportunities.config.ts +61 -0
  71. package/entities/opportunities/opportunities.fields.ts +416 -0
  72. package/entities/opportunities/opportunities.service.ts +525 -0
  73. package/entities/opportunities/opportunities.types.ts +135 -0
  74. package/entities/pipelines/messages/en.json +115 -0
  75. package/entities/pipelines/messages/es.json +115 -0
  76. package/entities/pipelines/migrations/001_pipelines_table.sql +106 -0
  77. package/entities/pipelines/migrations/002_pipelines_metas.sql +114 -0
  78. package/entities/pipelines/migrations/003_pipelines_sample_data.sql +91 -0
  79. package/entities/pipelines/pipelines.config.ts +62 -0
  80. package/entities/pipelines/pipelines.fields.ts +193 -0
  81. package/entities/pipelines/pipelines.service.ts +383 -0
  82. package/entities/pipelines/pipelines.types.ts +78 -0
  83. package/entities/products/messages/en.json +135 -0
  84. package/entities/products/messages/es.json +135 -0
  85. package/entities/products/migrations/001_products_table.sql +117 -0
  86. package/entities/products/migrations/002_products_metas.sql +114 -0
  87. package/entities/products/migrations/003_products_sample_data.sql +247 -0
  88. package/entities/products/products.config.ts +62 -0
  89. package/entities/products/products.fields.ts +361 -0
  90. package/entities/products/products.service.ts +437 -0
  91. package/entities/products/products.types.ts +125 -0
  92. package/lib/crm-constants.ts +77 -0
  93. package/lib/crm-utils.ts +185 -0
  94. package/lib/selectors.ts +333 -0
  95. package/messages/en.json +131 -0
  96. package/messages/es.json +131 -0
  97. package/migrations/999_theme_sample_data.sql +473 -0
  98. package/package.json +18 -0
  99. package/pendings.md +205 -0
  100. package/permissions-matrix.md +216 -0
  101. package/styles/components.css +414 -0
  102. package/styles/crm-theme.css +358 -0
  103. package/styles/globals.css +576 -0
  104. package/styles/variables.css +111 -0
  105. package/templates/dashboard/(main)/activities/components/ActivityCard.tsx +169 -0
  106. package/templates/dashboard/(main)/activities/components/ActivityTimeline.tsx +165 -0
  107. package/templates/dashboard/(main)/activities/page.tsx +297 -0
  108. package/templates/dashboard/(main)/campaigns/page.tsx +373 -0
  109. package/templates/dashboard/(main)/companies/page.tsx +296 -0
  110. package/templates/dashboard/(main)/contacts/page.tsx +347 -0
  111. package/templates/dashboard/(main)/layout.tsx +98 -0
  112. package/templates/dashboard/(main)/leads/page.tsx +335 -0
  113. package/templates/dashboard/(main)/opportunities/[id]/edit/page.tsx +95 -0
  114. package/templates/dashboard/(main)/opportunities/create/page.tsx +94 -0
  115. package/templates/dashboard/(main)/opportunities/page.tsx +350 -0
  116. package/templates/dashboard/(main)/pipelines/[id]/edit/page.tsx +95 -0
  117. package/templates/dashboard/(main)/pipelines/[id]/page.tsx +143 -0
  118. package/templates/dashboard/(main)/pipelines/create/page.tsx +94 -0
  119. package/templates/dashboard/(main)/pipelines/page.tsx +234 -0
  120. package/templates/dashboard/(main)/products/[id]/edit/page.tsx +97 -0
  121. package/templates/dashboard/(main)/products/[id]/page.tsx +509 -0
  122. package/templates/dashboard/(main)/products/create/page.tsx +96 -0
  123. package/templates/dashboard/(main)/products/page.tsx +308 -0
  124. package/templates/shared/ActionButtons.tsx +41 -0
  125. package/templates/shared/CRMDashboard.tsx +519 -0
  126. package/templates/shared/CRMDataTable.tsx +441 -0
  127. package/templates/shared/CRMMetricCard.tsx +76 -0
  128. package/templates/shared/CRMMobileNav.tsx +172 -0
  129. package/templates/shared/CRMSidebar.tsx +346 -0
  130. package/templates/shared/CRMTopBar.tsx +265 -0
  131. package/templates/shared/DealCard.tsx +123 -0
  132. package/templates/shared/EntityCard.tsx +58 -0
  133. package/templates/shared/OpportunityForm.tsx +649 -0
  134. package/templates/shared/PipelineForm.tsx +367 -0
  135. package/templates/shared/PipelineKanban.tsx +194 -0
  136. package/templates/shared/QuickFilters.tsx +47 -0
  137. package/templates/shared/StageColumn.tsx +175 -0
  138. package/templates/shared/StageSelect.tsx +177 -0
  139. package/templates/shared/StagesRepeater.tsx +317 -0
  140. package/templates/shared/index.ts +9 -0
@@ -0,0 +1,421 @@
1
+ -- ============================================================================
2
+ -- Sample data for contacts table - CRM Theme
3
+ -- Aligned with schema in 001_contacts_table.sql
4
+ -- Uses users from 999_theme_sample_data.sql
5
+ -- References companies from 003_companies_sample_data.sql
6
+ -- ============================================================================
7
+
8
+ -- Clean existing contacts data
9
+ DELETE FROM "contacts" WHERE "teamId" = 'team-crm-company';
10
+
11
+ INSERT INTO "contacts" (
12
+ id,
13
+ "firstName",
14
+ "lastName",
15
+ email,
16
+ phone,
17
+ mobile,
18
+ "companyId",
19
+ position,
20
+ department,
21
+ "isPrimary",
22
+ "birthDate",
23
+ linkedin,
24
+ twitter,
25
+ "preferredChannel",
26
+ timezone,
27
+ "lastContactedAt",
28
+ "userId",
29
+ "teamId",
30
+ "createdAt",
31
+ "updatedAt"
32
+ ) VALUES
33
+ -- TechnoSoft Solutions Contacts (company-crm-001)
34
+ (
35
+ 'contact-crm-001',
36
+ 'Amanda',
37
+ 'Davis',
38
+ 'amanda.davis@technosoft.com',
39
+ '+1-555-2001',
40
+ '+1-555-3001',
41
+ 'company-crm-001',
42
+ 'CEO',
43
+ 'Executive',
44
+ true,
45
+ '1985-03-15',
46
+ 'https://linkedin.com/in/amanda-davis-ceo',
47
+ '@amanda_davis_ceo',
48
+ 'email',
49
+ 'America/Los_Angeles',
50
+ NOW() - INTERVAL '3 days',
51
+ 'usr-crm-sales-mgr',
52
+ 'team-crm-company',
53
+ NOW() - INTERVAL '45 days',
54
+ NOW() - INTERVAL '3 days'
55
+ ),
56
+ (
57
+ 'contact-crm-002',
58
+ 'Mark',
59
+ 'Stevens',
60
+ 'mark.stevens@technosoft.com',
61
+ '+1-555-2002',
62
+ '+1-555-3002',
63
+ 'company-crm-001',
64
+ 'CTO',
65
+ 'Technology',
66
+ false,
67
+ '1982-07-22',
68
+ 'https://linkedin.com/in/mark-stevens-cto',
69
+ '@mark_stevens_tech',
70
+ 'slack',
71
+ 'America/Los_Angeles',
72
+ NOW() - INTERVAL '5 days',
73
+ 'usr-crm-sales-rep',
74
+ 'team-crm-company',
75
+ NOW() - INTERVAL '40 days',
76
+ NOW() - INTERVAL '5 days'
77
+ ),
78
+ (
79
+ 'contact-crm-003',
80
+ 'Rachel',
81
+ 'Kim',
82
+ 'rachel.kim@technosoft.com',
83
+ '+1-555-2003',
84
+ '+1-555-3003',
85
+ 'company-crm-001',
86
+ 'VP Sales',
87
+ 'Sales',
88
+ false,
89
+ '1988-11-08',
90
+ 'https://linkedin.com/in/rachel-kim-vp',
91
+ '@rachel_kim_sales',
92
+ 'phone',
93
+ 'America/Los_Angeles',
94
+ NOW() - INTERVAL '7 days',
95
+ 'usr-crm-sales-rep',
96
+ 'team-crm-company',
97
+ NOW() - INTERVAL '35 days',
98
+ NOW() - INTERVAL '7 days'
99
+ ),
100
+
101
+ -- Global Manufacturing Corp Contacts (company-crm-002)
102
+ (
103
+ 'contact-crm-004',
104
+ 'John',
105
+ 'Patterson',
106
+ 'john.patterson@globalmanufacturing.com',
107
+ '+1-555-2004',
108
+ '+1-555-3004',
109
+ 'company-crm-002',
110
+ 'President',
111
+ 'Executive',
112
+ true,
113
+ '1975-05-12',
114
+ 'https://linkedin.com/in/john-patterson-president',
115
+ '@john_patterson_gm',
116
+ 'email',
117
+ 'America/Detroit',
118
+ NOW() - INTERVAL '10 days',
119
+ 'usr-crm-sales-rep',
120
+ 'team-crm-company',
121
+ NOW() - INTERVAL '120 days',
122
+ NOW() - INTERVAL '10 days'
123
+ ),
124
+ (
125
+ 'contact-crm-005',
126
+ 'Susan',
127
+ 'Wright',
128
+ 'susan.wright@globalmanufacturing.com',
129
+ '+1-555-2005',
130
+ '+1-555-3005',
131
+ 'company-crm-002',
132
+ 'VP Operations',
133
+ 'Operations',
134
+ false,
135
+ '1980-09-03',
136
+ 'https://linkedin.com/in/susan-wright-ops',
137
+ '@susan_wright_ops',
138
+ 'phone',
139
+ 'America/Detroit',
140
+ NOW() - INTERVAL '12 days',
141
+ 'usr-crm-sales-rep',
142
+ 'team-crm-company',
143
+ NOW() - INTERVAL '115 days',
144
+ NOW() - INTERVAL '12 days'
145
+ ),
146
+
147
+ -- Healthcare Innovations Ltd Contacts (company-crm-003)
148
+ (
149
+ 'contact-crm-006',
150
+ 'Patricia',
151
+ 'Martinez',
152
+ 'patricia.martinez@healthcareinnovations.com',
153
+ '+1-555-2006',
154
+ '+1-555-3006',
155
+ 'company-crm-003',
156
+ 'Chief Medical Officer',
157
+ 'Medical',
158
+ true,
159
+ '1978-12-18',
160
+ 'https://linkedin.com/in/dr-patricia-martinez',
161
+ '@dr_martinez_cmo',
162
+ 'email',
163
+ 'America/New_York',
164
+ NOW() - INTERVAL '2 days',
165
+ 'usr-crm-sales-mgr',
166
+ 'team-crm-company',
167
+ NOW() - INTERVAL '30 days',
168
+ NOW() - INTERVAL '2 days'
169
+ ),
170
+ (
171
+ 'contact-crm-007',
172
+ 'Thomas',
173
+ 'Lee',
174
+ 'thomas.lee@healthcareinnovations.com',
175
+ '+1-555-2007',
176
+ '+1-555-3007',
177
+ 'company-crm-003',
178
+ 'IT Director',
179
+ 'Information Technology',
180
+ false,
181
+ '1983-04-25',
182
+ 'https://linkedin.com/in/thomas-lee-it',
183
+ '@thomas_lee_it',
184
+ 'slack',
185
+ 'America/New_York',
186
+ NOW() - INTERVAL '4 days',
187
+ 'usr-crm-sales-rep',
188
+ 'team-crm-company',
189
+ NOW() - INTERVAL '28 days',
190
+ NOW() - INTERVAL '4 days'
191
+ ),
192
+
193
+ -- FinanceFirst Bank Contacts (company-crm-004)
194
+ (
195
+ 'contact-crm-008',
196
+ 'Elizabeth',
197
+ 'Taylor',
198
+ 'elizabeth.taylor@financefirst.com',
199
+ '+1-555-2008',
200
+ '+1-555-3008',
201
+ 'company-crm-004',
202
+ 'SVP Technology',
203
+ 'Technology',
204
+ true,
205
+ '1979-08-14',
206
+ 'https://linkedin.com/in/elizabeth-taylor-svp',
207
+ '@liz_taylor_tech',
208
+ 'email',
209
+ 'America/New_York',
210
+ NOW() - INTERVAL '15 days',
211
+ 'usr-crm-sales-rep',
212
+ 'team-crm-company',
213
+ NOW() - INTERVAL '180 days',
214
+ NOW() - INTERVAL '15 days'
215
+ ),
216
+ (
217
+ 'contact-crm-009',
218
+ 'Robert',
219
+ 'Johnson',
220
+ 'robert.johnson@financefirst.com',
221
+ '+1-555-2009',
222
+ '+1-555-3009',
223
+ 'company-crm-004',
224
+ 'VP Digital Banking',
225
+ 'Digital Banking',
226
+ false,
227
+ '1981-01-30',
228
+ 'https://linkedin.com/in/robert-johnson-digital',
229
+ '@rob_johnson_digital',
230
+ 'linkedin',
231
+ 'America/New_York',
232
+ NOW() - INTERVAL '18 days',
233
+ 'usr-crm-sales-rep',
234
+ 'team-crm-company',
235
+ NOW() - INTERVAL '175 days',
236
+ NOW() - INTERVAL '18 days'
237
+ ),
238
+
239
+ -- EduTech Academy Contacts (company-crm-005)
240
+ (
241
+ 'contact-crm-010',
242
+ 'Maria',
243
+ 'Gonzalez',
244
+ 'maria.gonzalez@edutech-academy.com',
245
+ '+1-555-2010',
246
+ '+1-555-3010',
247
+ 'company-crm-005',
248
+ 'Head of Product',
249
+ 'Product',
250
+ true,
251
+ '1986-06-07',
252
+ 'https://linkedin.com/in/maria-gonzalez-product',
253
+ '@maria_gonzalez_edu',
254
+ 'email',
255
+ 'America/Chicago',
256
+ NOW() - INTERVAL '1 day',
257
+ 'usr-crm-sales-rep',
258
+ 'team-crm-company',
259
+ NOW() - INTERVAL '25 days',
260
+ NOW() - INTERVAL '1 day'
261
+ ),
262
+ (
263
+ 'contact-crm-011',
264
+ 'Kevin',
265
+ 'Brown',
266
+ 'kevin.brown@edutech-academy.com',
267
+ '+1-555-2011',
268
+ '+1-555-3011',
269
+ 'company-crm-005',
270
+ 'Engineering Manager',
271
+ 'Engineering',
272
+ false,
273
+ '1984-10-19',
274
+ 'https://linkedin.com/in/kevin-brown-eng',
275
+ '@kevin_brown_dev',
276
+ 'slack',
277
+ 'America/Chicago',
278
+ NOW() - INTERVAL '3 days',
279
+ 'usr-crm-sales-rep',
280
+ 'team-crm-company',
281
+ NOW() - INTERVAL '22 days',
282
+ NOW() - INTERVAL '3 days'
283
+ ),
284
+
285
+ -- RetailMax Chain Contacts (company-crm-006)
286
+ (
287
+ 'contact-crm-012',
288
+ 'Jennifer',
289
+ 'Wilson',
290
+ 'jennifer.wilson@retailmax.com',
291
+ '+1-555-2012',
292
+ '+1-555-3012',
293
+ 'company-crm-006',
294
+ 'VP Digital Transformation',
295
+ 'Digital',
296
+ true,
297
+ '1977-02-28',
298
+ 'https://linkedin.com/in/jennifer-wilson-retail',
299
+ '@jen_wilson_retail',
300
+ 'email',
301
+ 'America/Chicago',
302
+ NOW() - INTERVAL '7 days',
303
+ 'usr-crm-sales-mgr',
304
+ 'team-crm-company',
305
+ NOW() - INTERVAL '90 days',
306
+ NOW() - INTERVAL '7 days'
307
+ ),
308
+ (
309
+ 'contact-crm-013',
310
+ 'Michael',
311
+ 'Davis',
312
+ 'michael.davis@retailmax.com',
313
+ '+1-555-2013',
314
+ '+1-555-3013',
315
+ 'company-crm-006',
316
+ 'IT Manager',
317
+ 'Information Technology',
318
+ false,
319
+ '1987-12-05',
320
+ 'https://linkedin.com/in/michael-davis-it',
321
+ '@mike_davis_it',
322
+ 'phone',
323
+ 'America/Chicago',
324
+ NOW() - INTERVAL '9 days',
325
+ 'usr-crm-sales-rep',
326
+ 'team-crm-company',
327
+ NOW() - INTERVAL '85 days',
328
+ NOW() - INTERVAL '9 days'
329
+ ),
330
+
331
+ -- StartupTech Inc Contacts (company-crm-007)
332
+ (
333
+ 'contact-crm-014',
334
+ 'Sarah',
335
+ 'Thompson',
336
+ 'sarah.thompson@startuptech.io',
337
+ '+1-555-2014',
338
+ '+1-555-3014',
339
+ 'company-crm-007',
340
+ 'Co-Founder & CEO',
341
+ 'Executive',
342
+ true,
343
+ '1990-05-17',
344
+ 'https://linkedin.com/in/sarah-thompson-ceo',
345
+ '@sarah_startup_ceo',
346
+ 'whatsapp',
347
+ 'America/Los_Angeles',
348
+ NOW() - INTERVAL '1 day',
349
+ 'usr-crm-sales-rep',
350
+ 'team-crm-company',
351
+ NOW() - INTERVAL '15 days',
352
+ NOW() - INTERVAL '1 day'
353
+ ),
354
+ (
355
+ 'contact-crm-015',
356
+ 'Alex',
357
+ 'Rodriguez',
358
+ 'alex.rodriguez@startuptech.io',
359
+ '+1-555-2015',
360
+ '+1-555-3015',
361
+ 'company-crm-007',
362
+ 'Co-Founder & CTO',
363
+ 'Technology',
364
+ false,
365
+ '1989-09-23',
366
+ 'https://linkedin.com/in/alex-rodriguez-cto',
367
+ '@alex_startup_cto',
368
+ 'slack',
369
+ 'America/Los_Angeles',
370
+ NOW() - INTERVAL '2 days',
371
+ 'usr-crm-sales-rep',
372
+ 'team-crm-company',
373
+ NOW() - INTERVAL '14 days',
374
+ NOW() - INTERVAL '2 days'
375
+ ),
376
+
377
+ -- Local Consulting Group Contacts (company-crm-008)
378
+ (
379
+ 'contact-crm-016',
380
+ 'Diana',
381
+ 'Miller',
382
+ 'diana.miller@localconsulting.com',
383
+ '+1-555-2016',
384
+ '+1-555-3016',
385
+ 'company-crm-008',
386
+ 'Managing Partner',
387
+ 'Executive',
388
+ true,
389
+ '1976-11-11',
390
+ 'https://linkedin.com/in/diana-miller-partner',
391
+ '@diana_consulting',
392
+ 'email',
393
+ 'America/Los_Angeles',
394
+ NOW() - INTERVAL '5 days',
395
+ 'usr-crm-sales-rep',
396
+ 'team-crm-company',
397
+ NOW() - INTERVAL '40 days',
398
+ NOW() - INTERVAL '5 days'
399
+ ),
400
+ (
401
+ 'contact-crm-017',
402
+ 'Paul',
403
+ 'Anderson',
404
+ 'paul.anderson@localconsulting.com',
405
+ '+1-555-2017',
406
+ '+1-555-3017',
407
+ 'company-crm-008',
408
+ 'Senior Consultant',
409
+ 'Consulting',
410
+ false,
411
+ '1985-03-29',
412
+ 'https://linkedin.com/in/paul-anderson-consultant',
413
+ '@paul_consultant',
414
+ 'linkedin',
415
+ 'America/Los_Angeles',
416
+ NOW() - INTERVAL '6 days',
417
+ 'usr-crm-sales-rep',
418
+ 'team-crm-company',
419
+ NOW() - INTERVAL '38 days',
420
+ NOW() - INTERVAL '6 days'
421
+ );
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Leads Entity Configuration - CRM
3
+ *
4
+ * Prospective customers before conversion.
5
+ * Updated with team support and granular permissions.
6
+ */
7
+
8
+ import { UserSearch } from 'lucide-react'
9
+ import type { EntityConfig } from '@nextsparkjs/core/lib/entities/types'
10
+ import { leadsFields } from './leads.fields'
11
+
12
+ export const leadsEntityConfig: EntityConfig = {
13
+ // ==========================================
14
+ // 1. BASIC IDENTIFICATION
15
+ // ==========================================
16
+ slug: 'leads',
17
+ enabled: true,
18
+ names: {
19
+ singular: 'lead',
20
+ plural: 'Leads'
21
+ },
22
+ icon: UserSearch,
23
+
24
+ // ==========================================
25
+ // 2. ACCESS AND SCOPE CONFIGURATION
26
+ // ==========================================
27
+ access: {
28
+ public: false,
29
+ api: true,
30
+ metadata: true,
31
+ shared: true // Team-shared: all team members can see all leads
32
+ },
33
+
34
+ // ==========================================
35
+ // 3. UI/UX FEATURES
36
+ // ==========================================
37
+ ui: {
38
+ dashboard: {
39
+ showInMenu: true,
40
+ showInTopbar: true
41
+ },
42
+ public: {
43
+ hasArchivePage: false,
44
+ hasSinglePage: false
45
+ },
46
+ features: {
47
+ searchable: true,
48
+ sortable: true,
49
+ filterable: true,
50
+ bulkOperations: true,
51
+ importExport: true
52
+ }
53
+ },
54
+
55
+ // ==========================================
56
+ // FIELDS
57
+ // ==========================================
58
+ fields: leadsFields,
59
+ }
60
+
61
+ export default leadsEntityConfig