fix: klippede tekster i Oversigt/Marker/Fabrikker/Siloer/Stalde — kort status i oversigten, fuld dvale-grund i Flows-listen (oversat), kortere opmærksomhedslinjer — 1.62.307
This commit is contained in:
@@ -91,7 +91,7 @@ end
|
||||
function SmartPickupFrame:fieldPlanText(field, info)
|
||||
if field.contract then return self.i18n:getText("spu_field_plan_contract") end
|
||||
if field.plan.targetFruit ~= nil and field.plan.targetFruit ~= "" then
|
||||
return "-> " .. self:fruitTitle(field.plan.targetFruit)
|
||||
return "→" .. self:fruitTitle(field.plan.targetFruit) -- kort pil: "→Sugar Beet" passer i kolonnen (17/10)
|
||||
end
|
||||
local text = self.i18n:getText(ADFieldView.planKey(field.plan, info.kind))
|
||||
if field.plan.rake and info.kind == "mowable" then text = text .. " + " .. self.i18n:getText("spu_field_plan_rake") end
|
||||
|
||||
@@ -293,7 +293,7 @@ function SmartPickupFrame:refreshFlowListRows(adEnv)
|
||||
entry.cells[1]:setText(ADFlowView.listName(run))
|
||||
entry.cells[2]:setText(tostring(cells[2]))
|
||||
entry.cells[3]:setText(tostring(cells[5]))
|
||||
entry.cells[4]:setText(tostring(cells[6]))
|
||||
entry.cells[4]:setText(tostring(cells[7] or cells[6]))
|
||||
entry.cells[5]:setText(self.i18n:getText(canStop and "spu_flowList_stop" or "spu_flowList_start"))
|
||||
if entry.dot ~= nil and entry.dot.setImageColor ~= nil then entry.dot:setImageColor(nil, unpackFn(color)) end
|
||||
if entry.cells[4].setTextColor ~= nil then entry.cells[4]:setTextColor(unpackFn(color)) end
|
||||
@@ -349,7 +349,7 @@ function SmartPickupFrame:fillFlowSummary(adEnv, run)
|
||||
end)
|
||||
end
|
||||
local cells = self:flowCells(adEnv, run)
|
||||
self:addTextRow(" " .. string.format(i18n:getText("spu_field_statusFull"), tostring(cells[6])))
|
||||
self:addTextRow(" " .. string.format(i18n:getText("spu_field_statusFull"), tostring(cells[7] or cells[6])))
|
||||
self:addLinkRow(" " .. i18n:getText("spu_guide_flow_open"), function(frame)
|
||||
frame.selectedRunId = runId
|
||||
frame:onClickFlowSetup()
|
||||
@@ -371,7 +371,8 @@ SmartPickupFrame.EDIT_PANEL_KINDS.flow = {
|
||||
end,
|
||||
status = function(frame, adEnv, id)
|
||||
local run = ADRuns.getRun(ADRunsController.store, id)
|
||||
return {text = tostring(frame:flowCells(adEnv, run)[6]), level = frame:flowLevel(adEnv, run)}
|
||||
local cells = frame:flowCells(adEnv, run)
|
||||
return {text = tostring(cells[7] or cells[6]), level = frame:flowLevel(adEnv, run)}
|
||||
end,
|
||||
startStopText = function(frame, adEnv, id)
|
||||
local run = ADRuns.getRun(ADRunsController.store, id)
|
||||
|
||||
@@ -66,12 +66,22 @@ function SmartPickupFrame:flowCells(adEnv, run)
|
||||
end
|
||||
-- kædeflow uden traktor: sig hvorfor det står stille i stedet for flowets regel
|
||||
if ADFlowView.isIdleChain(run) then status = i18n:getText("spu_flow_chainIdle") end
|
||||
-- [6] kort status til oversigtens smalle celle (132 px), [7] lang status med grund til Flows-listen (244 px)
|
||||
local longStatus = status
|
||||
if run.sleeping then
|
||||
local why = ADFlowSleep ~= nil and ADFlowSleep.getSleepReason ~= nil and ADFlowSleep.getSleepReason(run.id) or nil
|
||||
status = why ~= nil and string.format(i18n:getText("spu_flow_sleepingWhy"), ADFlowSleep.shortReason(why)) or i18n:getText("spu_flow_sleeping")
|
||||
-- (ikke "a and b or nil": det sluger false, som betyder "ingen tur uden nærmere grund" — review 17/10)
|
||||
local why = nil
|
||||
if ADFlowSleep ~= nil and ADFlowSleep.getSleepReason ~= nil then why = ADFlowSleep.getSleepReason(run.id) end
|
||||
status = i18n:getText("spu_flow_sleeping")
|
||||
if why == false then
|
||||
why = i18n:getText(run.kind == "outbound" and "spu_sleep_noTripOut" or "spu_sleep_noTripSupply")
|
||||
elseif why ~= nil then
|
||||
why = ADFlowSleep.shortReason(why)
|
||||
end
|
||||
longStatus = why ~= nil and string.format(i18n:getText("spu_flow_sleepingWhy"), why) or i18n:getText("spu_flow_sleepingLong")
|
||||
end
|
||||
local name = (run.id == self.selectedRunId and "> " or "") .. ADFlowView.listName(run)
|
||||
return {name, products, from, to, string.format("%d/%d", row.running, row.total), status}
|
||||
return {name, products, from, to, string.format("%d/%d", row.running, row.total), status, longStatus}
|
||||
end
|
||||
|
||||
-- Hele rækken klikbar med musen (Bitmap-rækker har ingen onClick). Klikket gemmes kun som
|
||||
|
||||
Reference in New Issue
Block a user