update profile section

This commit is contained in:
pradeepkumar
2026-01-24 15:33:11 +05:30
parent ebbaaa84eb
commit 66e0b4659d
7 changed files with 552 additions and 13 deletions

View File

@@ -3,6 +3,7 @@
import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import SectionIcon from '@/components/SectionIcon';
import {
profileSectionsService,
ProfileSection,
@@ -254,7 +255,9 @@ export default function ProfileSectionsPage() {
<td className="px-6 py-4 whitespace-nowrap">
<div className="flex items-center">
{section.icon && (
<span className="mr-2 text-lg">{section.icon}</span>
<span className="mr-3 text-gray-500">
<SectionIcon name={section.icon} className="w-5 h-5" />
</span>
)}
<div>
<div className="text-sm font-medium text-gray-900">{section.name}</div>
@@ -280,7 +283,11 @@ export default function ProfileSectionsPage() {
</td>
<td className="px-6 py-4 whitespace-nowrap">
<div className="text-sm text-gray-500">
{section._count?.agentTypeSections || 0} assigned
{section.isGlobal ? (
<span className="text-purple-600 font-medium">All (Global)</span>
) : (
`${section._count?.agentTypeSections || 0} assigned`
)}
</div>
</td>
<td className="px-6 py-4 whitespace-nowrap">