order form text validation

This commit is contained in:
Surendiran 2023-09-05 17:33:39 +05:30
parent df28b04cfe
commit af86f4a33b
3 changed files with 31 additions and 3 deletions

View File

@ -375,7 +375,14 @@ this.invoice.products =[];
// }); // });
// } // }
// } // }
// let mixedProductGas = this.inputFieldGroups.filter((arr:any)=>{return arr.name == 'Mixed Gas'})
// console.log(mixedProductGas)
const filteredItems = this.inputFieldGroups.filter(item => item.name === 'Mixed Gas' && item.productSpec === '');
if (filteredItems.length > 0) {
this.showToast('warning', 'Please Fill Mixed Gas Fields...!', '');
return;
} else{
const buttonsConfig: NbWindowControlButtonsConfig = { const buttonsConfig: NbWindowControlButtonsConfig = {
minimize: this.minimize, minimize: this.minimize,
@ -420,6 +427,10 @@ this.invoice.products =[];
}else{ }else{
this.showToast('warning', 'Please Fill Request Fields...!', ''); this.showToast('warning', 'Please Fill Request Fields...!', '');
} }
}
} }
private showToast(type: NbComponentStatus, title: string, body: string) { private showToast(type: NbComponentStatus, title: string, body: string) {
const config = { const config = {
@ -910,4 +921,19 @@ onCreateConfirm() {
} }
// getProduct(param){
// console.log(param)
// if(param == 'Others'){
// this.mixedBTN = true
// }else{
// this.mixedBTN = false
// }
// }
// isProductSpecValid(): boolean {
// console.log(this.inputFieldGroups )
// return !!this.inputFieldGroups.find((fieldGroup) => fieldGroup.productSpec);
// }
} }

View File

@ -45,6 +45,8 @@ export class OrderSummaryFormComponent implements OnInit {
element.productName = element.name element.productName = element.name
if(element.hasOwnProperty('primaryId')){ if(element.hasOwnProperty('primaryId')){
element.productId = element.id
element.id = element.primaryId element.id = element.primaryId
}else{ }else{
element.pid = element.id element.pid = element.id

View File

@ -9,8 +9,8 @@
// The list of which env maps to which file can be found in `.angular-cli.json`. // The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = { export const environment = {
// apiEndpoint:'https://dev.venbait.in/vnms/api/', apiEndpoint:'https://dev.venbait.in/vnms/api/',
apiEndpoint:'http://localhost:8081/api/', // apiEndpoint:'http://localhost:8081/api/',
mailUrl:'', mailUrl:'',
production: false, production: false,
}; };