Skip to content

Commit

Permalink
Merge pull request #99 from acmauth/Personal-info-page
Browse files Browse the repository at this point in the history
Added unique identifier (APM)
  • Loading branch information
Christos Balaktsis authored Mar 3, 2024
2 parents 9a62921 + 501e1a6 commit 5ecf9cc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions StudentCompanion
Submodule StudentCompanion added at 294e42
12 changes: 12 additions & 0 deletions src/lib/components/personalInfo/infoItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* @type {any}
*/
export let aem;
/**
* @type {any}
*/
export let apm;
/**
* @type {any}
*/
Expand Down Expand Up @@ -84,6 +88,14 @@
</ion-item>
{/if}

{#if apm}
<ion-item>
<ion-icon size="small" icon={allIonicIcons.idCard} />

<ion-label class="ion-padding-start">{apm}</ion-label>
</ion-item>
{/if}

{#if birthDate}
<ion-item>
<ion-icon size="small" icon={allIonicIcons.calendar} />
Expand Down
5 changes: 4 additions & 1 deletion src/routes/pages/personalInfo/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// Keep personal info
let aem = '';
let apm = '';
let inscriptionYear = '';
let schoolGraduated = '';
let birthDate = '';
Expand All @@ -29,6 +30,7 @@
let department = await neoUniversisGet('Students/me/department',{lifetime: 86000});
let user = await neoUniversisGet('Users/me',{lifetime: 86000});
aem = personalData.studentIdentifier;
apm = personalData.uniqueIdentifier;
inscriptionYear = personalData.inscriptionYear.name;
schoolGraduated = personalData.schoolGraduated;
birthDate = personalData.person.birthDate.slice(0, 10);
Expand Down Expand Up @@ -67,7 +69,8 @@
{#await getPersonalInfo()}
<PersonSkeleton />
{:then}
<InfoItem gender = {gender} aem = {aem} schoolGraduated = {schoolGraduated} birthDate = {birthDate} email = {email} familyName = {familyName} givenName = {givenName} username = {username} departmentName = {departmentName} semester = {semester} />
<InfoItem gender = {gender} aem = {aem} apm = {apm} schoolGraduated = {schoolGraduated} birthDate = {birthDate} email = {email} familyName = {familyName} givenName = {givenName}
username = {username} departmentName = {departmentName} semester = {semester} />
{:catch error}
<ErrorLandingCard errorMsg={error.message}/>
{/await}
Expand Down

0 comments on commit 5ecf9cc

Please sign in to comment.