Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove UserProfile render modifiers #8245

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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: 0 additions & 4 deletions packages/frontend/.lint-todo
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
add|ember-template-lint|no-at-ember-render-modifiers|2|61|2|61|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|app/components/new-directory-user.hbs
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|app/components/user-profile-bio.hbs
add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|f53982efe02d2bef9e7f12b5b862288c594579c2|1731542400000|1762646400000|1793750400000|app/components/user-profile-bio.hbs
add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|app/components/user-profile-roles.hbs
add|ember-template-lint|no-at-ember-render-modifiers|6|2|6|2|e5120f87b74c5ae8e4c76b9089e0b4a4504c6e3c|1731542400000|1762646400000|1793750400000|app/components/user-profile-roles.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|1fb0566922ce4f066916e5e2931f650f69d7cfba|1731542400000|1762646400000|1793750400000|app/components/visualizer-program-year-objectives.hbs
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|38e65b45b56fdfd4160d3b0884114b6643e3a036|1731542400000|1762646400000|1793750400000|app/components/visualizer-program-year-objectives.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|cb6d7acb9879902b89ad1575846d290a564ffbae|1731542400000|1762646400000|1793750400000|app/components/learner-group/instructor-manager.hbs
Expand Down
135 changes: 135 additions & 0 deletions packages/frontend/app/components/user-profile-bio-details.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{{#let (unique-id) as |templateId|}}
<div class="form">
<div
class="item {{if (includes 'firstName' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-firstname
>
<label for="firstname-{{templateId}}">
{{t "general.firstName"}}:
</label>
<span class="value">
{{@user.firstName}}
</span>
</div>
<div class="item" data-test-middlename>
<label for="middlename-{{templateId}}">
{{t "general.middleName"}}:
</label>
<span class="value">
{{@user.middleName}}
</span>
</div>
<div
class="item {{if (includes 'lastName' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-lastname
>
<label for="lastname-{{templateId}}">
{{t "general.lastName"}}:
</label>
<span class="value">
{{@user.lastName}}
</span>
</div>
<div
class="item
{{if (includes 'campusId' this.updatedFieldsFromSync) 'synced-from-directory'}}
campus-id"
data-test-campus-id
>
<label for="campus-id-{{templateId}}">
{{t "general.campusId"}}:
</label>
<span class="value">
{{@user.campusId}}
</span>
</div>
<div class="item" data-test-other-id>
<label for="other-id-{{templateId}}">
{{t "general.otherId"}}:
</label>
<span class="value">
{{@user.otherId}}
</span>
</div>
<div
class="item {{if (includes 'email' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-email
>
<label for="email-{{templateId}}">
{{t "general.email"}}:
</label>
<span class="value">
{{@user.email}}
</span>
</div>
<div
class="item
{{if (includes 'displayName' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-displayname
>
<label for="displayname-{{templateId}}">
{{t "general.displayName"}}:
</label>
<span class="value">
{{@user.displayName}}
</span>
</div>
<div
class="item {{if (includes 'pronouns' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-pronouns
>
<label for="pronouns-{{templateId}}">
{{t "general.pronouns"}}:
</label>
<span class="value">
{{@user.pronouns}}
</span>
</div>
<div
class="item
{{if (includes 'preferredEmail' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-preferred-email
>
<label for="preferred-email-{{templateId}}">
{{t "general.preferredEmail"}}:
</label>
<span class="value">
{{@user.preferredEmail}}
</span>
</div>
<div
class="item {{if (includes 'phone' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-phone
>
<label for="phone-{{templateId}}">
{{t "general.phone"}}:
</label>
<span class="value">
{{@user.phone}}
</span>
</div>
<div
class="item {{if (includes 'username' this.updatedFieldsFromSync) 'synced-from-directory'}}"
data-test-username
>
<label for="username-{{templateId}}">
{{t "general.username"}}:
</label>
<span class="value">
{{this.userAuthentication.username}}
</span>
</div>
{{#if this.canEditUsernameAndPassword}}
<div class="item password" data-test-password>
<label for="password-{{templateId}}">
{{t "general.password"}}:
</label>
<span class="value">
{{#if this.userAuthentication.username}}
*********
{{/if}}
</span>
</div>
{{/if}}
</div>
{{/let}}
35 changes: 35 additions & 0 deletions packages/frontend/app/components/user-profile-bio-details.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
// import { action } from '@ember/object';
// import { service } from '@ember/service';
// import { TrackedAsyncData } from 'ember-async-data';

export default class UserProfileBioDetailsComponent extends Component {
@tracked firstName;
@tracked middleName;
@tracked lastName;
@tracked campusId;
@tracked otherId;
@tracked email;
@tracked displayName;
@tracked pronouns;
@tracked preferredEmail;
@tracked phone;
@tracked username;
@tracked password;

constructor() {
super(...arguments);

this.firstName = this.args.user.firstName;
this.middleName = this.args.user.middleName;
this.lastName = this.args.user.lastName;
this.campusId = this.args.user.campusId;
this.otherId = this.args.user.otherId;
this.email = this.args.user.email;
this.displayName = this.args.user.displayName;
this.pronouns = this.args.user.pronouns;
this.preferredEmail = this.args.user.preferredEmail;
this.phone = this.args.user.phone;
}
}
Loading
Loading