profile ing
This commit is contained in:
parent
62c5fa2b99
commit
43169639cd
|
@ -1,4 +1,5 @@
|
|||
<div class="ui-g">
|
||||
<form [formGroup]="modifyForm" (ngSubmit)="modifyProfile()">
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-12 ui-md-3">
|
||||
<p-panel [showHeader]="false">
|
||||
<div class="ui-g">
|
||||
|
@ -16,27 +17,37 @@
|
|||
<div class="ui-g form-group">
|
||||
<div class="ui-g-12 ui-md-6 ui-lg-6">
|
||||
<span class="md-inputfield">
|
||||
<input type="text" pInputText readonly value="overflow@loafle.com" [readonly]="true">
|
||||
<input type="text" pInputText readonly value="{{member.email}}">
|
||||
<label>Email</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6 ui-lg-6">
|
||||
<span class="md-inputfield">
|
||||
<input type="text" pInputText readonly value="overflow" >
|
||||
<input type="text" pInputText value="{{member.name}}" >
|
||||
<label>Name</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6 ui-lg-6">
|
||||
<span class="md-inputfield">
|
||||
<input type="text" pInputText readonly value="loafle" >
|
||||
<input type="text" pInputText value="{{member.companyName}}" >
|
||||
<label>Company Name</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6 ui-lg-6">
|
||||
<span class="md-inputfield">
|
||||
<input type="text" pInputText readonly value="010-4055-6699" >
|
||||
<input type="text" pInputText value="{{member.phone}}" >
|
||||
<label>Phone</label>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-g-12 ui-md-6 ui-lg-6" dir="rtl">
|
||||
<button type="submit" [disabled]="selected" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left" dir="auto">
|
||||
<span class="ui-button-icon-left ui-c fa fa-fw ui-icon-person"></span>
|
||||
<span class="ui-button-text ui-c">Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import { PagesComponent } from 'app/pages/pages.component';
|
||||
|
||||
import * as AuthStore from '../../store/auth';
|
||||
import { Member } from '../../model';
|
||||
import { AuthSelector } from '../../store';
|
||||
import { Store } from '@ngrx/store';
|
||||
import {FormBuilder, FormGroup} from '@angular/forms';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-profile',
|
||||
|
@ -7,9 +16,39 @@ import { Component, OnInit } from '@angular/core';
|
|||
})
|
||||
export class ProfileComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
member: Member;
|
||||
modifyForm: FormGroup;
|
||||
|
||||
constructor(
|
||||
public app: PagesComponent,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
private store: Store<AuthStore.State>,
|
||||
private formBuilder: FormBuilder,
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.store.select(AuthSelector.select('member')).subscribe(
|
||||
(member: Member) => {
|
||||
this.member = member;
|
||||
},
|
||||
(error) => {
|
||||
console.log(error);
|
||||
}
|
||||
);
|
||||
this.initForm();
|
||||
}
|
||||
|
||||
initForm() {
|
||||
this.modifyForm = this.formBuilder.group({
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
modifyProfile() {
|
||||
console.log('clicked');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user