-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip versions of new UserProfileBioDetails and UserProfileBioManager c…
…omponents
- Loading branch information
1 parent
d7c2687
commit 641f252
Showing
4 changed files
with
495 additions
and
0 deletions.
There are no files selected for viewing
135 changes: 135 additions & 0 deletions
135
packages/frontend/app/components/user-profile-bio-details.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
35
packages/frontend/app/components/user-profile-bio-details.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.