Skip to content
Merged
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
104 changes: 51 additions & 53 deletions packages/frontend/app/components/pending-updates-summary.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cached, tracked } from '@glimmer/tracking';
import { filter } from 'rsvp';
import { TrackedAsyncData } from 'ember-async-data';
import { findById } from 'ilios-common/utils/array-helpers';
import { uniqueId, get, hash } from '@ember/helper';
import { get, hash } from '@ember/helper';
import FaIcon from 'ilios-common/components/fa-icon';
import t from 'ember-intl/helpers/t';
import gt from 'ember-truth-helpers/helpers/gt';
Expand Down Expand Up @@ -88,60 +88,58 @@ export default class PendingUpdatesSummaryComponent extends Component {
});
}
<template>
{{#let (uniqueId) as |template-id|}}
<div
class="pending-updates-summary small-component {{if this.haveUpdates 'alert'}}"
data-test-pending-updates-summary
...attributes
>
<h3 data-test-title>
{{#if this.haveUpdates}}
<FaIcon @icon="triangle-exclamation" class="no" />
<div
class="pending-updates-summary small-component {{if this.haveUpdates 'alert'}}"
data-test-pending-updates-summary
...attributes
>
<h3 data-test-title>
{{#if this.haveUpdates}}
<FaIcon @icon="triangle-exclamation" class="no" />
{{/if}}
{{t "general.pendingUpdatesSummaryTitle"}}
</h3>
<div id="schoolsfilter" class="filter" data-test-schools>
<label class="inline-label">
<FaIcon @icon="building-columns" @title={{t "general.school"}} />
</label>
<div id="school-selection" class="inline-data">
{{#if (gt @schools.length 1)}}
<select
aria-label={{t "general.school"}}
{{on "change" (pick "target.value" (set this "selectedSchoolId"))}}
>
{{#each (sortBy "title" @schools) as |school|}}
<option value={{school.id}} selected={{eq school.id this.bestSelectedSchool.id}}>
{{school.title}}
</option>
{{/each}}
</select>
{{else}}
{{this.bestSelectedSchool.title}}
{{/if}}
{{t "general.pendingUpdatesSummaryTitle"}}
</h3>
<div id="schoolsfilter" class="filter" data-test-schools>
<label class="inline-label" for="schools-{{template-id}}">
<FaIcon @icon="building-columns" @title={{t "general.school"}} />
</label>
<div id="school-selection" class="inline-data">
{{#if (gt @schools.length 1)}}
<select
id="schools-{{template-id}}"
{{on "change" (pick "target.value" (set this "selectedSchoolId"))}}
>
{{#each (sortBy "title" @schools) as |school|}}
<option value={{school.id}} selected={{eq school.id this.bestSelectedSchool.id}}>
{{school.title}}
</option>
{{/each}}
</select>
{{else}}
{{this.bestSelectedSchool.title}}
{{/if}}
</div>
</div>
{{#if this.areUpdatesLoaded}}
<p data-test-summary>
{{t "general.pendingUpdatesSummary" count=(get this.updates "length")}}
</p>
{{#if (get this.updates "length")}}
<div class="actions" data-test-actions>
<LinkTo
@route="pending-user-updates"
@query={{hash school=this.bestSelectedSchool.id}}
data-test-manage
>
<button type="button">
{{t "general.manage"}}
</button>
</LinkTo>
</div>
{{/if}}
{{else}}
<LoadingSpinner />
{{/if}}
</div>
{{/let}}
{{#if this.areUpdatesLoaded}}
<p data-test-summary>
{{t "general.pendingUpdatesSummary" count=(get this.updates "length")}}
</p>
{{#if (get this.updates "length")}}
<div class="actions" data-test-actions>
<LinkTo
@route="pending-user-updates"
@query={{hash school=this.bestSelectedSchool.id}}
data-test-manage
>
<button type="button">
{{t "general.manage"}}
</button>
</LinkTo>
</div>
{{/if}}
{{else}}
<LoadingSpinner />
{{/if}}
</div>
</template>
}
12 changes: 6 additions & 6 deletions packages/frontend/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const BrowserStackLaunchers = {
'--os',
'OS X',
'--osv',
'Sonoma',
'Sequoia',
'--b',
'safari',
'--bv',
'latest', // Will always be 17.x on Sonoma
'latest', // Will always be 18.x on Sequoia, https://www.browserstack.com/docs/automate/capabilities
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -25,11 +25,11 @@ const BrowserStackLaunchers = {
'--os',
'ios',
'--osv',
'17',
'18',
'--b',
'iphone',
'--device',
'iPhone 15 Pro',
'iPhone 14',
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -42,11 +42,11 @@ const BrowserStackLaunchers = {
'--os',
'android',
'--osv',
'14.0',
'15.0',
'--b',
'android',
'--device',
'Google Pixel 8',
'Google Pixel 9',
...defaultArgs,
],
protocol: 'browser',
Expand Down
12 changes: 6 additions & 6 deletions packages/lti-course-manager/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const BrowserStackLaunchers = {
'--os',
'OS X',
'--osv',
'Sonoma',
'Sequoia',
'--b',
'safari',
'--bv',
'latest', // Will always be 17.x on Sonoma
'latest', // Will always be 18.x on Sequoia, https://www.browserstack.com/docs/automate/capabilities
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -25,11 +25,11 @@ const BrowserStackLaunchers = {
'--os',
'ios',
'--osv',
'17',
'18',
'--b',
'iphone',
'--device',
'iPhone 15 Pro',
'iPhone 14',
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -42,11 +42,11 @@ const BrowserStackLaunchers = {
'--os',
'android',
'--osv',
'14.0',
'15.0',
'--b',
'android',
'--device',
'Google Pixel 8',
'Google Pixel 9',
...defaultArgs,
],
protocol: 'browser',
Expand Down
12 changes: 6 additions & 6 deletions packages/lti-dashboard/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const BrowserStackLaunchers = {
'--os',
'OS X',
'--osv',
'Sonoma',
'Sequoia',
'--b',
'safari',
'--bv',
'latest', // Will always be 17.x on Sonoma
'latest', // Will always be 18.x on Sequoia, https://www.browserstack.com/docs/automate/capabilities
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -25,11 +25,11 @@ const BrowserStackLaunchers = {
'--os',
'ios',
'--osv',
'17',
'18',
'--b',
'iphone',
'--device',
'iPhone 15 Pro',
'iPhone 14',
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -42,11 +42,11 @@ const BrowserStackLaunchers = {
'--os',
'android',
'--osv',
'14.0',
'15.0',
'--b',
'android',
'--device',
'Google Pixel 8',
'Google Pixel 9',
...defaultArgs,
],
protocol: 'browser',
Expand Down
12 changes: 6 additions & 6 deletions packages/test-app/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const BrowserStackLaunchers = {
'--os',
'OS X',
'--osv',
'Sonoma',
'Sequoia',
'--b',
'safari',
'--bv',
'latest', // Will always be 17.x on Sonoma
'latest', // Will always be 18.x on Sequoia, https://www.browserstack.com/docs/automate/capabilities
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -25,11 +25,11 @@ const BrowserStackLaunchers = {
'--os',
'ios',
'--osv',
'17',
'18',
'--b',
'iphone',
'--device',
'iPhone 15 Pro',
'iPhone 14',
...defaultArgs,
],
protocol: 'browser',
Expand All @@ -42,11 +42,11 @@ const BrowserStackLaunchers = {
'--os',
'android',
'--osv',
'14.0',
'15.0',
'--b',
'android',
'--device',
'Google Pixel 8',
'Google Pixel 9',
...defaultArgs,
],
protocol: 'browser',
Expand Down