latest change add state

This commit is contained in:
gayathri1990 2021-03-18 21:40:36 +05:30
parent 7ab103f733
commit b40632772a
5 changed files with 173 additions and 13 deletions

Binary file not shown.

View File

@ -174,16 +174,68 @@
</div>
<mat-card *ngIf="regForm.controls['user_config']">
<mat-card-title>Configurations</mat-card-title><hr/>
<mat-card-content>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 50%;">
<mat-select multiple placeholder="Sales Products" [formControl]="regForm.get('user_config')['controls']['salespd_products']" [disabled] = "productsList.length == 0">
<mat-option *ngFor="let pd of productsList" [value]="pd.product_id" >
{{pd.product_name}}
</mat-option>
</mat-select>
<mat-error align="end" *ngIf="regForm.get('user_config')['controls']['salespd_products'].hasError('required')">Sales Products required</mat-error>
</mat-form-field>
</mat-card-content>
<!--******************************************-->
<mat-card class="p-2" style="box-shadow: 0 0 1px rgba(0,0,0,.18), 0 0 1px rgba(0,0,0,.15) !important">
<mat-tab-group >
<mat-tab>
<ng-template mat-tab-label>Sales Product</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData)"><mat-icon>edit</mat-icon></button>
</div>
<mat-card-header>
<mat-card-title style="color:red !important;">Applicants</mat-card-title>
</mat-card-header> -->
<mat-card-content>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 50%;">
<mat-select multiple placeholder="Sales Products" [formControl]="regForm.get('user_config')['controls']['salespd_products']" [disabled] = "productsList.length == 0">
<mat-option *ngFor="let pd of productsList" [value]="pd.product_id" >
{{pd.product_name}}
</mat-option>
</mat-select>
<mat-error align="end" *ngIf="regForm.get('user_config')['controls']['salespd_products'].hasError('required')">Sales Products required</mat-error>
</mat-form-field>
</mat-card-content>
<ng-template>
<mat-card-content>
<p>No Sales Product</p>
</mat-card-content>
</ng-template>
</mat-tab>
<mat-tab *ngIf="visible === true">
<ng-template mat-tab-label>State Mapping</ng-template>
<!-- <div class="cardEdit" *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED || currentPDStatus==pdStatusCheck.SCHEDULED">
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editAdditionalRequirement(pdAdditionalReqData)"><mat-icon>edit</mat-icon></button>
</div> -->
<!-- <mat-card-header>
<mat-card-title style="color:red !important;">Additional Requirements</mat-card-title>
</mat-card-header> -->
<mat-card-content >
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
<mat-select multiple matInput placeholder="State" [formControl]="regForm.controls['state']" required (selectionChange)="getcity($event)" >
<mat-option>--</mat-option>
<mat-option *ngFor="let s of State" [value]="s" >
{{s.name}}
</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>
</mat-card-content>
<ng-template>
<mat-card-content>
<p>No State Mapping</p>
</mat-card-content>
</ng-template>
</mat-tab>
</mat-tab-group>
</mat-card>
<!--*************************-->
</mat-card>
</div>
</mat-card-content>

View File

@ -11,4 +11,96 @@
mat-form-field {
width:23%;
}
.cardEdit {
float:right;
padding-top:3%;
}
.minheight {
min-height: 100%;
}
::ng-deep .body-container{
padding: 0rem !important;
}
.metaDataStyle{
height:89px !important;
}
.odd{
padding: 10px;
background-color:rgb(235, 231, 231);
border-radius: 5px;
// // font-size: 34px;
}
.even{
padding: 10px;
// background-color:rgb(255, 242, 242);
background-color:rgb(243, 240, 240);
border-radius: 5px;
// font-size: 22px;
}
// .headerdesign{
// border-radius: 5px !important;
// // border-bottom-left-radius: 5px !important;
// // border-bottom-right-radius: 5px !important;
// box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important;
// }
:host {
margin-left: -5px;
margin-right: -5px;
margin-top: -5px;
display: block;
}
.wrapper {
margin: 6px;
}
.content-data{
h2{
font-size: 1.5rem;
}
}
@media(max-width:767px){
.profile-center{
text-align: center;
}
}
.notify_duplicate{
padding: 10px;
//background-color: yellow;
text-align: center;
border-radius: 4px;
font-size: 14px;
}
.exist_pd_link{
text-decoration: underline;
color: red;
}
.exist_pd_link :hover{
text-decoration: none;
}
// .mat-list .mat-list-item.center .mat-list-item-content{
// justify-content: center;
// // color: #fff
// }
// .mat-list .mat-list-item.center .mat-list-text>*{
// margin: 0 auto 0 0;
// }
.fab-group{
// app-speed-dial-fab {
position: absolute;
@media(min-width:500px) {
// right: 415px;
}
// }
}
.mat-tooltip{
font-size: 12px !important;
}

View File

@ -7,6 +7,8 @@ import { CustomValidators } from 'ng2-validation';
import { FileUploader } from 'ng2-file-upload/ng2-file-upload';
// import { SharedService } from '../../shared.service';
import { MatOption } from '@angular/material';
import { MatDialog } from '@angular/material';
import {MatTabsModule} from '@angular/material';
import { UserService } from '../../service/user.service';
import { ifStmt } from '@angular/compiler/src/output/output_ast';
@ -67,9 +69,10 @@ export class RegisterComponent implements OnInit {
enableBranch: boolean=false;
productsList: any = [];
Designation: any= [];
visible: boolean=false;
constructor(
private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
,private elementRef: ElementRef,public users:UserService,notifier:NotifierService) {
,private elementRef: ElementRef,public users:UserService,notifier:NotifierService,private dialog: MatDialog) {
this.notifier=notifier
// console.log(this.notifier)
}
@ -265,7 +268,19 @@ console.log("cog",userData,this.usersData)
}
toggleAllSelection(e,enitiyid,flag?) {
console.log(enitiyid,e);
//console.log(e);
//sconsole.log(e.role_name);
if(e.role_name=='Regional credit Manager')
{
this.visible = true;
// alert(this.visible);
}
else
{
this.visible = false;
// alert(this.visible);
}
// if(e.value){
// if(e.value.role_name == pdoff && enitiyid.entity_type_id == 1){

View File

@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
MatCardModule,
MatCardModule,MatTabsModule,
MatIconModule,
MatInputModule,
MatRadioModule,
@ -31,6 +31,7 @@ import { NewPasswordDialog, ForgotPass } from '../../session/login/login.compone
CommonModule,
RouterModule.forChild(UserRoutes),
MatCardModule,
MatTabsModule,
MatIconModule,
MatInputModule,
MatRadioModule,