{{t "pages.skill-review.tabs.trainings.description"}}
- +import TrainingCard from '../../../../training/card'; + +export default class EvaluationResultsTabsTrainings extends Component { + @service store; + + @tracked isShareResultsLoading = false; + @tracked isShareResultsError = false; + @tracked isParticipationShared = false; + + constructor() { + super(...arguments); + + this.isParticipationShared = this.args.isParticipationShared; + } + + @action + async shareResults() { + const adapter = this.store.adapterFor('campaign-participation-result'); + + try { + this.isShareResultsError = false; + this.isShareResultsLoading = true; + + await adapter.share(this.args.campaignParticipationResultId); + + this.isParticipationShared = true; + } catch { + this.isShareResultsError = true; + } finally { + this.isShareResultsLoading = false; + } + } + + +{{t "pages.skill-review.tabs.trainings.description"}}
+ +