This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/explain-reviewable.js
2020-03-12 13:29:55 -04:00

17 lines
497 B
JavaScript

import Controller from "@ember/controller";
import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Controller.extend(ModalFunctionality, {
loading: null,
reviewableExplanation: null,
onShow() {
this.setProperties({ loading: true, reviewableExplanation: null });
this.store
.find("reviewable-explanation", this.model.id)
.then(result => this.set("reviewableExplanation", result))
.finally(() => this.set("loading", false));
}
});