Open William5553 opened 10 months ago
Yeah I only started supporting offseason teams recently, and I had already set the column to Integer instead of String. I'm rewriting a lot of it right now and it should be fixed by next season. In the meantime, you can manually convert from one representation to the other. Here's the JavaScript code the frontend uses:
export const formatNumber = (num: number) => {
if (num > 100000) {
return round(num / 100000, 0).toString() + String.fromCharCode(65 + (num % 100000));
}
return num.toString();
};
https://github.com/avgupta456/statbotics/blob/master/frontend/components/utils.tsx
When requesting a match where a team has a letter in it, the API converts the letters in the team to a number representation. An example can be found with 2023mirr, 6081B, 5712B, and 7211B are represented as 608100001, 571200001 and 721100001. On statbotics, the letter representation is shown properly. This is a breaking change, however, TBA does represent the teams properly and returns frc6081B, frc5712B, and frc7211B.