fix
This commit is contained in:
@@ -46,6 +46,7 @@ enum FieldType {
|
|||||||
DATE // Date picker
|
DATE // Date picker
|
||||||
TAG_INPUT // Tag input (add custom tags)
|
TAG_INPUT // Tag input (add custom tags)
|
||||||
FILE // File upload (documents, images)
|
FILE // File upload (documents, images)
|
||||||
|
REPEATER // Repeatable group of fields (e.g., certification + years)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -226,6 +227,7 @@ model ProfileSection {
|
|||||||
isActive Boolean @default(true)
|
isActive Boolean @default(true)
|
||||||
isGlobal Boolean @default(false) // If true, applies to ALL agent types
|
isGlobal Boolean @default(false) // If true, applies to ALL agent types
|
||||||
isSystem Boolean @default(false) // If true, section cannot be deleted (system default)
|
isSystem Boolean @default(false) // If true, section cannot be deleted (system default)
|
||||||
|
isRepeatable Boolean @default(false) // If true, user can add multiple entries (e.g., certifications)
|
||||||
|
|
||||||
// Timestamps
|
// Timestamps
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|||||||
138
prisma/seed.ts
138
prisma/seed.ts
@@ -137,7 +137,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'State',
|
name: 'State',
|
||||||
slug: 'state',
|
slug: 'state',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'States where you provide services',
|
description: 'States where you provide services',
|
||||||
placeholder: 'Select states',
|
placeholder: 'Select states',
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
@@ -200,7 +200,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'City',
|
name: 'City',
|
||||||
slug: 'city',
|
slug: 'city',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Cities where you provide services (max 5)',
|
description: 'Cities where you provide services (max 5)',
|
||||||
placeholder: 'Enter cities',
|
placeholder: 'Enter cities',
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
@@ -390,7 +390,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Availability',
|
name: 'Availability',
|
||||||
slug: 'availability',
|
slug: 'availability',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'When are you available?',
|
description: 'When are you available?',
|
||||||
placeholder: 'Select availability',
|
placeholder: 'Select availability',
|
||||||
sortOrder: 6,
|
sortOrder: 6,
|
||||||
@@ -433,7 +433,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Race',
|
name: 'Race',
|
||||||
slug: 'race',
|
slug: 'race',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Your race (used for search matching only, not displayed on profile)',
|
description: 'Your race (used for search matching only, not displayed on profile)',
|
||||||
placeholder: 'Select race',
|
placeholder: 'Select race',
|
||||||
sortOrder: 9,
|
sortOrder: 9,
|
||||||
@@ -453,7 +453,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Ethnicity',
|
name: 'Ethnicity',
|
||||||
slug: 'ethnicity',
|
slug: 'ethnicity',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Your ethnicity (used for search matching only, not displayed on profile)',
|
description: 'Your ethnicity (used for search matching only, not displayed on profile)',
|
||||||
placeholder: 'Select ethnicity',
|
placeholder: 'Select ethnicity',
|
||||||
sortOrder: 10,
|
sortOrder: 10,
|
||||||
@@ -519,7 +519,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Veteran Status',
|
name: 'Veteran Status',
|
||||||
slug: 'veteran_status',
|
slug: 'veteran_status',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Your military/veteran status',
|
description: 'Your military/veteran status',
|
||||||
placeholder: 'Select veteran status',
|
placeholder: 'Select veteran status',
|
||||||
sortOrder: 14,
|
sortOrder: 14,
|
||||||
@@ -536,7 +536,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Military Branch',
|
name: 'Military Branch',
|
||||||
slug: 'military_branch',
|
slug: 'military_branch',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Military branch(es) you served in',
|
description: 'Military branch(es) you served in',
|
||||||
placeholder: 'Select military branch',
|
placeholder: 'Select military branch',
|
||||||
sortOrder: 15,
|
sortOrder: 15,
|
||||||
@@ -666,7 +666,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Client Specialization',
|
name: 'Client Specialization',
|
||||||
slug: 'client_specialization',
|
slug: 'client_specialization',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Types of clients you specialize in',
|
description: 'Types of clients you specialize in',
|
||||||
placeholder: 'Select client types',
|
placeholder: 'Select client types',
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
@@ -685,7 +685,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Price Point',
|
name: 'Price Point',
|
||||||
slug: 'price_point',
|
slug: 'price_point',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Price ranges you typically work with',
|
description: 'Price ranges you typically work with',
|
||||||
placeholder: 'Select price ranges',
|
placeholder: 'Select price ranges',
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
@@ -704,7 +704,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Property Type',
|
name: 'Property Type',
|
||||||
slug: 'property_type',
|
slug: 'property_type',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Types of properties you specialize in',
|
description: 'Types of properties you specialize in',
|
||||||
placeholder: 'Select property types',
|
placeholder: 'Select property types',
|
||||||
sortOrder: 3,
|
sortOrder: 3,
|
||||||
@@ -738,7 +738,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Loan Type',
|
name: 'Loan Type',
|
||||||
slug: 'loan_type',
|
slug: 'loan_type',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Loan types you are familiar with',
|
description: 'Loan types you are familiar with',
|
||||||
placeholder: 'Select loan types',
|
placeholder: 'Select loan types',
|
||||||
sortOrder: 4,
|
sortOrder: 4,
|
||||||
@@ -756,7 +756,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Special Interests and Hobbies',
|
name: 'Special Interests and Hobbies',
|
||||||
slug: 'special_interests',
|
slug: 'special_interests',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Special property features you have expertise in',
|
description: 'Special property features you have expertise in',
|
||||||
placeholder: 'Select special interests',
|
placeholder: 'Select special interests',
|
||||||
sortOrder: 5,
|
sortOrder: 5,
|
||||||
@@ -779,6 +779,60 @@ async function main() {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Professional - Areas in Expertise & Years Section
|
||||||
|
{
|
||||||
|
agentTypeName: 'Professional',
|
||||||
|
section: {
|
||||||
|
name: 'Areas in Expertise & Years',
|
||||||
|
slug: 'professional-expertise-years',
|
||||||
|
description: 'Your areas of expertise with years of experience',
|
||||||
|
icon: 'award',
|
||||||
|
sortOrder: 6,
|
||||||
|
isActive: true,
|
||||||
|
isGlobal: false,
|
||||||
|
isSystem: false,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'Expertise Areas',
|
||||||
|
slug: 'expertise_areas',
|
||||||
|
fieldType: FieldType.TAG_INPUT,
|
||||||
|
description: 'Add your areas of expertise with years of experience',
|
||||||
|
placeholder: '',
|
||||||
|
sortOrder: 1,
|
||||||
|
isActive: true,
|
||||||
|
isRequired: false,
|
||||||
|
isSearchableOnly: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Professional - Licensing & Areas Section
|
||||||
|
{
|
||||||
|
agentTypeName: 'Professional',
|
||||||
|
section: {
|
||||||
|
name: 'Licensing & Areas',
|
||||||
|
slug: 'professional-licensing-areas',
|
||||||
|
description: 'Areas where you are licensed to practice',
|
||||||
|
icon: 'file-text',
|
||||||
|
sortOrder: 7,
|
||||||
|
isActive: true,
|
||||||
|
isGlobal: false,
|
||||||
|
isSystem: false,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'Licensed Areas',
|
||||||
|
slug: 'licensed_areas',
|
||||||
|
fieldType: FieldType.TAG_INPUT,
|
||||||
|
description: 'Enter areas where you are licensed to practice',
|
||||||
|
placeholder: 'Type area name, press Enter to add',
|
||||||
|
sortOrder: 1,
|
||||||
|
isActive: true,
|
||||||
|
isRequired: false,
|
||||||
|
isSearchableOnly: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
agentTypeName: 'Lender',
|
agentTypeName: 'Lender',
|
||||||
section: {
|
section: {
|
||||||
@@ -861,7 +915,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Client Specialization',
|
name: 'Client Specialization',
|
||||||
slug: 'client_specialization',
|
slug: 'client_specialization',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Types of clients you specialize in',
|
description: 'Types of clients you specialize in',
|
||||||
placeholder: 'Select client types',
|
placeholder: 'Select client types',
|
||||||
sortOrder: 1,
|
sortOrder: 1,
|
||||||
@@ -875,7 +929,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Property Type',
|
name: 'Property Type',
|
||||||
slug: 'property_type',
|
slug: 'property_type',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Types of properties you can finance',
|
description: 'Types of properties you can finance',
|
||||||
placeholder: 'Select property types',
|
placeholder: 'Select property types',
|
||||||
sortOrder: 2,
|
sortOrder: 2,
|
||||||
@@ -908,7 +962,7 @@ async function main() {
|
|||||||
{
|
{
|
||||||
name: 'Loan Type',
|
name: 'Loan Type',
|
||||||
slug: 'loan_type',
|
slug: 'loan_type',
|
||||||
fieldType: FieldType.MULTI_SELECT,
|
fieldType: FieldType.CHECKBOX_GROUP,
|
||||||
description: 'Types of loans you offer',
|
description: 'Types of loans you offer',
|
||||||
placeholder: 'Select loan types',
|
placeholder: 'Select loan types',
|
||||||
sortOrder: 3,
|
sortOrder: 3,
|
||||||
@@ -938,6 +992,60 @@ async function main() {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// Lender - Areas in Expertise & Years Section
|
||||||
|
{
|
||||||
|
agentTypeName: 'Lender',
|
||||||
|
section: {
|
||||||
|
name: 'Areas in Expertise & Years',
|
||||||
|
slug: 'lender-expertise-years',
|
||||||
|
description: 'Your areas of expertise with years of experience',
|
||||||
|
icon: 'award',
|
||||||
|
sortOrder: 6,
|
||||||
|
isActive: true,
|
||||||
|
isGlobal: false,
|
||||||
|
isSystem: false,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'Expertise Areas',
|
||||||
|
slug: 'expertise_areas',
|
||||||
|
fieldType: FieldType.TAG_INPUT,
|
||||||
|
description: 'Add your areas of expertise with years of experience',
|
||||||
|
placeholder: '',
|
||||||
|
sortOrder: 1,
|
||||||
|
isActive: true,
|
||||||
|
isRequired: false,
|
||||||
|
isSearchableOnly: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Lender - Licensing & Areas Section
|
||||||
|
{
|
||||||
|
agentTypeName: 'Lender',
|
||||||
|
section: {
|
||||||
|
name: 'Licensing & Areas',
|
||||||
|
slug: 'lender-licensing-areas',
|
||||||
|
description: 'Areas where you are licensed to practice',
|
||||||
|
icon: 'file-text',
|
||||||
|
sortOrder: 7,
|
||||||
|
isActive: true,
|
||||||
|
isGlobal: false,
|
||||||
|
isSystem: false,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'Licensed Areas',
|
||||||
|
slug: 'licensed_areas',
|
||||||
|
fieldType: FieldType.TAG_INPUT,
|
||||||
|
description: 'Enter areas where you are licensed to practice',
|
||||||
|
placeholder: 'Type area name, press Enter to add',
|
||||||
|
sortOrder: 1,
|
||||||
|
isActive: true,
|
||||||
|
isRequired: false,
|
||||||
|
isSearchableOnly: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const sectionData of defaultSections) {
|
for (const sectionData of defaultSections) {
|
||||||
|
|||||||
@@ -33,4 +33,9 @@ export class CreateSectionDto {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
isGlobal?: boolean;
|
isGlobal?: boolean;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({ description: 'Whether user can add multiple entries (e.g., certifications)', default: false })
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
isRepeatable?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user