feat(gui): markens lagervalg viser markørnavn og afstand, marksilo/gæringssilo først, kun de 8 nærmeste (34 ens Farma-rækker) (v1.29.5.0)

This commit is contained in:
2026-09-26 17:37:10 +02:00
parent 1b0a2c152b
commit 77253b5d2b
6 changed files with 83 additions and 8 deletions
+17
View File
@@ -45,5 +45,22 @@ check("FVcrop stub", ADFieldView.cropText({kind = "bare", stubbleOf = "Hvede", c
check("FVcrop bar", ADFieldView.cropText({kind = "bare"}, T), "bar jord")
check("FVcrop afgrøde", ADFieldView.cropText({kind = "harvest", cropTitle = "Majs"}, T), "Majs")
-- FVstore: marksilo først, gæringssilo, så afstand; valgte vises altid; kun de nærmeste af resten
local stores = {
{id = "fjern", distance = 3000},
{id = "nær", distance = 200},
{id = "mark", distance = 90, fieldSilo = true},
{id = "valgt", distance = 5000, chosen = true},
{id = "gær", distance = 800, fermenter = true},
{id = "midt", distance = 1200},
}
local storeRows, hiddenStores = ADFieldView.storeRows(stores, 2)
local order = {}
for _, e in ipairs(storeRows) do table.insert(order, e.id) end
check("FVstore rækkefølge", table.concat(order, ","), "mark,gær,nær,midt,valgt")
check("FVstore skjulte", hiddenStores, 1)
check("FVstore meter", ADFieldView.distanceText(90.4), "90 m")
check("FVstore km", ADFieldView.distanceText(1420), "1,4 km")
print(failures == 0 and "\nALLE TESTS OK" or ("\n" .. failures .. " FEJL"))
os.exit(failures == 0 and 0 or 1)