diff --git a/VNMS_Frontend-live-08-07-2024.zip b/VNMS_Frontend-live-01-08-2024.zip similarity index 90% rename from VNMS_Frontend-live-08-07-2024.zip rename to VNMS_Frontend-live-01-08-2024.zip index c8f7756..0545c81 100644 Binary files a/VNMS_Frontend-live-08-07-2024.zip and b/VNMS_Frontend-live-01-08-2024.zip differ diff --git a/src/app/pages/customer/customer-form/customer-form.component.html b/src/app/pages/customer/customer-form/customer-form.component.html index 3f3a807..ecc0310 100644 --- a/src/app/pages/customer/customer-form/customer-form.component.html +++ b/src/app/pages/customer/customer-form/customer-form.component.html @@ -2,140 +2,128 @@ {{heading}}
-
-
- - - - -
Name is required.
-
-
-
-
- - - - -
Email is required.
-
- Please enter a valid email address -
-
-
-
-
- - - - - -
- Password is required -
-
- Password length must be greater than or equal to 8 and password must contain one or more uppercase , lowercase , numeric and special characters -
- - - -
- -
-
-
- -
-
- - - - -
Mobile No is required.
- - -
-
-
-
- - - - -
Address is required.
- - -
-
-
-
- - - - -
State is required.
-
-
-
-
- -
-
+
+
- - - -
City is required.
-
-
-
-
- - - - -
Pincode is required.
-
Pincode must be a 6-digit number.
+ + + +
Name is required.
-
-
-
- -
- +
+
+
+ + + + +
Email is required.
+
Please enter a valid email address
+
+
+
+
+ + +
+ +
+
+ + + +
Password is required
+
Invalid password format +
+
+
+ +
+
+
+
+
+ + + + +
Mobile No is required.
+
+
+
+
+ + + + +
Address is required.
+
+
+
+
+ + + + +
State is required.
+
+
+
+
+
+
+ + + + +
City is required.
+
+
+
+
+ + + + +
Pincode is required.
+
Pincode must be a 6-digit number.
+
+
+
+
+ +
+ Medical Industrial - - -
Customer Type is required.
- - -
-
- -
-
- - - - -
-
- - -
-
- - + + +
Customer Type is required.
+
+ +
+
+ + + +
+ +
+
+ + +
+
- - \ No newline at end of file diff --git a/src/app/pages/customer/customer-form/customer-form.component.scss b/src/app/pages/customer/customer-form/customer-form.component.scss index d7e0251..0ead880 100644 --- a/src/app/pages/customer/customer-form/customer-form.component.scss +++ b/src/app/pages/customer/customer-form/customer-form.component.scss @@ -9,6 +9,33 @@ margin-right: 1rem; } } +.error-message { + color: #7c0e0e; + font-size: 10px; + word-wrap: break-word; + max-width: 250px; /* Adjust this value as needed */ +} + +nb-icon { + cursor: pointer; +} + +.icon-error { + color: red !important; +} + +@media (max-width: 767px) { + .show-grid .col-sm-12 { + padding: 0 15px; + } +} + +@media (min-width: 768px) { + .show-grid .col-md-4, .show-grid .col-md-3 { + padding: 0 15px; + } +} + .custom-dialog-class { width: 50%; /* Set the desired width here */ height: 300px; /* Set the desired height here */ diff --git a/src/app/pages/customer/customer-form/customer-form.component.ts b/src/app/pages/customer/customer-form/customer-form.component.ts index 34bde18..fcebcf1 100644 --- a/src/app/pages/customer/customer-form/customer-form.component.ts +++ b/src/app/pages/customer/customer-form/customer-form.component.ts @@ -13,6 +13,7 @@ export class CustomerFormComponent implements OnInit { userForm: FormGroup | any; formData:any =[] heading:any =[]; action: any; + showPasswordField: boolean = false; constructor(private dialogRef: NbDialogRef ,public _api:PageapiService,private dialogService: NbDialogService) { @@ -23,6 +24,10 @@ export class CustomerFormComponent implements OnInit { let details:any = this.dialogRef.componentRef.instance console.log('details',details) this.action = details.action + + if(this.action == 'Add'){ + this.showPasswordField = !this.showPasswordField; + } this.heading = details.title @@ -84,6 +89,21 @@ export class CustomerFormComponent implements OnInit { } + togglePasswordField() { + this.showPasswordField = !this.showPasswordField; + + if (this.showPasswordField) { + this.userForm.get('password').setValidators([ + Validators.required, + Validators.pattern('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*_=+-]).{8,16}$') + ]); + } else { + this.userForm.get('password').clearValidators(); + this.userForm.get('password').reset(); + } + this.userForm.get('password').updateValueAndValidity(); + } + cancel(){ // this.windowService // console.log( this.windowService)