diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html index e9bd3494a..6a84f0bbd 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html @@ -52,8 +52,39 @@ - - + + + + + + + + + + + + + + + + + diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts index 0341d3612..042a73e50 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts @@ -72,6 +72,11 @@ export class QcPdReportComponent implements OnInit { spinner_access:boolean=false; private notifier: NotifierService; + +// Menu: any[] = [ +// {state:'reports',name:'Re-Generate'}, +// {state:'sales-pd-list/reports',name:'Download'} +// ]; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent, private dialog: MatDialog, private sanitizer: DomSanitizer) { @@ -243,10 +248,11 @@ export class QcPdReportComponent implements OnInit { // alert(err.html_format); }); } - downloadPDImagesPDF(){ + downloadPDImagesPDF(a){ this.spinner_access=true let data = { "pd_id": this.startPD, + "regenerate":a, "random_string":atob(this.route.snapshot.params['string']) }; this.notifier.notify("info","Processing please wait..") @@ -265,10 +271,12 @@ export class QcPdReportComponent implements OnInit { }); } - archivePDImages(){ + archivePDImages(a){ + let data = { "pd_id": this.startPD, "form_id":"", + "regenerate":a, "random_string":atob(this.route.snapshot.params['string']) }; this.pdTrigerService.archivePDImages(data).subscribe(data => { diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html index a5a2c2653..9b3dcd75c 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html @@ -63,7 +63,7 @@
- Loan Amount + Loan Amount
{{master.loan_amount}} @@ -200,7 +200,7 @@
- + diff --git a/ng6-seed/src/app/settings/service/user.service.ts b/ng6-seed/src/app/settings/service/user.service.ts index 291695c4b..fc0848540 100755 --- a/ng6-seed/src/app/settings/service/user.service.ts +++ b/ng6-seed/src/app/settings/service/user.service.ts @@ -173,7 +173,7 @@ export class UserService { "mobile_no": users.phone, "email": users.email, "isactive":users.isactive, - + "designation":users.designation, "fk_entity_type_id":users.type.entity_type_id, "fk_entity_id":enities, "fk_city":users.city.city_id, diff --git a/ng6-seed/src/app/settings/users/register/register.component.html b/ng6-seed/src/app/settings/users/register/register.component.html index aae7901c6..5fabb2773 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -140,6 +140,7 @@ User Role Required User Role Required + @@ -148,6 +149,15 @@ Branch is Required + + + + + {{des.designation}} + + + Designation is Required + diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 73cf8b722..9ad8dc7df 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -8,6 +8,7 @@ import { FileUploader } from 'ng2-file-upload/ng2-file-upload'; // import { SharedService } from '../../shared.service'; 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'; @@ -35,6 +36,7 @@ export class RegisterComponent implements OnInit { product: any = []; img: any; roles: any; + types: any = []; loader:boolean = false; roleAccess:boolean = false; @@ -47,7 +49,7 @@ export class RegisterComponent implements OnInit { entityType: any; City: any = []; State: any; - designation: any; + hierarchy:any=[]; files: File = null usersData: any; @@ -64,6 +66,7 @@ export class RegisterComponent implements OnInit { branchList: any; enableBranch: boolean=false; productsList: any = []; + Designation: any= []; constructor( private router: Router, public fb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef ,private elementRef: ElementRef,public users:UserService,notifier:NotifierService) { @@ -74,7 +77,6 @@ export class RegisterComponent implements OnInit { if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined) { } else { - this.regdata(); } @@ -139,12 +141,15 @@ export class RegisterComponent implements OnInit { this.Cities = this.Cities.records.filter(City=>City.isactive ==1); } }); + this.users.State().subscribe(res => { this.State = res; if (this.State.status == 200) { this.State = this.State.records.filter(state=>state.isactive ==1); } }); + + this.users.pdTeam().subscribe(res=>{ @@ -189,6 +194,8 @@ export class RegisterComponent implements OnInit { register(userData) { if(this.regForm.invalid){ + //console.log(this.regForm.value); + //return; // this.notifier.notify('success','Please Fill all the Fields') Swal('Please Fill all the Fields'); const invalid = []; @@ -312,33 +319,45 @@ getBranch(flag?){ } getcity(e){ - // console.log(e); - // console.log(this.Cities); - - + this.City = this.Cities.filter(city=>city.fk_state_id == e.value.state_id); - } checkUserConfigAvail() { console.log(this.types[0].entity_type_id,this.regForm.value.lenVenName) 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.users.getEntityPreferences(this.regForm.value.lenVenName.entity_id).subscribe(res=>{ if(res['dataStatus']) { this.productsList = res['records'].salespd_products if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined && this.users.localUserId.user_config) { this.regForm.get('user_config')['controls']['salespd_products'].setValue(this.users.localUserId.user_config.salespd_products) + + //this.regForm.get('designation').setValue(this.users.localUserId.designation) } + else { this.regForm.get('user_config')['controls']['salespd_products'].setValue(this.productsList.map(item=>item.product_id)) } } }) console.log(this.regForm.value) + this.users.designation().subscribe(res=>{ + if(res['dataStatus']) { + this.Designation = res['records']; + if (this.users.localUserId != '' && this.users.localUserId != null && this.users.localUserId !== undefined && this.users.localUserId.user_config) { + // this.regForm.get('user_config')['controls']['salespd_products'].setValue(this.users.localUserId.user_config.salespd_products) + + this.regForm.get('designation').setValue(this.users.localUserId.designation) + } + + } + }) } else { this.regForm.removeControl('user_config') + this.regForm.removeControl('designation') } } userupdate() { diff --git a/ng6-seed/src/app/shared/menu-items/menu-items.ts b/ng6-seed/src/app/shared/menu-items/menu-items.ts index 7e38621a9..28b6c8aa8 100755 --- a/ng6-seed/src/app/shared/menu-items/menu-items.ts +++ b/ng6-seed/src/app/shared/menu-items/menu-items.ts @@ -108,7 +108,7 @@ const MENUITEMS : Menu[] = [ }, // { // state:'reports', - // name:'Reports', + // name:'Reports', // type:'link', // icon:'report', // }