pd changes
This commit is contained in:
parent
5061330b8f
commit
e9433f3c42
@ -12,7 +12,7 @@ import { AwsService } from '../../AwsService/aws.service';
|
|||||||
})
|
})
|
||||||
export class AddPdComponent implements OnInit {
|
export class AddPdComponent implements OnInit {
|
||||||
@Output() loadParent = new EventEmitter<string>();
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
public notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
public _PDtriggerForm: FormGroup;
|
public _PDtriggerForm: FormGroup;
|
||||||
items: FormArray;
|
items: FormArray;
|
||||||
productList:any;
|
productList:any;
|
||||||
@ -31,8 +31,8 @@ export class AddPdComponent implements OnInit {
|
|||||||
subAllocationTypeCheck: boolean;
|
subAllocationTypeCheck: boolean;
|
||||||
allocationLabel: string;
|
allocationLabel: string;
|
||||||
subAllocationLabel: string;
|
subAllocationLabel: string;
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(notifier: NotifierService,private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, private _aws:AwsService, notifier: NotifierService) {
|
private _pd: PdTrigerService, private _aws:AwsService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
}
|
}
|
||||||
public totalfiles: Array<File> =[];
|
public totalfiles: Array<File> =[];
|
||||||
@ -290,7 +290,7 @@ export class AddPdComponent implements OnInit {
|
|||||||
|
|
||||||
this._pd.addPdDetails(pd_form).subscribe(result => {
|
this._pd.addPdDetails(pd_form).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.notifier.notify('success', 'PD Saved Successfully.!');
|
this.notifier.notify('success', 'PD Saved.');
|
||||||
this.loadPdListCompoent();
|
this.loadPdListCompoent();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -70,4 +70,6 @@
|
|||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</form>
|
</form>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<!-- <notifier-container></notifier-container> -->
|
||||||
|
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
|
|
||||||
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.notifier.notify('success', 'PD Saved Successfully.!');
|
this.notifier.notify('success', 'Applicants updated..');
|
||||||
this.loadPdMasterCompoent();
|
this.loadPdMasterCompoent();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -121,7 +121,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
loadPdMasterCompoent() {
|
loadPdMasterCompoent() {
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
// this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
|
|
||||||
this.loadPdView.emit('1')
|
this.loadPdView.emit('1')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,3 +128,4 @@
|
|||||||
<app-edit-pd *ngIf="showEditComponent" [childData]="parentEditData" (loadParent)="updateParentComponent($event)"></app-edit-pd>
|
<app-edit-pd *ngIf="showEditComponent" [childData]="parentEditData" (loadParent)="updateParentComponent($event)"></app-edit-pd>
|
||||||
<app-add-pd *ngIf="showAddComponent" (loadParent)="updateParentComponent($event)"></app-add-pd>
|
<app-add-pd *ngIf="showAddComponent" (loadParent)="updateParentComponent($event)"></app-add-pd>
|
||||||
<app-view-pd *ngIf="showViewComponent" [childData]="parentViewData" (loadParent)="updateParentComponent($event)"></app-view-pd>
|
<app-view-pd *ngIf="showViewComponent" [childData]="parentViewData" (loadParent)="updateParentComponent($event)"></app-view-pd>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -59,7 +59,7 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
/** To update pd officer*/
|
/** To update pd officer*/
|
||||||
updatePdOfficer(allocateDate:any) {
|
updatePdOfficer(allocateDate:any) {
|
||||||
if(this.isDisabled){
|
if(this.isDisabled){
|
||||||
this.notifier.notify('warning', 'Please Choose Minimum One PD Officer.!');
|
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let updateData = {
|
let updateData = {
|
||||||
@ -69,7 +69,7 @@ export class PdAllocationComponent implements OnInit {
|
|||||||
this._pd.updatePdOfficer(updateData).subscribe(
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
result => {
|
result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
// this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'PD Allocated.!');
|
||||||
this.dialogRef.close();
|
this.dialogRef.close();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -20,16 +20,10 @@ export interface Master {
|
|||||||
|
|
||||||
export class PdTrigerService {
|
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://ssa.sineedge.com/sparqapi/api/";
|
||||||
//private apiUrl = "http://192.168.0.17:9999/AWSEC2/sparqapi/api/";
|
//private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||||
>>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f
|
//private apiUrl = "http://ssa.sineedge.com/sparqtest/api/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(private _http: HttpClient,
|
constructor(private _http: HttpClient,
|
||||||
private _aws:AwsService) { }
|
private _aws:AwsService) { }
|
||||||
// get add pd master details
|
// get add pd master details
|
||||||
@ -126,7 +120,6 @@ export class PdTrigerService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// get pd allocation to details
|
// get pd allocation to details
|
||||||
getPdOfficerList(pdID:string): Observable<any> {
|
getPdOfficerList(pdID:string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl+"getListPDOfficers",{"pdid":pdID})
|
return this._http.post<any>(this.apiUrl+"getListPDOfficers",{"pdid":pdID})
|
||||||
@ -143,18 +136,10 @@ export class PdTrigerService {
|
|||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleError<T>(operation = 'operation', result?: T) {
|
|
||||||
return (error: any): Observable<T> => {
|
|
||||||
return of(result as T);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
|
|
||||||
private handleError<T>(operation = 'operation', result?: T) {
|
private handleError<T>(operation = 'operation', result?: T) {
|
||||||
return (error: any): Observable<T> => {
|
return (error: any): Observable<T> => {
|
||||||
return of(result as T);
|
return of(result as T);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
>>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ import { EditPdComponent } from './edit-pd/edit-pd.component';
|
|||||||
import { ViewPdComponent } from './view-pd/view-pd.component';
|
import { ViewPdComponent } from './view-pd/view-pd.component';
|
||||||
import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component';
|
import { EditPdMasterComponent } from './edit-pd-master/edit-pd-master.component';
|
||||||
import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component';
|
import { EditPdApplicantComponent } from './edit-pd-applicant/edit-pd-applicant.component';
|
||||||
|
import { PdAllocationComponent } from './pd-allocation/pd-allocation.component';
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
*/
|
*/
|
||||||
@ -96,7 +97,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
MatDialogModule,MatSortModule,
|
MatDialogModule,MatSortModule,
|
||||||
NgxMatSelectSearchModule,MatTooltipModule,
|
NgxMatSelectSearchModule,MatTooltipModule,
|
||||||
],
|
],
|
||||||
declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent],
|
declarations: [AddPdComponent, ListPdComponent, EditPdComponent, ViewPdComponent, EditPdMasterComponent, EditPdApplicantComponent, PdAllocationComponent],
|
||||||
|
entryComponents:[PdAllocationComponent],
|
||||||
providers: [PdTrigerService]
|
providers: [PdTrigerService]
|
||||||
})
|
})
|
||||||
export class PdTrigerModule { }
|
export class PdTrigerModule { }
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
<!-- <pre>{{pdMasterData | json}}</pre>
|
<div class="row" style="text-align:right;">
|
||||||
<pre>{{pdApplicantData | json}}</pre>
|
|
||||||
<pre>{{pdDocumentsData | json}}</pre>
|
|
||||||
<pre>{{pdLogsData | json}}</pre> -->
|
|
||||||
<!-- pd master card -->
|
|
||||||
<div class="row" style="text-align:right;">
|
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!showEditMasterComponent">
|
<div *ngIf="!showEditMasterComponent">
|
||||||
<mat-card *ngFor="let master of pdMasterData">
|
<mat-card *ngFor="let master of pdMasterData">
|
||||||
<div class="cardEdit">
|
<div class="cardEdit">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="pdAllocationTo(master)"><mat-icon>directions_run</mat-icon></button>
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button"><mat-icon>schedule</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)"><mat-icon>edit</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
@ -62,21 +59,24 @@
|
|||||||
<app-edit-pd-applicant *ngIf="showEditApplicantComponent" [applicantChild]="editApplicantData" (loadPdView)="updateViewComponent($event)"></app-edit-pd-applicant>
|
<app-edit-pd-applicant *ngIf="showEditApplicantComponent" [applicantChild]="editApplicantData" (loadPdView)="updateViewComponent($event)"></app-edit-pd-applicant>
|
||||||
<!-- pd documents details -->
|
<!-- pd documents details -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<div class="cardEdit">
|
<!-- <div class="cardEdit">
|
||||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon"><mat-icon>edit</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"><mat-icon>edit</mat-icon></button>
|
||||||
</div>
|
</div> -->
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Documents</mat-card-title>
|
<mat-card-title>Documents</mat-card-title>
|
||||||
<!-- <mat-card-subtitle><i class="fa-1x fa fa-map-marker"> </i> {{master.city_name}} / {{master.state_name}}-{{master.pincode}}</mat-card-subtitle> -->
|
<!-- <mat-card-subtitle><i class="fa-1x fa fa-map-marker"> </i> {{master.city_name}} / {{master.state_name}}-{{master.pincode}}</mat-card-subtitle> -->
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
|
||||||
<mat-list *ngFor="let documents of pdDocumentsData">
|
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
|
<p><span>
|
||||||
|
{{documents.pd_document_title}} </span> <span class="mb-2 text-center hover-icon">
|
||||||
|
<i class="fa-1x fa fa-file"></i>
|
||||||
|
{{documents.pd_document_name}} </span>
|
||||||
|
</p>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|
||||||
</mat-card-content>
|
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<!-- pd logs card -->
|
<!-- pd logs card -->
|
||||||
<mat-card>
|
<mat-card>
|
||||||
@ -87,3 +87,5 @@
|
|||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, OnInit,ViewEncapsulation, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
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 { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||||
|
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-pd',
|
selector: 'app-view-pd',
|
||||||
templateUrl: './view-pd.component.html',
|
templateUrl: './view-pd.component.html',
|
||||||
@ -24,8 +25,8 @@ export class ViewPdComponent implements OnInit {
|
|||||||
@Input() childData: string;
|
@Input() childData: string;
|
||||||
@Output() loadParent = new EventEmitter<string>();
|
@Output() loadParent = new EventEmitter<string>();
|
||||||
public _EditPDtriggerForm:FormGroup;
|
public _EditPDtriggerForm:FormGroup;
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(notifier:NotifierService,private dialog: MatDialog,private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, notifier:NotifierService) {
|
private _pd: PdTrigerService) {
|
||||||
this.notifier=notifier
|
this.notifier=notifier
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ export class ViewPdComponent implements OnInit {
|
|||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdMasterData=data.records.pd_master_details;
|
this.pdMasterData=data.records.pd_master_details;
|
||||||
this.pdApplicantData= data.records.applicants_details;
|
this.pdApplicantData= data.records.applicants_details;
|
||||||
|
this.pdDocumentsData=data.records.pd_documnets;
|
||||||
this.pdLogsData=data.records.pd_logs;
|
this.pdLogsData=data.records.pd_logs;
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any> error);
|
}, error => this.errorMessage = <any> error);
|
||||||
@ -59,7 +61,6 @@ export class ViewPdComponent implements OnInit {
|
|||||||
this.editApplicantData=applicantData;
|
this.editApplicantData=applicantData;
|
||||||
this.showEditApplicantComponent=!this.showEditApplicantComponent;
|
this.showEditApplicantComponent=!this.showEditApplicantComponent;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
// pd allocation to
|
// pd allocation to
|
||||||
// edit questions master details popup model
|
// edit questions master details popup model
|
||||||
pdAllocationTo(pdID:any) {
|
pdAllocationTo(pdID:any) {
|
||||||
@ -69,13 +70,11 @@ export class ViewPdComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
this.viewPdDetails(this.childData)
|
this.viewPdDetails(this.childData)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
>>>>>>> 4133406fb5c648cd6dc4e0fd326d6301cf87939f
|
|
||||||
updateViewComponent(editBack:string) {
|
updateViewComponent(editBack:string) {
|
||||||
|
|
||||||
if(editBack=='1'){
|
if(editBack=='1'){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user