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 {
|
||||
@Output() loadParent = new EventEmitter<string>();
|
||||
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<File> =[];
|
||||
@ -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 {
|
||||
|
||||
@ -70,4 +70,6 @@
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
</mat-card>
|
||||
<!-- <notifier-container></notifier-container> -->
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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')
|
||||
}
|
||||
|
||||
@ -128,3 +128,4 @@
|
||||
<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-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*/
|
||||
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 {
|
||||
|
||||
@ -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<any> {
|
||||
return this._http.post<any>(this.apiUrl+"getListPDOfficers",{"pdid":pdID})
|
||||
@ -143,18 +136,10 @@ export class PdTrigerService {
|
||||
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) {
|
||||
return (error: any): Observable<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 { 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 { }
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
<!-- <pre>{{pdMasterData | json}}</pre>
|
||||
<pre>{{pdApplicantData | json}}</pre>
|
||||
<pre>{{pdDocumentsData | json}}</pre>
|
||||
<pre>{{pdLogsData | json}}</pre> -->
|
||||
<!-- pd master card -->
|
||||
<div class="row" style="text-align:right;">
|
||||
<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>
|
||||
</div>
|
||||
<div *ngIf="!showEditMasterComponent">
|
||||
<mat-card *ngFor="let master of pdMasterData">
|
||||
<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>
|
||||
</div>
|
||||
<mat-card-header>
|
||||
@ -62,21 +59,24 @@
|
||||
<app-edit-pd-applicant *ngIf="showEditApplicantComponent" [applicantChild]="editApplicantData" (loadPdView)="updateViewComponent($event)"></app-edit-pd-applicant>
|
||||
<!-- pd documents details -->
|
||||
<mat-card>
|
||||
<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>
|
||||
</div>
|
||||
<!-- <div class="cardEdit">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon"><mat-icon>edit</mat-icon></button>
|
||||
</div> -->
|
||||
<mat-card-header>
|
||||
<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-header>
|
||||
<mat-card-content>
|
||||
<mat-list *ngFor="let documents of pdDocumentsData">
|
||||
<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>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<!-- pd logs card -->
|
||||
<mat-card>
|
||||
@ -87,3 +87,5 @@
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
|
||||
@ -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<string>();
|
||||
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 = <any> 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'){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user