2026-08-24 15:16:51 -03:00
|
|
|
import type { MediaCategory, MediaFile } from "@/domain/work-orders/types/work-order-media";
|
|
|
|
|
|
2026-08-25 12:03:36 -03:00
|
|
|
/**
|
|
|
|
|
* Extra Docs overlay category. Board purpose stays Extra
|
|
|
|
|
* (API enum Before/After/Extra/Completion). Aveta is never inferred from
|
|
|
|
|
* upload order — only an explicit Aveta category counts.
|
|
|
|
|
*/
|
|
|
|
|
export function resolveExtraDocCategory(file: MediaFile): MediaCategory {
|
2026-08-24 15:16:51 -03:00
|
|
|
return file.category;
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-25 12:03:36 -03:00
|
|
|
export function hasExplicitAvetaFile(files: MediaFile[]): boolean {
|
|
|
|
|
return files.some((item) => item.category === "Aveta");
|
2026-08-24 15:16:51 -03:00
|
|
|
}
|