feat(flows): besked på skærmen når solgte traktorer fjernes fra et flow; rød når flowet står uden traktorer (v1.59.7.0)

This commit is contained in:
2026-09-29 18:18:27 +02:00
parent 45f58abcf0
commit fc646ab00b
6 changed files with 40 additions and 1 deletions
+8
View File
@@ -1513,6 +1513,14 @@ function ADRunsController.pruneMissingVehicles(adEnv)
Logging.info(ADRunsController.LOG_PREFIX .. "run '%s': køretøj %s findes ikke længere — fjernet fra flowet", tostring(entry.runName), tostring(entry.vehicleId))
end
ADRunsController.save()
-- besked på skærmen (højre side); rød når flowet står uden traktorer
if ADFieldJobs ~= nil and ADFieldJobs.notify ~= nil and g_i18n ~= nil then
for _, notice in ipairs(ADRuns.pruneNotices(store, removed)) do
local text = notice.critical and string.format(g_i18n:getText("spu_prune_empty"), notice.runName)
or string.format(g_i18n:getText("spu_prune_removed"), notice.runName, notice.removed, notice.left)
ADFieldJobs.notify(text, notice.critical)
end
end
end
function ADRunsController.installSaveHook()