2021-04-14 02:27:12 +00:00
|
|
|
import Component from '@glimmer/component';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { action } from '@ember/object';
|
|
|
|
import {tracked} from "@glimmer/tracking";
|
|
|
|
|
|
|
|
export default class WordsMorphologyComponent extends Component {
|
|
|
|
@service router;
|
|
|
|
@service store;
|
|
|
|
|
|
|
|
@tracked morphLegend;
|
|
|
|
|
|
|
|
constructor(...args) {
|
|
|
|
super(...args);
|
|
|
|
this.getMorphDetail();
|
|
|
|
}
|
|
|
|
|
|
|
|
async getMorphDetail()
|
|
|
|
{
|
2021-05-06 18:08:04 +00:00
|
|
|
if (this.args.morph == 'undefined' || this.args.morph == '') {
|
|
|
|
return;
|
|
|
|
}
|
2021-04-14 02:27:12 +00:00
|
|
|
const result = await this.store.findRecord('morph-legend', this.args.morph);
|
|
|
|
this.morphLegend = result.description;
|
|
|
|
}
|
|
|
|
}
|