aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/app/_data/User.ts4
-rw-r--r--frontend/src/app/_modals/register-modal/register-modal.component.ts4
-rw-r--r--frontend/src/app/_pages/profile/profile.component.ts9
3 files changed, 14 insertions, 3 deletions
diff --git a/frontend/src/app/_data/User.ts b/frontend/src/app/_data/User.ts
index be42ed0a..527bac77 100644
--- a/frontend/src/app/_data/User.ts
+++ b/frontend/src/app/_data/User.ts
@@ -6,6 +6,8 @@ export default class User {
public password: string = '',
public firstName: string = '',
public lastName: string = '',
- public photoId: string = '1' //difoltna profilna slika
+ public photoId: string = '1', //difoltna profilna slika
+ public isPermament:boolean=false,
+ public dateCreated:Date=new Date()
) { }
} \ No newline at end of file
diff --git a/frontend/src/app/_modals/register-modal/register-modal.component.ts b/frontend/src/app/_modals/register-modal/register-modal.component.ts
index 9da5484d..575fc717 100644
--- a/frontend/src/app/_modals/register-modal/register-modal.component.ts
+++ b/frontend/src/app/_modals/register-modal/register-modal.component.ts
@@ -150,7 +150,9 @@ export class RegisterModalComponent implements OnInit {
username: this.username,
password: this.pass1,
email: this.email,
- photoId: "1"
+ photoId: "1",
+ isPermament:true,
+ dateCreated:new Date()
}
this.authService.register(user)
diff --git a/frontend/src/app/_pages/profile/profile.component.ts b/frontend/src/app/_pages/profile/profile.component.ts
index ae9fb12c..fdcd347c 100644
--- a/frontend/src/app/_pages/profile/profile.component.ts
+++ b/frontend/src/app/_pages/profile/profile.component.ts
@@ -28,6 +28,8 @@ export class ProfileComponent implements OnInit {
newPass2: string = '';
photoId: string = '';
photoPath: string = '';
+ isPermament:boolean=false;
+ dateCreated:Date=new Date();
wrongPassBool: boolean = false;
wrongNewPassBool: boolean = false;
@@ -60,6 +62,9 @@ export class ProfileComponent implements OnInit {
this.firstName = this.user.firstName;
this.lastName = this.user.lastName;
this.photoId = this.user.photoId;
+ this.dateCreated=this.user.dateCreated;
+ this.isPermament=this.user.isPermament;
+
for (let i = 0; i < this.pictures.length; i++) {
if (this.pictures[i].photoId.toString() === this.photoId) {
@@ -81,7 +86,9 @@ export class ProfileComponent implements OnInit {
password: this.user.password,
firstName: this.firstName,
lastName: this.lastName,
- photoId: this.photoId
+ photoId: this.photoId,
+ isPermament:this.isPermament,
+ dateCreated:this.dateCreated
}
this.userInfoService.changeUserInfo(editedUser).subscribe((response: any) =>{