Expose built element counts per floor and trade [HMA-1938] - #366
Draft
bryandebourbon2 wants to merge 1 commit into
Draft
Expose built element counts per floor and trade [HMA-1938]#366bryandebourbon2 wants to merge 1 commit into
bryandebourbon2 wants to merge 1 commit into
Conversation
Adds Avvir.api.projects.getProjectFloorTradeBuiltElementCounts for the gateway's
new GET /projects/{projectId}/built-elements-by-floor-and-trade.
The as-built IFC export's trade step uses it to disable a trade with nothing built
in the selected areas. The deviation magnitudes it already fetches cannot answer
that: a trade built at its designed position reports a magnitude of zero, exactly
like a trade that was never built.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Avvir.api.projects.getProjectFloorTradeBuiltElementCounts({ projectId }, user)for the gateway's newGET /projects/{projectId}/built-elements-by-floor-and-trade, returning{ [floorFirebaseId]: { [tradeCode]: number } }.The as-built IFC export's trade step (HMA-1938) uses it to disable a trade with nothing built in the selected areas. The deviation magnitudes it already fetches cannot answer that: a trade built at its designed position reports a magnitude of zero, exactly like a trade that was never built.
Tests
3 new cases in
tests/api/project_api_test.ts(URL, auth headers, response shape). 64 passing locally for that file.Release
Avvir/avvir-web's HMA-1938 branch needs this published asavvir@8.9.3; it is pinned atavvir@^8.9.3and will not compile until then.Related
Avvir/avvir-web-gateway#1465— the endpointAvvir/avvir-web— the trade step that consumes it🤖 Generated with Claude Code