Skip to content

Modular logistics and supply chain operating system (LSOS)

Minor tweaks to user model and profile page

Ronald A. Richardson19341c81e791
diff --git a/console/app/controllers/console/account/index.js b/console/app/controllers/console/account/index.js
index 26fb856a..e0de666e 100644
--- a/console/app/controllers/console/account/index.js
+++ b/console/app/controllers/console/account/index.js
@@ -68,6 +68,7 @@ export default class ConsoleAccountIndexController extends Controller {
subject_uuid: this.user.id,
subject_type: 'user',
type: 'user_avatar',
+ resize: 'md'
},
(uploadedFile) => {
this.user.setProperties({
diff --git a/console/app/serializers/user.js b/console/app/serializers/user.js
index e7f721c2..d0f3c04d 100644
--- a/console/app/serializers/user.js
+++ b/console/app/serializers/user.js
@@ -29,7 +29,7 @@ export default class UserSerializer extends ApplicationSerializer.extend(Embedde
let attrs = normalized.data.attributes || {};
for (let key in attrs) {
- if (attrs[key] === null || attrs[key] === undefined) {
+ if (attrs[key] === null || attrs[key] === undefined || key === 'avatar_url') {
delete attrs[key];
}
}
diff --git a/console/app/templates/console/account/index.hbs b/console/app/templates/console/account/index.hbs
index 70753366..6c373c15 100644
--- a/console/app/templates/console/account/index.hbs
+++ b/console/app/templates/console/account/index.hbs
@@ -4,9 +4,9 @@
<div class="container mx-auto h-screen">
<div class="max-w-3xl my-10 mx-auto">
<ContentPanel @title={{t "common.your-profile"}} @open={{true}} @wrapperClass="bordered-classic">
- <form class="flex flex-col md:flex-row" {{on "submit" (perform this.saveProfile)}}>
+ <form class="flex flex-col items-start md:flex-row" {{on "submit" (perform this.saveProfile)}}>
<div class="w-32 flex flex-col justify-center mb-6 mr-6">
- <Image src={{this.user.avatar_url}} @fallbackSrc={{config "defaultValues.userImage"}} alt={{this.user.name}} class="w-32 h-32 rounded-md" />
+ <Image src={{this.user.avatar_url}} @fallbackSrc={{config "defaultValues.userImage"}} alt={{this.user.name}} class="w-32 h-32 rounded-md mt-1" />
<FileUpload
@name={{t "console.account.index.photos"}}
@accept="image/*"