Expose next incomplete sortie checklist item
This commit is contained in:
@@ -13799,12 +13799,15 @@ export class CampScene extends Phaser.Scene {
|
||||
|
||||
private sortieChecklistSummary(checklist: SortieChecklistItem[]) {
|
||||
const completeCount = checklist.filter((item) => item.complete).length;
|
||||
const nextIncomplete = checklist.find((item) => !item.complete);
|
||||
return {
|
||||
total: checklist.length,
|
||||
completeCount,
|
||||
complete: completeCount === checklist.length,
|
||||
requiredRemainingCount: checklist.filter((item) => !item.complete && item.priority === 'required').length,
|
||||
recommendedRemainingCount: checklist.filter((item) => !item.complete && item.priority !== 'required').length
|
||||
recommendedRemainingCount: checklist.filter((item) => !item.complete && item.priority !== 'required').length,
|
||||
nextIncompleteLabel: nextIncomplete?.label ?? null,
|
||||
nextIncompletePriority: nextIncomplete?.priority ?? null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user