Bläddra i källkod

feedback changes

ashwini 1 månad sedan
förälder
incheckning
9e2b396dce

+ 12 - 10
src/app/app-routing.module.ts

@@ -3,28 +3,30 @@ import { RouterModule, Routes } from '@angular/router';
 import { LoginComponent } from '../app/login/login.component';
 import { HomeComponent } from '../app/home/home.component';
 //import {SignupComponent} from '../app/signup/signup.component';
-import {FormsModule, ReactiveFormsModule } from '@angular/forms';
-import {DvrEntryComponent} from '../app/createentry/dvrentry.component';
-import {ContactComponent} from '../app/contact/contact.component';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { DvrEntryComponent } from '../app/createentry/dvrentry.component';
+import { ContactComponent } from '../app/contact/contact.component';
 import { DatePipe } from '@angular/common';
-import {CustomerComponent} from '../app/customer/customer.component';
+import { CustomerComponent } from '../app/customer/customer.component';
+import { PasswordComponent } from './password/password.component';
 
 
 const routes: Routes = [
   { path: '', redirectTo: 'login', pathMatch: 'full' },
   { path: 'login', component: LoginComponent },
   { path: 'home', component: HomeComponent },
-  { path: 'dvrentry',component: DvrEntryComponent},
-  { path: 'dvrentry/:id',component: DvrEntryComponent},
-  { path: 'contactDetails',component: ContactComponent},
-  { path: 'contactDetails/:contact/:id', component: ContactComponent},
-  { path: 'customer',component: CustomerComponent},
+  { path: 'dvrentry', component: DvrEntryComponent },
+  { path: 'dvrentry/:id', component: DvrEntryComponent },
+  { path: 'contactDetails', component: ContactComponent },
+  { path: 'contactDetails/:contact/:id', component: ContactComponent },
+  { path: 'customer', component: CustomerComponent },
+  { path: 'password', component: PasswordComponent }
 
 
 ];
 
 @NgModule({
   imports: [RouterModule.forRoot(routes)],
-  exports: [RouterModule,ReactiveFormsModule,FormsModule]
+  exports: [RouterModule, ReactiveFormsModule, FormsModule]
 })
 export class AppRoutingModule { }

+ 3 - 1
src/app/app.module.ts

@@ -16,6 +16,7 @@ import {HeaderComponent} from "../app/header/header.component";
 
 import { HashLocationStrategy, LocationStrategy } from '@angular/common';
 import {CustomerComponent} from '../app/customer/customer.component';
+import {PasswordComponent} from './password/password.component';
 
 @NgModule({
     declarations: [
@@ -28,7 +29,8 @@ import {CustomerComponent} from '../app/customer/customer.component';
         DateFormatPipe,
         FieldErrorDisplayComponent,
         HeaderComponent,
-        CustomerComponent
+        CustomerComponent,
+        PasswordComponent
     ],
     providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
     bootstrap: [AppComponent],

+ 19 - 2
src/app/contact/contact.component.html

@@ -134,7 +134,7 @@
 
 
                             <div class="row">
-                                <div class="col-lg-6">
+                                <div class="col-lg-3">
 
                                     <div class="form-group" [ngClass]="displayFieldCss('mobile_number')">
                                         <input type="text" maxlength="10" class="form-control "
@@ -149,10 +149,24 @@
                                         Please Enter Mobile Number 
                                     </div> -->
 
+                                </div>
 
+                                <div class="col-lg-3">
 
+                                    <div class="form-group" [ngClass]="displayFieldCss('mob_no')">
+                                        <input type="text" maxlength="10" class="form-control "
+                                            formControlName='mob_no' name="mob_no" id=""
+                                            (keypress)="numberOnly($event)">
+                                        <label for="Mobile" class="animated-label">Alternate Mobile Number</label>
+                                     
+                                    </div>
+                                    <!-- <div *ngIf="checkmobilleno_flag == true">
+                                        Please Enter Mobile Number 
+                                    </div> -->
 
                                 </div>
+
+                                
                                 <div class="col-lg-6">
 
                                     <div class="form-group">
@@ -294,9 +308,11 @@
                                 <th style="width:15%">Last Name</th>
                                 <th style="width:15%">Email ID</th>
                                 <th style="width:15%">Mobile Number</th>
+                                <th style="width:15%">Alternate Mobile Number</th>
                                 <th style="width:15%">Designation</th>
                                 <th style="width:15%">Department</th>
                                 <th style="width:15%">Function</th>
+                                <th style="width: 15%;">Incomplte Entry</th>
 
 
 
@@ -312,10 +328,11 @@
                                 <td>{{current.last_name }}</td>
                                 <td>{{current.email_id }}</td>
                                 <td>{{current.mobile_number }}</td>
+                                <td>{{current.mob_no }}</td>
                                 <td>{{current.designation }}</td>
                                 <td>{{current.department }}</td>
                                 <td>{{current.function_area }}</td>
-
+                                <td>{{current.stage_id == 2 ? 'Yes' : 'No'}}</td>
 
                             </tr>
                         </tbody>

+ 7 - 2
src/app/contact/contact.component.ts

@@ -218,7 +218,8 @@ export class ContactComponent implements OnInit {
       designation: new FormControl(null, Validators.required),
       email_Id: new FormControl('', Validators.required),
       department: new FormControl('', Validators.required),
-      function: new FormControl('', Validators.required)
+      function: new FormControl('', Validators.required),
+      mob_no: new FormControl('', [Validators.required, Validators.maxLength(10)])
     })
   }
 
@@ -260,6 +261,7 @@ export class ContactComponent implements OnInit {
         function: form.value.function,
         contact_for: this.cont_id,
         created_by: this.login_id,
+        mob_no: form.value.mob_no
 
 
       }
@@ -361,7 +363,8 @@ export class ContactComponent implements OnInit {
         department: form.value.department,
         function: form.value.function,
         contact_for: (this.mySelect ? this.mySelect.customer_id : ''),
-        created_by: this.login_id
+        created_by: this.login_id,
+        mob_no: form.value.mob_no
 
       }
       console.log("contactData", contactData);
@@ -404,6 +407,7 @@ export class ContactComponent implements OnInit {
                   email_Id: new FormControl('', Validators.required),
                   department: new FormControl('', Validators.required),
                   function: new FormControl('', Validators.required),
+                  mob_no: new FormControl('', [Validators.required, Validators.maxLength(10)])
                 })
                 // console.log("response.data.message", response.data[0].exception.errorid);
                 if (response.data[0].exception.errorid != '') {
@@ -445,6 +449,7 @@ export class ContactComponent implements OnInit {
                     email_Id: new FormControl('', Validators.required),
                     department: new FormControl('', Validators.required),
                     function: new FormControl('', Validators.required),
+                    mob_no: new FormControl('', [Validators.required, Validators.maxLength(10)])
                   })
                   // console.log("response.data.message", response.data[0].exception.errorid);
                   if (response.data[0].exception.errorid != '') {

+ 49 - 27
src/app/createentry/dvrentry.component.html

@@ -32,9 +32,9 @@
         </li>
         <li style="text-align:center" *ngIf="role == 'admin'">
           <a routerLink="/customer"><span class="fa fa-file-text "></span>
-              <p style="font-size:15px;margin-bottom: 0px;">Customer</p>
+            <p style="font-size:15px;margin-bottom: 0px;">Customer</p>
           </a>
-      </li>
+        </li>
       </ul>
 
     </nav>
@@ -70,10 +70,11 @@
                     <div class="col-lg-4">
 
                       <div class="form-group" [ngClass]="displayFieldCss('date')">
-                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Date of Visit<span style="color: red;"> *</span></label>
+                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Date of Visit<span
+                            style="color: red;"> *</span></label>
 
                         <input type="Date" class="form-control" formControlName='date' name="Date" id="Date"
-                          placeholder="Date of Visit" style="margin-top: 0px;" >
+                          placeholder="Date of Visit" style="margin-top: 0px;">
                         <app-field-error-display [displayError]="isFieldValid('date')" errorMsg="Please enter date">
                         </app-field-error-display>
                       </div>
@@ -83,8 +84,10 @@
 
                     <div class="col-lg-4">
                       <div class="form-group" [ngClass]="displayFieldCss('custName')">
-                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;"> Customer<span style="color: red;"> *</span></label>
-                        <select id="Axis" class="form-control" formControlName='custName' style="margin-top: 0px;">
+                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;"> Customer<span
+                            style="color: red;"> *</span></label>
+                        <select id="Axis" class="form-control" formControlName='custName' style="margin-top: 0px;"
+                          (change)="customerDetails(contactEntryForm)">
                           <!-- <option [selected]=true default disabled> Choose Customer</option> -->
                           <!-- <option value=""  selected >Choose Customer</option> -->
 
@@ -104,7 +107,8 @@
                     <div class="col-lg-4">
 
                       <div class="form-group" style="margin-bottom:2px" [ngClass]="displayFieldCss('contactName')">
-                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;"> Contact<span style="color: red;"> *</span></label>
+                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;"> Contact<span
+                            style="color: red;"> *</span></label>
 
                         <select id="Axis" (change)="contactDetails(contactEntryForm)" class="form-control"
                           formControlName='contactName' style="margin-top: 0px;">
@@ -140,12 +144,14 @@
                         </div>
                       </div>
                     </div>
-                    
+
                     <div class="col-lg-3" style="margin-top:38px">
 
                       <div class="form-group" style="margin-bottom:2px" [ngClass]="displayFieldCss('stageName')">
-                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Status<span style="color: red;"> *</span></label>
-                        <select id="Axis" class="form-control" formControlName="stageName" style="margin: 6px;margin-top: 0px;">
+                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Status<span
+                            style="color: red;"> *</span></label>
+                        <select id="Axis" class="form-control" formControlName="stageName"
+                          style="margin: 6px;margin-top: 0px;">
                           <!-- <option default disabled> Choose Status</option> -->
                           <option *ngIf="stage_des" default disabled>{{stage_des}}</option>
                           <option *ngFor="let status of stage_data" [ngValue]="status">
@@ -157,18 +163,33 @@
                           errorMsg="Please enter Status">
                         </app-field-error-display>
                       </div>
+                    </div>
 
-
+                    <div class="col-lg-3" style="margin-top:38px;margin-left: 73px;">
+
+                      <div class="form-group" [ngClass]="displayFieldCss('nextstep')">
+                        <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Next Action
+                          <span
+                            style="color: red;"> *</span></label>
+                        <textarea type="text" name="First Name" formControlName="nextstep" class="textarea" id="user"
+                          onkeyup="this.setAttribute('value', this.value);" value=""
+                          style="margin: 25px 0;padding: 14px;height:auto !important;border-bottom: 2px solid #e0e0e0 !important;margin-top: -2px;padding: 0px;margin-left: -2px;"></textarea>
+                        <app-field-error-display [displayError]="isFieldValid('nextstep')"
+                          errorMsg="Please enter Next steps details">
+                        </app-field-error-display>
+                      </div>
 
                     </div>
+
                   </div>
 
 
                   <div class="col-lg-3" style="padding-right: 5px;padding-left: 5px;">
                     <div class="form-group" [ngClass]="displayFieldCss('message')">
-                  <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Activity Remark<span style="color: red;"> *</span></label>
-                      <textarea type="text" name="First Name"  formControlName="message" class="textarea"
-                        id="user" onkeyup="this.setAttribute('value', this.value);" value="" 
+                      <label style="font-size: 16px;margin-top: 5px;margin-bottom: 0px;">Activity Remark<span
+                          style="color: red;"> *</span></label>
+                      <textarea type="text" name="First Name" formControlName="message" class="textarea" id="user"
+                        onkeyup="this.setAttribute('value', this.value);" value=""
                         style="margin: 25px 0;padding: 14px;height:auto !important;border-bottom: 2px solid #e0e0e0 !important;margin-top: -2px;padding: 0px;"></textarea>
                       <app-field-error-display [displayError]="isFieldValid('message')" errorMsg="Please enter Message">
                       </app-field-error-display>
@@ -185,29 +206,30 @@
 
               </div>
 
-             
 
-                <div class="col-lg-12 row text-lg-right">
 
-                  <div class="col-lg-8 col-md-7">
-                  </div>
+              <div class="col-lg-12 row text-lg-right">
 
-                  <div class="col-lg-4 col-sm-12 col-md-12" >
-                      <input class="cancelbutton" type="button" value="Delete" (click)="deleteEntry()" style="margin-right:15px" *ngIf="checkupdatedelete == true">
-               
-                    <input class="submitbutton" type="submit" value="Save" style="margin-right:15px">
+                <div class="col-lg-8 col-md-7">
+                </div>
+
+                <div class="col-lg-4 col-sm-12 col-md-12">
+                  <input class="cancelbutton" type="button" value="Delete" (click)="deleteEntry()"
+                    style="margin-right:15px" *ngIf="checkupdatedelete == true">
 
-                    <input class="cancelbutton" type="submit" value="reset"
+                  <input class="submitbutton" type="submit" value="Save" style="margin-right:15px">
+
+                  <input class="cancelbutton" type="submit" value="reset"
                     (click)="(contactEntryForm.reset({}));addUser()">
-                  </div>
+                </div>
+
+
+
 
-                  
 
 
-                  
 
 
-               
               </div>
 
 

+ 40 - 7
src/app/createentry/dvrentry.component.ts

@@ -52,6 +52,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
   role: any;
   check_date: any;
 
+  nextstep:any;
+
    checkupdatedelete:boolean;
   saveautoData = [];
   autofillData = [];
@@ -101,6 +103,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
         this.stage_des = response.data[0].stage_desc;
         this.stage_id = response.data[0].stage_id;
         this.check_date = response.data[0].created_on;
+        this.nextstep=response.data[0].nextstep;
         //this.visit_date = datePipetransform(this.visit_date.now(),'dd/MM/yyyy');
         this.visit_date = this.formatDate(this.visit_date);
         this.check_date=this.formatDate(this.check_date);
@@ -116,6 +119,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
           custName: new FormControl(this.customer_name, Validators.required),
           stageName: new FormControl(this.stage_des, Validators.required),
           ph_meet: new FormControl('yes', Validators.required),
+          nextstep: new FormControl(this.nextstep, Validators.required),
 
 
         });
@@ -163,7 +167,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
         custName: new FormControl(null, Validators.required),
         stageName: new FormControl(null, Validators.required),
         ph_meet: new FormControl('yes', Validators.required),
-
+        nextstep: new FormControl(null, Validators.required),
 
       });
 
@@ -311,8 +315,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
         message: new FormControl(this.autofillData["message"], Validators.required),
         contactName: new FormControl(this.contact_name, Validators.required),
         custName: new FormControl(this.customer_name, Validators.required),
-        stageName: new FormControl(this.stage_des, Validators.required)
-
+        stageName: new FormControl(this.stage_des, Validators.required),
+        nextstep: new FormControl(this.autofillData["nextstep"], Validators.required),
 
       });
     }
@@ -350,7 +354,7 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
         custName: new FormControl(this.customer_name, Validators.required),
         stageName: new FormControl(this.stage_des, Validators.required),
         ph_meet: new FormControl(this.autofillData["ph_meet"], Validators.required),
-
+        nextstep: new FormControl(this.autofillData["nextstep"], Validators.required),
 
       });
     }
@@ -415,7 +419,9 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
         message: form.value.message,
         physical_metting: form.value.ph_meet,
         stage_id: this.stage_id,
-        updated_by: this.login_id
+        updated_by: this.login_id,
+        nextstep: form.value.nextstep
+
       }
 
       console.log("createdvr", createdvr);
@@ -472,7 +478,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
           physical_metting: form.value.ph_meet,
           sale_person: this.username,
           stage_id: (form.value.stageName ? form.value.stageName.stage_id : ''),
-          created_by: this.login_id
+          created_by: this.login_id,
+          nextstep: form.value.nextstep
 
         }
       } else {
@@ -485,7 +492,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
           physical_metting: form.value.ph_meet,
           sale_person: this.username,
           stage_id: this.stage_id,
-          created_by: this.login_id
+          created_by: this.login_id,
+          nextstep: form.value.nextstep
 
         }
       }
@@ -528,6 +536,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
               custName: new FormControl(null, Validators.required),
               stageName: new FormControl(null, Validators.required),
               ph_meet: new FormControl('yes', Validators.required),
+              nextstep: new FormControl(null, Validators.required),
+
             });
             // console.log("response.data.message", response.data[0].exception.errorid);
             if (response.data[0].exception.errorid != '') {
@@ -585,6 +595,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
       custName: new FormControl(null, Validators.required),
       stageName: new FormControl(null, Validators.required),
       ph_meet: new FormControl('yes', Validators.required),
+      nextstep: new FormControl(null, Validators.required),
+
     });
   }
 
@@ -622,6 +634,25 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
 
   }
 
+  customerDetails(form: FormGroup){
+    console.log("form value", form.value.custName.customer_name);
+    if(form.value.custName){
+      this.commonservice.getAllData(this.commonservice.projectpath + "/getcustcontactdetails?customer_id="+form.value.custName.customer_name).subscribe(response => {
+        if (response.status == 'falsetoken') {
+          this.router.navigate(['/login'])
+        } else {
+          this.contact_data = response.data[0].conrtactData;
+          console.log("aaaaaaaaaaa------------>", this.contact_data);
+         // this.dtTrigger.next(this.dtOptions)
+
+        }
+      });
+
+    }else{
+      console.log("customer not selected yet");
+    }
+
+  }
 
   get dateValidationCheck() {
     return this.formControlName.get('date');
@@ -718,6 +749,8 @@ export class DvrEntryComponent implements OnInit, OnDestroy {
             custName: new FormControl(null, Validators.required),
             stageName: new FormControl(null, Validators.required),
             ph_meet: new FormControl('yes', Validators.required),
+            nextstep: new FormControl(null, Validators.required),
+
           });
           //this.router.navigate(['/home'])
           // console.log("response.data.message", response.data[0].exception.errorid);

+ 2 - 2
src/app/login/login.component.html

@@ -25,7 +25,7 @@
 
               <div class="card-body  col-lg-10">
                 <h3 class="mt-2 text-center"><b>Sign In</b></h3>
-                <p class="text-center mb-5">Hi there! Welcome aboard.</p>
+                <p class="text-center mb-5">Hi there! Welcome DVR Dashboard.</p>
 
 
                 <form [formGroup]='loginForm' (ngSubmit)="loginUser(loginForm)">
@@ -62,7 +62,7 @@
                     </div>
                     <div class="col-lg-7 padding0" style="text-align: end;">
 
-                      <a href="" style="color:#58585a"><u>Forgot Password?</u></a>
+                      <a routerLink="/password" style="color:#58585a"><u>Forgot Password?</u></a>
                     </div>
                   </div>
                   <div class="row mt-3 mb-4">

+ 48 - 0
src/app/password/password.component.css

@@ -0,0 +1,48 @@
+tr .even{background:red !important;}
+tfoot input {
+      width: 100%;
+      padding: 3px;
+      box-sizing: border-box;
+  }
+tr.highlight {
+  background-color: blue !important;
+}
+td,th {
+border: 1px solid #dad8d8 ;
+border-collapse: collapse;
+color: #0e0b0b;
+  font-size: 15px;
+
+}
+table.dataTable {
+  width: 100%;
+  margin: 0 auto;
+  clear: both;
+  border-collapse: collapse;
+}
+table{ border-collapse: collapse}
+tr {
+border-right: 1px solid #dad8d8 !important;
+border-collapse: collapse;
+
+}
+table.dataTable tbody tr{  border-right: 1px solid #dad8d8 !important;}
+
+table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.display tbody tr.odd:hover > .sorting_1{background-color:#f5f5f5 !important}
+table.dataTable thead > tr > th.sorting{background: #ffe8cb;}
+table.dataTable.display > tbody > tr.odd > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 {
+  box-shadow: none;
+}
+table.dataTable.display > tbody > tr.even > .sorting_1, table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 {
+  box-shadow: none;
+}
+a > .current{padding:0px 10px 0px 10px !important}
+table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
+  height: 28px;
+}
+.form-control:focus {
+border-color: #cacdd1 !important;
+}
+th{background: #ffe8cb !important;}
+
+

+ 112 - 0
src/app/password/password.component.html

@@ -0,0 +1,112 @@
+<div style="min-height: 100vh; background-size: cover; background-image: url(/assets/images/bg.jpg);overflow: hidden;">
+
+    <div class="container-fluid p-lg-0 p-sm-0 p-md-0" style="background:#ffffff">
+  
+      <div class="row">
+  
+        <div class="col-lg-4 col-md-3 col-sm-3" style="padding:10px">
+          <img src="/assets/images/mindcraft_logo.png" style="height:55px" />
+        </div>
+      </div>
+    </div>
+  
+    <div class="main">
+      <div class="pt-5 pb-5 mt-0 align-items-center d-flex ">
+        <br>
+        
+  
+        <div class="container-fluid">
+          <div class="row pt-4  justify-content-center align-items-center d-flex-row text-center h-100">
+            <div class="col-12 col-md-5 col-lg-4   h-50">
+              <div class="card shadow">
+                <div class="row col-lg-12">
+                <div class="col-lg-1">
+                </div>
+  
+                <div class="card-body  col-lg-10">
+                  <h3 class="mt-2 text-center"><b>Change Password</b></h3>
+  
+  
+                  <form [formGroup]='passwordForm' (ngSubmit)="passwordUser(passwordForm)">
+                    <div class="form-group input-group mt-4" style="margin-bottom:4px">
+                      <div class="input-group-prepend" style="    width: 100%;">
+                        <span class="input-group-text" style="height: 40px;padding: 10px"> <i class="fa fa-user"></i>
+                        </span>
+                        <input name="" class="" formControlName='email' placeholder="Username" type="text" (keyup)="onKeypressEvent($event)"
+                          style="border: 1px solid #caced3;padding-left:7px;margin-top:0px;    width: 100%;display:block">
+                          
+                      </div>
+                      <div *ngIf="loginvalidflag == true" class="pull-right col-lg-12" style="color:red">
+                        <label style="margin-bottom:0px">{{validationmsg}}</label>
+                      </div>
+  
+                    </div>
+                    <div class="form-group input-group mt-2" style="margin-bottom:4px">
+                      <div class="input-group-prepend" style="    width: 100%;">
+                        <span class="input-group-text" style="height: 40px; padding: 10px"> <i class="fa fa-lock"></i>
+                        </span>
+                      
+                        <input name="" class="" formControlName='password' placeholder="Password" type="password" (keyup)="onKeypressEvent1($event)"
+                          style="border: 1px solid #caced3;padding-left:7px;margin-top:0px;  width: 100%;display:block">
+                          
+                      </div>
+                      <div  *ngIf="loginvalidpassword == true" class="pull-right col-lg-12" style="color:red">
+                        <label style="margin-bottom:0px">{{validationmsg1}}</label>
+                      </div>
+                      
+                    </div>
+                    <div class="row mt-3 mb-4">
+                      
+                      <div class="col-lg-6 col-md-6">
+                        <div class="form-group">
+                          <button type="submit" class="submitbutton" >SUBMIT </button>
+                        </div>
+                      </div>
+                      <div class="col-lg-6 col-md-6">
+                        <div class="form-group">
+                          <button type="submit" class="cancelbutton" (click)="(passwordForm.reset({}))" > CANCEL </button>
+                        </div>
+                      
+                      </div>
+
+                      <div class="modal" tabindex="-1" role="dialog" [ngStyle]="{'display':displayStyle}">
+                        <div class="modal-dialog" role="document">
+                          <div class="modal-content">
+                            <div class="modal-header">
+                              <h4 class="modal-title">{{status_msg}}</h4>
+        
+                            </div>
+                            <div class="modal-body">
+                              <p>{{error_msg}}</p>
+        
+                            </div>
+                            <div class="modal-footer">
+                              <button type="button" class="btn btn-danger" (click)="closePopup()">
+                                Close
+                              </button>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+  
+                    </div>
+                  </form>
+                 
+                </div>
+  
+                <div class="col-lg-1">
+                </div>
+              </div>
+            </div>
+          </div>
+  
+  
+          </div>
+  
+  
+        </div>
+  
+      </div>
+      <style>
+  body{overflow: hidden;}
+        </style>

+ 138 - 0
src/app/password/password.component.ts

@@ -0,0 +1,138 @@
+import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+import { CommonFunctionService } from '../services/commonfunctions.service';
+import { response } from 'express';
+import { Router } from '@angular/router';
+
+
+@Component({
+  selector: 'dvr-password',
+  templateUrl: './password.component.html',
+  styleUrls: ['./password.component.css']
+
+})
+
+export class PasswordComponent implements OnInit {
+
+  public passwordForm !: FormGroup;
+  loginStatus: any;
+  loginvalidflag: boolean = false;
+  loginvalidpassword: boolean = false;
+  validationmsg: any;
+  validationmsg1: any;
+  error_msg: any;
+  success_msg: any;
+  status_msg: any;
+  displayStyle = "none";
+  checkoperationflag: boolean = false;
+  entry_successflag: boolean = false;
+
+
+  constructor(private router: Router, private commonservice: CommonFunctionService) {
+    console.log("in password changes");
+  }
+
+
+  ngOnInit() {
+    this.passwordForm = new FormGroup({
+      email: new FormControl(null, Validators.required),
+      password: new FormControl(null, [Validators.required, Validators.maxLength(8)])
+    });
+  }
+
+  ngOnChanges() {
+    console.log("this.passwordForm------>", this.passwordForm);
+  }
+
+  passwordUser(form: FormGroup) {
+    console.log('Username', form.value.email);
+    //console.log('password', form.value.password);
+
+
+    const logindata = {
+      username: form.value.email,
+      password: form.value.password
+    }
+
+    //console.log("username and password ", logindata);
+
+    this.validationmsg = "";
+    this.validationmsg1 = "";
+    this.loginvalidflag = false;
+    this.loginvalidpassword = false;
+    this.commonservice.getData(this.commonservice.projectpath + "/changepassword", logindata).subscribe(response => {
+      //   console.log("in response", response);
+      console.log("in response", response);
+
+
+      if (response.data.length == 0) {
+        //warning 
+        this.openPopup();
+        this.status_msg = "Warning";
+        this.error_msg = response.errors;
+        this.entry_successflag=true;
+      } else if (response.data.length > 0) {
+        console.log("inside if(response.message== '') ")
+        this.openPopup();
+        this.status_msg = "Success";
+        this.error_msg = response.data[0].message;
+        this.checkoperationflag=true;
+        console.log("error_msg", this.error_msg);
+      }
+      else {
+        this.status_msg = "";
+        this.error_msg = "";
+      }
+
+
+    })
+
+
+
+
+  }
+
+  onCancle() {
+    console.log("in cancel");
+    this.validationmsg = "";
+
+
+  }
+
+  onKeypressEvent(event: any) {
+
+    // console.log("in onkey press",event.target.value);
+    this.loginvalidflag = false;
+
+  }
+
+  openPopup() {
+    this.displayStyle = "block";
+  }
+  onKeypressEvent1(event: any) {
+
+    // console.log("in onkey press",event.target.value);
+    this.loginvalidpassword = false;
+
+  }
+
+  closePopup() {
+    this.displayStyle = "none";
+
+    if (this.checkoperationflag == true) {
+      this.router.navigate(['/login'])
+
+    } else {
+      if (this.entry_successflag == true) {
+        window.location.reload();
+      }
+    }
+  }
+
+}
+
+
+
+
+

+ 3 - 3
src/app/services/commonfunctions.service.ts

@@ -24,7 +24,7 @@ export class CommonFunctionService {
     headers = headers.append("Access-Control-Allow-Origin", '*')
     let text = "Mr. Blue has a blue house";
     // let position = text.search("blue");
-    var urlfind = url.includes("loginuser") || url.includes("signupuser");
+    var urlfind = url.includes("loginuser") || url.includes("changepassword");
     if (urlfind) {
       console.log("login url");
       let abc: any;
@@ -59,7 +59,7 @@ export class CommonFunctionService {
     headers = headers.append("Content-Type", "application/json")
     headers = headers.append("Access-Control-Allow-Origin", '*')
 
-    var urlfind = url.includes("loginuser") || url.includes("signupuser");
+    var urlfind = url.includes("loginuser") || url.includes("changepassword");
     if (urlfind) {
       console.log("login url");
       let abc: any; abc = this.http.post(url, params,
@@ -93,7 +93,7 @@ export class CommonFunctionService {
     headers = headers.append("Content-Type", "application/json")
     headers = headers.append("Access-Control-Allow-Origin", '*')
 
-    var urlfind = url.includes("loginuser") || url.includes("signupuser");
+    var urlfind = url.includes("loginuser") || url.includes("changepassword");
     if (urlfind) {
       console.log("login url");
       let abc: any; abc = this.http.post(url, params,