Skip to content

Commit

Permalink
Merge staging into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 6, 2023
2 parents 42a0f19 + e253fe5 commit 2d78a1f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/components/form/responses-table-card.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import Component from '@ember/component';
import { inject as service } from '@ember/service';

const FormResponsesTableCardComponent = Component.extend({
session: service('session'),
actions: {
copyUsernames() {
const usernames = this.form
let usernames = this.form
.get('responses')
.map((response) => response.get('user.username'))
.join('\n');

.map((response) => response.get('user.username'));
if (!this.form.currentUserResponseCompleted) {
usernames = usernames.filter(
(name) => name !== this.session.currentUser.username
);
}
usernames = usernames.join('\n');
navigator.clipboard.writeText(usernames);
},
},
Expand Down

0 comments on commit 2d78a1f

Please sign in to comment.