From ef016fbe53f53655b207ab81783421ef1d0a4f98 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Wed, 28 Nov 2018 19:35:51 +0530 Subject: [PATCH] pd view more mpa changes --- .../allocation-view-more.component.html | 49 ++++++++++++++----- .../allocation-view-more.component.scss | 35 +++++++++++++ .../allocation-view-more.component.ts | 3 +- .../map-pd-view/map-pd-view.component.ts | 33 ++++++++++--- .../pd-allocation/pd-allocation.component.ts | 1 + .../smart-pd-allocation.component.html | 4 +- .../smart-pd-allocation.component.ts | 1 + .../tele-pd-allocation.component.ts | 1 + 8 files changed, 104 insertions(+), 23 deletions(-) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html index a39a12bf0..0b3d03e52 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.html @@ -1,17 +1,40 @@ -

{{data.first_name}}

- - - -
    -
  1. {{moreDat.pd_type_name}} ( ID : {{moreDat.pd_id}} )
  2. -
  3. {{moreDat.applicant_name}}
  4. -
  5. {{moreDat.pd_status}} ( {{moreDat.scheduled_on}} )
  6. -
-
-
+

+
+ {{data.first_name}} +
+
+ + +
+

+ +
+
+ + + + + + + +
+
+ + +
    +
  1. {{moreDat.pd_status | titlecase}} ( {{moreDat.applicant_name | titlecase}} )
  2. +
  3. {{moreDat.scheduled_on | titlecase}}
  4. + +
  5. {{moreDat.pd_type_name | titlecase}} ( Id : {{moreDat.pd_id}} )
  6. +
+
+
+ +
+
- + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss index 076be8a35..f8d5b8deb 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.scss @@ -6,4 +6,39 @@ ol { } ol li:first-child { color: #62B013; +} + +@import "../../../../../assets/styles/scss/material.variables"; + +// :host { +// margin-left: -5px; +// margin-right: -5px; +// margin-top: -5px; +// display: block; +// height: 100%; +// } +.sebm-google-map-container { + width: 100%; + height: 500px; + display: flex; +} + +$mat-toolbar-height-desktop: 64px !default; +$mat-toolbar-height-mobile-portrait: 56px !default; +$mat-toolbar-height-mobile-landscape: 48px !default; + +.mat-card-top { + margin-top: -($mat-toolbar-height-desktop); +} + +@media ($mat-xsmall) and (orientation: portrait) { + .mat-card-top { + margin-top: -($mat-toolbar-height-mobile-portrait); + } +} + +@media ($mat-small) and (orientation: landscape) { + .mat-card-top { + margin-top: -($mat-toolbar-height-mobile-landscape); + } } \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts index fd89ec25f..8bff6fbb4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/allocation-view-more/allocation-view-more.component.ts @@ -7,7 +7,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; styleUrls: ['./allocation-view-more.component.scss'] }) export class AllocationViewMoreComponent implements OnInit { - + lat = -34.397; + lng = 150.644; constructor(private dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) { } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts index 226c149a2..802fe08e3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/map-pd-view/map-pd-view.component.ts @@ -3,12 +3,13 @@ import { MatPaginator, MatSort, MatTableDataSource, PageEvent } from '@angular/m import { ActivatedRoute, Router } from '@angular/router'; import { NotifierService } from 'angular-notifier'; import { MatDialog } from '@angular/material'; -import { PdTrigerService } from '../../../pd-service/pd-triger.service'; -import { GetGeometricLocationService } from '../../../location-service/get-geometric-location.service'; -import { ListPdComponent } from '../list-pd.component'; -import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component'; -import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component'; -import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component'; +import { PdTrigerService } from './../../../pd-service/pd-triger.service'; +import { GetGeometricLocationService } from './../../../location-service/get-geometric-location.service'; +import { ListPdComponent } from './../list-pd.component'; +import { PdAllocationComponent } from './../pd-allocation/pd-allocation.component'; +import { SmartPdAllocationComponent } from './../smart-pd-allocation/smart-pd-allocation.component'; +import { TelePdAllocationComponent } from '././../tele-pd-allocation/tele-pd-allocation.component'; +import { SchedulePdComponent } from './../schedule-pd/schedule-pd.component'; @Component({ selector: 'app-map-pd-view', @@ -122,9 +123,11 @@ pdList:any[] = []; // pd allocation to pdAllocationTo(pdData:any) { - if(pdData.fk_pd_type != 2){ + if(pdData.fk_pd_type == 1){ const dialogRef = this.dialog.open(PdAllocationComponent, { data: pdData, + width: '60%', + maxHeight: '60%', disableClose: true }); dialogRef.afterClosed() @@ -136,6 +139,8 @@ pdList:any[] = []; else if(pdData.fk_pd_type == 2){ const dialogRef = this.dialog.open(SmartPdAllocationComponent, { data: pdData, + width: '60%', + maxHeight: '60%', disableClose: true }); dialogRef.afterClosed() @@ -144,6 +149,20 @@ pdList:any[] = []; this.loadPdDetails(); }); } + else if(pdData.fk_pd_type == 3){ + const dialogRef = this.dialog.open(TelePdAllocationComponent, { + data: pdData, + width: '60%', + maxHeight: '60%', + disableClose: true, + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.notifier.notify('success', 'Successfully allocated.!'); + + this.loadPdDetails(); + }); + } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts index 38eb7cdd9..5717e4de8 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/pd-allocation/pd-allocation.component.ts @@ -89,6 +89,7 @@ export class PdAllocationComponent implements OnInit { data: details, disableClose: true, position: { right: '0'}, + width:'80%', // hasBackdrop:false }); // dialogSchedule.afterClosed() diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html index e1407f0f5..6251bbfdb 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.html @@ -84,8 +84,8 @@
-

Central Officer: {{selectedCentralItem.first_name}}

-

Executive: {{selectedExcutiveItem.first_name}}

+

Central Officer: {{selectedCentralItem.first_name | titlecase }}

+

Executive: {{selectedExcutiveItem.first_name | titlecase}}

diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.ts index f07e95c76..73f01d755 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/smart-pd-allocation/smart-pd-allocation.component.ts @@ -110,6 +110,7 @@ export class SmartPdAllocationComponent implements OnInit { data: details, disableClose: true, position: { right: '0'}, + width:'80%', // hasBackdrop:false }); // dialogSchedule.afterClosed() diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts index fd82fa7b0..71030a146 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/tele-pd-allocation/tele-pd-allocation.component.ts @@ -82,6 +82,7 @@ export class TelePdAllocationComponent implements OnInit { data: details, disableClose: true, position: { right: '0'}, + width:'80%', // hasBackdrop:false }); // dialogSchedule.afterClosed()