mp-common
Version:
This is XPO MarketPlace common libary
32 lines (26 loc) • 970 B
text/typescript
import { Component, OnInit, Input } from '@angular/core';
import { UserProfileService, UserProfile } from '../shared';
import { BreadCrumbService } from '@xpo/common';
({
selector: 'app-user-profile',
templateUrl: './user-profile.component.html',
styleUrls: [ './user-profile.component.scss' ]
})
export class UserProfileComponent implements OnInit {
public updateProfileInfo: UserProfile;
private userId: number;
public userProfile: UserProfile;
constructor(private userProfileService: UserProfileService, private bcService: BreadCrumbService) {
this.bcService.setCrumbs({ breadcrumb: [ { name: 'MY PROFILE', link: './' }] });
this.userId = 1;
this.userProfileService.getUserProfile(this.userId).then(user => {
this.userProfile = user;
});
}
ngOnInit() {
}
onSaveProfile() {
this.userProfileService.setUpdatedUserProfile(this.userProfile).then(userProfile => {
});
}
}