fix: cleaning units and area calculation#971
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (["clean_time", "clean_area", "clean_count"].includes(mappedAttribute)) { | ||
| let val = cleaningAttributes[cleaningAttribute] as number; | ||
|
|
||
| if (mappedAttribute === "clean_time") { | ||
| val = Number((val / 3600).toFixed(2)); |
There was a problem hiding this comment.
Align clean summary clean_time with new units
The clean summary now divides clean_time by 3600 before writing cleaningInfo.clean_time, so the adapter will store hours (≈122.6 for the mocked 441361 value) instead of the raw seconds used previously. The mock data and src/lib/mock/typeCheck.test.ts still assert the unconverted 441361 value, so running updateCleanSummary under the mock harness will now fail. Please update the mocks/tests (or gate the conversion) to keep the stored units consistent with the expectations.
Useful? React with 👍 / 👎.
No description provided.