Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/frontend/app/components/program-year/list-item.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cached, tracked } from '@glimmer/tracking';
import { TrackedAsyncData } from 'ember-async-data';
import { service } from '@ember/service';
import { task } from 'ember-concurrency';
import { and, not, or } from 'ember-truth-helpers';
import { or } from 'ember-truth-helpers';
import { LinkTo } from '@ember/routing';
import { array } from '@ember/helper';
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
Expand Down Expand Up @@ -119,7 +119,7 @@ export default class ProgramYearListItemComponent extends Component {
await this.args.programYear.destroyRecord();
});
<template>
{{#if (and this.cohort (not @programYear.archived))}}
{{#if this.cohort}}
<tr
class={{if this.showRemoveConfirmation "confirm-removal"}}
data-test-program-year-list-item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ module('Acceptance | Program - ProgramYear List', function (hooks) {
startYear: thisYear - 1,
cohort: cohorts[2],
});
this.server.create('program-year', {
program: this.program,
startYear: thisYear - 3,
cohort: cohorts[3],
archived: true,
});
await page.visit({ programId: this.program.id });
await takeScreenshot(assert, 'default');
assert.strictEqual(page.programYears.items.length, 3);
Expand Down
1 change: 1 addition & 0 deletions packages/ilios-common/addon/models/program-year.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ProgramYear extends Model {
@attr('boolean')
locked;

/** @deprecated */
@attr('boolean')
archived;

Expand Down
4 changes: 2 additions & 2 deletions packages/ilios-common/addon/services/permission-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default class PermissionCheckerService extends Service {
return this.canChangeInSchool(school, 'CAN_CREATE_PROGRAMS');
}
async canUpdateProgramYear(programYear) {
if (programYear.get('locked') || programYear.get('archived')) {
if (programYear.get('locked')) {
return false;
}

Expand All @@ -187,7 +187,7 @@ export default class PermissionCheckerService extends Service {
return this.canUpdateProgram(program);
}
async canDeleteProgramYear(programYear) {
if (programYear.get('locked') || programYear.get('archived')) {
if (programYear.get('locked')) {
return false;
}

Expand Down
Loading