mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 16:33:12 +00:00
The 10-photo / 3-video limit only counted dispatcher attachments, so vendor portal uploads could push a work order past it (and vice versa). Count the work order's current vendor documents alongside its attachments on both the dispatcher media endpoint and the vendor portal. A new completion version does not count the version it replaces.
28 lines
1.7 KiB
C#
28 lines
1.7 KiB
C#
using Data.SeaHavenIndustries;
|
|
|
|
namespace SeaHaven.DataServices.Interfaces
|
|
{
|
|
public interface IVendorDocumentDataService
|
|
{
|
|
Task<VendorCompletionDocument?> GetLatestForDispatchAsync(int dispatchId, CancellationToken cancellationToken);
|
|
Task<VendorCompletionDocument?> GetForVendorDispatchAsync(int documentId, int dispatchId, int vendorId, CancellationToken cancellationToken);
|
|
Task<VendorCompletionDocument?> GetMetadataForVendorDispatchAsync(int documentId, int dispatchId, int vendorId, CancellationToken cancellationToken);
|
|
Task<List<VendorCompletionDocument>> ListForVendorDispatchAsync(int dispatchId, int vendorId, CancellationToken cancellationToken);
|
|
Task<VendorCompletionDocument?> GetUpliftEvidenceAsync(int documentId, int dispatchId, int vendorId, CancellationToken cancellationToken);
|
|
/// <summary>
|
|
/// Content types of the work order's current vendor documents (not deleted, not replaced by a
|
|
/// newer completion version), optionally excluding one being replaced. SH-116 photo/video counts.
|
|
/// </summary>
|
|
Task<IReadOnlyList<string>> ListActiveContentTypesForWorkOrderAsync(
|
|
int workOrderId,
|
|
int? excludingDocumentId,
|
|
CancellationToken cancellationToken);
|
|
|
|
/// <summary>Stored URLs of the work order's non-deleted dispatcher attachments (SH-116 counts).</summary>
|
|
Task<IReadOnlyList<string>> ListActiveWorkOrderAttachmentUrlsAsync(
|
|
int workOrderId,
|
|
CancellationToken cancellationToken);
|
|
Task AddAsync(VendorCompletionDocument document, CancellationToken cancellationToken);
|
|
Task SaveChangesAsync(CancellationToken cancellationToken);
|
|
}
|
|
}
|