+ *ngIf="(sup.get('business_assets_mode').value != '') && sup.get('business_ownership_type').value == 'owned' && lender_short_name != 'CLIX'">
appt.applicant_type != 2)
this.applicants.push({ 'pd_co_applicant_id': '0', 'applicant_name': 'Others' });
@@ -95,6 +98,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
ngOnInit() {
console.clear();
+ console.log("len",this.lender_short_name)
// this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid,'').subscribe(data => {
// this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
index 3e5a295b4..3315a2ed2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html
@@ -124,7 +124,7 @@
-
+
Add Other Family Members Involved In Business
@@ -1557,9 +1557,9 @@
type="number" formControlName="employees_permanent" required>
Permanent Required
-
+
+ type="number" formControlName="employees_temporary" >
Temporary Required
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
index a0b307ea4..163ee29cf 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts
@@ -172,7 +172,7 @@ export class BusinessInfoComponent implements OnInit {
//const Desgn = this.businessForm.controls['designation'];
const Partnr: any = this.businessForm.controls['partners'];
const otherDoc = this.businessForm.controls['documents'];
- const personRel = this.businessForm.controls['persons_with_relationships'];
+ const personRel = this.businessForm.controls['persons_with_relationships']
const businessActivityControl = this.businessForm.controls['select_business_activity_type'];
const manufacturingControl: any = this.businessForm.controls['manufacturing_activity_details'];
const retailControl: any = this.businessForm.controls['retail_trading_activity_details'];
@@ -244,6 +244,7 @@ export class BusinessInfoComponent implements OnInit {
//businessVal.designation = DesgnArray;
businessVal.partners = PartnrArray;
businessVal.documents = DocArray;
+ if(this.lender_short_name != 'CLIX'){
if (data.records.persons_with_relationships) {
let selectedFamilyMember = Object.keys(data.records.persons_with_relationships).map(function (key) {
return data.records.persons_with_relationships[key];
@@ -263,6 +264,11 @@ export class BusinessInfoComponent implements OnInit {
businessVal.persons_with_relationships = [];
}
+ }
+ else {
+ businessVal.persons_with_relationships = [];
+
+ }
// find exist and non-exist businees activity type list
let activityData = this.activityData.map(item => ({ name: item.name, type_of_activity_id: item.type_of_activity_id }))
@@ -373,10 +379,12 @@ export class BusinessInfoComponent implements OnInit {
});
if (selectedRetail.length > 0) {
selectedRetail.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
+ if(this.lender_short_name != 'CLIX'){
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedRetail.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
selectedRetail.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+ }
selectedRetail.forEach((element, index) => {
this.CheckExport(element.area_of_sale, 'RActivity', index);
@@ -438,10 +446,12 @@ export class BusinessInfoComponent implements OnInit {
});
if (selectedWholesale.length > 0) {
selectedWholesale.length > 0 ? this.businessForm.addControl('export_import_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('export_import_cert');
+ if(this.lender_short_name != 'CLIX'){
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedWholesale.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
selectedWholesale.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+ }
selectedWholesale.forEach((element, index) => {
this.CheckExport(element.area_of_sale, 'WActivity', index);
@@ -505,10 +515,12 @@ export class BusinessInfoComponent implements OnInit {
});
if (selectedService.length > 0) {
selectedService.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl('', Validators.required)) : this.businessForm.removeControl('practice_cert');
+ if(this.lender_short_name != 'CLIX'){
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl('')) : this.businessForm.removeControl('applicant_use_mobile_wallets');
selectedService.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl('')) : this.businessForm.removeControl('applicant_use_pos_machines');
selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('no_of_pos_machines', new FormControl('')) : this.businessForm.removeControl('no_of_pos_machines');
selectedService.length > 0 && businessVal.applicant_use_pos_machines == 'yes' ? this.businessForm.addControl('pos_machines_details', this.fb.array([])) : this.businessForm.removeControl('pos_machines_details');
+ }
selectedService.forEach((element, index) => {
this.CheckExport(element.area_of_sale, 'SPActivity', index);
@@ -629,11 +641,13 @@ export class BusinessInfoComponent implements OnInit {
this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
+ if(this.lender_short_name != 'CLIX'){
// change relation with businees update dat sorce table
this.businessForm.controls['persons_with_relationships'].valueChanges.subscribe(val => {
let relationControl = this.businessForm.controls['persons_with_relationships'];
this.relationSource.data = relationControl.controls;
});
+ }
// change business sessional
this.businessForm.controls['seasonality'].valueChanges.subscribe(val => {
@@ -659,7 +673,7 @@ export class BusinessInfoComponent implements OnInit {
partners: this.fb.array([]),
employees_total: [''],
employees_permanent: ['', Validators.compose([Validators.required])],
- employees_temporary: ['', Validators.compose([Validators.required])],
+ employees_temporary: [''],
employees_appx_salary: ['', Validators.compose([Validators.required])],
officer_total: ['' || null, Validators.compose([Validators.required])],
was_the_company_name_board_sighted: ['', Validators.compose([Validators.required])],
@@ -689,6 +703,9 @@ export class BusinessInfoComponent implements OnInit {
service_provider_activity_details: this.fb.array([]),
// others_activity_details: this.fb.array([]),
});
+ if(this.lender_short_name == 'CLIX'){
+ this.businessForm.removeControl('persons_with_relationships');
+ }
}
// businees activity type change event
@@ -766,6 +783,7 @@ export class BusinessInfoComponent implements OnInit {
this.businessForm.value.service_provider_activity_details.length > 0 ? this.businessForm.addControl('practice_cert', new FormControl(this.businessForm.value.practice_cert, Validators.required)) : this.businessForm.removeControl('practice_cert');
// check activity for extra question make dynamic
+ if(this.lender_short_name != 'CLIX'){
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_mobile_wallets', new FormControl(this.businessForm.value.applicant_use_mobile_wallets)) : this.businessForm.removeControl('applicant_use_mobile_wallets');
this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0 ? this.businessForm.addControl('applicant_use_pos_machines', new FormControl(this.businessForm.value.applicant_use_pos_machines)) : this.businessForm.removeControl('applicant_use_pos_machines');
if (this.businessForm.value.service_provider_activity_details.length > 0 || this.businessForm.value.retail_trading_activity_details.length > 0 || this.businessForm.value.wholesale_trading_activity_details.length > 0) {
@@ -774,6 +792,7 @@ export class BusinessInfoComponent implements OnInit {
}
this.changePOSMachinesAvailablity(this.businessForm.value.applicant_use_pos_machines, 2);
}
+ }
if (this.ManufacturingUnChecked || this.ManufacturingUnChecked == undefined && this.RetailedUnChecked || this.RetailedUnChecked == undefined && this.WholeSalesUnChecked || this.WholeSalesUnChecked == undefined && this.ServiceUnChecked || this.ServiceUnChecked == undefined) {
this.ExportFlag = false;
}
@@ -1491,6 +1510,7 @@ export class BusinessInfoComponent implements OnInit {
}
if (!this.businessForm.valid) {
+ console.log(this.businessForm.value);
this.notifier.notify('warning', "Please Check All Manatory Fields..");
return;
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
index f333a7f4e..0497bff42 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/client-info/client-info.component.html
@@ -55,7 +55,7 @@
-
+
Select
@@ -103,7 +103,7 @@
Enter Valid LandLine Number.
-
+
@@ -375,7 +375,7 @@
Enter Valid LandLine Number.
-
+
-
+
@@ -261,6 +261,23 @@
+
+
+
+
+ Family Details of {{FamilyMemberAsLabel[ix]}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
index 5d6485c1b..a59454f2d 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/family-details/family-details.component.ts
@@ -57,6 +57,7 @@ export class FamilyDetailsComponent implements OnInit {
earningStatus = [{ id: 1, type: 'Earning' },
{ id: 2, type: 'Non Earning' }]
documentsAndFilesList : any = [];
+ lender_short_name: any;
/** constructor Of the class */
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router,
@@ -69,6 +70,7 @@ export class FamilyDetailsComponent implements OnInit {
this.notifier = notifier;
this.selectPerson = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type != '2');
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
+ this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name;
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
@@ -298,6 +300,8 @@ export class FamilyDetailsComponent implements OnInit {
residence_ownership: ['', Validators.compose([])],
ownershipOther: [''],
rent: [''],
+ no_family_mem_clix:[''],
+ no_dependents_clix:[''],
// total_number_of_family_members: ['', Validators.compose([Validators.min(1), Validators.max(20)])],
family_members_details: this.fb.array([]),
});
@@ -325,6 +329,8 @@ export class FamilyDetailsComponent implements OnInit {
residence_ownership: [val.residence_ownership, Validators.compose([])],
ownershipOther: [val.ownershipOther || null],
rent: [val.rent || null],
+ no_family_mem_clix:[val.no_family_mem_clix || ''],
+ no_dependents_clix:[val.no_dependents_clix || ''],
// total_number_of_family_members: [val.total_number_of_family_members, Validators.compose([Validators.min(1), Validators.max(20)])],
family_members_details: this.fb.array([]),
});
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
index 466d0e45e..32bb45e21 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html
@@ -486,7 +486,7 @@
-
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
index b60d7fcff..81b751d4b 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/loan-details/loan-details.component.html
@@ -76,6 +76,7 @@
+
@@ -143,7 +144,7 @@
{{"₹"}} {{ loanDetailsForm.controls['own_contribution'].value | numberToWords }} Only
-
+
@@ -165,11 +166,13 @@
-
+
{{"₹"}} {{ loanDetailsForm.controls['emi_level'].value | numberToWords }} Only
+
+
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
index 1ac16b208..69478f379 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/stock/stock.component.html
@@ -46,6 +46,7 @@
Stock Required
+
@@ -63,6 +64,7 @@
formControlName="other_uom">
UOM Required
+
@@ -139,6 +141,7 @@
+
UOM Required
+
@@ -223,6 +227,7 @@
+
UOM Required
+
+
UOM Required
+
+
UOM Required
+
,
private dialog: MatDialog,
private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA)
- public pd_all_details: any) {
+ public pd_all_details: any)
+ {
+
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id
+ this.lender_short_name=this.pd_all_details.pdmaster_details.lender_short_name
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
this.form_id = 11;
this.company_id = this.pd_all_details.company_id;
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
index 4840b59a4..ddf706ecc 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/supplier-info/supplier-info.component.html
@@ -49,7 +49,7 @@
formControlName="manufacturing_supplier_name">
-
+
@@ -107,7 +107,7 @@
Enter Valid LandLine Number.
-
+
+ settings_backup_restore
get_app
save_alt
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 c09b18e1d..94abc14c9 100644
--- 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
@@ -90,9 +90,9 @@ export class QcPdReportComponent implements OnInit {
getHTMLPDReport(){
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
this.pdTrigerService.getPDReportHTML(encryptReportRandomString,this.startPD).subscribe(response=>{
- console.log("d",this.dataContainer)
+ // console.log("d",this.dataContainer)
this.dataContainer.nativeElement.innerHTML = response
- console.log("data",this.dataContainer)
+ // console.log("data",this.dataContainer)
this.loadComponent=true
})
}
@@ -104,9 +104,10 @@ export class QcPdReportComponent implements OnInit {
// })
this.listPDComponent.showListView(false);
+ this.generateBtn = true;
this.getPdReportDetails();
// this.getPdReportVersionList();
- this.generateBtn = true;
+
// start
// end
@@ -198,9 +199,10 @@ export class QcPdReportComponent implements OnInit {
};
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) {
+ console.log("Generate Report Called")
// console.log(data.records);
this.notifier.notify('success', 'Done Successfully..!');
- this.getPdReportVersionList();
+ // this.getPdReportVersionList();
this.ngOnInit();
} else {
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
@@ -282,6 +284,9 @@ export class QcPdReportComponent implements OnInit {
this.generateBtn = data.records.is_original_report_created == 1 ? false : true;
// console.log(this.generateBtn);
this.reGenerateBtn = data.records.is_original_report_created == 1 ? true : false;
+ if(this.reGenerateBtn){
+ this.getHTMLPDReport()
+ }
// console.log(this.reGenerateBtn);
}
else{
@@ -289,7 +294,7 @@ export class QcPdReportComponent implements OnInit {
// console.log('else',this.generateBtn);
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
}
- this.getHTMLPDReport()
+ console.log("Final PD Report Details","generatebtn",this.generateBtn,"regenerateBtn",this.reGenerateBtn);
}, err => {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
@@ -319,7 +324,7 @@ export class QcPdReportComponent implements OnInit {
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult.status==true){
- this.getPdReportVersionList();
+ // this.getPdReportVersionList();
}
// this.getPdReportFinalTemplateDetails();
// this.getQuestionsMasters();
@@ -341,7 +346,11 @@ export class QcPdReportComponent implements OnInit {
dialogRef.afterClosed()
.subscribe(dataresult => {
if(dataresult.status==true){
- this.getPdReportVersionList();
+ // this.getPdReportVersionList();
+ // console.log("rs",dataresult,status);
+ if(status=='change_status_completed' || status == 'COMPLETE'){
+ this.router.navigate(['../../../viewpd',this.startPD,atob(this.route.snapshot.params['string'])], { relativeTo: this.route });
+ }
}
// this.getPdReportFinalTemplateDetails();
// this.getQuestionsMasters();
@@ -389,7 +398,7 @@ export class QcPdReportComponent implements OnInit {
this.pdTrigerService.swapOlderPDReportToLatest(data).subscribe(data => {
if (data.status == 200) {
this.notifier.notify('success', 'Your Changes Updated.!');
- this.getPdReportVersionList();
+ // this.getPdReportVersionList();
} else {
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
}
@@ -470,6 +479,43 @@ export class QcPdReportComponent implements OnInit {
}
})
}
+ changePDStatus(){
+ // const dialogRef = this.dialog.open(QcReviewComponent, {
+ // data: { startId: this.startPD, data_status: status,random_string : atob(this.route.snapshot.params['string']) },
+ // disableClose: true
+ // });
+ // dialogRef.afterClosed()
+ // .subscribe(dataresult => {
+ // if(dataresult.status==true){
+ // this.getPdReportVersionList();
+ // }
+ // // this.getPdReportFinalTemplateDetails();
+ // // this.getQuestionsMasters();
+ // // this.getBranch();
+ // // this.isPopupOpened = false;
+ // });
+ let encryptReportRandomString = atob(this.route.snapshot.params['string']);
+ let update_status = {
+ "pd_id":this.startPD,
+ };
+ this.pdTrigerService.editPdMasterDetails(update_status,'COMPLETED',encryptReportRandomString).subscribe(result=>{
+
+ if (result.status == 200) {
+
+ let getItem = localStorage.getItem('userEdits');
+ localStorage.removeItem('userEdits');
+ this.router.navigate(['../../../viewpd',this.startPD,atob(this.route.snapshot.params['string'])], { relativeTo: this.route });
+
+ }
+ else {
+ // this.dialogRef.close({update_status:false});
+ this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
+ }
+}, error => {
+ // this.dialogRef.close({update_status:false});
+ this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
+});
+ }
// OnDestroy():void{
// console.log("onDestroy called");
// this.listPDComponent.showListView(true);
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html
index 99ef6ff1d..fd5c717d8 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.html
@@ -66,4 +66,24 @@
Save
Cancel
+
+
+
+
Status Change
+
+
+
+
+ Save
+ Cancel
+
\ No newline at end of file
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
index 78845f5ba..2fdd4901d 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
@@ -9,6 +9,7 @@ import {
MatDialogRef,
MAT_DIALOG_DATA
} from '@angular/material';
+import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
@Component({
selector: 'app-qc-review',
@@ -29,6 +30,7 @@ export class QcReviewComponent implements OnInit {
private notifier: NotifierService;
constructor( private _formBuilder: FormBuilder,
private pdTrigerService: QcService,
+ private serviceFromPD:PdTrigerService,
notifier: NotifierService ,
private dialogRef: MatDialogRef
,
@Inject(MAT_DIALOG_DATA) public data: any) {
@@ -65,7 +67,7 @@ export class QcReviewComponent implements OnInit {
this.recordData = data.records[0];
this.ngForm = this._formBuilder.group({
pd_qc_note: [this.recordData.pd_qc_note],
- pd_status: [this.recordData.pd_status]
+ pd_status: [this.recordData.pd_status || "COMPLETED"]
})
this.showForm = true;
}
@@ -89,7 +91,16 @@ export class QcReviewComponent implements OnInit {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
- } else {
+ }
+ else if(this.showStatus === 'change_status_completed') {
+
+ this.ngForm = this._formBuilder.group({
+ change_status_remark: [''],
+ // qc_rating: [Number(this.recordData.qc_rating)],
+ pd_status: ["COMPLETED"],
+ })
+ this.showForm = true;
+
}
}
@@ -103,7 +114,28 @@ export class QcReviewComponent implements OnInit {
template.pd_id = this.data.startId;
template.random_string = this.data.random_string;
template.parent_pd_id=this.data.startId;
+
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
+ this.notifier.notify('success', 'Your Changes Updated.!');
+ this.dialogRef.close({
+ status:true,
+ dialog_close:true
+ });
+ }, error => {
+ this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
+ // alert(err.html_format);
+ });
+
+ }
+
+ statusChangeClick(): void {
+ let template = this.ngForm.value;
+ let savePDRemark_values={'pd_id':this.data.startId,'remark':template.change_status_remark}
+ this.serviceFromPD.savePDRemark(savePDRemark_values).subscribe(result=>{
+
+ let changeStatus_values={'pd_id':this.data.startId,random_string:this.data.random_string,parent_pd_id:this.data.startId,pd_status:template.pd_status}
+
+ this.pdTrigerService.pdReviewStatusUpdate(changeStatus_values).subscribe(data=>{
this.notifier.notify('success', 'Your Changes Updated.!');
this.dialogRef.close({
status:true
@@ -112,6 +144,7 @@ export class QcReviewComponent implements OnInit {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
+ })
}