Skip to content

Commit

Permalink
Merge pull request #8380 from michaelchadwick/remove-print-course-ren…
Browse files Browse the repository at this point in the history
…der-modifiers

Remove PrintCourse render modifiers
  • Loading branch information
jrjohnson authored Feb 25, 2025
2 parents a1d82e8 + 9b7d911 commit 3f47601
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
2 changes: 0 additions & 2 deletions packages/ilios-common/.lint-todo
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|0a8f8f3c4ad64455e02
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|fab53a12bc25481f88028a380c2d467d682eee45|1731542400000|1762646400000|1793750400000|addon/components/offering-form.hbs
add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|d6e466b5b7ca03528b0882253d26794d3a9aa6ca|1731542400000|1762646400000|1793750400000|addon/components/offering-form.hbs
add|ember-template-lint|no-at-ember-render-modifiers|26|14|26|14|e5d8b6826e05b980dca30d848c35171b24960c39|1731542400000|1762646400000|1793750400000|addon/components/offering-manager.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|addon/components/print-course.hbs
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|aa5aedc5b45db1644928b5b95c2fefc1ef4a7bdf|1731542400000|1762646400000|1793750400000|addon/components/print-course.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|1fb6f249958ee245e6abc413681c9fe096120cef|1731542400000|1762646400000|1793750400000|addon/components/session-copy.hbs
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|856162ce473b112534763bb641aae7a4422d8e2e|1731542400000|1762646400000|1793750400000|addon/components/session-copy.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|addon/components/session-offerings-list.hbs
Expand Down
9 changes: 2 additions & 7 deletions packages/ilios-common/addon/components/print-course.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<section
class="print-course"
{{did-insert (perform this.load)}}
{{did-update (perform this.load) @course.sessions @course.learningMaterials}}
...attributes
>
<section class="print-course" ...attributes>
{{#let (unique-id) as |templateId|}}
<div class="header" data-test-course-header>
<h2 data-test-course-title>
Expand Down Expand Up @@ -209,4 +204,4 @@
<PrintCourseSession @session={{session}} @templatedId={{templateId}}/>
{{/each}}
{{/let}}
</section>
</section>
21 changes: 13 additions & 8 deletions packages/ilios-common/addon/components/print-course.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { service } from '@ember/service';
import Component from '@glimmer/component';
import { cached, tracked } from '@glimmer/tracking';
import { dropTask } from 'ember-concurrency';
import sortableByPosition from 'ilios-common/utils/sortable-by-position';
import { TrackedAsyncData } from 'ember-async-data';

Expand All @@ -11,7 +10,19 @@ export default class PrintCourseComponent extends Component {

@tracked sortTitle;
@tracked sortDirectorsBy;
@tracked academicYearCrossesCalendarYearBoundaries = false;

@cached
get academicYearCrossesCalendarYearBoundariesData() {
return new TrackedAsyncData(
this.iliosConfig.itemFromConfig('academicYearCrossesCalendarYearBoundaries'),
);
}

get academicYearCrossesCalendarYearBoundaries() {
return this.academicYearCrossesCalendarYearBoundariesData.isResolved
? this.academicYearCrossesCalendarYearBoundariesData.value
: false;
}

@cached
get competenciesData() {
Expand Down Expand Up @@ -69,12 +80,6 @@ export default class PrintCourseComponent extends Component {
return this.termsData.isResolved ? this.termsData.value : [];
}

load = dropTask(async () => {
this.academicYearCrossesCalendarYearBoundaries = await this.iliosConfig.itemFromConfig(
'academicYearCrossesCalendarYearBoundaries',
);
});

get courseLearningMaterials() {
if (!this.courseLearningMaterialsRelationship) {
return [];
Expand Down

0 comments on commit 3f47601

Please sign in to comment.