mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 10:43:13 +00:00
- Reject duplicate site codes per client (case-insensitive); site code is immutable once set
- Delete tombstones the site and requires the DeleteSites permission (Admin, Scheduler)
- GET /api/locations/{id}/open-work-orders returns the open count and ids
- PATCH /api/locations/{id}/contact-info saves contacts and notes from the work-order Site dialog
- Add nullable Locations.Notes, used as the site-level POC notes fallback
24 lines
732 B
C#
24 lines
732 B
C#
namespace SeaHaven.Services.Exceptions;
|
|
|
|
/// <summary>Another live site of the same client already uses the requested site code.</summary>
|
|
public sealed class SiteCodeConflictException : Exception
|
|
{
|
|
public const string ErrorCode = "DuplicateSiteCode";
|
|
public const string PublicMessage = "This site code already exists.";
|
|
|
|
public SiteCodeConflictException()
|
|
: base(PublicMessage)
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>The caller lacks the permission required for a site mutation.</summary>
|
|
public sealed class SiteForbiddenException : Exception
|
|
{
|
|
public const string DeleteDeniedMessage = "You are not allowed to delete sites.";
|
|
|
|
public SiteForbiddenException(string message)
|
|
: base(message)
|
|
{
|
|
}
|
|
}
|