Skip to content

Commit

Permalink
Merge pull request #773 from mathematicalthinking/develop
Browse files Browse the repository at this point in the history
Enc 3.6.3 - merge develop into main
  • Loading branch information
ywakili18 authored May 6, 2024
2 parents 994b7eb + 180b481 commit 56fd79c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
6 changes: 4 additions & 2 deletions app/components/home-page.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class='home--container{{unless this.isExpanded ' closed'}}'>
<div class='home--container{{unless this.isExpanded " closed"}}'>
<EmberTable as |t|>
<t.head
@columns={{@tableColumns}}
Expand All @@ -25,7 +25,9 @@
@model={{rowValue.id}}
>{{format-date cellValue 'MM/DD/YYYY'}}</LinkTo>
{{else if (is-equal @type 'feedback')}}
{{#if (is-equal columnValue.name 'Workspace')}}
{{#if (is-equal columnValue.name 'Student Submission')}}
<a {{on 'click' (fn this.toResponse rowValue)}}>{{cellValue}}</a>
{{else if (is-equal columnValue.name 'Mentor')}}
<a {{on 'click' (fn this.toResponse rowValue)}}>{{cellValue}}</a>
{{else if (is-equal columnValue.name 'Status')}}
<svg height='20' width='20'>
Expand Down
10 changes: 9 additions & 1 deletion app/components/response-mentor-thread.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
/**
* #
* @description
Class component file to response-mentor-thread component. Purpose is to show responses for a mentor thread.
* @author Yousof Wakili
* @since 3.6.2
*/

import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';

export default class ResponseMentorThreadComponent extends Component {
@tracked show = false;
@tracked show = true;

get showResponsesText() {
return this.showResponses
Expand Down
14 changes: 9 additions & 5 deletions app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,24 @@ export default class IndexController extends Controller {
}
if (this.dataToShow === 'feedback') {
return [
{ name: 'Workspace', valuePath: 'workspaceName' },
{ name: 'Latest Feedback', valuePath: 'latestReply.createDate' },
{ name: 'Latest Revision', valuePath: 'latestRevision.createDate' },
{
name: `${this.activeDetailTab === 'Given' ? 'Student' : 'Mentor'}`,
name: `${
this.activeDetailTab === 'Given' ? 'Student Submission' : 'Mentor'
}`,
valuePath: `${
this.activeDetailTab === 'Given'
? 'studentDisplay'
: 'mentorDisplay'
}`,
},

{ name: 'Latest Feedback', valuePath: 'latestReply.createDate' },
{ name: 'Latest Revision', valuePath: 'latestRevision.createDate' },
{ name: 'Status', valuePath: 'statusMessage' },
{ name: 'Workspace', valuePath: 'workspaceName' },
];
}

//getter must return a value
return [];
}
// updates when user changes tabs and gets sent to table
Expand Down Expand Up @@ -178,10 +180,12 @@ export default class IndexController extends Controller {
const received = responses.filter(
(response) => response.threadType === 'submitter'
);
// Under "given" tab
const sent = responses.filter(
(response) =>
response.threadType === 'mentor' || response.threadType === 'approver'
);

const threads = [
{ label: 'Given', details: sent, type: 'response' },
{ label: 'Received', details: received, type: 'response' },
Expand Down
1 change: 0 additions & 1 deletion app/models/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export default class WorkspaceModel extends Auditable {
}
return null;
}

@attr() permissions;
get collaborators() {
const permissions = this.permissions;
Expand Down
10 changes: 6 additions & 4 deletions app/templates/workspace/submission.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
<LinkTo @route='workspace.info' @model={{this.currentWorkspace.id}}>
<a>Workspace Stats &amp; Settings</a>
</LinkTo>

<LinkTo @route='workspace.summary' @model={{this.model.workspace.id}}>
<a>View All Responses</a>
</LinkTo>
{{#if canSeeResponses}}<LinkTo
@route='workspace.summary'
@model={{this.model.workspace.id}}
>
<a>View All Responses</a>
</LinkTo>{{/if}}

{{#each this.currentWorkspace.parentWorkspaces as |ws|}}
<LinkTo @route='workspace.work' @model={{ws.id}}>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "encompass",
"version": "3.6.2",
"version": "3.6.3",
"private": true,
"description": "enCoMPASS",
"keywords": [
Expand Down

0 comments on commit 56fd79c

Please sign in to comment.