Einzelfahrt-Dauer: "h min" statt "Std. Min." (Paritätsregel zu companion-app)
dauerText() zeigte "1 Std. 15 Min." - der Besitzer wollte exakt die Schreibweise, die companion-app/src/format.ts' dauer() bereits verwendet: "1 h 15 min", Minuten zweistellig gepolstert. Betrifft sowohl die Einzelfahrt-Detailansicht als auch die Dauer-Anzeige im Fahrt-Bearbeiten-Formular (gemeinsamer Helfer). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2899,13 +2899,14 @@ function vReifen() {
|
|||||||
const FAHRT_ARTEN = ["privat", "arbeitsweg"];
|
const FAHRT_ARTEN = ["privat", "arbeitsweg"];
|
||||||
const artText = (a) => (a ? a.charAt(0).toUpperCase() + a.slice(1) : "");
|
const artText = (a) => (a ? a.charAt(0).toUpperCase() + a.slice(1) : "");
|
||||||
|
|
||||||
/* "1 Std. 15 Min." statt "75 min" - bei mehrstündigen Fahrten liest sich die
|
/* "1 h 15 min" statt "75 min" - bei mehrstündigen Fahrten liest sich die
|
||||||
reine Minutenzahl schlecht. */
|
reine Minutenzahl schlecht. Gleiche Schreibweise wie companion-app/src/
|
||||||
|
format.ts' dauer() (Paritätsregel), zweistellig gepolsterte Minuten. */
|
||||||
function dauerText(sekunden) {
|
function dauerText(sekunden) {
|
||||||
if (sekunden == null || !isFinite(sekunden)) return "–";
|
if (sekunden == null || !isFinite(sekunden)) return "–";
|
||||||
const min = Math.max(0, Math.round(sekunden / 60));
|
const min = Math.max(0, Math.round(sekunden / 60));
|
||||||
const std = Math.floor(min / 60);
|
const std = Math.floor(min / 60);
|
||||||
return std ? `${std} Std. ${min % 60} Min.` : `${min} Min.`;
|
return std ? `${std} h ${String(min % 60).padStart(2, "0")} min` : `${min} min`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start und Ankunft eines Formulars als echte Zeitpunkte. Liegt die Ankunft
|
/* Start und Ankunft eines Formulars als echte Zeitpunkte. Liegt die Ankunft
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "audi_dashboard",
|
"domain": "audi_dashboard",
|
||||||
"name": "Audi Dashboard",
|
"name": "Audi Dashboard",
|
||||||
"version": "2026.8.24.15",
|
"version": "2026.8.24.16",
|
||||||
"documentation": "https://gitea.nothaft.cloud/paul/audi-app/src/branch/main/README.md",
|
"documentation": "https://gitea.nothaft.cloud/paul/audi-app/src/branch/main/README.md",
|
||||||
"issue_tracker": "https://gitea.nothaft.cloud/paul/audi-app/issues",
|
"issue_tracker": "https://gitea.nothaft.cloud/paul/audi-app/issues",
|
||||||
"codeowners": ["@paul"],
|
"codeowners": ["@paul"],
|
||||||
|
|||||||
Reference in New Issue
Block a user