# AnywhereNow UCC SPFx Components

Modern SharePoint Framework components for AnywhereNow UCC sites.

## Components

### UCC Dashboard Web Part
A modern dashboard that displays UCC statistics and provides navigation to configuration areas.

**Features:**
- Real-time statistics display (Agents, Skills, Endpoints, etc.)
- Configuration menu cards for all UCC list management
- Doughnut charts for visual data representation
- Bar charts for queue and call metrics
- Responsive design using Fluent UI

## Why SPFx?

This component replaces classic SharePoint customizations that require Custom Script to be enabled. With Microsoft's MC1117115 deprecation notice (March 2026), classic publishing features and script injection will no longer be supported.

**Benefits:**
- Works with `DenyAddAndCustomizePages` enabled (default for modern sites)
- Full MC1117115 compliance
- Modern React-based UI
- Better performance and security
- Easier maintenance and updates

## Prerequisites

- SharePoint Online tenant
- App Catalog site collection
- PowerShell 7.x with PnP.PowerShell module

## Deployment

### Tenant-Wide Deployment (Recommended)

Use `Deploy-UccDashboard.ps1` from the parent folder to deploy the SPFx package tenant-wide:

```powershell
.\Deploy-UccDashboard.ps1 `
    -TenantUrl "https://yourtenant.sharepoint.com" `
    -Interactive `
    -ClientId "your-app-id"
```

This makes the UCC Dashboard web part available to all sites automatically.

### Site-Specific Deployment

Use `Deploy-UccSpfx.ps1` to deploy to a specific site:

```powershell
.\Deploy-UccSpfx.ps1 `
    -SiteUrl "https://yourtenant.sharepoint.com/sites/ucc-site" `
    -Interactive `
    -ClientId "your-app-id"
```

## Package Contents

```
SPFx/
├── sharepoint/solution/
│   └── ucc-dashboard-spfx.sppkg    # Pre-built SPFx package
├── Deploy-UccSpfx.ps1              # Site deployment script
├── Deploy-UccDashboardWebPart.ps1     # Web part deployment helper
└── README.md                        # This file
```

## Configuration

The UCC Dashboard web part automatically detects the site URL and loads data from UCC lists. No configuration is required.

## Troubleshooting

### "Access Denied" errors
- Ensure the user has at least Read permissions on all UCC lists
- Check that the App Catalog deployment was successful

### Web part not appearing
- Clear browser cache
- Check that the solution is deployed and trusted
- Verify the app is installed on the site (if not deployed tenant-wide)

### Data not loading
- Open browser Developer Tools (F12) and check Console for errors
- Verify the lists exist and have the expected column names
- Check network requests for failed API calls

## Version History

- **1.0.0** - Initial release
  - UCC Dashboard Web Part (replaces portal.aspx)

## Support

For issues, contact AnywhereNow support.
