feat(delivery): record shots delivered outside the render pipeline
Deploy / deploy (push) Successful in 3m34s
Deploy / deploy (push) Successful in 3m34s
Shots delivered by hand before the pipeline have no Export, so they could never appear in a DeliveryPackage and the dashboard countdown showed them as not delivered. Add Shot.manualDeliveredAt/ById/Note, a "Delivered Outside Pipeline" bulk action on Shot Status (mark with the real date, or clear), a badge on marked shots, and count them in the countdown alongside DELIVERED EXR packages. The real date keeps the weekly rate honest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-2
@@ -267,7 +267,9 @@ export function projectPace(
|
||||
* Are we going to make the date, per episode?
|
||||
*
|
||||
* A shot counts as delivered when it appears in a package that has actually
|
||||
* gone out — a DeliveryItem in a DELIVERED EXR_DELIVERY package. Shot.status
|
||||
* gone out — a DeliveryItem in a DELIVERED EXR_DELIVERY package — or when it
|
||||
* was recorded as delivered by hand before the pipeline existed
|
||||
* (Shot.manualDeliveredAt), since those shots have no Export to package. Shot.status
|
||||
* is deliberately not the measure: it says where the work is, not whether the
|
||||
* client has the frames, and a review package (MOV_REVIEW) ships nothing.
|
||||
*
|
||||
@@ -295,7 +297,7 @@ export async function getDeliveryCountdown(limit = 6): Promise<EpisodeCountdown[
|
||||
const [shots, postQc, deliveredItems] = await Promise.all([
|
||||
db.shot.findMany({
|
||||
where: { projectId: { in: projectIds } },
|
||||
select: { id: true, projectId: true, episode: true, status: true },
|
||||
select: { id: true, projectId: true, episode: true, status: true, manualDeliveredAt: true },
|
||||
}),
|
||||
db.export.findMany({
|
||||
where: { status: { in: POST_QC_STATUSES }, shot: { projectId: { in: projectIds } } },
|
||||
@@ -323,6 +325,12 @@ export async function getDeliveryCountdown(limit = 6): Promise<EpisodeCountdown[
|
||||
const seen = deliveredAt.get(item.shotId);
|
||||
if (!seen || when < seen) deliveredAt.set(item.shotId, when);
|
||||
}
|
||||
for (const shot of shots) {
|
||||
const when = shot.manualDeliveredAt;
|
||||
if (!when) continue;
|
||||
const seen = deliveredAt.get(shot.id);
|
||||
if (!seen || when < seen) deliveredAt.set(shot.id, when);
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
const rows: EpisodeCountdown[] = [];
|
||||
|
||||
Reference in New Issue
Block a user