fix
This commit is contained in:
@@ -46,6 +46,7 @@ enum FieldType {
|
||||
DATE // Date picker
|
||||
TAG_INPUT // Tag input (add custom tags)
|
||||
FILE // File upload (documents, images)
|
||||
REPEATER // Repeatable group of fields (e.g., certification + years)
|
||||
}
|
||||
|
||||
|
||||
@@ -226,6 +227,7 @@ model ProfileSection {
|
||||
isActive Boolean @default(true)
|
||||
isGlobal Boolean @default(false) // If true, applies to ALL agent types
|
||||
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
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
138
prisma/seed.ts
138
prisma/seed.ts
@@ -137,7 +137,7 @@ async function main() {
|
||||
{
|
||||
name: 'State',
|
||||
slug: 'state',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'States where you provide services',
|
||||
placeholder: 'Select states',
|
||||
sortOrder: 1,
|
||||
@@ -200,7 +200,7 @@ async function main() {
|
||||
{
|
||||
name: 'City',
|
||||
slug: 'city',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Cities where you provide services (max 5)',
|
||||
placeholder: 'Enter cities',
|
||||
sortOrder: 2,
|
||||
@@ -390,7 +390,7 @@ async function main() {
|
||||
{
|
||||
name: 'Availability',
|
||||
slug: 'availability',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'When are you available?',
|
||||
placeholder: 'Select availability',
|
||||
sortOrder: 6,
|
||||
@@ -433,7 +433,7 @@ async function main() {
|
||||
{
|
||||
name: 'Race',
|
||||
slug: 'race',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Your race (used for search matching only, not displayed on profile)',
|
||||
placeholder: 'Select race',
|
||||
sortOrder: 9,
|
||||
@@ -453,7 +453,7 @@ async function main() {
|
||||
{
|
||||
name: 'Ethnicity',
|
||||
slug: 'ethnicity',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Your ethnicity (used for search matching only, not displayed on profile)',
|
||||
placeholder: 'Select ethnicity',
|
||||
sortOrder: 10,
|
||||
@@ -519,7 +519,7 @@ async function main() {
|
||||
{
|
||||
name: 'Veteran Status',
|
||||
slug: 'veteran_status',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Your military/veteran status',
|
||||
placeholder: 'Select veteran status',
|
||||
sortOrder: 14,
|
||||
@@ -536,7 +536,7 @@ async function main() {
|
||||
{
|
||||
name: 'Military Branch',
|
||||
slug: 'military_branch',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Military branch(es) you served in',
|
||||
placeholder: 'Select military branch',
|
||||
sortOrder: 15,
|
||||
@@ -666,7 +666,7 @@ async function main() {
|
||||
{
|
||||
name: 'Client Specialization',
|
||||
slug: 'client_specialization',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Types of clients you specialize in',
|
||||
placeholder: 'Select client types',
|
||||
sortOrder: 1,
|
||||
@@ -685,7 +685,7 @@ async function main() {
|
||||
{
|
||||
name: 'Price Point',
|
||||
slug: 'price_point',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Price ranges you typically work with',
|
||||
placeholder: 'Select price ranges',
|
||||
sortOrder: 2,
|
||||
@@ -704,7 +704,7 @@ async function main() {
|
||||
{
|
||||
name: 'Property Type',
|
||||
slug: 'property_type',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Types of properties you specialize in',
|
||||
placeholder: 'Select property types',
|
||||
sortOrder: 3,
|
||||
@@ -738,7 +738,7 @@ async function main() {
|
||||
{
|
||||
name: 'Loan Type',
|
||||
slug: 'loan_type',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Loan types you are familiar with',
|
||||
placeholder: 'Select loan types',
|
||||
sortOrder: 4,
|
||||
@@ -756,7 +756,7 @@ async function main() {
|
||||
{
|
||||
name: 'Special Interests and Hobbies',
|
||||
slug: 'special_interests',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Special property features you have expertise in',
|
||||
placeholder: 'Select special interests',
|
||||
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',
|
||||
section: {
|
||||
@@ -861,7 +915,7 @@ async function main() {
|
||||
{
|
||||
name: 'Client Specialization',
|
||||
slug: 'client_specialization',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Types of clients you specialize in',
|
||||
placeholder: 'Select client types',
|
||||
sortOrder: 1,
|
||||
@@ -875,7 +929,7 @@ async function main() {
|
||||
{
|
||||
name: 'Property Type',
|
||||
slug: 'property_type',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Types of properties you can finance',
|
||||
placeholder: 'Select property types',
|
||||
sortOrder: 2,
|
||||
@@ -908,7 +962,7 @@ async function main() {
|
||||
{
|
||||
name: 'Loan Type',
|
||||
slug: 'loan_type',
|
||||
fieldType: FieldType.MULTI_SELECT,
|
||||
fieldType: FieldType.CHECKBOX_GROUP,
|
||||
description: 'Types of loans you offer',
|
||||
placeholder: 'Select loan types',
|
||||
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) {
|
||||
|
||||
@@ -33,4 +33,9 @@ export class CreateSectionDto {
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
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