From 4133406fb5c648cd6dc4e0fd326d6301cf87939f Mon Sep 17 00:00:00 2001 From: saravanakumarkandasami Date: Sat, 6 Oct 2018 20:22:08 +0530 Subject: [PATCH 1/3] entity and pd trigger UI changes --- .../pd-triger/add-pd/add-pd.component.html | 47 +++++----- .../edit-pd-applicant.component.html | 1 - .../edit-pd-master.component.html | 1 - .../edit-pd-master.component.ts | 2 +- .../pd-triger/list-pd/list-pd.component.html | 72 +++++++++++---- .../pd-triger/list-pd/list-pd.component.ts | 6 +- .../pd-allocation.component.html | 27 ------ .../pd-allocation.component.scss | 0 .../pd-allocation.component.spec.ts | 25 ------ .../pd-allocation/pd-allocation.component.ts | 85 ------------------ .../pd-triger/pd-service/pd-triger.service.ts | 29 ++---- .../src/app/pd-triger/pd-triger.module.ts | 12 +-- .../pd-triger/view-pd/view-pd.component.html | 43 ++++----- .../pd-triger/view-pd/view-pd.component.scss | 2 +- .../pd-triger/view-pd/view-pd.component.ts | 18 +--- .../entity-add/entity.add.component.html | 44 +++++---- .../entity/entity-add/entity.add.component.ts | 10 +-- .../entity-edit/entity.edit.component.html | 42 ++++++--- .../entity-edit/entity.edit.component.ts | 12 +-- .../entity-list/entity.list.component.html | 21 ++--- ng6-seed/src/assets/images/lime.jpg | Bin 0 -> 1104 bytes 21 files changed, 197 insertions(+), 302 deletions(-) delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.spec.ts delete mode 100644 ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts create mode 100644 ng6-seed/src/assets/images/lime.jpg diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html b/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html index 8607f5530..c98778f50 100644 --- a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html +++ b/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.html @@ -105,18 +105,23 @@ Pincode is required. - - {{allocationLabel}} - - {{subAllocationLabel}} - - + +
+

Allocation

+
{{allocationLabel}} +
+
+ {{subAllocationLabel}} + +
+
+ @@ -134,7 +139,7 @@ - Email is required. + Email number is required. @@ -148,6 +153,7 @@
+
@@ -170,11 +176,13 @@
- +
+
Co-Applicant
- + +
@@ -185,10 +193,11 @@
+
Document
- + @@ -204,9 +213,7 @@ - - +
@@ -227,4 +234,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html index 92e007b0b..125b81296 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html @@ -70,5 +70,4 @@ - \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html index cec20aecb..b1145bcb8 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html +++ b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.html @@ -115,4 +115,3 @@ - diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts index 37558080b..fc7405eac 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts @@ -21,7 +21,7 @@ export class EditPdMasterComponent implements OnInit { @Input() masterChild: any; @Output() loadPdView = new EventEmitter(); public _EditPDtriggerForm:FormGroup; - private notifier: NotifierService; + public notifier: NotifierService; constructor(private _fb: FormBuilder, private _pd: PdTrigerService, notifier: NotifierService,) { this.notifier=notifier diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html index ec2759fa7..814237603 100644 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html @@ -1,19 +1,21 @@ -
- +
+ +
- All PD Details + All +
- +

{{details.applicat_details[0].applicant_name}}

-

{{details.lender_full_name}}    {{details.lender_applicant_id}}   {{details.pd_date_of_initiation}}

-

{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}}   {{details.loan_amount}}    {{details.city_name}}/{{details.state_name}}-{{details.pincode}}

+

{{details.lender_full_name}} {{details.lender_applicant_id}}{{details.pd_date_of_initiation}}

+

{{details.product_abbr}}/{{details.subproduct_abbr}}/{{details.customer_segment_abbr}} {{details.loan_amount}}  {{details.city_name}}/{{details.state_name}}-{{details.pincode}}

- In Progress PD Details + In Progress - {{tile.text}} @@ -78,9 +80,47 @@ -
+
--> - --> + + + Scheduled + + + + + + Completed + + + + diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts index 5d6597f80..f7d1c702e 100644 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts +++ b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.ts @@ -1,6 +1,6 @@ import { Component, ViewChild, OnInit, ViewEncapsulation, EventEmitter, Output } from '@angular/core'; -import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; import { PdTrigerService } from '../pd-service/pd-triger.service'; +import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/material'; @Component({ selector: 'app-list-pd', @@ -109,9 +109,6 @@ export class ListPdComponent implements OnInit { } }, error => this.errorMessage = error); } - ngAfterViewInit() { - this.dataSource.paginator = this.paginator; - } addPdDetails(){ this.showParentComponent=false this.showEditComponent=false @@ -152,7 +149,6 @@ export class ListPdComponent implements OnInit { this.pdListData = data.records; this.dataLength = data.records.length; this.dataSource.data = this.pdListData; - this.recordStatus=false; } else{ diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html deleted file mode 100644 index 15ad414a8..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.html +++ /dev/null @@ -1,27 +0,0 @@ - - - {{pageTitle}} - - - -
- -
- - - {{ ct.categroy_name }} - - Select name. - -
-
- - -
- -
-
-
- - \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.spec.ts b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.spec.ts deleted file mode 100644 index c2547603e..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PdAllocationComponent } from './pd-allocation.component'; - -describe('PdAllocationComponent', () => { - let component: PdAllocationComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ PdAllocationComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PdAllocationComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts deleted file mode 100644 index e146a8df3..000000000 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; -import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { NotifierService } from 'angular-notifier'; -import { PdTrigerService } from '../pd-service/pd-triger.service'; - -@Component({ - selector: 'app-pd-allocation', - templateUrl: './pd-allocation.component.html', - styleUrls: ['./pd-allocation.component.scss'] -}) -export class PdAllocationComponent implements OnInit { - public pageTitle: string = "PD Allocation To"; - public _pdAllocationForm: FormGroup; - public pdOfficerList: any = []; - errorMessage: any; - notifier : NotifierService; - constructor( notifier: NotifierService, - private _fb: FormBuilder, - private dialogRef: MatDialogRef, - private _pd: PdTrigerService, - @Inject(MAT_DIALOG_DATA) public data: any) { - this.notifier=notifier; - console.log(this.data) - this.getPDOfficerList(); - } - - ngOnInit() { - this._pdAllocationForm = this._fb.group({ - pd_primary_id: [null], - allocation_id: [null, Validators.compose([Validators.required])], - }); - } - -// convenience getter for easy access to form fields -get readForm() { return this._pdAllocationForm.controls; } - -// pd officer list - getPDOfficerList(){ - this._pd.getPdOfficerList().subscribe( - data => { - if (data.status == 200) { - this.pdOfficerList=data.records.pd_master_details; - - } - }, error => this.errorMessage = error); - - } - /** To Save/Edited Popup Data */ - onSubmit() { - // stop here if form is invalid - if (this._pdAllocationForm.invalid) { - this.errorMessage = "Please Fill All Mandate Fields."; - return; - } else { - var updateData = this._pdAllocationForm.value; - - //To Remove The "Null" With Key also - Object.keys(updateData).forEach((key) => (updateData[key] == null) && delete updateData[key]); - - //Add BRANCH data with help Service File - this._pd.updatePdOfficer(updateData).subscribe( - result => { - if (result.status == 200) { - this.notifier.notify('success', 'Your Changes Updated.!'); - this.dialogRef.close(); - } - else { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - this.errorMessage = "Something Wents Wrong Try Again.!"; - } - }, error => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - this.errorMessage = "Some Thing Wents Wrong Try Again.!"; - this.dialogRef.close(); - }); - //After Saving the BRANCH data then popup close - // this.dialogRef.close(); - } - } -/** For Popup Close Button */ -closeAllocationComponent(): void { - this.dialogRef.close(); -} -} diff --git a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts index c77b0d72a..a6e35101c 100644 --- a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts @@ -21,7 +21,7 @@ export interface Master { export class PdTrigerService { private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; - //private apiUrl = "http://192.168.15.5:9999/AWSEC2/sparqapi/api/"; + //private apiUrl = "http://192.168.0.17:9999/AWSEC2/sparqapi/api/"; @@ -113,6 +113,7 @@ export class PdTrigerService { updatePdApplicant(editData:any):Observable{ // editData.fk_updatedby = this._aws.getlocale(); // editData.updatedon = currentdate; + console.log(editData) return this._http.post(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":editData}) .pipe( @@ -120,24 +121,10 @@ export class PdTrigerService { ) } - // get pd allocation to details - getPdOfficerList(): Observable { - return this._http.get(this.apiUrl+"getListPDOfficers") - .pipe( - catchError(this.handleError('operation', [])) - ) - } - // update pd officer - updatePdOfficer(updateData: any): Observable { - return this._http.post(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":updateData}) - .pipe( - catchError(this.handleError('operation', [])) - ) - } - - private handleError(operation = 'operation', result?: T) { - return (error: any): Observable => { - return of(result as T); - }; - } + + private handleError(operation = 'operation', result?: T) { + return (error: any): Observable => { + return of(result as T); + }; + } } diff --git a/ng6-seed/src/app/pd-triger/pd-triger.module.ts b/ng6-seed/src/app/pd-triger/pd-triger.module.ts index fa393eedf..9ea40fdf6 100644 --- a/ng6-seed/src/app/pd-triger/pd-triger.module.ts +++ b/ng6-seed/src/app/pd-triger/pd-triger.module.ts @@ -19,8 +19,6 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; import { NotifierModule, NotifierOptions } from 'angular-notifier'; -import {MatDatepickerModule} from '@angular/material/datepicker'; - import 'hammerjs'; import { PdTrigerRoutes } from './pd-triger-routing.module'; @@ -31,11 +29,10 @@ import { EditPdComponent } from './edit-pd/edit-pd.component'; import { ViewPdComponent } from './view-pd/view-pd.component'; import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component'; import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component'; -import { PdAllocationComponent } from './pd-allocation/pd-allocation.component'; /** * Custom angular notifier options */ -const customNotifierOptions: NotifierOptions = { +const pdCustomNotifierOptions: NotifierOptions = { position: { horizontal: { position: 'right', @@ -79,7 +76,7 @@ const customNotifierOptions: NotifierOptions = { imports: [ CommonModule, RouterModule.forChild(PdTrigerRoutes), - NotifierModule.withConfig(customNotifierOptions), + NotifierModule.withConfig(pdCustomNotifierOptions), MatCardModule, MatIconModule, MatInputModule, @@ -97,10 +94,9 @@ const customNotifierOptions: NotifierOptions = { FileUploadModule, TreeModule, MatDialogModule,MatSortModule, - NgxMatSelectSearchModule,MatTooltipModule, MatDatepickerModule, + NgxMatSelectSearchModule,MatTooltipModule, ], - declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent, PdAllocationComponent], - entryComponents: [PdAllocationComponent], + declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent], providers: [PdTrigerService] }) export class PdTrigerModule { } diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html index 7e0b016bd..6e01a9e6c 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html @@ -1,13 +1,14 @@ -
- - + + +
+
- - -
@@ -17,7 +18,6 @@  {{master.city_name}} / {{master.state_name}}-{{master.pincode}} -

{{master.product_name}} / {{master.subproduct_name}}

{{master.pd_type_name}}   {{master.pd_allocation_type_name}}    {{master.pd_allocated_to}}

@@ -40,7 +40,7 @@ Applicants - +

@@ -53,31 +53,31 @@ + + - +

+ +
Documents - + -

- {{documents.pd_document_title}}     - -  {{documents.pd_document_name}} -

+
-
+ + + @@ -86,11 +86,4 @@ - - - diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss index 542c06744..fd48f4449 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.scss @@ -1,3 +1,3 @@ .cardEdit { - display: inline;float:right; + display: inline;float:right;padding-top:3%; } \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts index 29e3ba07a..bfb32830f 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; -import { MatDialog } from '@angular/material'; import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; +import { CustomValidators } from 'ng2-validation'; import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from '../pd-service/pd-triger.service'; -import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; @Component({ selector: 'app-view-pd', templateUrl: './view-pd.component.html', @@ -26,7 +25,7 @@ export class ViewPdComponent implements OnInit { @Output() loadParent = new EventEmitter(); public _EditPDtriggerForm:FormGroup; constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, notifier:NotifierService, private dialog: MatDialog,) { + private _pd: PdTrigerService, notifier:NotifierService) { this.notifier=notifier } @@ -43,7 +42,6 @@ export class ViewPdComponent implements OnInit { if (data.status == 200) { this.pdMasterData=data.records.pd_master_details; this.pdApplicantData= data.records.applicants_details; - this.pdDocumentsData=data.records.pd_documnets; this.pdLogsData=data.records.pd_logs; } }, error => this.errorMessage = error); @@ -61,18 +59,6 @@ export class ViewPdComponent implements OnInit { this.editApplicantData=applicantData; this.showEditApplicantComponent=!this.showEditApplicantComponent; } - // pd allocation to - // edit questions master details popup model - pdAllocationTo(pdID:any) { - const dialogRef = this.dialog.open(PdAllocationComponent, { - data: pdID, - disableClose: true - }); - dialogRef.afterClosed() - .subscribe(dataresult => { - //this.getQuestionsMasters(); - }); - } updateViewComponent(editBack:string) { if(editBack=='1'){ diff --git a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html index 5a7d3deef..dc2b65856 100644 --- a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html +++ b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.html @@ -1,13 +1,14 @@
+

{{pageTitle}}

- +
- +
@@ -17,8 +18,7 @@ You must Select Entity Type. -
-
+
@@ -65,8 +65,16 @@
- + You must Include Address. + + + + + + + + @@ -82,8 +90,8 @@ - - You must Select Alternet Email. + + @@ -93,7 +101,7 @@ - You must Include Mobile Number. +
@@ -103,10 +111,12 @@ You must Include Remarks.
-
+ + +

{{subTitle1}}

- + You must Include Pan Number. @@ -124,14 +134,16 @@ You must Include TAT.
-
+
+
+

{{subTitle2}}

- +
@@ -157,8 +169,9 @@
- -
+ + +
@@ -172,8 +185,9 @@
+
- +
diff --git a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts index 1f5484466..899778a06 100644 --- a/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts +++ b/ng6-seed/src/app/settings/entity/entity-add/entity.add.component.ts @@ -36,7 +36,9 @@ import { EntityService } from './../../service/entity/entity.service'; }) export class EntityAddComponent implements OnInit { - public pageTitle: string = "Add Entity Master Details"; + public pageTitle: string = "Entity"; + public subTitle1: string = "Tax Info"; + public subTitle2: string = "Contacts"; public _addQuesFrom: FormGroup; public submitted = false; public categories: any = []; @@ -72,10 +74,8 @@ export class EntityAddComponent implements OnInit { fk_branch: [null, Validators.compose([Validators.required])], addressline1: [null, Validators.compose([Validators.required])], pincode: [null, Validators.compose([Validators.required])], - official_email: [null, Validators.compose([Validators.required, Validators.email])], - alt_email: [null, Validators.compose([Validators.required, Validators.email])], - phone_number: [null, Validators.compose([Validators.required])], - mobile_no: [null, Validators.compose([Validators.required])], + official_email: [null, Validators.compose([Validators.required, Validators.email])], + phone_number: [null, Validators.compose([Validators.required])], remarks: [null, Validators.compose([Validators.required])], pan: [null, Validators.compose([Validators.required])], gst_no: [null, Validators.compose([Validators.required])], diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html index a002c9080..fa3cb8bf2 100644 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.html @@ -1,13 +1,14 @@
+

{{pageTitle}}

- +
- +
@@ -17,8 +18,7 @@ You must Select Entity Type. -
-
+
@@ -65,8 +65,16 @@
- + You must Include Address. + + + + + + + + @@ -82,8 +90,8 @@ - - You must Select Alternet Email. + + @@ -93,7 +101,7 @@ - You must Include Mobile Number. +
@@ -103,10 +111,12 @@ You must Include Remarks.
-
+ + +

{{subTitle1}}

- + You must Include Pan Number. @@ -124,7 +134,10 @@ You must Include TAT.
-
+
+ + +

{{subTitle2}}

@@ -160,8 +173,8 @@
- -
+ +
@@ -175,6 +188,7 @@ (click)="onReset()">settings_backup_restore
- + + diff --git a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.ts b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.ts index 300fb31a0..750cd6fbe 100644 --- a/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.ts +++ b/ng6-seed/src/app/settings/entity/entity-edit/entity.edit.component.ts @@ -33,7 +33,9 @@ export class EntityEditComponent implements OnInit{ @Input() public childMessage: any; -public pageTitle: string = "Edit Entity Master Details"; +public pageTitle: string = "Entity"; + public subTitle1: string = "Tax Info"; + public subTitle2: string = "Contacts"; public _addQuesFrom: FormGroup; public submitted = false; public categories: any = []; @@ -95,12 +97,10 @@ public pageTitle: string = "Edit Entity Master Details"; fk_state: [this.childMessage.fk_state, Validators.compose([Validators.required])], fk_city: [this.childMessage.fk_city, Validators.compose([Validators.required])], fk_branch: [this.childMessage.fk_branch, Validators.compose([Validators.required])], - addressline1: [this.childMessage.addressline1, Validators.compose([Validators.required])], + addressline1: [this.childMessage.addressline1, Validators.compose([Validators.required])], pincode: [this.childMessage.pincode, Validators.compose([Validators.required])], - official_email: [this.childMessage.official_email, Validators.compose([Validators.required, Validators.email])], - alt_email: [this.childMessage.alt_email, Validators.compose([Validators.required, Validators.email])], - phone_number: [this.childMessage.phone_number, Validators.compose([Validators.required])], - mobile_no: [this.childMessage.mobile_no, Validators.compose([Validators.required])], + official_email: [this.childMessage.official_email, Validators.compose([Validators.required, Validators.email])], + phone_number: [this.childMessage.phone_number, Validators.compose([Validators.required])], remarks: [this.childMessage.remarks, Validators.compose([Validators.required])], pan: [this.childMessage.pan, Validators.compose([Validators.required])], gst_no: [this.childMessage.gst_no, Validators.compose([Validators.required])], diff --git a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html index 1f33e28f2..ade078062 100644 --- a/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html +++ b/ng6-seed/src/app/settings/entity/entity-list/entity.list.component.html @@ -1,12 +1,13 @@
- +
-
Entity Master
-
List of Entity Master Details
+
Entity Master
+ +
-
+
- + +
- + -
- - - {{ ct.categroy_name }} - - Select name. - -
+ + + +

+ {{officer.first_name}} +

+

+ Allocated +

+

+ Scheduled +

+

+ Inprogress +

+ +
+
+ + +

PD officer not available..

+
+
- +
- - + +
+ + + - \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss index e69de29bb..6e263adae 100644 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss +++ b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.scss @@ -0,0 +1,3 @@ +.example-full-width{ + width: 100%; +} \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts index e146a8df3..5bde0ee3e 100644 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts @@ -15,54 +15,61 @@ export class PdAllocationComponent implements OnInit { public pdOfficerList: any = []; errorMessage: any; notifier : NotifierService; + selectedItem:any; + isDisabled: boolean; constructor( notifier: NotifierService, private _fb: FormBuilder, private dialogRef: MatDialogRef, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any) { this.notifier=notifier; - console.log(this.data) - this.getPDOfficerList(); } ngOnInit() { - this._pdAllocationForm = this._fb.group({ - pd_primary_id: [null], - allocation_id: [null, Validators.compose([Validators.required])], - }); + this.isDisabled=true; + this.getPDOfficerList(this.data.pd_id); + + // this._pdAllocationForm = this._fb.group({ + // pd_primary_id: [null], + // allocation_id: [null], + // }); } // convenience getter for easy access to form fields -get readForm() { return this._pdAllocationForm.controls; } +// get readForm() { return this._pdAllocationForm.controls; } // pd officer list - getPDOfficerList(){ - this._pd.getPdOfficerList().subscribe( + getPDOfficerList(pdID:string){ + this._pd.getPdOfficerList(pdID).subscribe( data => { if (data.status == 200) { - this.pdOfficerList=data.records.pd_master_details; + this.pdOfficerList=data.records; } }, error => this.errorMessage = error); } - /** To Save/Edited Popup Data */ - onSubmit() { - // stop here if form is invalid - if (this._pdAllocationForm.invalid) { - this.errorMessage = "Please Fill All Mandate Fields."; - return; - } else { - var updateData = this._pdAllocationForm.value; + // select pd officer list + selectPdOfficer(selected:any){ + this.isDisabled=false; + this.selectedItem=selected; + // this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - //To Remove The "Null" With Key also - Object.keys(updateData).forEach((key) => (updateData[key] == null) && delete updateData[key]); - - //Add BRANCH data with help Service File + } + /** To update pd officer*/ + updatePdOfficer(allocateDate:any) { + if(this.isDisabled){ + this.notifier.notify('warning', 'Please Choose Minimum One PD Officer.!'); + } + else { + let updateData = { + "pd_id":this.data.pd_id, + "fk_pd_allocated_to":allocateDate.fk_user_id, + } this._pd.updatePdOfficer(updateData).subscribe( result => { if (result.status == 200) { - this.notifier.notify('success', 'Your Changes Updated.!'); + // this.notifier.notify('success', 'Your Changes Updated.!'); this.dialogRef.close(); } else { @@ -72,14 +79,12 @@ get readForm() { return this._pdAllocationForm.controls; } }, error => { this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.errorMessage = "Some Thing Wents Wrong Try Again.!"; - this.dialogRef.close(); + // this.dialogRef.close(); }); - //After Saving the BRANCH data then popup close - // this.dialogRef.close(); } } /** For Popup Close Button */ -closeAllocationComponent(): void { - this.dialogRef.close(); -} + closeAllocationComponent(): void { + this.dialogRef.close(); + } } diff --git a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts index c77b0d72a..9f75af2fe 100644 --- a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts @@ -20,8 +20,8 @@ export interface Master { export class PdTrigerService { - private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; - //private apiUrl = "http://192.168.15.5:9999/AWSEC2/sparqapi/api/"; + //private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; + private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/"; @@ -121,15 +121,17 @@ export class PdTrigerService { } // get pd allocation to details - getPdOfficerList(): Observable { - return this._http.get(this.apiUrl+"getListPDOfficers") + getPdOfficerList(pdID:string): Observable { + return this._http.post(this.apiUrl+"getListPDOfficers",{"pdid":pdID}) .pipe( catchError(this.handleError('operation', [])) ) } // update pd officer updatePdOfficer(updateData: any): Observable { - return this._http.post(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":updateData}) + updateData.fk_updatedby = this._aws.getlocale(); + updateData.updatedon = currentdate; + return this._http.post(this.apiUrl+"allocatePD",{"records":updateData}) .pipe( catchError(this.handleError('operation', [])) ) diff --git a/ng6-seed/src/app/pd-triger/pd-triger.module.ts b/ng6-seed/src/app/pd-triger/pd-triger.module.ts index fa393eedf..78c182bd0 100644 --- a/ng6-seed/src/app/pd-triger/pd-triger.module.ts +++ b/ng6-seed/src/app/pd-triger/pd-triger.module.ts @@ -8,7 +8,7 @@ import { MatRadioModule, MatButtonModule,MatTableModule,MatPaginatorModule, MatProgressBarModule,MatDialogModule, MatSortModule, - MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule } from '@angular/material'; + MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule, MatBadgeModule } from '@angular/material'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload'; @@ -92,7 +92,7 @@ const customNotifierOptions: NotifierOptions = { FlexLayoutModule, NgxDatatableModule, FormsModule,MatSlideToggleModule, - MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, + MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, ReactiveFormsModule, FileUploadModule, TreeModule, diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts index 29e3ba07a..56f0dd791 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts @@ -11,7 +11,7 @@ import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component' encapsulation: ViewEncapsulation.None }) export class ViewPdComponent implements OnInit { - public notifier:NotifierService; + private notifier:NotifierService; errorMessage: any; pdMasterData: any; pdApplicantData: any; @@ -70,7 +70,9 @@ export class ViewPdComponent implements OnInit { }); dialogRef.afterClosed() .subscribe(dataresult => { - //this.getQuestionsMasters(); + this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); + + this.viewPdDetails(this.childData) }); } updateViewComponent(editBack:string) { From e9433f3c42cc38b72ce77f3e9a2e77e1358b8f19 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Sat, 6 Oct 2018 21:53:37 +0530 Subject: [PATCH 3/3] pd changes --- .../app/pd-triger/add-pd/add-pd.component.ts | 8 +++---- .../edit-pd-applicant.component.html | 2 ++ .../edit-pd-applicant.component.ts | 2 +- .../edit-pd-master.component.ts | 2 +- .../pd-triger/list-pd/list-pd.component.html | 1 + .../pd-allocation/pd-allocation.component.ts | 4 ++-- .../pd-triger/pd-service/pd-triger.service.ts | 19 ++------------- .../src/app/pd-triger/pd-triger.module.ts | 4 +++- .../pd-triger/view-pd/view-pd.component.html | 24 ++++++++++--------- .../pd-triger/view-pd/view-pd.component.ts | 15 ++++++------ 10 files changed, 36 insertions(+), 45 deletions(-) diff --git a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts b/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts index 2880b9299..1613e5c92 100644 --- a/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/pd-triger/add-pd/add-pd.component.ts @@ -12,7 +12,7 @@ import { AwsService } from '../../AwsService/aws.service'; }) export class AddPdComponent implements OnInit { @Output() loadParent = new EventEmitter(); - public notifier: NotifierService; + private notifier: NotifierService; public _PDtriggerForm: FormGroup; items: FormArray; productList:any; @@ -31,8 +31,8 @@ export class AddPdComponent implements OnInit { subAllocationTypeCheck: boolean; allocationLabel: string; subAllocationLabel: string; - constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, private _aws:AwsService, notifier: NotifierService) { + constructor(notifier: NotifierService,private _fb: FormBuilder, + private _pd: PdTrigerService, private _aws:AwsService) { this.notifier = notifier; } public totalfiles: Array =[]; @@ -290,7 +290,7 @@ export class AddPdComponent implements OnInit { this._pd.addPdDetails(pd_form).subscribe(result => { if (result.status == 200) { - this.notifier.notify('success', 'PD Saved Successfully.!'); + this.notifier.notify('success', 'PD Saved.'); this.loadPdListCompoent(); } else { diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html index 125b81296..198e3fb58 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html +++ b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.html @@ -70,4 +70,6 @@
+ + \ No newline at end of file diff --git a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts index b0c20d303..7d42232cf 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts +++ b/ng6-seed/src/app/pd-triger/edit-pd-applicant/edit-pd-applicant.component.ts @@ -105,7 +105,7 @@ export class EditPdApplicantComponent implements OnInit { this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => { if (result.status == 200) { - this.notifier.notify('success', 'PD Saved Successfully.!'); + this.notifier.notify('success', 'Applicants updated..'); this.loadPdMasterCompoent(); } else { diff --git a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts index fc7405eac..9ed6604ac 100644 --- a/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/pd-triger/edit-pd-master/edit-pd-master.component.ts @@ -121,7 +121,7 @@ export class EditPdMasterComponent implements OnInit { } } loadPdMasterCompoent() { - this.notifier.notify('success', 'Your Changes Updated.!'); + // this.notifier.notify('success', 'Your Changes Updated.!'); this.loadPdView.emit('1') } diff --git a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html index 814237603..60888e66e 100644 --- a/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html +++ b/ng6-seed/src/app/pd-triger/list-pd/list-pd.component.html @@ -128,3 +128,4 @@ + diff --git a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts index 5bde0ee3e..ac56fdf9e 100644 --- a/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/pd-triger/pd-allocation/pd-allocation.component.ts @@ -59,7 +59,7 @@ export class PdAllocationComponent implements OnInit { /** To update pd officer*/ updatePdOfficer(allocateDate:any) { if(this.isDisabled){ - this.notifier.notify('warning', 'Please Choose Minimum One PD Officer.!'); + this.notifier.notify('warning', 'Please Choose PD Officer.!'); } else { let updateData = { @@ -69,7 +69,7 @@ export class PdAllocationComponent implements OnInit { this._pd.updatePdOfficer(updateData).subscribe( result => { if (result.status == 200) { - // this.notifier.notify('success', 'Your Changes Updated.!'); + this.notifier.notify('success', 'PD Allocated.!'); this.dialogRef.close(); } else { diff --git a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts index c49f7aabd..62f166ac7 100644 --- a/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts +++ b/ng6-seed/src/app/pd-triger/pd-service/pd-triger.service.ts @@ -20,16 +20,10 @@ export interface Master { export class PdTrigerService { -<<<<<<< HEAD - //private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; - private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/"; -======= private apiUrl = "http://ssa.sineedge.com/sparqapi/api/"; - //private apiUrl = "http://192.168.0.17:9999/AWSEC2/sparqapi/api/"; ->>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f + //private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/"; + //private apiUrl = "http://ssa.sineedge.com/sparqtest/api/"; - - constructor(private _http: HttpClient, private _aws:AwsService) { } // get add pd master details @@ -126,7 +120,6 @@ export class PdTrigerService { ) } -<<<<<<< HEAD // get pd allocation to details getPdOfficerList(pdID:string): Observable { return this._http.post(this.apiUrl+"getListPDOfficers",{"pdid":pdID}) @@ -143,18 +136,10 @@ export class PdTrigerService { catchError(this.handleError('operation', [])) ) } - - private handleError(operation = 'operation', result?: T) { - return (error: any): Observable => { - return of(result as T); - }; - } -======= private handleError(operation = 'operation', result?: T) { return (error: any): Observable => { return of(result as T); }; } ->>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f } diff --git a/ng6-seed/src/app/pd-triger/pd-triger.module.ts b/ng6-seed/src/app/pd-triger/pd-triger.module.ts index c947c0495..ce716f451 100644 --- a/ng6-seed/src/app/pd-triger/pd-triger.module.ts +++ b/ng6-seed/src/app/pd-triger/pd-triger.module.ts @@ -29,6 +29,7 @@ import { EditPdComponent } from './edit-pd/edit-pd.component'; import { ViewPdComponent } from './view-pd/view-pd.component'; import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component'; import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component'; +import { PdAllocationComponent } from './pd-allocation/pd-allocation.component'; /** * Custom angular notifier options */ @@ -96,7 +97,8 @@ const pdCustomNotifierOptions: NotifierOptions = { MatDialogModule,MatSortModule, NgxMatSelectSearchModule,MatTooltipModule, ], - declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent], + declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent, PdAllocationComponent], + entryComponents:[PdAllocationComponent], providers: [PdTrigerService] }) export class PdTrigerModule { } diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html index 6e01a9e6c..f5d233149 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.html @@ -1,14 +1,11 @@ - - -
+
+ +
@@ -62,21 +59,24 @@ -
- -
+ Documents - +

+ {{documents.pd_document_title}}     + +  {{documents.pd_document_name}} +

-
@@ -87,3 +87,5 @@ + + diff --git a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts index 1e348b334..f0324f37e 100644 --- a/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/pd-triger/view-pd/view-pd.component.ts @@ -1,8 +1,9 @@ import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core'; import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { CustomValidators } from 'ng2-validation'; +import { MatDialog } from '@angular/material'; import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from '../pd-service/pd-triger.service'; +import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; @Component({ selector: 'app-view-pd', templateUrl: './view-pd.component.html', @@ -24,8 +25,8 @@ export class ViewPdComponent implements OnInit { @Input() childData: string; @Output() loadParent = new EventEmitter(); public _EditPDtriggerForm:FormGroup; - constructor(private _fb: FormBuilder, - private _pd: PdTrigerService, notifier:NotifierService) { + constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder, + private _pd: PdTrigerService) { this.notifier=notifier } @@ -42,6 +43,7 @@ export class ViewPdComponent implements OnInit { if (data.status == 200) { this.pdMasterData=data.records.pd_master_details; this.pdApplicantData= data.records.applicants_details; + this.pdDocumentsData=data.records.pd_documnets; this.pdLogsData=data.records.pd_logs; } }, error => this.errorMessage = error); @@ -59,7 +61,6 @@ export class ViewPdComponent implements OnInit { this.editApplicantData=applicantData; this.showEditApplicantComponent=!this.showEditApplicantComponent; } -<<<<<<< HEAD // pd allocation to // edit questions master details popup model pdAllocationTo(pdID:any) { @@ -69,13 +70,11 @@ export class ViewPdComponent implements OnInit { }); dialogRef.afterClosed() .subscribe(dataresult => { - this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); - + // this.notifier.notify('success', 'Successfully allocated.!'); this.viewPdDetails(this.childData) }); } -======= ->>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f + updateViewComponent(editBack:string) { if(editBack=='1'){