forked from MapComplete/MapComplete
Fix: hide tag_apply_button when applied
This commit is contained in:
parent
5f7cc351c9
commit
622df2df19
1 changed files with 3 additions and 1 deletions
|
@ -162,6 +162,8 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
||||||
await Maproulette.singleton.closeTask(maproulette_id, Maproulette.STATUS_FIXED, {
|
await Maproulette.singleton.closeTask(maproulette_id, Maproulette.STATUS_FIXED, {
|
||||||
comment: "Tags are copied onto "+targetId+" with MapComplete"
|
comment: "Tags are copied onto "+targetId+" with MapComplete"
|
||||||
})
|
})
|
||||||
|
tags.data["mr_taskStatus"] = "Fixed"
|
||||||
|
tags.ping()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +195,7 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
||||||
})
|
})
|
||||||
).SetClass("subtle")
|
).SetClass("subtle")
|
||||||
const self = this
|
const self = this
|
||||||
const applied = new UIEventSource(false)
|
const applied = new UIEventSource(tags?.data?.["mr_taskStatus"] !== "Created") // This will default to 'false' for non-maproulette challenges
|
||||||
const applyButton = new SubtleButton(
|
const applyButton = new SubtleButton(
|
||||||
image,
|
image,
|
||||||
new Combine([msg, tagsExplanation]).SetClass("flex flex-col")
|
new Combine([msg, tagsExplanation]).SetClass("flex flex-col")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue