Skip to content

Commit

Permalink
Merge pull request #21 from visagang/main
Browse files Browse the repository at this point in the history
Update my profile
  • Loading branch information
Oceania2018 authored Jan 23, 2024
2 parents 0a503e0 + 4c0f344 commit 749e897
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/lib/helpers/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
* @property {string} [last_name] - The user last name.
* @property {string} [full_name] - The user full name.
* @property {string} [email] - The user email.
* @property {string} [external_id] - The user external id.
* @property {string} [create_date] - The user create date.
* @property {string} [update_date] - The user update date.
* @property {string} [role] - The user role.
* @property {string} [avatar] - The user avatar.
* @property {string} [color]
Expand Down
22 changes: 19 additions & 3 deletions src/routes/page/user/me/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import { myInfo } from '$lib/services/auth-service';
import Loader from '$lib/common/Loader.svelte';
/**
* @type {{ full_name: any; id?: string; user_name?: string | undefined; first_name?: string | undefined; last_name?: string | undefined; email?: string | undefined; role?: string | undefined; avatar?: string | undefined; color?: string | undefined; token?: string | undefined; }}
*/
/** @type {import('$types').UserModel} */
let currentUser;
let isLoading = false;
onMount(async () => {
Expand Down Expand Up @@ -77,6 +75,24 @@
{currentUser?.email ?? "N/A"}
</td>
</tr>
<tr>
<th>External Id:</th>
<td>
{currentUser?.external_id ?? "N/A"}
</td>
</tr>
<tr>
<th>Update Date:</th>
<td>
{currentUser?.update_date ? new Date(currentUser?.update_date).toLocaleString() : "N/A"}
</td>
</tr>
<tr>
<th>Create Date:</th>
<td>
{currentUser?.create_date ? new Date(currentUser?.create_date).toLocaleString() : "N/A"}
</td>
</tr>
</tbody>
</Table>
</div>
Expand Down

0 comments on commit 749e897

Please sign in to comment.