@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,247 @@
1
+ -- ============================================================================
2
+ -- Sample data for products table - CRM Theme
3
+ -- Aligned with schema in 001_products_table.sql
4
+ -- Uses users from 999_theme_sample_data.sql
5
+ -- ============================================================================
6
+
7
+ -- Clean existing products data
8
+ DELETE FROM "products" WHERE "teamId" = 'team-crm-company';
9
+
10
+ INSERT INTO "products" (
11
+ id,
12
+ code,
13
+ name,
14
+ category,
15
+ type,
16
+ description,
17
+ price,
18
+ cost,
19
+ currency,
20
+ unit,
21
+ "isActive",
22
+ image,
23
+ "brochureUrl",
24
+ "minimumQuantity",
25
+ "commissionRate",
26
+ "userId",
27
+ "teamId",
28
+ "createdAt",
29
+ "updatedAt"
30
+ ) VALUES
31
+ -- Software Products (Subscriptions)
32
+ (
33
+ 'prod-crm-001',
34
+ 'CRM-PRO-001',
35
+ 'CRM Pro License',
36
+ 'Software',
37
+ 'subscription',
38
+ 'Professional CRM software license with advanced features for growing teams',
39
+ 299.00,
40
+ 50.00,
41
+ 'USD',
42
+ 'user',
43
+ true,
44
+ 'https://example.com/crm-pro-screenshot1.png',
45
+ 'https://example.com/crm-pro-brochure.pdf',
46
+ 1,
47
+ 10.00,
48
+ 'usr-crm-ceo',
49
+ 'team-crm-company',
50
+ NOW() - INTERVAL '180 days',
51
+ NOW() - INTERVAL '30 days'
52
+ ),
53
+ (
54
+ 'prod-crm-002',
55
+ 'CRM-ENT-001',
56
+ 'CRM Enterprise License',
57
+ 'Software',
58
+ 'subscription',
59
+ 'Enterprise CRM solution with unlimited users and advanced customization capabilities',
60
+ 899.00,
61
+ 150.00,
62
+ 'USD',
63
+ 'license',
64
+ true,
65
+ 'https://example.com/crm-ent-screenshot1.png',
66
+ 'https://example.com/crm-enterprise-brochure.pdf',
67
+ 1,
68
+ 12.00,
69
+ 'usr-crm-ceo',
70
+ 'team-crm-company',
71
+ NOW() - INTERVAL '180 days',
72
+ NOW() - INTERVAL '25 days'
73
+ ),
74
+ (
75
+ 'prod-crm-003',
76
+ 'MOD-ANA-001',
77
+ 'Advanced Analytics Module',
78
+ 'Add-ons',
79
+ 'subscription',
80
+ 'Advanced analytics and reporting module for enhanced CRM insights',
81
+ 149.00,
82
+ 25.00,
83
+ 'USD',
84
+ 'user',
85
+ true,
86
+ 'https://example.com/analytics-module.png',
87
+ 'https://example.com/analytics-brochure.pdf',
88
+ 1,
89
+ 8.00,
90
+ 'usr-crm-ceo',
91
+ 'team-crm-company',
92
+ NOW() - INTERVAL '90 days',
93
+ NOW() - INTERVAL '5 days'
94
+ ),
95
+ (
96
+ 'prod-crm-004',
97
+ 'MOD-MKT-001',
98
+ 'Marketing Automation Module',
99
+ 'Add-ons',
100
+ 'subscription',
101
+ 'Marketing automation module with campaign management and lead scoring',
102
+ 199.00,
103
+ 35.00,
104
+ 'USD',
105
+ 'user',
106
+ true,
107
+ 'https://example.com/marketing-module.png',
108
+ 'https://example.com/marketing-brochure.pdf',
109
+ 1,
110
+ 8.00,
111
+ 'usr-crm-ceo',
112
+ 'team-crm-company',
113
+ NOW() - INTERVAL '120 days',
114
+ NOW() - INTERVAL '15 days'
115
+ ),
116
+
117
+ -- Service Products
118
+ (
119
+ 'prod-crm-005',
120
+ 'SRV-IMP-001',
121
+ 'CRM Implementation Service',
122
+ 'Services',
123
+ 'service',
124
+ 'Professional CRM implementation and setup service with data migration',
125
+ 2500.00,
126
+ 800.00,
127
+ 'USD',
128
+ 'piece',
129
+ true,
130
+ 'https://example.com/implementation-process.png',
131
+ 'https://example.com/implementation-brochure.pdf',
132
+ 1,
133
+ 15.00,
134
+ 'usr-crm-sales-mgr',
135
+ 'team-crm-company',
136
+ NOW() - INTERVAL '180 days',
137
+ NOW() - INTERVAL '20 days'
138
+ ),
139
+ (
140
+ 'prod-crm-006',
141
+ 'SRV-TRN-001',
142
+ 'CRM Training Workshop',
143
+ 'Services',
144
+ 'service',
145
+ 'Comprehensive CRM training workshop for teams with hands-on practice',
146
+ 1200.00,
147
+ 300.00,
148
+ 'USD',
149
+ 'day',
150
+ true,
151
+ 'https://example.com/training-workshop.png',
152
+ 'https://example.com/training-brochure.pdf',
153
+ 1,
154
+ 12.00,
155
+ 'usr-crm-sales-mgr',
156
+ 'team-crm-company',
157
+ NOW() - INTERVAL '150 days',
158
+ NOW() - INTERVAL '15 days'
159
+ ),
160
+ (
161
+ 'prod-crm-007',
162
+ 'SRV-INT-001',
163
+ 'Custom Integration Development',
164
+ 'Services',
165
+ 'service',
166
+ 'Custom integration development service for connecting CRM with third-party systems',
167
+ 5000.00,
168
+ 2000.00,
169
+ 'USD',
170
+ 'piece',
171
+ true,
172
+ 'https://example.com/integration-service.png',
173
+ 'https://example.com/integration-brochure.pdf',
174
+ 1,
175
+ 15.00,
176
+ 'usr-crm-sales-mgr',
177
+ 'team-crm-company',
178
+ NOW() - INTERVAL '120 days',
179
+ NOW() - INTERVAL '10 days'
180
+ ),
181
+
182
+ -- Support Packages
183
+ (
184
+ 'prod-crm-008',
185
+ 'SUP-PRI-001',
186
+ 'Priority Support Package',
187
+ 'Support',
188
+ 'subscription',
189
+ 'Priority support package with dedicated support representative',
190
+ 499.00,
191
+ 100.00,
192
+ 'USD',
193
+ 'month',
194
+ true,
195
+ 'https://example.com/priority-support.png',
196
+ 'https://example.com/support-brochure.pdf',
197
+ 12,
198
+ 10.00,
199
+ 'usr-crm-sales-mgr',
200
+ 'team-crm-company',
201
+ NOW() - INTERVAL '150 days',
202
+ NOW() - INTERVAL '8 days'
203
+ ),
204
+ (
205
+ 'prod-crm-009',
206
+ 'SUP-ENT-001',
207
+ 'Enterprise Support Package',
208
+ 'Support',
209
+ 'subscription',
210
+ 'Enterprise-grade support with dedicated team and custom SLAs',
211
+ 999.00,
212
+ 250.00,
213
+ 'USD',
214
+ 'month',
215
+ true,
216
+ 'https://example.com/enterprise-support.png',
217
+ 'https://example.com/enterprise-support-brochure.pdf',
218
+ 12,
219
+ 12.00,
220
+ 'usr-crm-sales-mgr',
221
+ 'team-crm-company',
222
+ NOW() - INTERVAL '150 days',
223
+ NOW() - INTERVAL '5 days'
224
+ ),
225
+
226
+ -- Hardware/Infrastructure (for on-premise)
227
+ (
228
+ 'prod-crm-010',
229
+ 'HW-SRV-001',
230
+ 'Enterprise Server Package',
231
+ 'Infrastructure',
232
+ 'product',
233
+ 'Complete server package for on-premise CRM deployment with high availability',
234
+ 8500.00,
235
+ 5200.00,
236
+ 'USD',
237
+ 'piece',
238
+ true,
239
+ 'https://example.com/server-package.png',
240
+ 'https://example.com/server-brochure.pdf',
241
+ 1,
242
+ 5.00,
243
+ 'usr-crm-ceo',
244
+ 'team-crm-company',
245
+ NOW() - INTERVAL '120 days',
246
+ NOW() - INTERVAL '10 days'
247
+ );
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Products Entity Configuration - CRM
3
+ *
4
+ * Products and services catalog.
5
+ * Updated with team support and granular permissions.
6
+ * Only owner can manage products.
7
+ */
8
+
9
+ import { Package } from 'lucide-react'
10
+ import type { EntityConfig } from '@nextsparkjs/core/lib/entities/types'
11
+ import { productsFields } from './products.fields'
12
+
13
+ export const productsEntityConfig: EntityConfig = {
14
+ // ==========================================
15
+ // 1. BASIC IDENTIFICATION
16
+ // ==========================================
17
+ slug: 'products',
18
+ enabled: true,
19
+ names: {
20
+ singular: 'product',
21
+ plural: 'Products'
22
+ },
23
+ icon: Package,
24
+
25
+ // ==========================================
26
+ // 2. ACCESS AND SCOPE CONFIGURATION
27
+ // ==========================================
28
+ access: {
29
+ public: false,
30
+ api: true,
31
+ metadata: true,
32
+ shared: true
33
+ },
34
+
35
+ // ==========================================
36
+ // 3. UI/UX FEATURES
37
+ // ==========================================
38
+ ui: {
39
+ dashboard: {
40
+ showInMenu: false, // Accessed via settings
41
+ showInTopbar: false
42
+ },
43
+ public: {
44
+ hasArchivePage: false,
45
+ hasSinglePage: false
46
+ },
47
+ features: {
48
+ searchable: true,
49
+ sortable: true,
50
+ filterable: true,
51
+ bulkOperations: false,
52
+ importExport: false
53
+ }
54
+ },
55
+
56
+ // ==========================================
57
+ // FIELDS
58
+ // ==========================================
59
+ fields: productsFields,
60
+ }
61
+
62
+ export default productsEntityConfig
@@ -0,0 +1,361 @@
1
+ /**
2
+ * Products Entity Fields Configuration
3
+ *
4
+ * Separated from main config according to new refactoring plan.
5
+ * Contains all field definitions for the products entity.
6
+ */
7
+
8
+ import type { EntityField } from '@nextsparkjs/core/lib/entities/types'
9
+
10
+ export const productsFields: EntityField[] = [
11
+ {
12
+ name: 'code',
13
+ type: 'text',
14
+ required: true,
15
+ display: {
16
+ label: 'Product Code',
17
+ description: 'Product code or SKU',
18
+ placeholder: 'Enter product code...',
19
+ showInList: true,
20
+ showInDetail: true,
21
+ showInForm: true,
22
+ order: 1,
23
+ columnWidth: 4,
24
+ },
25
+ api: {
26
+ searchable: true,
27
+ sortable: true,
28
+ readOnly: false,
29
+ },
30
+ },
31
+ {
32
+ name: 'name',
33
+ type: 'text',
34
+ required: true,
35
+ display: {
36
+ label: 'Product Name',
37
+ description: 'Product name',
38
+ placeholder: 'Enter product name...',
39
+ showInList: true,
40
+ showInDetail: true,
41
+ showInForm: true,
42
+ order: 2,
43
+ columnWidth: 8,
44
+ },
45
+ api: {
46
+ searchable: true,
47
+ sortable: true,
48
+ readOnly: false,
49
+ },
50
+ },
51
+ {
52
+ name: 'category',
53
+ type: 'text',
54
+ required: false,
55
+ display: {
56
+ label: 'Category',
57
+ description: 'Product category',
58
+ placeholder: 'Enter category...',
59
+ showInList: true,
60
+ showInDetail: true,
61
+ showInForm: true,
62
+ order: 3,
63
+ columnWidth: 4,
64
+ },
65
+ api: {
66
+ searchable: true,
67
+ sortable: true,
68
+ readOnly: false,
69
+ },
70
+ },
71
+ {
72
+ name: 'type',
73
+ type: 'select',
74
+ required: false,
75
+ options: [
76
+ { value: 'product', label: 'Product' },
77
+ { value: 'service', label: 'Service' },
78
+ { value: 'subscription', label: 'Subscription' },
79
+ { value: 'bundle', label: 'Bundle' },
80
+ { value: 'addon', label: 'Add-on' },
81
+ ],
82
+ display: {
83
+ label: 'Product Type',
84
+ description: 'Type of product',
85
+ placeholder: 'Select type...',
86
+ showInList: true,
87
+ showInDetail: true,
88
+ showInForm: true,
89
+ order: 4,
90
+ columnWidth: 4,
91
+ },
92
+ api: {
93
+ searchable: false,
94
+ sortable: true,
95
+ readOnly: false,
96
+ },
97
+ },
98
+ {
99
+ name: 'description',
100
+ type: 'textarea',
101
+ required: false,
102
+ display: {
103
+ label: 'Description',
104
+ description: 'Product description',
105
+ placeholder: 'Enter description...',
106
+ showInList: false,
107
+ showInDetail: true,
108
+ showInForm: true,
109
+ order: 5,
110
+ columnWidth: 12,
111
+ },
112
+ api: {
113
+ searchable: true,
114
+ sortable: false,
115
+ readOnly: false,
116
+ },
117
+ },
118
+ {
119
+ name: 'price',
120
+ type: 'number',
121
+ required: true,
122
+ display: {
123
+ label: 'Price',
124
+ description: 'Standard selling price',
125
+ placeholder: '0.00',
126
+ showInList: true,
127
+ showInDetail: true,
128
+ showInForm: true,
129
+ order: 7,
130
+ columnWidth: 4,
131
+ },
132
+ api: {
133
+ searchable: false,
134
+ sortable: true,
135
+ readOnly: false,
136
+ },
137
+ },
138
+ {
139
+ name: 'cost',
140
+ type: 'number',
141
+ required: false,
142
+ display: {
143
+ label: 'Cost',
144
+ description: 'Product cost',
145
+ placeholder: '0.00',
146
+ showInList: false,
147
+ showInDetail: true,
148
+ showInForm: true,
149
+ order: 8,
150
+ columnWidth: 4,
151
+ },
152
+ api: {
153
+ searchable: false,
154
+ sortable: true,
155
+ readOnly: false,
156
+ },
157
+ },
158
+ {
159
+ name: 'currency',
160
+ type: 'select',
161
+ required: false,
162
+ options: [
163
+ { value: 'USD', label: 'US Dollar' },
164
+ { value: 'EUR', label: 'Euro' },
165
+ { value: 'GBP', label: 'British Pound' },
166
+ { value: 'MXN', label: 'Mexican Peso' },
167
+ { value: 'CAD', label: 'Canadian Dollar' },
168
+ { value: 'AUD', label: 'Australian Dollar' },
169
+ { value: 'JPY', label: 'Japanese Yen' },
170
+ { value: 'CNY', label: 'Chinese Yuan' },
171
+ { value: 'INR', label: 'Indian Rupee' },
172
+ { value: 'BRL', label: 'Brazilian Real' },
173
+ ],
174
+ display: {
175
+ label: 'Currency',
176
+ description: 'Currency code',
177
+ placeholder: 'Select currency...',
178
+ showInList: false,
179
+ showInDetail: true,
180
+ showInForm: true,
181
+ order: 9,
182
+ columnWidth: 4,
183
+ },
184
+ api: {
185
+ searchable: false,
186
+ sortable: true,
187
+ readOnly: false,
188
+ },
189
+ },
190
+ {
191
+ name: 'unit',
192
+ type: 'select',
193
+ required: false,
194
+ options: [
195
+ { value: 'piece', label: 'Piece' },
196
+ { value: 'hour', label: 'Hour' },
197
+ { value: 'day', label: 'Day' },
198
+ { value: 'week', label: 'Week' },
199
+ { value: 'month', label: 'Month' },
200
+ { value: 'year', label: 'Year' },
201
+ { value: 'kg', label: 'Kilogram' },
202
+ { value: 'lb', label: 'Pound' },
203
+ { value: 'meter', label: 'Meter' },
204
+ { value: 'foot', label: 'Foot' },
205
+ { value: 'license', label: 'License' },
206
+ { value: 'user', label: 'User' },
207
+ ],
208
+ display: {
209
+ label: 'Unit of Measure',
210
+ description: 'Unit of measure',
211
+ placeholder: 'Select unit...',
212
+ showInList: false,
213
+ showInDetail: true,
214
+ showInForm: true,
215
+ order: 10,
216
+ columnWidth: 4,
217
+ },
218
+ api: {
219
+ searchable: false,
220
+ sortable: true,
221
+ readOnly: false,
222
+ },
223
+ },
224
+ {
225
+ name: 'isActive',
226
+ type: 'boolean',
227
+ required: false,
228
+ display: {
229
+ label: 'Active',
230
+ description: 'Is product currently active',
231
+ showInList: true,
232
+ showInDetail: true,
233
+ showInForm: true,
234
+ order: 11,
235
+ columnWidth: 4,
236
+ },
237
+ api: {
238
+ searchable: false,
239
+ sortable: true,
240
+ readOnly: false,
241
+ },
242
+ },
243
+ {
244
+ name: 'minimumQuantity',
245
+ type: 'number',
246
+ required: false,
247
+ display: {
248
+ label: 'Minimum Quantity',
249
+ description: 'Minimum order quantity',
250
+ placeholder: '1',
251
+ showInList: false,
252
+ showInDetail: true,
253
+ showInForm: true,
254
+ order: 12,
255
+ columnWidth: 4,
256
+ },
257
+ api: {
258
+ searchable: false,
259
+ sortable: true,
260
+ readOnly: false,
261
+ },
262
+ },
263
+ {
264
+ name: 'image',
265
+ type: 'url',
266
+ required: false,
267
+ display: {
268
+ label: 'Image',
269
+ description: 'Product image URL',
270
+ placeholder: 'https://example.com/image.png',
271
+ showInList: false,
272
+ showInDetail: true,
273
+ showInForm: true,
274
+ order: 13,
275
+ columnWidth: 6,
276
+ },
277
+ api: {
278
+ searchable: false,
279
+ sortable: false,
280
+ readOnly: false,
281
+ },
282
+ },
283
+ {
284
+ name: 'brochureUrl',
285
+ type: 'url',
286
+ required: false,
287
+ display: {
288
+ label: 'Brochure URL',
289
+ description: 'Product brochure URL',
290
+ placeholder: 'https://example.com/brochure.pdf',
291
+ showInList: false,
292
+ showInDetail: true,
293
+ showInForm: true,
294
+ order: 14,
295
+ columnWidth: 6,
296
+ },
297
+ api: {
298
+ searchable: false,
299
+ sortable: false,
300
+ readOnly: false,
301
+ },
302
+ },
303
+ {
304
+ name: 'commissionRate',
305
+ type: 'number',
306
+ required: false,
307
+ display: {
308
+ label: 'Commission Rate (%)',
309
+ description: 'Sales commission percentage',
310
+ placeholder: '0.00',
311
+ showInList: false,
312
+ showInDetail: true,
313
+ showInForm: true,
314
+ order: 15,
315
+ columnWidth: 4,
316
+ },
317
+ api: {
318
+ searchable: false,
319
+ sortable: true,
320
+ readOnly: false,
321
+ },
322
+ },
323
+ {
324
+ name: 'createdAt',
325
+ type: 'datetime',
326
+ required: false,
327
+ display: {
328
+ label: 'Created At',
329
+ description: 'When the product was created',
330
+ showInList: true,
331
+ showInDetail: true,
332
+ showInForm: false,
333
+ order: 98,
334
+ columnWidth: 4,
335
+ },
336
+ api: {
337
+ searchable: false,
338
+ sortable: true,
339
+ readOnly: true,
340
+ },
341
+ },
342
+ {
343
+ name: 'updatedAt',
344
+ type: 'datetime',
345
+ required: false,
346
+ display: {
347
+ label: 'Updated At',
348
+ description: 'When the product was last updated',
349
+ showInList: false,
350
+ showInDetail: true,
351
+ showInForm: false,
352
+ order: 99,
353
+ columnWidth: 4,
354
+ },
355
+ api: {
356
+ searchable: false,
357
+ sortable: true,
358
+ readOnly: true,
359
+ },
360
+ },
361
+ ]