address form family details form and banking details
This commit is contained in:
parent
c826296f63
commit
507cc1c2fd
File diff suppressed because it is too large
Load Diff
@ -120,4 +120,35 @@ mat-icon{
|
||||
position: fixed;
|
||||
right: 69px;
|
||||
top: 112px;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
padding: 0 2%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.address > * {
|
||||
width: 100%;
|
||||
}
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
.address .button {
|
||||
float: right;
|
||||
width: 10px;
|
||||
background: #62B013;
|
||||
color: white;
|
||||
}
|
||||
.banlFields mat-form-field {
|
||||
width: 100%;
|
||||
margin: 0 2%;
|
||||
}
|
||||
.bankForm .button {
|
||||
float: right;
|
||||
width: 10px;
|
||||
background: #62B013;
|
||||
color: white;
|
||||
}
|
||||
.has-danger{
|
||||
border: solid thin #f44336!important;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,123 +1,130 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatButtonModule,MatTableModule,MatPaginatorModule,
|
||||
MatProgressBarModule,MatDialogModule, MatSortModule,
|
||||
MatToolbarModule,MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule, MatBadgeModule, MatExpansionModule, MatStepperModule ,MatSidenavModule ,MatMenuModule, MatButtonToggleModule } 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';
|
||||
import { TreeModule } from 'angular-tree-component';
|
||||
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
|
||||
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
||||
import 'hammerjs';
|
||||
import { NotifierModule, NotifierOptions } from 'angular-notifier';
|
||||
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
|
||||
|
||||
import { AgmCoreModule } from '@agm/core';
|
||||
import { ManagePdRoutingModule } from './manage-pd.routing';
|
||||
import { ListPdComponent } from './list-pd/list-pd.component';
|
||||
import { ManagePdComponent } from './manage-pd.component';
|
||||
import { MapPdViewComponent } from './list-pd/map-pd-view/map-pd-view.component';
|
||||
import { AddPdComponent } from '../manage-pd/list-pd/add-pd/add-pd.component';
|
||||
import { ViewPdComponent } from '../manage-pd/list-pd/view-pd/view-pd.component';
|
||||
import { PdAllocationComponent } from '../manage-pd/list-pd/pd-allocation/pd-allocation.component';
|
||||
import { SmartPdAllocationComponent } from './list-pd/smart-pd-allocation/smart-pd-allocation.component';
|
||||
import { PdTrigerService } from '../pd-service/pd-triger.service';
|
||||
import { GetGeometricLocationService } from '../location-service/get-geometric-location.service';
|
||||
import { SchedulePdComponent } from './list-pd/schedule-pd/schedule-pd.component';
|
||||
import { EditPdApplicantComponent } from './list-pd/edit-pd-applicant/edit-pd-applicant.component';
|
||||
import { EditPdMasterComponent } from './list-pd/edit-pd-master/edit-pd-master.component';
|
||||
import { StartPdComponent } from './list-pd/start-pd/start-pd.component';
|
||||
import { InprogressPdComponent } from './list-pd/inprogress-pd/inprogress-pd.component';
|
||||
import { AllPdComponent } from './list-pd/all-pd/all-pd.component';
|
||||
import { ScheduledPdComponent } from './list-pd/scheduled-pd/scheduled-pd.component';
|
||||
import { CompletedPdComponent } from './list-pd/completed-pd/completed-pd.component';
|
||||
import { QcCompletedPdComponent } from './list-pd/qc-completed-pd/qc-completed-pd.component';
|
||||
|
||||
import { ClientInfoComponent } from './list-pd/start-pd/forms/client-info/client-info.component';
|
||||
import { SupplierInfoComponent } from './list-pd/start-pd/forms/supplier-info/supplier-info.component';
|
||||
import { PersonalInfoComponent } from './list-pd/start-pd/forms/personal-info/personal-info.component';
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
*/
|
||||
const pdCustomNotifierOptions: NotifierOptions = {
|
||||
position: {
|
||||
horizontal: {
|
||||
position: 'right',
|
||||
distance: 12
|
||||
},
|
||||
vertical: {
|
||||
position: 'top',
|
||||
distance: 32,
|
||||
gap: 10
|
||||
}
|
||||
},
|
||||
theme: 'material',
|
||||
behaviour: {
|
||||
autoHide: 5000,
|
||||
onClick: 'hide',
|
||||
onMouseover: 'pauseAutoHide',
|
||||
showDismissButton: true,
|
||||
stacking: 4
|
||||
},
|
||||
animations: {
|
||||
enabled: true,
|
||||
show: {
|
||||
preset: 'slide',
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
hide: {
|
||||
preset: 'fade',
|
||||
speed: 300,
|
||||
easing: 'ease',
|
||||
offset: 50
|
||||
},
|
||||
shift: {
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
overlap: 150
|
||||
}
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
NotifierModule.withConfig(pdCustomNotifierOptions),
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatButtonModule,
|
||||
MatProgressBarModule,
|
||||
MatToolbarModule,
|
||||
FlexLayoutModule,
|
||||
NgxDatatableModule,
|
||||
FormsModule,MatSlideToggleModule,
|
||||
MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
|
||||
ReactiveFormsModule,
|
||||
FileUploadModule,
|
||||
TreeModule,
|
||||
MatDialogModule,MatSortModule,
|
||||
NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,
|
||||
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule,
|
||||
OwlNativeDateTimeModule,
|
||||
],
|
||||
declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||
providers: [PdTrigerService, GetGeometricLocationService],
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent]
|
||||
MatButtonModule, MatTableModule, MatPaginatorModule,
|
||||
MatProgressBarModule, MatDialogModule, MatSortModule,
|
||||
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatCheckboxModule,
|
||||
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
||||
MatAutocompleteModule
|
||||
} 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';
|
||||
import {TreeModule} from 'angular-tree-component';
|
||||
import {NgxDatatableModule} from '@swimlane/ngx-datatable';
|
||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
|
||||
import {NgxMatSelectSearchModule} from 'ngx-mat-select-search';
|
||||
import 'hammerjs';
|
||||
import {NotifierModule, NotifierOptions} from 'angular-notifier';
|
||||
import {OwlDateTimeModule, OwlNativeDateTimeModule} from 'ng-pick-datetime';
|
||||
|
||||
import {AgmCoreModule} from '@agm/core';
|
||||
import {ManagePdRoutingModule} from './manage-pd.routing';
|
||||
import {ListPdComponent} from './list-pd/list-pd.component';
|
||||
import {ManagePdComponent} from './manage-pd.component';
|
||||
import {MapPdViewComponent} from './list-pd/map-pd-view/map-pd-view.component';
|
||||
import {AddPdComponent} from '../manage-pd/list-pd/add-pd/add-pd.component';
|
||||
import {ViewPdComponent} from '../manage-pd/list-pd/view-pd/view-pd.component';
|
||||
import {PdAllocationComponent} from '../manage-pd/list-pd/pd-allocation/pd-allocation.component';
|
||||
import {SmartPdAllocationComponent} from './list-pd/smart-pd-allocation/smart-pd-allocation.component';
|
||||
import {PdTrigerService} from '../pd-service/pd-triger.service';
|
||||
import {GetGeometricLocationService} from '../location-service/get-geometric-location.service';
|
||||
import {SchedulePdComponent} from './list-pd/schedule-pd/schedule-pd.component';
|
||||
import {EditPdApplicantComponent} from './list-pd/edit-pd-applicant/edit-pd-applicant.component';
|
||||
import {EditPdMasterComponent} from './list-pd/edit-pd-master/edit-pd-master.component';
|
||||
import {StartPdComponent} from './list-pd/start-pd/start-pd.component';
|
||||
import {InprogressPdComponent} from './list-pd/inprogress-pd/inprogress-pd.component';
|
||||
import {AllPdComponent} from './list-pd/all-pd/all-pd.component';
|
||||
import {ScheduledPdComponent} from './list-pd/scheduled-pd/scheduled-pd.component';
|
||||
import {CompletedPdComponent} from './list-pd/completed-pd/completed-pd.component';
|
||||
import {QcCompletedPdComponent} from './list-pd/qc-completed-pd/qc-completed-pd.component';
|
||||
|
||||
import {ClientInfoComponent} from './list-pd/start-pd/forms/client-info/client-info.component';
|
||||
import {SupplierInfoComponent} from './list-pd/start-pd/forms/supplier-info/supplier-info.component';
|
||||
import {PersonalInfoComponent} from './list-pd/start-pd/forms/personal-info/personal-info.component';
|
||||
|
||||
/**
|
||||
* Custom angular notifier options
|
||||
*/
|
||||
const pdCustomNotifierOptions: NotifierOptions = {
|
||||
position: {
|
||||
horizontal: {
|
||||
position: 'right',
|
||||
distance: 12
|
||||
},
|
||||
vertical: {
|
||||
position: 'top',
|
||||
distance: 32,
|
||||
gap: 10
|
||||
}
|
||||
},
|
||||
theme: 'material',
|
||||
behaviour: {
|
||||
autoHide: 5000,
|
||||
onClick: 'hide',
|
||||
onMouseover: 'pauseAutoHide',
|
||||
showDismissButton: true,
|
||||
stacking: 4
|
||||
},
|
||||
animations: {
|
||||
enabled: true,
|
||||
show: {
|
||||
preset: 'slide',
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
hide: {
|
||||
preset: 'fade',
|
||||
speed: 300,
|
||||
easing: 'ease',
|
||||
offset: 50
|
||||
},
|
||||
shift: {
|
||||
speed: 300,
|
||||
easing: 'ease'
|
||||
},
|
||||
overlap: 150
|
||||
}
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
ManagePdRoutingModule,
|
||||
NotifierModule.withConfig(pdCustomNotifierOptions),
|
||||
MatCardModule,
|
||||
MatIconModule,
|
||||
MatInputModule,
|
||||
MatRadioModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
MatButtonModule,
|
||||
MatProgressBarModule,
|
||||
MatAutocompleteModule,
|
||||
MatToolbarModule,
|
||||
FlexLayoutModule,
|
||||
NgxDatatableModule,
|
||||
FormsModule,
|
||||
MatSlideToggleModule,
|
||||
MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
||||
ReactiveFormsModule,
|
||||
FileUploadModule,
|
||||
TreeModule,
|
||||
MatDialogModule, MatSortModule,
|
||||
NgxMatSelectSearchModule, MatTooltipModule, MatExpansionModule,
|
||||
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
|
||||
OwlNativeDateTimeModule,
|
||||
],
|
||||
declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent],
|
||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
||||
providers: [PdTrigerService, GetGeometricLocationService],
|
||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent]
|
||||
})
|
||||
export class ManagePdModule { }
|
||||
export class ManagePdModule {
|
||||
}
|
||||
|
||||
@ -1,210 +1,241 @@
|
||||
/** Common Import Section */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';//for Datatables
|
||||
import { HttpClient,HttpParams } from '@angular/common/http';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Observable} from 'rxjs';//for Datatables
|
||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||
import {catchError, map} from 'rxjs/operators';
|
||||
import {of} from 'rxjs';
|
||||
|
||||
/** Imported Service Files Are., */
|
||||
import { AwsService } from '../../AwsService/aws.service';
|
||||
import {AwsService} from '../../AwsService/aws.service';
|
||||
|
||||
/** Environment */
|
||||
import { environment } from 'environments/environment'
|
||||
import {environment} from 'environments/environment'
|
||||
|
||||
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
|
||||
|
||||
const currentdate = new Date().toJSON().slice(0,19).replace('T',' ');
|
||||
/** Master Interface */
|
||||
export interface Master {
|
||||
master_id:number;
|
||||
master_name:string;
|
||||
constant_name:string;
|
||||
master_id: number;
|
||||
master_name: string;
|
||||
constant_name: string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
|
||||
|
||||
export class PdTrigerService {
|
||||
|
||||
//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 = environment.apiEndpoint;
|
||||
MAP_API_KEY: string;
|
||||
MAP_API_URL: string;
|
||||
constructor(private _http: HttpClient,
|
||||
private _aws:AwsService) {
|
||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||
}
|
||||
// get add pd master details
|
||||
getAllMasterDatas(TableName:string): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+'getListOfMaster', { "master_name":TableName })
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
//get product and subproduct master details
|
||||
getProductsDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfProducts')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// get lenders list
|
||||
getLenderDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfLenders')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// get customers list
|
||||
getCustomersDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfCustomerSegments')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// get Pd Allocation type details list
|
||||
getPDAllocationDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// get state and city details
|
||||
getStateCityDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfStatesAndCities')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// get pd type and allocation type details
|
||||
getPDTypeDetails():Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
// add pd details
|
||||
addPdDetails(pdForm: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+"triggerNewPD", pdForm)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// get pd details
|
||||
getPdDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl+"listLessPDDetails/get")
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
// private apiUrl = "http://192.168.0.5:9999/AWSEC2/sparqapi/api/";
|
||||
MAP_API_KEY: string;
|
||||
MAP_API_URL: string;
|
||||
// private apiUrl = "http://ssa.sineedge.com/sparqapi/api/";
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
|
||||
// get status based pd list
|
||||
getTabStatusPdDetails(status:string): Observable<any> {
|
||||
const tabStatus = status ?
|
||||
{ params: new HttpParams().set('status', status) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl+"listLessPDDetails/get",tabStatus)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
constructor(private _http: HttpClient,
|
||||
private _aws: AwsService) {
|
||||
this.MAP_API_KEY = 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'
|
||||
this.MAP_API_URL = `https://maps.googleapis.com/maps/api/geocode/json?key=${this.MAP_API_KEY}&address=`;
|
||||
}
|
||||
|
||||
// get edit row pd details
|
||||
editPdDetails(editId:string):Observable<any>{
|
||||
let httpParams = new HttpParams().set('pdid', editId);
|
||||
return this._http.post<any>(this.apiUrl+"getFullPDDetails",httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// update pd master details
|
||||
editPdMasterDetails(editData:any,status:string):Observable<any>{
|
||||
// get add pd master details
|
||||
getAllMasterDatas(TableName: string): Observable<any> {
|
||||
console.log('table', TableName);
|
||||
return this._http.post(this.apiUrl + 'getListOfMaster', {"master_name": TableName})
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
saveForm(records): Observable<any> {
|
||||
console.log('table', records);
|
||||
let params = {records}
|
||||
return this._http.post(this.apiUrl + 'savePDFormDetails', params)
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
retriveForm(params): Observable<any> {
|
||||
console.log('data', params);
|
||||
return this._http.post(this.apiUrl + 'getPDFormDetails', params)
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
//get product and subproduct master details
|
||||
getProductsDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfProducts')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get lenders list
|
||||
getLenderDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfLenders')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get customers list
|
||||
getCustomersDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfCustomerSegments')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get Pd Allocation type details list
|
||||
getPDAllocationDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get state and city details
|
||||
getStateCityDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfStatesAndCities')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd type and allocation type details
|
||||
getPDTypeDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + 'getListOfPDAllocationTypes')
|
||||
.pipe(
|
||||
catchError(this.handleError('role', []))
|
||||
)
|
||||
}
|
||||
|
||||
// add pd details
|
||||
addPdDetails(pdForm: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "triggerNewPD", pdForm)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd details
|
||||
getPdDetails(): Observable<any> {
|
||||
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get")
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get status based pd list
|
||||
getTabStatusPdDetails(status: string): Observable<any> {
|
||||
const tabStatus = status ?
|
||||
{params: new HttpParams().set('status', status)} : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", tabStatus)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get edit row pd details
|
||||
editPdDetails(editId: string): Observable<any> {
|
||||
let httpParams = new HttpParams().set('pdid', editId);
|
||||
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd master details
|
||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
||||
editData.pd_status = status;
|
||||
editData.fk_updatedby = this._aws.getlocale();
|
||||
editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"updatePDMaster",{records:editData})
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
// update pd applicant
|
||||
updatePdApplicant(editData:any):Observable<any>{
|
||||
// editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"updatePDApplicants",{"pd_applicant_details":editData})
|
||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", {records: editData})
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd allocation to details
|
||||
getPdOfficerList(pdID:string): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl+"getListPDOfficers",{"pdid":pdID})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd applicant
|
||||
updatePdApplicant(editData: any): Observable<any> {
|
||||
// editData.fk_updatedby = this._aws.getlocale();
|
||||
// editData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "updatePDApplicants", {"pd_applicant_details": editData})
|
||||
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// get pd allocation to details
|
||||
getPdOfficerList(pdID: string): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getListPDOfficers", {"pdid": pdID})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// update pd officer
|
||||
updatePdOfficer(updateData: any): Observable<any> {
|
||||
updateData.fk_updatedby = this._aws.getlocale();
|
||||
updateData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"allocatePD",{"records":updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
updateData.fk_updatedby = this._aws.getlocale();
|
||||
updateData.updatedon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "allocatePD", {"records": updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// update pd schedule
|
||||
updateSchedule(updateData: any): Observable<any> {
|
||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||
updateData.createdon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl+"schdulePD",{"records":updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
updateData.fk_scheduled_by = this._aws.getlocale();
|
||||
updateData.createdon = currentdate;
|
||||
return this._http.post<any>(this.apiUrl + "schdulePD", {"records": updateData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
//load pd template details
|
||||
loadPDTemplates(pdId: string):Observable<any>{
|
||||
const options = pdId ?
|
||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate",options)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
loadPDTemplates(pdId: string): Observable<any> {
|
||||
const options = pdId ?
|
||||
{params: new HttpParams().set('pd_id', pdId)} : {};
|
||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// load PD question answers
|
||||
getAnswersForPD(list: any):Observable<any>{
|
||||
let httpParams = new HttpParams();
|
||||
httpParams = httpParams.append("category_id", list.category_id);
|
||||
httpParams = httpParams.append("pd_id", list.pd_id);
|
||||
httpParams = httpParams.append("question_id", list.question_id);
|
||||
httpParams = httpParams.append("template_id", list.template_id);
|
||||
// load PD question answers
|
||||
getAnswersForPD(list: any): Observable<any> {
|
||||
let httpParams = new HttpParams();
|
||||
httpParams = httpParams.append("category_id", list.category_id);
|
||||
httpParams = httpParams.append("pd_id", list.pd_id);
|
||||
httpParams = httpParams.append("question_id", list.question_id);
|
||||
httpParams = httpParams.append("template_id", list.template_id);
|
||||
|
||||
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD",httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl+"savePDQuestions",{"records":saveData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
private handleError<T>(operation = 'operation', result?: T) {
|
||||
return (error: any): Observable<T> => {
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
return this._http.post<any[]>(this.apiUrl + "getAnswersForPD", httpParams)
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// save pd answers
|
||||
savePDQuestions(saveData: any): Observable<any> {
|
||||
saveData.createdby = this._aws.getlocale();
|
||||
saveData.fk_createdon = currentdate;
|
||||
// saveData[0].fk_updatedby = this._aws.getlocale();
|
||||
// saveData[0].updatedon = currentdate;
|
||||
|
||||
return this._http.post<any>(this.apiUrl + "savePDQuestions", {"records": saveData})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
private handleError<T>(operation = 'operation', result?: T) {
|
||||
return (error: any): Observable<T> => {
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user