Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
407f45eada
3616
ng6-seed/package-lock.json
generated
3616
ng6-seed/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.6.1",
|
||||
"@angular-devkit/build-angular": "^0.6.8",
|
||||
"@angular/cli": "^6.0.0-rc.5",
|
||||
"@angular/compiler-cli": "^6.0.0-rc.5",
|
||||
"@types/aws-sdk": "^2.7.0",
|
||||
|
||||
@ -8,10 +8,8 @@
|
||||
<div dividerColor="primary" class="ml-xs mr-xs">
|
||||
<div style="font-size:24px;"> User Registration</div>
|
||||
</div>
|
||||
<div dividerColor="primary" class="ml-xs mr-xs">
|
||||
|
||||
<div dividerColor="primary" class="ml-xs mr-xs" style="text-align: right;margin-top: -4%;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Close" matTooltipPosition="above"(click)="back()"><mat-icon>close</mat-icon></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap">
|
||||
@ -19,19 +17,21 @@
|
||||
<mat-card>
|
||||
<mat-card-title>Personal</mat-card-title><hr/>
|
||||
<mat-card-content>
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2" style="display: inline-flex;">
|
||||
<span dividerColor="primary" class="ml-xs mr-xs" *ngIf="profileaccess">
|
||||
<img [src]="profileurl" style="width: 10%;border-radius: 50%;"></span>
|
||||
<div style="width:80%">
|
||||
User Profile
|
||||
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" accept="image/*" />
|
||||
<br/>
|
||||
<div *ngIf="imageaccess">
|
||||
<img [src]="filename" style="width: 14%; border-radius: 50%;">
|
||||
</div>
|
||||
<span *ngIf="usersData !=''">
|
||||
{{img}}
|
||||
<img [src]="profileurl" style="width: 50%;border-radius: 50%;">
|
||||
</span>
|
||||
<span *ngIf="imageaccess">
|
||||
<img [src]="filename" style="width: 50%; border-radius: 50%;">
|
||||
</span>
|
||||
<div style="width:60%">
|
||||
Profile Picture
|
||||
<input type="file" (change)="onFileChange($event)" [formControl]="regForm.controls['userpic']" accept="image/*" />
|
||||
|
||||
|
||||
<!-- <span *ngIf="usersData !=''">
|
||||
{{img}}
|
||||
</span> -->
|
||||
</div>
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||
<input matInput placeholder="First Name" [formControl]="regForm.controls['firstName']" required>
|
||||
@ -40,7 +40,7 @@
|
||||
<mat-error *ngIf="regForm.controls['firstName'].hasError('maxlength') && regForm.controls['firstName'].touched" class="mat-text-warn">Not More Than 10 Characters.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||
<input matInput placeholder="Last Name" [formControl]="regForm.controls['lastName']" required>
|
||||
@ -51,7 +51,7 @@
|
||||
<mat-form-field style="display: none;">
|
||||
<input matInput placeholder="User Id" [formControl]="regForm.controls['userid']">
|
||||
</mat-form-field>
|
||||
<br>
|
||||
|
||||
|
||||
<mat-slide-toggle color="primary" [formControl]="regForm.controls['isactive']">
|
||||
Isactive
|
||||
@ -60,7 +60,6 @@
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
<div fxFlex.gt-sm="33.33%" fxFlex="50" class="m-gap p-gap">
|
||||
<mat-card>
|
||||
@ -72,7 +71,7 @@
|
||||
<mat-error *ngIf="regForm.controls['email'].hasError('required') && regForm.controls['email'].touched" class="mat-text-warn">email Address Required.</mat-error>
|
||||
<mat-error *ngIf="regForm.controls['email'].errors?.email && regForm.controls['email'].touched" class="mat-text-warn">Invalid Email Address.</mat-error>
|
||||
</mat-form-field>
|
||||
<br>
|
||||
|
||||
<!-- <mat-form-field dividerColor="primary" class="ml-xs mr-xs">
|
||||
<input matInput placeholder="Alt Email address" [formControl]="regForm.controls['altemail']" type="email">
|
||||
</mat-form-field> -->
|
||||
@ -82,7 +81,7 @@
|
||||
<mat-error *ngIf="regForm.controls['phone'].errors?.phone && regForm.controls['phone'].touched" class="mat-text-warn">Invalid Phone Number.</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<br>
|
||||
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||
<mat-select matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
|
||||
<mat-option>--</mat-option>
|
||||
@ -91,7 +90,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="regForm.controls['state'].hasError('required') && regForm.controls['state'].touched" class="mat-text-warn">State Required.</mat-error>
|
||||
</mat-form-field><br>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||
<mat-select matInput placeholder="City" [formControl]="regForm.controls['city']" required>
|
||||
@ -172,7 +171,9 @@
|
||||
<mat-error *ngIf="regForm.controls['city'].hasError('required') && regForm.controls['city'].touched" class="mat-text-warn">city Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>-->
|
||||
<mat-card> <mat-card-title>Role</mat-card-title><hr/>
|
||||
<mat-card>
|
||||
|
||||
<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" >
|
||||
@ -187,7 +188,7 @@
|
||||
<mat-error *ngIf="regForm.controls['type'].errors?.phone && regForm.controls['type'].touched" class="mat-text-warn">Enitity Type Required</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<br>
|
||||
|
||||
<!-- <span *ngIf="roleload"> -->
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="typeValue == '2'">
|
||||
<mat-select matInput placeholder="Lender Name" [formControl]="regForm.controls['lenVenName']" required>
|
||||
@ -199,7 +200,6 @@
|
||||
<mat-error *ngIf="regForm.controls['lenVenName'].hasError('required') && regForm.controls['lenVenName'].touched" class="mat-text-warn">Lender Name Required.</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<div></div>
|
||||
<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>
|
||||
@ -209,7 +209,6 @@
|
||||
</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>
|
||||
<div></div>
|
||||
|
||||
<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>
|
||||
@ -223,8 +222,29 @@
|
||||
<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>
|
||||
<!-- <div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||
|
||||
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||
<mat-select matInput placeholder="PD Type" [formControl]="regForm.controls['pdtype']" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
||||
{{PDT.type_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
</div>-->
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
@ -249,26 +269,7 @@
|
||||
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="mb-2">
|
||||
<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-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 30%;" *ngIf="roleAccess">
|
||||
<mat-select matInput placeholder="PD Type" [formControl]="regForm.controls['pdtype']" required>
|
||||
<mat-option>--</mat-option>
|
||||
<mat-option *ngFor="let PDT of pdType" [value]="PDT">
|
||||
{{PDT.type_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<hr>
|
||||
|
||||
@ -9,7 +9,8 @@ import { FileUploader } from 'ng2-file-upload/ng2-file-upload';
|
||||
import { MatOption } from '@angular/material';
|
||||
import { UserService } from '../../service/user.service';
|
||||
import { ifStmt } from '@angular/compiler/src/output/output_ast';
|
||||
|
||||
/**sweet alert */
|
||||
import Swal from 'sweetalert2';
|
||||
|
||||
const pdoff = "PD Officer";
|
||||
const pdexu = "PD Executive";
|
||||
@ -199,7 +200,7 @@ this.loader = true;
|
||||
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => {
|
||||
this.loader =false;
|
||||
console.log(res);
|
||||
alert('user Created');
|
||||
Swal('user Created');
|
||||
this.router.navigate(['setting/users/userlist']);
|
||||
});
|
||||
}
|
||||
@ -215,7 +216,7 @@ this.loader = true;
|
||||
});}
|
||||
this.users.saveRecords(res,userData).subscribe(res=>{
|
||||
this.loader = false;
|
||||
alert('Update User');
|
||||
Swal('Update User');
|
||||
this.router.navigate(['setting/users/userlist']);
|
||||
//this.shared.redirectTo('settings/userListing');
|
||||
delete this.AWS.localUserId;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user