Fairoj : Customer image recapture module added and vendor form fetch based on the vendor status
This commit is contained in:
parent
a093ec16d3
commit
f52ee940f2
@ -233,7 +233,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 46%;"
|
<mat-form-field style="width: 46%;"
|
||||||
*ngIf="addressForm.controls['address_type'].value == 1">
|
*ngIf="addressForm.controls['address_type'].value == 1 && addressForm.controls['address_type_others']">
|
||||||
<input matInput placeholder="Specify Address Type " required
|
<input matInput placeholder="Specify Address Type " required
|
||||||
formControlName="address_type_others" autocomplete="off"
|
formControlName="address_type_others" autocomplete="off"
|
||||||
(change)="selectedAddressType($event.target.value)">
|
(change)="selectedAddressType($event.target.value)">
|
||||||
|
|||||||
@ -417,10 +417,11 @@ export class AddressComponent implements OnInit {
|
|||||||
e == 1 ? AltChildCtrl.addControl('alternative_pincode_others', new FormControl('', Validators.required)) : AltChildCtrl.removeControl('alternative_pincode_others');
|
e == 1 ? AltChildCtrl.addControl('alternative_pincode_others', new FormControl('', Validators.required)) : AltChildCtrl.removeControl('alternative_pincode_others');
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
console.log("value",e );
|
||||||
e == 1 ? this.addressForm.addControl('address_type_others', new FormControl('', Validators.required)) : this.addressForm.removeControl('address_type_others');
|
e == 1 ? this.addressForm.addControl('address_type_others', new FormControl('', Validators.required)) : this.addressForm.removeControl('address_type_others');
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
console.log("value",e );
|
|
||||||
e == 1 ? this.addressForm.addControl('locality_others', new FormControl('', Validators.required)) : this.addressForm.removeControl('locality_others');
|
e == 1 ? this.addressForm.addControl('locality_others', new FormControl('', Validators.required)) : this.addressForm.removeControl('locality_others');
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@ -627,7 +628,7 @@ export class AddressComponent implements OnInit {
|
|||||||
|
|
||||||
this.disableAfterSubmit = true;
|
this.disableAfterSubmit = true;
|
||||||
|
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -881,7 +882,7 @@ export class AddressComponent implements OnInit {
|
|||||||
// else {
|
// else {
|
||||||
// control.push(this.createAddresses(null));
|
// control.push(this.createAddresses(null));
|
||||||
// }
|
// }
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' ) {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
}
|
}
|
||||||
@ -933,41 +934,42 @@ export class AddressComponent implements OnInit {
|
|||||||
AltCtrl.controls['alternative_pincode_others'].updateValueAndValidity();
|
AltCtrl.controls['alternative_pincode_others'].updateValueAndValidity();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addressForm.controls.pd_location.setValue(result.records.pd_location);
|
|
||||||
this.addressForm.controls.address_type.setValue(result.records.address_type);
|
|
||||||
|
|
||||||
let selectedAddressType = this.addressData.filter(element => element.address_type_id == result.records.address_type)[0];
|
|
||||||
if(selectedAddressType != undefined && selectedAddressType.hasOwnProperty('address_type')){
|
|
||||||
this.selectedAddressType(selectedAddressType.address_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setOthers(result.records.address_type, '', 3);
|
|
||||||
|
|
||||||
if (result.records.address_type == 1) {
|
|
||||||
this.addressForm.controls.address_type_others.setValue(result.records.address_type_others);
|
|
||||||
this.selectedAddressType(result.records.address_type_others);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.addressForm.controls.comment_locality.setValue(result.records.comment_locality);
|
|
||||||
|
|
||||||
this.addressForm.controls.locality.setValue(result.records.locality);
|
|
||||||
this.setOthers(result.records.locality, '', 4);
|
|
||||||
|
|
||||||
if (result.records.locality == 1) {
|
|
||||||
this.addressForm.controls.locality_others.setValue(result.records.locality_others);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.lender_short_name != 'CLIX' && this.prod_catagory != 'BL'){
|
|
||||||
this.addressForm.controls.estimated_area.setValue(result.records.estimated_area);
|
|
||||||
this.addressForm.controls.uom.setValue(result.records.uom);
|
|
||||||
this.setOthers(result.records.uom, '', 5);
|
|
||||||
if (result.records.uom == 1) {
|
|
||||||
this.addressForm.controls.uom_others.setValue(result.records.uom_others);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.addressForm.controls.pd_location.setValue(result.records.pd_location);
|
||||||
|
this.addressForm.controls.address_type.setValue(result.records.address_type);
|
||||||
|
|
||||||
|
let selectedAddressType = this.addressData.filter(element => element.address_type_id == result.records.address_type)[0];
|
||||||
|
if(selectedAddressType != undefined && selectedAddressType.hasOwnProperty('address_type')){
|
||||||
|
this.selectedAddressType(selectedAddressType.address_type);
|
||||||
|
}
|
||||||
|
console.log("ds",result.records.address_type);
|
||||||
|
this.setOthers(result.records.address_type, '', 3);
|
||||||
|
|
||||||
|
if (result.records.address_type == 1) {
|
||||||
|
this.addressForm.controls.address_type_others.setValue(result.records.address_type_others);
|
||||||
|
this.selectedAddressType(result.records.address_type_others);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addressForm.controls.comment_locality.setValue(result.records.comment_locality);
|
||||||
|
|
||||||
|
this.addressForm.controls.locality.setValue(result.records.locality);
|
||||||
|
this.setOthers(result.records.locality, '', 4);
|
||||||
|
|
||||||
|
if (result.records.locality == 1) {
|
||||||
|
this.addressForm.controls.locality_others.setValue(result.records.locality_others);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.lender_short_name != 'CLIX' && this.prod_catagory != 'BL'){
|
||||||
|
this.addressForm.controls.estimated_area.setValue(result.records.estimated_area);
|
||||||
|
this.addressForm.controls.uom.setValue(result.records.uom);
|
||||||
|
this.setOthers(result.records.uom, '', 5);
|
||||||
|
if (result.records.uom == 1) {
|
||||||
|
this.addressForm.controls.uom_others.setValue(result.records.uom_others);
|
||||||
|
}
|
||||||
|
}
|
||||||
setTimeout(() =>{
|
setTimeout(() =>{
|
||||||
this.addressForm.patchValue(result.records);
|
this.addressForm.patchValue(result.records);
|
||||||
},1000)
|
},1000)
|
||||||
|
|||||||
@ -220,7 +220,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
// this.noRecordFound = true;
|
// this.noRecordFound = true;
|
||||||
}
|
}
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
@ -1086,7 +1086,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
//To Remove The "Null" With Key also
|
//To Remove The "Null" With Key also
|
||||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||||
// Save the data with help of Service
|
// Save the data with help of Service
|
||||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
this.pdTrigerService.saveForm(answerFormValues,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if (dataresult.status == 200) {
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
|
|||||||
@ -34,6 +34,7 @@ export class BusinessInfoGroupComponent implements OnInit {
|
|||||||
lender_short_name :any;
|
lender_short_name :any;
|
||||||
product_abbr :any;
|
product_abbr :any;
|
||||||
prod_catagory: any;
|
prod_catagory: any;
|
||||||
|
vendor_status_arr: any=[];
|
||||||
|
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@ -57,6 +58,17 @@ export class BusinessInfoGroupComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getCompanyListForBusiness();
|
this.getCompanyListForBusiness();
|
||||||
|
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
|
||||||
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2') {
|
||||||
|
let temp_vendor_status = localStorage.getItem("vendorFormStatus_arr")
|
||||||
|
if(temp_vendor_status) {
|
||||||
|
temp_vendor_status = JSON.parse(temp_vendor_status)
|
||||||
|
if(temp_vendor_status && temp_vendor_status.length > 0 ) {
|
||||||
|
this.vendor_status_arr = temp_vendor_status
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// END OF VENDOR FORM ANSWER FETCH
|
||||||
}
|
}
|
||||||
getCompanyListForBusiness(): void{
|
getCompanyListForBusiness(): void{
|
||||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||||
@ -79,7 +91,20 @@ export class BusinessInfoGroupComponent implements OnInit {
|
|||||||
this.pd_all_details.business_years = company.business_years;
|
this.pd_all_details.business_years = company.business_years;
|
||||||
this.pd_all_details.business_month = company.business_month;
|
this.pd_all_details.business_month = company.business_month;
|
||||||
|
|
||||||
|
let curr_vendor_ans_fetch_status = null
|
||||||
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2') {
|
||||||
|
if(this.vendor_status_arr && this.vendor_status_arr.length > 0) {
|
||||||
|
curr_vendor_ans_fetch_status =this.vendor_status_arr.filter(val=>val.fk_form_id == String(details.form_id))
|
||||||
|
if(curr_vendor_ans_fetch_status.length > 0) {
|
||||||
|
curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status[0].form_status
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
curr_vendor_ans_fetch_status = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status
|
||||||
|
console.log(this.pd_all_details);
|
||||||
if(details.form_id==1){
|
if(details.form_id==1){
|
||||||
const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
||||||
data: this.pd_all_details,
|
data: this.pd_all_details,
|
||||||
|
|||||||
@ -656,7 +656,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
}
|
}
|
||||||
@ -1759,7 +1759,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
|
|
||||||
records.select_business_activity_type = records.select_business_activity_type.filter(value => value.exist_status == 1);
|
records.select_business_activity_type = records.select_business_activity_type.filter(value => value.exist_status == 1);
|
||||||
|
|
||||||
this._pd.saveForm(records).subscribe(data => {
|
this._pd.saveForm(records,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(data => {
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
|
|||||||
@ -293,7 +293,7 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
this.noRecordsFound = true;
|
this.noRecordsFound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
if((this.lender_short_name == 'CLIX' || this.lender_short_name == 'MWISE' || this.prod_catagory == 'LAEP')) {
|
if((this.lender_short_name == 'CLIX' || this.lender_short_name == 'MWISE' || this.prod_catagory == 'LAEP')) {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
@ -388,7 +388,7 @@ export class FinalRemarksComponent implements OnInit {
|
|||||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||||
// console.log(JSON.stringify(answerFormValues));
|
// console.log(JSON.stringify(answerFormValues));
|
||||||
//Add BRANCH data with help Service File
|
//Add BRANCH data with help Service File
|
||||||
this.pdTrigerService.savePDFormDetailsWithID(answerFormValues).subscribe(
|
this.pdTrigerService.saveForm(answerFormValues,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if (dataresult.status == 200) {
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
|
|||||||
@ -368,7 +368,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
}
|
}
|
||||||
@ -859,7 +859,7 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
|
this._pd.saveForm(saveRecords,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
if (dataresult.status == 200) {
|
if (dataresult.status == 200) {
|
||||||
this.notifier.notify('success', 'Saved Successfully.');
|
this.notifier.notify('success', 'Saved Successfully.');
|
||||||
|
|||||||
@ -179,7 +179,7 @@ pdf(fileURL){
|
|||||||
neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details));
|
neighbourhoodControl.push(this.createNeighbourhood(this.default_neighbourhood_details));
|
||||||
referencecheckControl.push(this.createReerenceCheck(this.default_reference_details));
|
referencecheckControl.push(this.createReerenceCheck(this.default_reference_details));
|
||||||
}
|
}
|
||||||
if(this.data.pdmaster_details.fk_pd_type == '2' && this.data.pdmaster_details.hasOwnProperty('vendor_status') && this.data.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.data.pdmaster_details.fk_pd_type == '2' && this.data.pdmaster_details.hasOwnProperty('vendor_status') && this.data.pdmaster_details.vendor_status == 'COMPLETED' && this.data.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.data.pdmaster_details.vendor_status);
|
console.log(this.data.pdmaster_details.vendor_status);
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
}
|
}
|
||||||
@ -451,7 +451,7 @@ pdf(fileURL){
|
|||||||
saveRecords.formid=formData.formid;
|
saveRecords.formid=formData.formid;
|
||||||
saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : '';
|
saveRecords.neighbourhood_status = formData.neighbourhood_status!='' ? formData.neighbourhood_status : '';
|
||||||
saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark;
|
saveRecords.neighbour_reference_remark=formData.neighbour_reference_remark;
|
||||||
this._pd.savePDFormDetailsWithID(saveRecords).subscribe(
|
this._pd.saveForm(saveRecords,this.data.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(
|
||||||
dataresult => {
|
dataresult => {
|
||||||
// this.notifier.notify('success', resultMessage);
|
// this.notifier.notify('success', resultMessage);
|
||||||
if (dataresult.status == 200) {
|
if (dataresult.status == 200) {
|
||||||
|
|||||||
@ -198,7 +198,7 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
this.docsCollectedForm.patchValue(retrieved_data)
|
this.docsCollectedForm.patchValue(retrieved_data)
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED') {
|
if(this.pd_all_details.pdmaster_details.fk_pd_type == '2' && this.pd_all_details.pdmaster_details.hasOwnProperty('vendor_status') && this.pd_all_details.pdmaster_details.vendor_status == 'COMPLETED' && this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status == '0') {
|
||||||
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
console.log(this.pd_all_details.pdmaster_details.vendor_status);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.getDataFromVendor()
|
this.getDataFromVendor()
|
||||||
@ -388,7 +388,7 @@ export class QueriesDocsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
console.log(formParams);
|
console.log(formParams);
|
||||||
|
|
||||||
this.pdTriggerService.saveForm(formParams).subscribe(res=>{
|
this.pdTriggerService.saveForm(formParams,this.pd_all_details.pdmaster_details.curr_vendor_ans_fetch_status).subscribe(res=>{
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
this.notifier.notify("success","Record Saved Successfully..")
|
this.notifier.notify("success","Record Saved Successfully..")
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
|||||||
@ -65,6 +65,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
actualQuestions: number;
|
actualQuestions: number;
|
||||||
answeredQuestions: number;
|
answeredQuestions: number;
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
|
vendor_status_arr: any = [];
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
@ -90,6 +91,8 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
this.loadTemplates(this.startPD,1,this.randomString);
|
this.loadTemplates(this.startPD,1,this.randomString);
|
||||||
this.getCreditPDTemplate();
|
this.getCreditPDTemplate();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
getCreditPDTemplate() {
|
getCreditPDTemplate() {
|
||||||
// let params = { "fk_entity_id":this.pddetails.fk_lender_id,"fk_product_id":this.pddetails.fk_product_id,"pd_form_id":this.pddetails.pd_id }
|
// let params = { "fk_entity_id":this.pddetails.fk_lender_id,"fk_product_id":this.pddetails.fk_product_id,"pd_form_id":this.pddetails.pd_id }
|
||||||
@ -136,6 +139,17 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
||||||
this.answeredQuestions = getAnsweredFormsCount.length;
|
this.answeredQuestions = getAnsweredFormsCount.length;
|
||||||
this.pdFullDetails = data.records;
|
this.pdFullDetails = data.records;
|
||||||
|
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
|
||||||
|
if(this.pdMasterList.fk_pd_type == '2') {
|
||||||
|
let temp_vendor_status = localStorage.getItem("vendorFormStatus_arr")
|
||||||
|
if(temp_vendor_status) {
|
||||||
|
temp_vendor_status = JSON.parse(temp_vendor_status)
|
||||||
|
if(temp_vendor_status && temp_vendor_status.length > 0 ) {
|
||||||
|
this.vendor_status_arr = temp_vendor_status
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// END OF VENDOR FORM ANSWER FETCH
|
||||||
if(type==1 && (data.records.pdmaster_details.pd_status=='SCHEDULED' || data.records.pdmaster_details.pd_status=='ALLOCATED')) {
|
if(type==1 && (data.records.pdmaster_details.pd_status=='SCHEDULED' || data.records.pdmaster_details.pd_status=='ALLOCATED')) {
|
||||||
this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS,1)
|
this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS,1)
|
||||||
}
|
}
|
||||||
@ -179,7 +193,21 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// console.log(details)
|
// console.log(details)
|
||||||
// this.formsCategoryEnable = true;
|
// this.formsCategoryEnable = true;
|
||||||
this.selectedFormsCategory = details;
|
this.selectedFormsCategory = details;
|
||||||
|
let curr_vendor_ans_fetch_status = null
|
||||||
|
if(this.pdMasterList.fk_pd_type == '2') {
|
||||||
|
if(this.vendor_status_arr && this.vendor_status_arr.length > 0 && this.selectedFormsCategory.form_id != 13) {
|
||||||
|
console.log(this.vendor_status_arr,this.selectedFormsCategory)
|
||||||
|
curr_vendor_ans_fetch_status =this.vendor_status_arr.filter(val=>val.fk_form_id == String(this.selectedFormsCategory.form_id))
|
||||||
|
if(curr_vendor_ans_fetch_status.length > 0) {
|
||||||
|
curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status[0].form_status
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
curr_vendor_ans_fetch_status = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.pdFullDetails.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status
|
||||||
|
console.log(this.pdFullDetails);
|
||||||
if(this.selectedFormsCategory.form_id==1){
|
if(this.selectedFormsCategory.form_id==1){
|
||||||
const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
const dialogRef = this.dialog.open(SupplierInfoComponent, {
|
||||||
data: this.pdFullDetails,
|
data: this.pdFullDetails,
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export class VendorPdAllocationComponent implements OnInit {
|
|||||||
public submitted = false;
|
public submitted = false;
|
||||||
cityList: any = [];
|
cityList: any = [];
|
||||||
stateList: any = [];
|
stateList: any = [];
|
||||||
|
i :Number = 0
|
||||||
constructor(notifier: NotifierService,
|
constructor(notifier: NotifierService,
|
||||||
private _fb: FormBuilder,
|
private _fb: FormBuilder,
|
||||||
private dialogRef: MatDialogRef<VendorPdAllocationComponent>,
|
private dialogRef: MatDialogRef<VendorPdAllocationComponent>,
|
||||||
|
|||||||
@ -131,6 +131,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
};
|
};
|
||||||
videoplayback: any = {enableBtn:false,url:null};
|
videoplayback: any = {enableBtn:false,url:null};
|
||||||
openvendorallocation: any;
|
openvendorallocation: any;
|
||||||
|
vendor_form_status_arr: any =[];
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
|
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent) {
|
||||||
@ -203,6 +204,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.enableStartPD = false;
|
this.enableStartPD = false;
|
||||||
}
|
}
|
||||||
this.existPDs=data.records.exist_pd_details
|
this.existPDs=data.records.exist_pd_details
|
||||||
|
if(this.pdMasterData[0].fk_pd_type == '2') {
|
||||||
|
if(data.records.vendor_form_status && data.records.vendor_form_status.length > 0) {
|
||||||
|
this.vendor_form_status_arr = JSON.stringify(data.records.vendor_form_status)
|
||||||
|
localStorage.setItem("vendorFormStatus_arr",this.vendor_form_status_arr)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, error => {
|
}, error => {
|
||||||
console.log('%c Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!', 'font-weight: bold; font-size: 50px;color: red; ');
|
console.log('%c Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!', 'font-weight: bold; font-size: 50px;color: red; ');
|
||||||
@ -636,8 +643,12 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
pd_id: master.pd_id,
|
pd_id: master.pd_id,
|
||||||
mobile_no: this.pdApplicantData[0].mobile_no,
|
mobile_no: this.pdApplicantData[0].mobile_no,
|
||||||
random_string: master.random_string,
|
random_string: master.random_string,
|
||||||
|
sms_flag:'1'
|
||||||
// pd_type:master.fk_pd_type
|
// pd_type:master.fk_pd_type
|
||||||
}
|
}
|
||||||
|
// sms_flag options
|
||||||
|
// 1 - Image Capture for Telepd and smart pd
|
||||||
|
// 2 - Image Recapture for Telepd and smart pd
|
||||||
this._pd.smsLink(param).subscribe(res=>{
|
this._pd.smsLink(param).subscribe(res=>{
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
this.notifier.notify("info","SMS Sent Successfully")
|
this.notifier.notify("info","SMS Sent Successfully")
|
||||||
|
|||||||
@ -49,10 +49,23 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
saveForm(records: any): Observable<any> {
|
saveForm(records: any,curr_vendor_ans_fetch_status?): Observable<any> {
|
||||||
records.fk_createdby = this._aws.getlocale();
|
records.fk_createdby = this._aws.getlocale();
|
||||||
let params = { records }
|
let params = { records }
|
||||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
return this._http.post(this.apiUrl + 'savePDFormDetails', params).map(res=>{
|
||||||
|
// console.log(res,curr_vendor_ans_fetch_status,res['dataStatus'],curr_vendor_ans_fetch_status == '0');
|
||||||
|
// for UPDATING THE VENDOR FORM STATUS (SMART PD ONLY)
|
||||||
|
if (curr_vendor_ans_fetch_status == '0') {
|
||||||
|
if (res['dataStatus']) {
|
||||||
|
console.log("inside")
|
||||||
|
this.updateVendorFormStatus({"fk_pd_id":records.pdid,"fk_form_id":records.formid}).subscribe(re=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// end of UPDATING THE VENDOR FORM STATUS (SMART PD ONLY)
|
||||||
|
return res
|
||||||
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('role', []))
|
catchError(this.handleError('role', []))
|
||||||
)
|
)
|
||||||
@ -976,4 +989,9 @@ export class PdTrigerService {
|
|||||||
// return apivalue
|
// return apivalue
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
updateVendorFormStatus(params) {
|
||||||
|
console.log("update",params);
|
||||||
|
return this._http.post(this.apiUrl+'updateVendorFormStatus',params)
|
||||||
|
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,181 @@
|
|||||||
|
<div style="position:sticky;top:0;z-index: 99;">
|
||||||
|
<h2 mat-dialog-title class="paragraph_change">
|
||||||
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
|
<span> Customer Images <span ><mat-icon>done_all</mat-icon> </span> </span><br/>
|
||||||
|
<span>Images to be ReCapture by customer</span>
|
||||||
|
</div>
|
||||||
|
<!-- <div fxFlex="30" align="end" *ngIf="imgReCaptureBucket.length > 0">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Clear Selected"
|
||||||
|
matTooltipPosition="right" (click)="clearSelected()">
|
||||||
|
<mat-icon>check_box_outline_blank</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close"
|
||||||
|
matTooltipPosition="right" mat-dialog-close>
|
||||||
|
<mat-icon>close</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<!-- <mat-dialog-content> -->
|
||||||
|
<!-- <input type="file" accept="image/*" capture="environment"> -->
|
||||||
|
<mat-card>
|
||||||
|
<div fxLayout="row">
|
||||||
|
<span fxLayout="column" fxFlex="85" fxFlex.xs = "70" fxLayoutAlign="flex-start" >
|
||||||
|
<!-- <mat-card-header >
|
||||||
|
<mat-card-title><h5>PD Images</h5></mat-card-title>
|
||||||
|
</mat-card-header> -->
|
||||||
|
</span>
|
||||||
|
<!-- <div fxLayout="column" fxFlex="15" fxFlex.xs = "30" fxLayoutAlign="flex-end" >
|
||||||
|
<button mat-button mat-raised-button class="mr-1 mb-1" color="primary" (click)="openVideoChat()">
|
||||||
|
<mat-icon>videocam</mat-icon>
|
||||||
|
<strong>Call</strong>
|
||||||
|
</button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<!-- </span> -->
|
||||||
|
<mat-card-content>
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="start stretch" fxLayoutAlign.xs="space-between stretch" fxLayoutGap="25px" fxLayoutGap.xs="15px" style="flex-wrap: wrap">
|
||||||
|
<!-- {{records.img_data | json}} -->
|
||||||
|
<div *ngFor="let val of imageData;let i = index" [ngStyle]="{'flex-basis': val.is_multiple == 1 ? '100%' : ''}" >
|
||||||
|
<!-- {{val.is_multiple}} -->
|
||||||
|
<div *ngIf="(!val.hasOwnProperty('is_multiple')) || (val.hasOwnProperty('is_multiple') && val.is_multiple == '0')" style="flex-basis: 100%" class ="image-div" >
|
||||||
|
|
||||||
|
<img *ngIf="val.img_url != '' && val.img_url != null"
|
||||||
|
class="image-class" [src]="val.img_url" [alt]="val.img_key" alt="image" (click)="openImage(val)">
|
||||||
|
<div class="dummy-img" *ngIf="val.img_url == '' || val.img_url == null">
|
||||||
|
<p
|
||||||
|
style="justify-content: center;align-content: center;text-align: center;align-items: center; margin-top: 10%;">
|
||||||
|
<span>
|
||||||
|
Image is not Captured.
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="image-label" fxLayout ="row" >
|
||||||
|
<mat-checkbox class="example-margin" labelPosition="before" (change)="handleReCapturingImage($event.checked,val)">
|
||||||
|
<p fxFlex="80" >{{val.img_name || val.img_key}} </p>
|
||||||
|
<!-- <span fxFlex="20"> -->
|
||||||
|
</mat-checkbox>
|
||||||
|
<!-- <object style="height: 35px" type="image/svg+xml" data="../../../assets/spinner/spinner.svg">
|
||||||
|
Your browser does not support SVG
|
||||||
|
</object> -->
|
||||||
|
<!-- <img src="../../../assets/spinner/spinner.svg" alt="spinner"/> -->
|
||||||
|
<!-- </span> -->
|
||||||
|
<!-- <span *ngIf="val.is_saved == true && val.img_url != '' && val.img_url != null" fxFlex = "20" fxLayoutAlign="flex-end">
|
||||||
|
<mat-icon style="color:green;font-size: 20px;">done</mat-icon>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="val.is_saved == false && val.is_loader == false" fxFlex = "20" fxLayoutAlign="flex-end">
|
||||||
|
<mat-icon style="color:rgb(255, 196, 0);font-size: 25px;">cloud_upload</mat-icon><br/> -->
|
||||||
|
<!-- <span><p style="font-size: 6px">Click to ReUpload</p></span> -->
|
||||||
|
<!-- </span> -->
|
||||||
|
|
||||||
|
<!-- <div> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
|
||||||
|
<!-- <span (click)="getIndex(i)">
|
||||||
|
<app-capture-btn class="file-btn" (imageDataEmitter)="addImage($event,i)"></app-capture-btn>
|
||||||
|
</span> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="val.is_multiple == 1" style="flex-basis: 100%;">
|
||||||
|
<br/> <br/>
|
||||||
|
<hr />
|
||||||
|
<h5>{{val.img_name}}</h5>
|
||||||
|
<div fxLayout="row wrap" fxLayoutAlign="start stretch" fxLayoutAlign.xs="space-between stretch">
|
||||||
|
<h6 style="font-weight: bold;font-size:1.2rem" *ngIf="!val.img_data || (val.img_data != null && val.img_data.length == 0) || (val.img_data == null)">No Images Captured</h6>
|
||||||
|
<div *ngFor="let multiple_img of val.img_data;let i=index" class ="image-div">
|
||||||
|
<img *ngIf="multiple_img.img_url != '' && multiple_img.img_url != null"
|
||||||
|
class="image-class" [src]="multiple_img.img_url" [alt]="val.img_key" alt="image" (click)="openImage(multiple_img)"/>
|
||||||
|
|
||||||
|
<div class="image-label" fxLayout ="row" >
|
||||||
|
<mat-checkbox class="example-margin" labelPosition="before" (change)="handleReCapturingImage($event.checked,multiple_img,i,val)">
|
||||||
|
<p fxFlex="60">{{val.img_name}} {{i+1}} </p>
|
||||||
|
</mat-checkbox>
|
||||||
|
<!-- <span *ngIf="multiple_img.is_loader == true" fxFlex="20">
|
||||||
|
<img src="../../../assets/spinner/spinner.svg" alt="spinner"/>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="multiple_img.is_saved == true && multiple_img.img_url != '' && multiple_img.img_url != null" fxLayoutAlign="flex-end">
|
||||||
|
<mat-icon style="color:green;font-size: 20px;">done</mat-icon>
|
||||||
|
</span>
|
||||||
|
<span *ngIf="multiple_img.is_saved == false && multiple_img.is_loader == false" fxLayoutAlign="flex-end">
|
||||||
|
<mat-icon style="color:rgb(255, 196, 0);font-size: 25px;">cloud_upload</mat-icon><br/>
|
||||||
|
|
||||||
|
</span> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div style="margin-right: -20px !important;padding:0!important;">
|
||||||
|
<div class="dummy-img" style="margin: 30px 0 0 4px;
|
||||||
|
padding: 1.4%;">
|
||||||
|
<p
|
||||||
|
style="justify-content: center;align-content: center;text-align: center;align-items: center; ">
|
||||||
|
<span>
|
||||||
|
Add More Image.<br /> Click to
|
||||||
|
</span>Capture <mat-icon>add_a_photo</mat-icon>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="image-label" fxLayout ="column" >
|
||||||
|
<p fxFlex="80">Add More {{val.img_name}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<br/> <br/>
|
||||||
|
<hr *ngIf="imageData[i+1] && imageData[i+1].is_multiple != 1"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <div style="padding: 1.5%;margin-top: 10px;" fxLayoutAlign.xs="flex-start stretch" >
|
||||||
|
<div style="height: auto">
|
||||||
|
<div class="dummy-img-more" #dummy_img_more>
|
||||||
|
<p
|
||||||
|
style="justify-content: center;align-content: center;text-align: center;align-items: center; margin-top: 10%;">
|
||||||
|
<span>
|
||||||
|
|
||||||
|
Click to
|
||||||
|
</span>Capture More..<mat-icon>add_a_photo</mat-icon>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
<!-- <div class="image-label" fxLayout ="column" >
|
||||||
|
<p fxFlex="60">Capture More</p>
|
||||||
|
</div> -->
|
||||||
|
<!-- <span (click)="getIndex('last')">
|
||||||
|
<app-capture-btn class="file-btn" addMoreBtn="true" (imageDataEmitter)="addImage($event,'last')"></app-capture-btn>
|
||||||
|
</span> -->
|
||||||
|
<!-- </div>
|
||||||
|
</div> -->
|
||||||
|
<!-- <div >
|
||||||
|
<img class="image-class" [src]="imageData"
|
||||||
|
alt="image"><br/>
|
||||||
|
<app-capture-btn class="file-btn" (imageDataEmitter)="addImage($event)"></app-capture-btn>
|
||||||
|
</div>
|
||||||
|
<div >
|
||||||
|
<div class="dummy-img">
|
||||||
|
<p style="justify-content: center;align-content: center;text-align: center;align-items: center; margin-top: 10%;"><span>
|
||||||
|
Image is not Captured.<br/>
|
||||||
|
</span>Capture <mat-icon >camera</mat-icon></p>
|
||||||
|
</div>
|
||||||
|
<button style="justify-content:center" mat-button mat-raised-button>Capture <mat-icon name="camera">camera</mat-icon></button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
<!-- </mat-dialog-content> -->
|
||||||
|
<!-- <mat-dialog-actions>
|
||||||
|
hi
|
||||||
|
</mat-dialog-actions> -->
|
||||||
|
<div style="position:sticky;background-color:black;float: right;bottom: 0;border:2px solid red;padding: 14px;color: white;border-radius: 10px" *ngIf="imgReCaptureBucket.length > 0">
|
||||||
|
<div fxLayout="row" fxLayoutGap="20px" fxLayoutGap.xs = "5px" style="max-height: 35px">
|
||||||
|
<span style="font-weight:bold">Total Re-capturing Images :
|
||||||
|
<span id="num_count">{{imgReCaptureBucket.length}}</span></span>
|
||||||
|
<button mat-raised-button (click)="submitQcImages()"><mat-icon>done_all</mat-icon> Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <input type="file" id="input-file" name="file" accept="image/*" capture="user"> -->
|
||||||
@ -0,0 +1,149 @@
|
|||||||
|
.paragraph_change {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #e00201 !important;
|
||||||
|
}
|
||||||
|
// .custom-file-input::-webkit-file-upload-button {
|
||||||
|
// visibility: hidden;
|
||||||
|
// }
|
||||||
|
// .custom-file-input::before {
|
||||||
|
// content: 'Select some files';
|
||||||
|
// display: inline-block;
|
||||||
|
// background: linear-gradient(top, #f9f9f9, #e3e3e3);
|
||||||
|
// border: 1px solid #999;
|
||||||
|
// border-radius: 3px;
|
||||||
|
// padding: 5px 8px;
|
||||||
|
// outline: none;
|
||||||
|
// white-space: nowrap;
|
||||||
|
// -webkit-user-select: none;
|
||||||
|
// cursor: pointer;
|
||||||
|
// text-shadow: 1px 1px #fff;
|
||||||
|
// font-weight: 700;
|
||||||
|
// font-size: 10pt;
|
||||||
|
// color:black;
|
||||||
|
// // width: 20px;
|
||||||
|
// }
|
||||||
|
// .custom-file-input:hover::before {
|
||||||
|
// border-color: black;
|
||||||
|
// }
|
||||||
|
// .custom-file-input:active::before {
|
||||||
|
// background: -webkit-linear-gradient(top, #e3e3e3, #f9f9f9);
|
||||||
|
// }
|
||||||
|
// input[type='file'] {
|
||||||
|
// // opacity:0
|
||||||
|
// color: transparent;
|
||||||
|
// width: 130px;
|
||||||
|
// }
|
||||||
|
.image-class{
|
||||||
|
width: 170px;
|
||||||
|
height: 200px;
|
||||||
|
border: 1px solid lavender;
|
||||||
|
border-radius: 7px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.image-div {
|
||||||
|
max-width: 200px;
|
||||||
|
width: auto;
|
||||||
|
// height: 200px;
|
||||||
|
margin-top: 25px;
|
||||||
|
padding: 1.4%;
|
||||||
|
}
|
||||||
|
// .image-class:hover {
|
||||||
|
// -webkit-transform: scale(1.1);
|
||||||
|
// -ms-transform: scale(1.1);
|
||||||
|
// transform: scale(1.1);
|
||||||
|
// }
|
||||||
|
.dummy-img {
|
||||||
|
width: 170px;
|
||||||
|
height: 200px;
|
||||||
|
border: 3px dashed rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 7px;
|
||||||
|
background: #eeee;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
.dummy-img-more{
|
||||||
|
width: 170px;
|
||||||
|
height: 200px;
|
||||||
|
margin-top: 20px;
|
||||||
|
border: 4px dashed #03a9f470;
|
||||||
|
border-radius: 7px;
|
||||||
|
box-shadow : 0px 3px 6px 3px rgba(160, 161, 188, 0.53);
|
||||||
|
background: #eeee;
|
||||||
|
color: #b53f3f;
|
||||||
|
}
|
||||||
|
.file-btn{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
@media (max-width: 600px){
|
||||||
|
.image-class {
|
||||||
|
width: 125px;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
.image-div {
|
||||||
|
width:auto;
|
||||||
|
max-width: 135px;
|
||||||
|
// height: 120px;
|
||||||
|
}
|
||||||
|
.dummy-img {
|
||||||
|
width: 125px;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
.dummy-img-more{
|
||||||
|
width: 125px;
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
.image-label {
|
||||||
|
min-height: 58px;
|
||||||
|
p{
|
||||||
|
width: auto;
|
||||||
|
max-width: 67% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.image-label {
|
||||||
|
min-height: 58px;
|
||||||
|
width: auto;
|
||||||
|
// max-width: 67%;
|
||||||
|
p{
|
||||||
|
margin: 7px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size : 14px;
|
||||||
|
max-width: 99%!important;
|
||||||
|
// overflow: hidden
|
||||||
|
white-space: pre-wrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.object {
|
||||||
|
/* width: 110px; */
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
background: #d23f2f;
|
||||||
|
padding: 0.03em;
|
||||||
|
margin: -2px;
|
||||||
|
}
|
||||||
|
.example-margin {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#num_count {
|
||||||
|
color: #00ffa7;
|
||||||
|
font-family: tahoma;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
.num_count_animate {
|
||||||
|
|
||||||
|
animation: num_pad 0.3s 1
|
||||||
|
}
|
||||||
|
// #num_count.num_ani {
|
||||||
|
// -webkit-transition: 3s;
|
||||||
|
// -moz-transition: 3s;
|
||||||
|
// -ms-transition: 3s;
|
||||||
|
// -o-transition: 3s;
|
||||||
|
// transition: 3s;
|
||||||
|
// margin-left: 50% !important;
|
||||||
|
// }
|
||||||
|
@keyframes num_pad {
|
||||||
|
50% {font-size:1.7rem;}
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { QcCusImagesComponent } from './qc-cus-images.component';
|
||||||
|
|
||||||
|
describe('QcCusImagesComponent', () => {
|
||||||
|
let component: QcCusImagesComponent;
|
||||||
|
let fixture: ComponentFixture<QcCusImagesComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ QcCusImagesComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(QcCusImagesComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
File diff suppressed because one or more lines are too long
@ -132,6 +132,20 @@
|
|||||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="70" fxFlex.xl="70" class="content-data" *ngFor="let master of pdMasterData">
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="60" fxFlex.lg="70" fxFlex.xl="70" class="content-data" *ngFor="let master of pdMasterData">
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex="100" align="right">
|
<div fxFlex="100" align="right">
|
||||||
|
<span> <button *ngIf="master.fk_pd_type == '2'"
|
||||||
|
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="copyCusURL()"
|
||||||
|
matTooltip="Copy Customer Image Recapture Link" matTooltipPosition="above" >
|
||||||
|
<mat-icon>link</mat-icon>
|
||||||
|
</button> </span>
|
||||||
|
<span> <button *ngIf="master.fk_pd_type == '2'"
|
||||||
|
mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="onClickSmsLink(master)"
|
||||||
|
matTooltip="Send Customer Image Recapture Link via SMS" matTooltipPosition="above" >
|
||||||
|
<mat-icon>sms</mat-icon>
|
||||||
|
</button> </span>
|
||||||
|
<button *ngIf="master.fk_pd_type == '2'" mat-stroked-button class="mr-1 mb-1" color="primary" (click)="openCusImages()">
|
||||||
|
<mat-icon>collections</mat-icon>
|
||||||
|
<strong>Customer Images</strong>
|
||||||
|
</button>
|
||||||
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
||||||
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
|
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import {QcStartComponent} from '../qc-start/qc-start.component'
|
|||||||
|
|
||||||
import {DatePipe } from '@angular/common';
|
import {DatePipe } from '@angular/common';
|
||||||
import { VendorPdAllocationComponent } from 'app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent';
|
import { VendorPdAllocationComponent } from 'app/personal-discussion/manage-pd/list-pd/vendor-pd-allocation/VendorPdAllocationComponent';
|
||||||
|
import { QcCusImagesComponent } from 'app/quality-check/qc-cus-images/qc-cus-images.component';
|
||||||
|
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-qc-view',
|
selector: 'app-qc-view',
|
||||||
@ -59,7 +61,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
pdCollectedDocument:any=[];
|
pdCollectedDocument:any=[];
|
||||||
pd_QC_Rating: Number;
|
pd_QC_Rating: Number;
|
||||||
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
|
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
|
||||||
private _qc: QcService,private route: ActivatedRoute,private router: Router, private QcListComponent: QcListComponent) {
|
private _qc: QcService,private route: ActivatedRoute,private router: Router, private QcListComponent: QcListComponent,private pdService:PdTrigerService) {
|
||||||
this.notifier=notifier
|
this.notifier=notifier
|
||||||
this.enableStartPD=false;
|
this.enableStartPD=false;
|
||||||
}
|
}
|
||||||
@ -301,6 +303,57 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
this.destroyType=3;
|
this.destroyType=3;
|
||||||
this.router.navigate([ '../../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
|
this.router.navigate([ '../../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
openCusImages() {
|
||||||
|
const dialogRef = this.dialog.open(QcCusImagesComponent, {
|
||||||
|
data: this.pdMasterData[0],
|
||||||
|
// position: { right: '0'},
|
||||||
|
maxWidth: '100vw',
|
||||||
|
maxHeight: '100vh',
|
||||||
|
height: '100%',
|
||||||
|
width: '100%',
|
||||||
|
disableClose: true
|
||||||
|
});
|
||||||
|
dialogRef.afterClosed()
|
||||||
|
.subscribe(dataresult => {
|
||||||
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
copyCusURL() {
|
||||||
|
// console.log(window.location);
|
||||||
|
|
||||||
|
let cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string+'/recapture';
|
||||||
|
// if(event && event.btnValue == 'video') {
|
||||||
|
// cus_link = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string;
|
||||||
|
// }
|
||||||
|
// else if(event && event.btnValue == 'image') {
|
||||||
|
// cus_link = window.location.origin+'/customer/#/pd-images/'+this.pdMasterData[0].random_string;
|
||||||
|
// }
|
||||||
|
// return;
|
||||||
|
// let cus_link = window.location.origin+'/customer/#/pd-images/'+randomStr;
|
||||||
|
// console.log(randomStr)
|
||||||
|
this.pdService.copyToClipBoard(cus_link);
|
||||||
|
this.notifier.notify('info','Customer Image Recapture link copied');
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickSmsLink(master){
|
||||||
|
console.log('SMS',master);
|
||||||
|
let param={
|
||||||
|
pd_id: master.pd_id,
|
||||||
|
mobile_no: this.pdApplicantData[0].mobile_no,
|
||||||
|
random_string: master.random_string,
|
||||||
|
sms_flag:'2'
|
||||||
|
// pd_type:master.fk_pd_type
|
||||||
|
}
|
||||||
|
// sms_flag options
|
||||||
|
// 1 - Image Capture for Telepd and smart pd
|
||||||
|
// 2 - Image Recapture for Telepd and smart pd
|
||||||
|
this.pdService.smsLink(param).subscribe(res=>{
|
||||||
|
if(res['dataStatus']){
|
||||||
|
this.notifier.notify("info","SMS Sent Successfully")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
if(this.destroyType==1){
|
if(this.destroyType==1){
|
||||||
this.QcListComponent.pdListLoad(true);
|
this.QcListComponent.pdListLoad(true);
|
||||||
|
|||||||
@ -641,4 +641,13 @@ export class QcService {
|
|||||||
getPDReportPDFpreview(random_string,pd_id,htmlData){
|
getPDReportPDFpreview(random_string,pd_id,htmlData){
|
||||||
return this._http.post(this.apiUrl+'getPDReportPDFpreview/'+random_string+'/'+pd_id,{"myData":htmlData,responseType:'json'})
|
return this._http.post(this.apiUrl+'getPDReportPDFpreview/'+random_string+'/'+pd_id,{"myData":htmlData,responseType:'json'})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPDImgDetails(params):Observable<any> {
|
||||||
|
// let headers = this.createAuthorizationHeader()
|
||||||
|
return this._http.post(this.apiUrl+'getPDImgDetails',params);
|
||||||
|
}
|
||||||
|
|
||||||
|
auditSmartPDImages(params):Observable<any> {
|
||||||
|
return this._http.post(this.apiUrl+'auditSmartPDImages',params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,8 @@ import { PdCollectedDocsComponent } from 'app/personal-discussion/manage-pd/list
|
|||||||
import { FuturePlansAndBusinessEnvironmentComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
import { FuturePlansAndBusinessEnvironmentComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/future-plans-and-business-environment/future-plans-and-business-environment.component';
|
||||||
import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component';
|
import { QcNewComponent } from './qc-list/qc-pd-report/qc-new/qc-new.component';
|
||||||
|
|
||||||
import {AngularSplitModule} from 'angular-split'
|
import {AngularSplitModule} from 'angular-split';
|
||||||
|
import { QcCusImagesComponent } from './qc-cus-images/qc-cus-images.component'
|
||||||
// import { PdfViewerModule } from 'ng2-pdf-viewer';
|
// import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
|
|
||||||
|
|
||||||
@ -180,7 +181,7 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
AngularSplitModule.forRoot(),
|
AngularSplitModule.forRoot(),
|
||||||
|
|
||||||
],
|
],
|
||||||
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe, QcNewComponent],
|
declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe, QcNewComponent, QcCusImagesComponent],
|
||||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,QcNewComponent,
|
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,QcNewComponent,
|
||||||
BusinessAssetsInfoComponent,
|
BusinessAssetsInfoComponent,
|
||||||
ClientInfoComponent,
|
ClientInfoComponent,
|
||||||
@ -216,7 +217,8 @@ const customNotifierOptions: NotifierOptions = {
|
|||||||
RentalVerificationComponent,
|
RentalVerificationComponent,
|
||||||
ManageDailyPurchaseComponent,
|
ManageDailyPurchaseComponent,
|
||||||
ManageRentalVerificationComponent,
|
ManageRentalVerificationComponent,
|
||||||
FuturePlansAndBusinessEnvironmentComponent],
|
FuturePlansAndBusinessEnvironmentComponent,
|
||||||
|
QcCusImagesComponent],
|
||||||
providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
providers : [QcService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
||||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},PdLocatedMapViewDirective],
|
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},PdLocatedMapViewDirective],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user