vendor validation removed and vendor menu view based on role
This commit is contained in:
parent
32e47445c6
commit
ac989915e2
@ -5,7 +5,7 @@
|
||||
margin-top: -5px;
|
||||
display: block;
|
||||
}
|
||||
:host /deep/ {
|
||||
:host {
|
||||
mat-sidenav {
|
||||
max-width: 400px;
|
||||
max-height: 500px;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
margin-top: -5px;
|
||||
display: block;
|
||||
}
|
||||
:host /deep/ {
|
||||
:host {
|
||||
// mat-sidenav {
|
||||
// max-width: 400px;
|
||||
// max-height: 500px;
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="regForm.controls['designation'].hasError('required')" class="mat-text-warn">Designation is Required</mat-error>
|
||||
</mat-form-field>
|
||||
</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']" >
|
||||
@ -174,7 +174,8 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="ml-xs mr-xs" *ngIf="regForm.controls['smc_agency_id']">
|
||||
|
||||
<mat-form-field class="ml-xs mr-xs" *ngIf="regForm.controls['smc_agency_id']&& vendor===true ">
|
||||
<mat-select placeholder="Vendor" formControlName="smc_agency_id">
|
||||
<mat-option>
|
||||
Select
|
||||
|
||||
@ -74,6 +74,7 @@ export class RegisterComponent implements OnInit {
|
||||
configdata: any;
|
||||
shortname: any;
|
||||
vendorlist: any;
|
||||
vendor: boolean;
|
||||
constructor(
|
||||
private router: Router, public fb: FormBuilder,public cb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
|
||||
,private elementRef: ElementRef,public users:UserService,notifier:NotifierService,private dialog: MatDialog) {
|
||||
@ -331,6 +332,13 @@ console.log("cog",userData,this.usersData)
|
||||
this.visible = false;
|
||||
// alert(this.visible);
|
||||
}
|
||||
if(e.role_id=='28' ||e.role_id=='29')
|
||||
{
|
||||
this.vendor=true;
|
||||
}
|
||||
else{
|
||||
this.vendor=false;
|
||||
}
|
||||
|
||||
// if(e.value){
|
||||
|
||||
@ -396,7 +404,7 @@ getBranch(flag?){
|
||||
if(this.types[0].entity_type_id == '2' && this.regForm.value.lenVenName.short_name == 'MWISE') {
|
||||
//this.regForm.addControl('user_config',this.addUserConfigControls())
|
||||
this.regForm.addControl('designation',new FormControl('',Validators.required))
|
||||
this.regForm.addControl('smc_agency_id',new FormControl('',Validators.required))
|
||||
this.regForm.addControl('smc_agency_id',new FormControl(''))
|
||||
this.getvendor()
|
||||
this.users.getEntityPreferences(this.regForm.value.lenVenName.entity_id).subscribe(res=>{
|
||||
if(res['dataStatus']) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
@import "../mixins/bi-app/bi-app-ltr";
|
||||
@import "../app.variables";
|
||||
@import "../mixins";
|
||||
:host /deep/ {
|
||||
:host {
|
||||
[appAccordionToggle] {
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -86,7 +86,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.app-dark :host /deep/ {
|
||||
.app-dark :host {
|
||||
.messages-list {
|
||||
.mat-list-item {
|
||||
background: mat-color($dark-background, card);
|
||||
@ -95,7 +95,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
[dir="rtl"] :host /deep/ {
|
||||
[dir="rtl"] :host {
|
||||
.messages-nav {
|
||||
mat-icon {
|
||||
margin-right: 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user