This commit is contained in:
Akisha 2018-11-08 21:00:22 +05:30
commit 8f3a7e8673
8 changed files with 111 additions and 200 deletions

View File

@ -64,7 +64,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
}
let users= {
'userid':this.currentUser.userid,
'entityid':this.currentUser.fk_entity_id,
'entityid':this.currentUser.fk_entity_type_id,
'profilepic':this.currentUser.profilepic
}
this.users.getprofilepic(users).subscribe(res=>{

View File

@ -193,13 +193,13 @@
<div>
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
<div fxFlex="30%">
<mat-form-field class="ml-xs">
<mat-form-field class="ml-xs" style="width:100%">
<input matInput placeholder="Entity Full Name" formControlName="full_name">
<mat-error *ngIf="submitted && f.full_name.hasError('required')" class="mat-text-warn">You must Include Entity Full Name.</mat-error>
</mat-form-field>
</div>
<div fxFlex="30%">
<mat-form-field class="ml-xs">
<mat-form-field class="ml-xs" style="width:100%">
<input matInput placeholder="Entity Short Name" formControlName="short_name">
<mat-error *ngIf="submitted && f.short_name.hasError('required')" class="mat-text-warn">You must Include Entity Short Name.</mat-error>
</mat-form-field>

View File

@ -96,71 +96,66 @@
<mat-card-title>Role</mat-card-title><hr/>
<mat-card-content>
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select matInput placeholder="Enitity Type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
required>
<mat-option>--</mat-option>
<mat-option *ngFor="let types of types" [value]="types">
{{types.name}}
</mat-option>
</mat-select>
<mat-error *ngIf="regForm.controls['type'].hasError('required') && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '2'">
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
</mat-option>
</mat-select>
<mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Lender Name Required.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '3'">
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
</mat-option>
</mat-select><mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Vendor Name Required.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select matInput placeholder="Enitity Type" (selectionChange)="checktype($event.value)" [formControl]="regForm.controls['type']"
required>
<mat-option>--</mat-option>
<mat-option *ngFor="let types of types" [value]="types">
{{types.name}}
</mat-option>
</mat-select>
<mat-error *ngIf="regForm.controls['type'].hasError('required') && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '2'">
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
</mat-option>
</mat-select>
<mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Lender Name Required.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '3'">
<mat-select matInput placeholder="Vendor Name" [formControl]="regForm.controls['lenVenName']" required>
<mat-option>--</mat-option>
<mat-option *ngFor="let ent of entities" [value]="ent">
{{ent.full_name}}
</mat-option>
</mat-select><mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Vendor Name Required.</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
<mat-option *ngFor="let role of roles" [value]="role" >
{{role.role_name}}
</mat-option>
</mat-select>
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
<mat-error *ngIf="regForm.controls['role'].hasError('required') && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="roleAccess">
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
<mat-option>--</mat-option>
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
{{pd.team_name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-select matInput placeholder="Role" (selectionChange)="toggleAllSelection($event,regForm.controls['type'].value)" [formControl]="regForm.controls['role']" required>
<mat-option *ngFor="let role of roles" [value]="role" >
{{role.role_name}}
</mat-option>
</mat-select>
<div *ngIf="roleload"><mat-progress-bar mode="indeterminate" color="defalut"></mat-progress-bar></div>
<mat-error *ngIf="regForm.controls['role'].hasError('required') && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
<mat-error *ngIf="regForm.controls['role'].errors?.phone && regForm.controls['role'].touched" class="mat-text-warn">User Role Required</mat-error>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="roleAccess">
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" required >
<mat-option>--</mat-option>
<mat-option *ngFor="let pd of pdTeam" [value]="pd" >
{{pd.team_name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</mat-card-content>
</mat-card-content>
</mat-card>
</div>
</div>
</mat-card-content>
</mat-card-content>
<hr>
<mat-card-actions style="text-align:right;">
<mat-card-actions style="text-align:right;">
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>

View File

@ -8,4 +8,7 @@
.hoverdp:hover mat-icon{
display:block;
}
mat-form-field {
width:23%;
}

View File

@ -1,130 +1,43 @@
<div class="user-profile relative">
<div class="profile-cover">
</div>
<div class="">
<!-- <div fxLayout="row" fxLayoutWrap="wrap" class="profile-w">
<div fxFlex.gt-sm="25" fxFlex.gt-xs="25" fxFlex="20">
</div>
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="80" class="user-links">
<ul class="profile-menu">
<li><a href="">Tweets<span class="block text-lg-center">217</span></a></li>
<li><a href="">Followings<span class="block text-lg-center">89</span></a></li>
<li><a href="">Followers<span class="block text-lg-center">78,6790</span></a></li>
<li><a href="">Likes<span class="block text-lg-center">7</span></a></li>
<li><a href="">Moments<span class="block text-lg-center">0</span></a></li>
</ul>
</div>
<div fxFlex.gt-sm="25" fxFlex.gt-xs="25" fxFlex="100" class="align-self-center">
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button">
<span class="button-text">Edit profile</span>
</button>
</div>
</div> -->
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex.gt-sm="25" fxFlex.gt-xs="50" fxFlex="100" class="relative">
<div class="profile-avatar" style="margin-left: 39%;margin-top:-12%;">
<img [src]="profileurl ||''" width="200" height="200" alt="user">
</div>
<div class="profile-info">
<!-- <h3 class="profile-name"><strong>{{userDetails.user_full_name}}</strong></h3>
<span class="user-name">{{userDetails.email}}</span>
<span class="user-name">{{userDetails.mobile_no}}</span>
<span class="pro-des">
</span>
<span><i class="fa fa-map-marker"></i> {{userDetails.addressline1}} {{userDetails.addressline2}}</span>
<span><i class="fa fa-calendar"></i>{{userDetails.addressline3}} {{userDetails.state_name}} - {{userDetails.pincode}}</span>
<span>{{userDetails.createdon | date:'dd MMM yyyy'}}</span> -->
</div>
</div>
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="100" class="mt-1">
<div class="profile-content">
<div class="profile-head">
<div fxFlex.gt-sm="25" fxFlex.gt-xs="25" fxFlexOffset="100" fxFlex="100" class="align-self-center">
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="changePassword()">
<span class="button-text">Change Password</span>
</button>
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="editprofile()">
<span class="button-text">Edit profile</span>
</button>
</div>
<hr>
</div>
<div class="profile-cont">
<ul class="pl-0">
<li>
<mat-card>
<mat-card-content>
<div class="user-profile relative">
<div class="profile-cover">
</div>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex.gt-sm="25" fxFlex.gt-xs="50" fxFlex="100" class="relative">
<div class="profile-avatar" style="margin-left: 39%;margin-top:-12%;">
<img [src]="profileurl || 'https://image.ibb.co/mGjZB9/usernew.png'" width="200" height="200" alt="user">
</div>
</div>
<div fxLayout="row wrap" fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="50" class="align-self-center pt-1" >
<div fxLayout="row">
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15"> <img class="profile-thumb" [src]="profileurl ||''" width="80" height="80" alt="user">
</div>
<div class="pl-1 pr-1 profile-i" fxFlex.xs="85" fxFlex.sm="85" fxFlex.md="85" fxFlex.lg="85" fxFlex.xl="85">
<div>
<span class="post-profile-head">{{userDetails.user_full_name}}</span>
<span class="twitter-uname"><i class="fa fa-email"></i> {{userDetails.email}}</span><br/>
<span class="time">{{userDetails.createdon | date:'dd MMM yyyy'}}</span>
<p><i class="fa fa-mobile"></i> {{userDetails.mobile_no}}</p>
<p>{{userDetails.addressline1}} {{userDetails.addressline2}} <br/>
{{userDetails.addressline3}} - {{userDetails.pincode}} {{userDetails.state_name}}
</p>
</div>
<!-- <div class="profile-action"><a href=""><i class="fa fa-retweet"></i></a><a href=""><i class="fa fa-comment-o"></i></a><a href=""><i class="fa fa-heart-o"></i></a></div> -->
</div>
</div>
</li>
<!-- <li>
<div fxLayout="row">
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15"> <img class="profile-thumb" src="../../../assets/images/test3.jpg" width="80" height="80" alt="user">
</div>
<div class="pl-1 pr-1 profile-i" fxFlex.xs="85" fxFlex.sm="85" fxFlex.md="85" fxFlex.lg="85" fxFlex.xl="85">
<div>
<span class="post-profile-head">Jane Doe</span>
<span class="twitter-uname">@JaneDoe</span>
<span class="time">Sep 11, 2017</span>
<p>
“Tomorrow belongs to those who can hear it coming.” - David Bowie
</p>
</div>
<div class="profile-action"><a href=""><i class="fa fa-retweet"></i></a><a href=""><i class="fa fa-comment-o"></i></a><a href=""><i class="fa fa-heart-o"></i></a></div>
</div>
</div>
</li>
<li>
<div fxLayout="row">
<div fxFlex.xs="15" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="15" fxFlex.xl="15"> <img class="profile-thumb" src="../../../assets/images/test3.jpg" width="80" height="80" alt="user">
</div>
<div class="pl-1 pr-1 profile-i" fxFlex.xs="85" fxFlex.sm="85" fxFlex.md="85" fxFlex.lg="85" fxFlex.xl="85">
<div>
<span class="post-profile-head">Jane Doe</span>
<span class="twitter-uname">@JaneDoe</span>
<span class="time">Sep 13, 2017</span>
<p>our recent work</p>
</div>
<div class="img-wrp" fxLayout="row" fxLayoutWrap="space-around">
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="100">
<div class="thumb-border">
<img src="../../../assets/images/blog-1.jpg" alt="user">
</div>
</div>
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="100">
<div class="thumb-border">
<img src="../../../assets/images/blog-2.jpg" alt="user">
</div>
</div>
</div>
<div class="profile-action"><a href=""><i class="fa fa-retweet"></i></a><a href=""><i class="fa fa-comment-o"></i></a><a href=""><i class="fa fa-heart-o"></i></a></div>
</div>
</div>
</li> -->
</ul>
</div>
</div>
</div>
<div fxFlex.gt-sm="25" fxFlex.gt-xs="50" fxFlex="100" class="align-self-center">
</div>
</div>
</div>
</div>
<div class="pl-1 pr-1 profile-i" fxFlex.xs="85" fxFlex.sm="85" fxFlex.md="85" fxFlex.lg="85" fxFlex.xl="85">
<p> {{userDetails.user_first_name}} {{userDetails.user_last_name}}</p>
<p>{{userDetails.role_name}}</p>
<p> {{userDetails.email}}</p>
<p> {{userDetails.mobile_no}}</p>
<p> {{userDetails.city_name}} ,{{userDetails.state_name}} </p>
</div>
</div>
</div>
<div fxFlex.gt-sm="50" fxFlex.gt-xs="50" fxFlex="50" class="align-self-center pt-1">
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="changePassword()">
<span class="button-text">Change Password</span>
</button>
<button type="button" class="UserActions-editButton edit-button EdgeButton EdgeButton--tertiary" data-scribe-element="profile_edit_button" (click)="editprofile()">
<span class="button-text">Edit Profile</span>
</button>
</div>
</div>
</div>
</div>
</mat-card-content>
</mat-card>

View File

@ -68,7 +68,7 @@ export class UserProfileComponent implements OnInit {
getprofilepic(){
let users= {
'userid':this.userDetails.userid,
'entityid':this.userDetails.fk_entity_id,
'entityid':this.userDetails.fk_entity_type_id,
'profilepic':this.userDetails.profilepic
}
this.users.getprofilepic(users).subscribe(res=>{
@ -85,7 +85,7 @@ export class UserProfileComponent implements OnInit {
@Component({
selector: 'app-jazz-dialog',
template: `
<h5 class="mt-0">New Password Change.</h5>
<h5 class="mt-0">Change Password</h5>
<mat-form-field>
<input matInput placeholder="Old Password" [(ngModel)]="pass.oldPassword" type="password" style="width: 100%;">
@ -99,15 +99,15 @@ export class UserProfileComponent implements OnInit {
<br/>
<mat-form-field>
<input matInput placeholder="ConfirmPassword" [(ngModel)]="pass.confirmPassword" type="password" style="width: 100%;">
<input matInput placeholder="Confirm Password" [(ngModel)]="pass.confirmPassword" type="password" style="width: 100%;">
</mat-form-field>
<small *ngIf="pass.confirmPassword !='' && pass.newPassword != pass.confirmPassword" class="mat-text-warn">Passwords do not math.</small>
<br>
<button mat-raised-button class="mat-green" type="submit" (click)="dialogRef.close(pass)">Submit</button>
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Submit" matTooltipPosition="above" type="submit" (click)="dialogRef.close(pass)"><mat-icon>save</mat-icon></button>
`
})

View File

@ -13,14 +13,14 @@
<mat-error *ngIf="submitted && f.fk_question_category.hasError('required')" class="mat-text-warn">You must Select Category.</mat-error>
</mat-form-field>
</div>
<div fxFlex="50">
<!--<div fxFlex="50">
<mat-form-field>
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
</mat-select>
<mat-error *ngIf="submitted && f.fk_question_group_id.hasError('required')" class="mat-text-warn">You must Select Group.</mat-error>
</mat-form-field>
</div>
</div>-->
</div>
<div fxLayout="row" fxLayoutAlign="start none">
<div class="example-full-width">
@ -58,13 +58,13 @@
<textarea matInput placeholder="Answer" formControlName="answer"></textarea>
</mat-form-field>
</div>
<div fxFlex="30">
<!--<div fxFlex="30">
<mat-form-field>
<mat-select placeholder="Select Group" formControlName="fk_question_group_id">
<mat-option *ngFor="let gp of m_group" [value]="gp.question_group_id">{{ gp.group_name }}</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>-->
<div fxFlex="20">
<span *ngIf="_addQuesFrom.controls.answers.controls.length > 1" (click)="removeLanguage(i)">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>

View File

@ -63,7 +63,7 @@ export class AddComponent implements OnInit {
question: [null, Validators.compose([Validators.required])],
description: [null, Validators.compose([Validators.required])],
fk_question_category: [null, Validators.compose([Validators.required])],
fk_question_group_id: [null, Validators.compose([Validators.required])],
// fk_question_group_id: [null, Validators.compose([Validators.required])],
fk_question_answertype: [null, Validators.compose([Validators.required])],
answers: this._formBuilder.array([
this.initAnswers(),
@ -82,7 +82,7 @@ export class AddComponent implements OnInit {
initAnswers() {
return this._formBuilder.group({
answer: ['', Validators.compose([Validators.required])],
fk_question_group_id: ['']
// fk_question_group_id: ['']
});
}
addLanguage(e) {