diff --git a/ng6-seed/package-lock.json b/ng6-seed/package-lock.json index c79cbe0fe..a7227093d 100644 --- a/ng6-seed/package-lock.json +++ b/ng6-seed/package-lock.json @@ -1691,6 +1691,21 @@ "tslib": "^1.9.0" } }, + "angular-svg-icon": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/angular-svg-icon/-/angular-svg-icon-15.0.0.tgz", + "integrity": "sha512-qurcOPbGri1ZveGd3Iol7CRSpveaxu21V1VCPwMSUfXlwwUT1hL4Aq3VE/RkJw5zZmFuR8akgaKeHLD+CFjjEQ==", + "requires": { + "tslib": "^2.3.1" + }, + "dependencies": { + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + } + } + }, "angular-tree-component": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/angular-tree-component/-/angular-tree-component-6.1.0.tgz", diff --git a/ng6-seed/package.json b/ng6-seed/package.json index a422079ef..30f80a1c8 100755 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -40,6 +40,7 @@ "angular-notifier": "^4.1.2", "angular-sortablejs": "^2.7.0", "angular-split": "^3.0.2", + "angular-svg-icon": "^15.0.0", "angular-tree-component": "6.1.0", "chart.js": "2.6.0", "core-js": "^2.6.11", diff --git a/ng6-seed/src/app/app.module.ts b/ng6-seed/src/app/app.module.ts index 9cb8e9da4..22d776a4d 100755 --- a/ng6-seed/src/app/app.module.ts +++ b/ng6-seed/src/app/app.module.ts @@ -68,6 +68,8 @@ import { ReqTokenInterceptor } from './_guard/req-token.interceptor'; import { DynamicNotifyComponent } from './layouts/dynamic-notify/dynamic-notify.component'; import { OtpComponent } from './session/otp/otp.component'; import { NotifierModule, NotifierOptions } from 'angular-notifier'; + + // import { SelectAllComponent } from './select-all/select-all.component'; // import { CustomNotificationComponent } from './layouts/custom-notification/custom-notification.component'; //import { SelectAllComponent } from './select-all/select-all.component'; @@ -165,7 +167,7 @@ const pdCustomNotifierOptions: NotifierOptions = { MatFormFieldModule, HttpClientModule, ResizableModule, - + TranslateModule.forRoot({ loader: { provide: TranslateLoader, diff --git a/ng6-seed/src/app/app.routing.ts b/ng6-seed/src/app/app.routing.ts index fa70dcdb4..463b6b30b 100755 --- a/ng6-seed/src/app/app.routing.ts +++ b/ng6-seed/src/app/app.routing.ts @@ -30,6 +30,10 @@ export const AppRoutes: Routes = [{ path:'template2', loadChildren:'./template2/template2.module#Template2Module' }, + { + path:'datadump', + loadChildren:'./datadump/datadump.module#DatadumpModule' + }, { path:'quality_check_discussion', loadChildren:'./quality-check/quality-check.module#QualityCheckModule' diff --git a/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.html b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.html new file mode 100644 index 000000000..e7e875f38 --- /dev/null +++ b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.html @@ -0,0 +1,116 @@ + +

+
+ Trigger New Item in Data Dump List +
+
+ + +
+

+ + + + + + +
+ + + {{ent.full_name}} + + + + + {{pro.product_name}} + + + + + {{pro.customer_segment}} + +     + + + {{type.type_name}} + + + + + {{status.name }} + + + + + + {{city.city_name}} + +     + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + +
+ + + + + + + diff --git a/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.scss b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.scss new file mode 100644 index 000000000..7c68a430b --- /dev/null +++ b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.scss @@ -0,0 +1,53 @@ +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; + } + ::ng-deep { .no-padding > mat-dialog-container { + // background: black; + padding: 0; + // overflow-y: scroll !important; + } + } + .example-full-width { + width: 100%; + } + .mat-dialog-content{ + margin:0px !important; + } + // mat-placeholder{ + // margin-top: 20px; + // word-wrap: break-word; + // } + // input{ + // height:40px; + // } + + .mat-form-field-label { + white-space: normal; + } + + textarea.mat-input-element { + padding: 0px 0; + margin: 5px 0; + } + + .mat-input-placeholder { + white-space: normal; + } + + mat-form-field { + margin: 0 2%; + } +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; +} + + +table { + width: 100%; + } + .mat-elevation-z8{ + margin-top: 10px; + } + \ No newline at end of file diff --git a/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.spec.ts b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.spec.ts new file mode 100644 index 000000000..cde0913be --- /dev/null +++ b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddDatadumpComponent } from './add-datadump.component'; + +describe('AddDatadumpComponent', () => { + let component: AddDatadumpComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddDatadumpComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddDatadumpComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.ts b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.ts new file mode 100644 index 000000000..30ffeb4ce --- /dev/null +++ b/ng6-seed/src/app/datadump/add-datadump/add-datadump.component.ts @@ -0,0 +1,135 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; +import { NotifierService } from 'angular-notifier'; +import { DatadumpService } from '../datadump.service'; + +@Component({ + selector: 'app-add-datadump', + templateUrl: './add-datadump.component.html', + styleUrls: ['./add-datadump.component.scss'] +}) +export class AddDatadumpComponent implements OnInit { + searchForm: FormGroup; + entity_lender: any=[] + product: any =[]; + customer_segments: any=[]; + pd_types: any=[]; + states: any=[]; + city: any=[]; + constructor(private dialogRef: MatDialogRef, private notifier: NotifierService, + @Inject(MAT_DIALOG_DATA) public data: any,private _fb:FormBuilder,private datadumpservice : DatadumpService) { + + this.getApiList() + } + + ngOnInit() { + this.searchForm = this._fb.group( + { + + pd_lender:[null], + pd_products:[null], + pd_Customer_Segment:[null], + pd_type:[null], + pd_state:[null], + pd_city:[null], + pd_from_date:[null], + pd_to_date:[null] + + }); + console.log( this.searchForm) + this.searchForm.controls['pd_products'].disable() + this.searchForm.controls['pd_Customer_Segment'].disable() + this.searchForm.controls['pd_type'].disable() + this.searchForm.controls['pd_city'].disable() + } + + getApiList(){ + + this.datadumpservice.getListOfLenders().subscribe(res => { + console.log(res) + if(res.status == 200 ){ + this.entity_lender = res.records + } + + }) + let param = {"master_name":"STATE"} + this.datadumpservice.getListOfMaster(param).subscribe(res => { + console.log(res) + if(res.status == 200 ){ + this.states = res.records + } + + }) + console.log( this.searchForm) + + + + } + + onChangeCategory(event) { + console.log(event.value); + this.datadumpservice.getEntityPreferences(event.value).subscribe(res => { + console.log(res) + if(res.status == 200 ){ + console.log(res) + this.product = res.records.products + this.customer_segments = res.records.customer_segments + this.pd_types = res.records.pd_types + this.searchForm.controls['pd_products'].enable() + this.searchForm.controls['pd_Customer_Segment'].enable() + this.searchForm.controls['pd_type'].enable() + + } + + }) +} +onChangeCity(event){ + console.log(event.value); + this.datadumpservice.getListOfStatesAndCities(event.value).subscribe(res => { + console.log(res) + if(res.status == 200 ){ + console.log(res) + + this.city = res.records.cities + this.searchForm.controls['pd_city'].enable() + + + } + + }) +} +save(data){ +console.log(data) +function toJSONLocal(date) { + var local = new Date(date); + local.setMinutes(date.getMinutes() - date.getTimezoneOffset()); + return local.toJSON().slice(0, 10); +} +let param = { + "fk_lender_id": data.pd_lender, + "fk_pd_type_id": data.pd_type, + "fk_customer_segment_id": data.pd_Customer_Segment, + "fk_product_id": data.pd_products, + "fk_city_id": data.pd_city, + "from_date":toJSONLocal(data.pd_from_date), + "to_date":toJSONLocal(data.pd_to_date), + "fk_createdby":1 + } + console.log(param) + this.datadumpservice.saveDatadumpRequest(param).subscribe(res => { + console.log(res) + if(res.status == 200 ){ + console.log(res) + this.dialogRef.close(0) + this.notifier.notify('success', 'Your Changes Updated.!'); + + + }else{ + this.dialogRef.close() + } + + }) + + } +} diff --git a/ng6-seed/src/app/datadump/datadump-routing.module.ts b/ng6-seed/src/app/datadump/datadump-routing.module.ts new file mode 100644 index 000000000..549122bb3 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump-routing.module.ts @@ -0,0 +1,29 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { DatadumpComponent } from './datadump/datadump.component'; + +const routes: Routes = [ + { + path: '', + redirectTo: 'datadumplist', + + },{ + path: '', + children: [ + { + path: 'datadumplist', + component: DatadumpComponent, + //component: QuestionViewComponent, + + }, + + ] +} + +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class DatadumpRoutingModule { } diff --git a/ng6-seed/src/app/datadump/datadump.module.spec.ts b/ng6-seed/src/app/datadump/datadump.module.spec.ts new file mode 100644 index 000000000..ac404b639 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump.module.spec.ts @@ -0,0 +1,13 @@ +import { DatadumpModule } from './datadump.module'; + +describe('DatadumpModule', () => { + let datadumpModule: DatadumpModule; + + beforeEach(() => { + datadumpModule = new DatadumpModule(); + }); + + it('should create an instance', () => { + expect(datadumpModule).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/datadump/datadump.module.ts b/ng6-seed/src/app/datadump/datadump.module.ts new file mode 100644 index 000000000..126db41ce --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump.module.ts @@ -0,0 +1,113 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DatadumpRoutingModule } from './datadump-routing.module'; +import { DatadumpComponent } from './datadump/datadump.component'; +import { MatAutocompleteModule, MatBadgeModule, MatBottomSheetModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatDividerModule, MatExpansionModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatNativeDateModule, MatPaginatorModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatRippleModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSlideToggleModule, MatSnackBarModule, MatSortModule, MatStepperModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatTreeModule, MAT_DATE_LOCALE } from '@angular/material'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { DatadumpService } from './datadump.service'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { NgxDatatableModule } from '@swimlane/ngx-datatable'; +import { NgxSpinnerModule } from 'ngx-spinner'; +import { NgxMatSelectSearchModule } from 'ngx-mat-select-search'; +import { AddDatadumpComponent } from './add-datadump/add-datadump.component'; +import { NotifierModule, NotifierOptions } from 'angular-notifier'; +const customNotifierOptions: 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, + DatadumpRoutingModule, + MatCardModule, + MatTabsModule, + MatIconModule, + MatInputModule, + + MatIconModule, + MatAutocompleteModule, + MatInputModule, + MatRadioModule, + MatTableModule, + MatPaginatorModule, + MatButtonModule, + MatProgressBarModule, + MatToolbarModule, + FlexLayoutModule, + NgxDatatableModule, + NgxSpinnerModule, + MatChipsModule,MatProgressSpinnerModule, + FormsModule,MatSlideToggleModule, + NotifierModule.withConfig(customNotifierOptions), + MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule, + ReactiveFormsModule, + MatBottomSheetModule, + + MatDividerModule, + + MatNativeDateModule, + + MatRippleModule, + + MatSliderModule, + + MatSnackBarModule, + + MatTreeModule, + + + MatDatepickerModule, + MatDialogModule,MatSortModule, + NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule, + MatRadioModule,MatProgressSpinnerModule , + MatButtonModule,MatTableModule,MatPaginatorModule, + MatProgressBarModule,MatDialogModule, MatSortModule, + MatToolbarModule,MatSelectModule,MatListModule, MatMenuModule, + MatSlideToggleModule,MatTooltipModule, + FormsModule, ReactiveFormsModule, + ], + declarations: [DatadumpComponent, AddDatadumpComponent], + providers : [ + DatadumpService,{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' } + ], + entryComponents:[AddDatadumpComponent] +}) +export class DatadumpModule { } diff --git a/ng6-seed/src/app/datadump/datadump.service.spec.ts b/ng6-seed/src/app/datadump/datadump.service.spec.ts new file mode 100644 index 000000000..e33c3525c --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { DatadumpService } from './datadump.service'; + +describe('DatadumpService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: DatadumpService = TestBed.get(DatadumpService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/datadump/datadump.service.ts b/ng6-seed/src/app/datadump/datadump.service.ts new file mode 100644 index 000000000..62f50ec06 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump.service.ts @@ -0,0 +1,62 @@ +import { Injectable } from '@angular/core'; + + +/** Common Import Section */ + +import { BehaviorSubject, Observable } from 'rxjs';//for Datatables +import { HttpClient } from '@angular/common/http'; +import { catchError } from 'rxjs/operators'; +import { of } from 'rxjs'; + +/** Imported Service Files Are., */ + +import { AwsService } from '../AwsService/aws.service'; + +/** Environment */ +import { environment } from 'environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class DatadumpService { + private apiUrl = environment.apiEndpoint; + constructor(private _http: HttpClient, + private _aws:AwsService) { } + + + + getDatadumpRequestList(): Observable { + // Add safe, URL encoded search parameter if there is a search term + return this._http.get(this.apiUrl + "getDatadumpRequestList"); + } + getListOfLenders(): Observable { + // Add safe, URL encoded search parameter if there is a search term + return this._http.get(this.apiUrl + "getListOfLenders"); + } + getEntityPreferences(lenderid): Observable { + // Add safe, URL encoded search parameter if there is a search term + return this._http.get(this.apiUrl + "getEntityPreferences/"+lenderid); + } + getListOfMaster(param): Observable { + // Add safe, URL encoded search parameter if there is a search term + + return this._http.post(this.apiUrl + "getListOfMaster", param); + } + getListOfStatesAndCities(param): Observable { + // Add safe, URL encoded search parameter if there is a search term + + return this._http.post(this.apiUrl + "getListOfStatesAndCities", param); + } + + saveDatadumpRequest(param): Observable { + // Add safe, URL encoded search parameter if there is a search term + + return this._http.post(this.apiUrl + "saveDatadumpRequest", param); + } + + + + downloadDatadumpRequest(id): Observable { + // Add safe, URL encoded search parameter if there is a search term + return this._http.get(this.apiUrl + "downloadDatadumpRequest?request_id="+id); + } +} diff --git a/ng6-seed/src/app/datadump/datadump/datadump.component.html b/ng6-seed/src/app/datadump/datadump/datadump.component.html new file mode 100644 index 000000000..a348cea47 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump/datadump.component.html @@ -0,0 +1,139 @@ +
+ +
+
+ Data Dump +
+
+ +
+
+
+ + + + +
+
+

No Records found ....!

+ + + Created By + + {{us.createdby}} + + + + Pd Type + {{us.pd_type_name}} + + + Lender + {{us.lender_short_name}} + + + + Product + {{us.product_abbr}} + + + + Customer Segment + {{us.customer_segment_abbr}} + + + + City + {{us.city_name}} + + + From Date + + {{us.from_date}} + + + To Date + + {{us.to_date}} + + + Status + + {{us.status}} + + + + + Download + + + + + + + +
+ +
+
+ + +
+
+
+ + + + + + + + + + + + +
+
+ + + + +
+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/ng6-seed/src/app/datadump/datadump/datadump.component.scss b/ng6-seed/src/app/datadump/datadump/datadump.component.scss new file mode 100644 index 000000000..b5b648ed1 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump/datadump.component.scss @@ -0,0 +1,116 @@ +table { + width: 100%; + } + + th { + text-align: left; + } +.active{ + + color: green; + font-size: 20px; +} +.active:hover{ + color:red; + font-size:25px; +} +.deactive{ + + color: red; + font-size: 20px; +} +.deactive:hover{ + color: green; + font-size: 25px; +} + +.example-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.example-header { + min-height: 64px; + padding: 8px 24px 0; + background: #fff; +} + +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.mat-table { + overflow: auto; + max-height: 500px; +} +.mat-table { + display: table; + width: 100%; + overflow: auto; + max-height: 500px; + + > .mat-header-row, > .mat-row { + display: table-row; + padding: 0; + border: none; + + > .mat-header-cell, > .mat-cell { + display: table-cell; + height: 48px; + vertical-align: middle; + + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + } + } +} + +/** Table CSS -nocontent */ +.nocontent { + color: red; + font-size: 16px; + text-align: center; +} + + +/** Table CSS - Search(or)Filter Field */ +.mat-form-field { + font-size: 14px; + width: 100%; +} + +.filter-container { + display: flex; + flex-direction: column; + min-width: 300px; +} + +.filter-header { + min-height: 64px; + padding: 8px 24px 0; +} + + +// mat-card { +// display: flex; +// flex-direction: column; +// } + + .file { + + display: flex; + justify-content: space-between; + align-items: center; + } + + .spinner__loading { + display: flex; + justify-content: center; + } + .spinner{ + margin-left: 28%; + } + #datadump{ + zoom: 90%; + } \ No newline at end of file diff --git a/ng6-seed/src/app/datadump/datadump/datadump.component.spec.ts b/ng6-seed/src/app/datadump/datadump/datadump.component.spec.ts new file mode 100644 index 000000000..c162853a0 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump/datadump.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DatadumpComponent } from './datadump.component'; + +describe('DatadumpComponent', () => { + let component: DatadumpComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ DatadumpComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DatadumpComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/datadump/datadump/datadump.component.ts b/ng6-seed/src/app/datadump/datadump/datadump.component.ts new file mode 100644 index 000000000..d813f9668 --- /dev/null +++ b/ng6-seed/src/app/datadump/datadump/datadump.component.ts @@ -0,0 +1,123 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { MatDialog, MatIconRegistry, MatPaginator, MatSort, MatTableDataSource } from '@angular/material'; +import { DomSanitizer } from '@angular/platform-browser'; +import { NotifierService } from 'angular-notifier'; +import { interval, Subscription } from 'rxjs'; +import { AddDatadumpComponent } from '../add-datadump/add-datadump.component'; +import { DatadumpService } from '../datadump.service'; + +@Component({ + selector: 'app-datadump', + templateUrl: './datadump.component.html', + styleUrls: ['./datadump.component.scss'] +}) +export class DatadumpComponent implements OnInit { + public dataLength: number; + public dataSource = new MatTableDataSource(); + displayedColumns = ['createdby','pd_type_name','lender_full_name','product_abbr','customer_segment_name','city_name','from_date','to_date','status','Actions']; + + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatSort) sort: MatSort; + color="primary"; + // pagination variable details + pageSize = 10; + userdata: any = []; + loader: boolean = false; + value = 0; + loading = true; + searchForm: FormGroup; + constructor(private datadumpservice : DatadumpService, private sanitizer: DomSanitizer, private readonly matIconRegistry: MatIconRegistry,private _fb:FormBuilder, private dialog: MatDialog, private notifier: NotifierService,) { + this.matIconRegistry.addSvgIcon('download', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/download.svg')); + } + + ngOnInit() { + + this.loadContent(); + this.getApiList() + + + } + ngAfterViewInit() { + this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; + } + + applyFilter(filterValue: string) { + filterValue = filterValue.trim(); // Remove whitespace + filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches + this.dataSource.filter = filterValue; + } + + getApiList(){ + this.datadumpservice.getDatadumpRequestList().subscribe(res => { + + console.log(res) + if(res.status == 200 ){ + + this.dataLength = res.records.length; + this.dataSource.data = res.records + + } + + }) + + } + loadContent() { + this.loading = true; + const subs$: Subscription = interval(200).subscribe(res => { + this.value = this.value + 10; + if(this.value === 120) { + subs$.unsubscribe(); + this.loading = false; + this.value = 0; + console.log('Ha terminado'); + } + }); + } + add(){ + const dialogRef = this.dialog.open(AddDatadumpComponent, { + + // position: { right: '0'}, + disableClose: true, + minHeight:'40%', + maxHeight:'75%', + minWidth: '50%', + maxWidth: '75%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + + if(dataresult == 0){ + this.getApiList() + // if(dataresult.length>0){ + // this.pdf_merge_data = dataresult + // console.log( this.pdf_merge_data ) + + // } + + } + + + }); + } + + download(param){ + console.log(param) + + this.datadumpservice.downloadDatadumpRequest(param.request_id).subscribe(res => { + + + console.log(res) + if(res.status == 200 ){ + this.notifier.notify('success', 'Download Successfully.!'); + window.open(res.uri, "_blank"); + + + }else{ + this.notifier.notify('warning', res.msg); + } + + }) + } +} diff --git a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts index e80efab99..38128ad4f 100755 --- a/ng6-seed/src/app/layouts/admin/admin-layout.component.ts +++ b/ng6-seed/src/app/layouts/admin/admin-layout.component.ts @@ -98,6 +98,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy { 'entityid':this.currentUser.fk_entity_type_id, 'profilepic':this.currentUser.profilepic } + localStorage.setItem('videocall_userid', this.currentUser.userid) this.users.getprofilepic(users).subscribe(res=>{ this.profileurl = res; if(this.profileurl.dataStatus == true){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html index 6ada8cf63..95c085bb6 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/completed-pd/completed-pd.component.html @@ -90,9 +90,13 @@ {{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}
+ Not Provided - {{details.lender_applicant_id}} - -({{details.customer_segment_abbr}} )
+ {{details.lender_applicant_id}} + -({{details.customer_segment_abbr}} )
+ ( {{details.fi_type}} ) {{details.fin_institute_name}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html index 2d3073b30..cc0ffb6b3 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/qc-completed-pd/qc-completed-pd.component.html @@ -89,9 +89,14 @@ {{details.is_child == 0 ? details.applicant_name : 'Add On PD' }}
- Not Provided + + + Not Provided + {{details.lender_applicant_id}} + -({{details.customer_segment_abbr}} )
+ ( {{details.fi_type}} ) {{details.fin_institute_name}} diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts index bd9c16692..522a1522a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts @@ -181,9 +181,12 @@ export class DynamicQuestionTemplateComponent implements OnInit { this.formGroupN.get('pincode').patchValue((res.pdMasterList.pincode_id || '')) } else if(this.parent_ques.question_key == 'Name_of_the_Person_met'){ - this.formGroupN.get('Name_of_the_Person_met').patchValue((res.pdMasterList.applicat_details[0].applicant_name + let name = localStorage.getItem('pdApplicantData') + let res = JSON.parse(name) + this.formGroupN.get('Name_of_the_Person_met').patchValue((res.toString()|| '')) - || '')) + + } } if(this.parent_ques.question_key == 'avail_loan_moratorium_facility'){ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/form/form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/form/form.component.ts index a69e0e8ed..954c5ce15 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/form/form.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/form/form.component.ts @@ -170,7 +170,7 @@ else } } loadTemplate() { - + localStorage.setItem('callApi','0') this.is_loading = true // let localId = this.getLocalFormId() // console.log("d",this.pd_all_details.form_id,Number(this.pd_all_details.form_id)) @@ -287,6 +287,212 @@ else //formValues = JSON.parse(records.json) if(this.pd_all_details_data.FormData.form_id =='34'){ this.quesService.formanswers = records + + // this.quesService.formanswers = [ + // { + // "answer_value": "https://test-lender21.s3.ap-south-1.amazonaws.com/pd3369/eCeE12022-11-07-12-08-18.jpeg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR7TQUR2JQYXKFYXA%2F20221108%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20221108T092822Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=233fd1b2ba52d0674fa32b7e6b6943d35d6a465c2d16c0a2e626f188c51da6f2", + // "question": "Selfie with person met", + // "question_key": "selfie_with_person_met", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false, + // "pd_document_id": "14441" + // }, + // { + // "answer_value": "saved", + // "question": "ID card", + // "question_key": "id_card", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // }, + // { + // "answer_value": "saved", + // "question": "Machinery Image", + // "question_key": "machinery_image", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // }, + // { + // "is_repeatable": "1", + // "is_multi_disabled": "0", + // "group_title": "Approach to PD Location", + // "group_type": "6", + // "question_key": "approach_to_pd_location", + // "questions_group": [ + // { + // "questions": [ + // { + // "answer_value": "https://test-lender21.s3.ap-south-1.amazonaws.com/pd3369/T3c5g2022-11-07-12-08-30.jpeg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR7TQUR2JQYXKFYXA%2F20221108%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20221108T092822Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=a06aa90a179256f54d1af81de108bf65f27a533ad64af8565fab8c9b126077a3", + // "question": "Approach to PD Location", + // "question_key": "approach_to_pd_location", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false, + // "pd_document_id": "14442" + // } + // ] + // } + // ] + // }, + // { + // "is_repeatable": "1", + // "is_multi_disabled": "0", + // "group_title": "Name Board Seen", + // "group_type": "6", + // "question_key": "name_board_seen", + // "questions_group": [ + // { + // "questions": [ + // { + // "answer_value": "saved", + // "question": "Name Board Seen", + // "question_key": "name_board_seen", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // } + // ] + // } + // ] + // }, + // { + // "is_repeatable": "1", + // "is_multi_disabled": "0", + // "group_title": "Stock Photograph's", + // "group_type": "6", + // "question_key": "stock_image", + // "questions_group": [ + // { + // "questions": [ + // { + // "answer_value": "saved", + // "question": "Stock Photograph's", + // "question_key": "stock_image", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // } + // ] + // } + // ] + // }, + // { + // "is_repeatable": "1", + // "is_multi_disabled": "0", + // "group_title": "Documents photographs", + // "group_type": "6", + // "question_key": "documents_interior_image", + // "questions_group": [ + // { + // "questions": [ + // { + // "answer_value": "saved", + // "question": "Documents photographs", + // "question_key": "documents_interior_image", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // } + // ] + // } + // ] + // }, + // { + // "is_repeatable": "1", + // "is_multi_disabled": "0", + // "group_title": "VIDEOS", + // "group_type": "6", + // "question_key": "video", + // "questions_group": [ + // { + // "questions": [ + // { + // "answer_value": "https://test-lender21.s3.ap-south-1.amazonaws.com/pd3369/video/fileName2.mp4?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR7TQUR2JQYXKFYXA%2F20221108%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20221108T094754Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604800&X-Amz-Signature=c1b8dab3113b0d24cf1c06744981ef159d47f50ac1c98699274d56813ec4c085", + // "question": "VIDEOS", + // "question_key": "video", + // "type": "6", + // "raw_validations": [], + // "validations": [], + // "api_properties": null, + // "onchange_properties": null, + // "answers": null, + // "is_repeatable": null, + // "is_multiple": 0, + // "group_title": null, + // "is_loader": "", + // "is_saved": "", + // "is_image_status": false + // } + // ] + // } + // ] + // } + // ] }else{ formValues = records.json this.quesService.formanswers= formValues diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.html index cb480ce85..5c1027e87 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.html @@ -1,4 +1,4 @@ - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.ts index 9dfbb91cd..51d5ab5c4 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/capture-btn/capture-btn.component.ts @@ -26,7 +26,7 @@ import { LoaderService } from 'app/shared/loaderService/loader.service'; styleUrls: ['./capture-btn.component.scss'] }) export class CaptureBtnComponent implements OnInit { - + @Input() json_index:any; @Input() addMoreBtn; @Output() imageDataEmitter = new EventEmitter @Output() singleDataEmitter = new EventEmitter @@ -36,7 +36,7 @@ export class CaptureBtnComponent implements OnInit { constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) { this.role_id = localStorage.getItem('user_role') this.sales_pd_type = localStorage.getItem('sales_pd_type') - console.log(this.sales_pd_type) + console.log(this.json_index) } ngOnInit(): void { @@ -45,6 +45,7 @@ export class CaptureBtnComponent implements OnInit { capturedImage(event){ this.loaderService.showMatSpinnerDialog('Fetching Data...') console.log(event); + console.log(this.json_index) let imageData= event.target.files[0] this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe( @@ -52,6 +53,7 @@ export class CaptureBtnComponent implements OnInit { this.imageDataEmitter.emit(result) this.singleDataEmitter.emit(result) + localStorage.setItem('callApi','1') this.loaderService.closeMatSpinnerDialog() }, error => { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/question-service.service.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/question-service.service.ts index 59236b31f..fc2cdfe8e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/question-service.service.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/question-service.service.ts @@ -361,7 +361,13 @@ export class QuestionServiceService { // FOR SETTING THE ARRAY OF VALIDATORS COMING FROM JSON Temp, settingArrayofValidators(data,curr_control,curr_index){ console.log("entered 334",data,curr_control,curr_index); - if(data.hasOwnProperty('validations') && data.validations.length > 0 ){ + if(data.hasOwnProperty('validations') ){ + if(data.validations instanceof Array){ + if( data.validations.length > 0){ + + + + const validList :any= []; let validator_value data.validations=data.validations.filter(val=>val.isactive != '0') @@ -392,6 +398,8 @@ export class QuestionServiceService { console.log("after setting validators 363",curr_control) } } + } + } // END OF SETTINGARRAYOFVALIDATORS FUN // FOR GETTING THE VALIDATION VALUE diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/sales-pd.service.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/sales-pd.service.ts index 1c4e20111..21c854f96 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/sales-pd.service.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/providers/services/sales-pd.service.ts @@ -752,4 +752,10 @@ generatesateliteimage(param:any): Observable{ }) ) } +saveShortsVideo(imagesDetails) +{ + console.log('savepdimg',imagesDetails); + // let record = {'records':imagesDetails}; + return this._http.post(api_url+'saveShortsVideo',imagesDetails); +} } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.html index 8a64a88c4..528fb745b 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.html @@ -430,7 +430,13 @@ edit --> - + +
@@ -450,8 +456,8 @@ -
-

Click to ReUpload

+
@@ -467,10 +473,14 @@ - + - + + + + + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.ts index f7ad74729..cd9b7f981 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/ques-template.component.ts @@ -28,6 +28,7 @@ import { CameraService } from '../ques-template/providers/camera/camera.service' import { ApiServiceService } from '../ques-template/providers/services/api-service.service'; import { FormComponent } from '../form/form.component'; import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service'; +import { DomSanitizer } from '@angular/platform-browser'; // import { ImageEditComponent } from './image-edit/image-edit.component'; // const originFormControlNameNgOnChanges = FormControlName.prototype.ngOnChanges; // FormControlName.prototype.ngOnChanges = function () { @@ -69,6 +70,7 @@ export class QuesTemplateComponent { @ViewChild('accordion') Accordion: MatAccordion @ViewChild('mapanel') matExpansionPanel:MatExpansionPanel @Output() imageDataEmitter = new EventEmitter + @Output() videoDataEmitter = new EventEmitter @Output() singleDataEmitter = new EventEmitter @ViewChild('dummy_img_more') dummyImgMoreRef: ElementRef; emittedFormGroup: any = null; @@ -90,7 +92,8 @@ export class QuesTemplateComponent { pd_all_details_data: any; parent_index: any=[]; parent_control: any=[]; - constructor( private pdTriggerService:PdTrigerService,private cameraService: CameraService,public dialogRef: MatDialogRef,private route: ActivatedRoute,private router: Router,private dialog:MatDialog,private _fb:FormBuilder,private questionService:QuestionServiceService,private SalesPdService:SalesPdService,notifier: NotifierService,private loaderService:LoaderService) { + prev_url : any; + constructor( private sanitizer : DomSanitizer, private pdTriggerService:PdTrigerService,private cameraService: CameraService,public dialogRef: MatDialogRef,private route: ActivatedRoute,private router: Router,private dialog:MatDialog,private _fb:FormBuilder,private questionService:QuestionServiceService,private SalesPdService:SalesPdService,notifier: NotifierService,private loaderService:LoaderService) { this.role_id = localStorage.getItem('LenderRoleID') console.log('Hello QuesTemplateComponent Component'); this.text = 'Hello World'; @@ -360,6 +363,33 @@ console.log(this.pdstatus) } } + capturedImage(event){ + this.loaderService.showMatSpinnerDialog('Fetching Data...') + console.log(event); + // console.log(this.sales_pd_type,this.videoDataEmitter) + let imageData= event.target.files[0] + let files = imageData + // var URL = window.URL; + //var URL = window.URL || window.webkitURL; + var file = new Blob([files],{"type" : "video\/mp4"}); + //var value = URL.createObjectURL(file); + console.log(file) + // this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe( + // result => { + //this.videoDataEmitter.emit(file) + //localStorage.setItem('callApi','1') + this.loaderService.closeMatSpinnerDialog() + // this.imageDataEmitter.emit(result) + // this.singleDataEmitter.emit(result) + // localStorage.setItem('callApi','1') + // this.loaderService.closeMatSpinnerDialog() + // }, + // error => { + // console.log('😢 Oh no!', error); + // } + // ); + + } proceedonChangeProperty(local_value_obj?){ console.log("On Change Property",this.quesAnsForm.value.questions); @@ -528,6 +558,315 @@ this.proceedonChangeProperty(modified) this.current_index = index; } + getIndex_name(index,q,data,single_ques) { + console.log('curr', index); + console.log(q); + + // setTimeout(function(){ + // console.log(q); + // },3000); + // console.log(q.controls); + this.tmp =[] + this.tmp.push(q) + console.log(data); + data.forEach(element => { + console.log(element.question_key); + }); + console.log(this.tmp); + + this.tmp[0].value.question_key + console.log( this.tmp[0].value.group_title) + console.log( this.tmp[0].value.question_key) + + return this.tmp[0].value.group_title + + this.tmp_ques = single_ques; + console.log(single_ques) + this.tmp_control = this.questionService + + this.current_index = index; + } + addvideo2(event, index, parent_index, data,single_ques1) { + + console.log(event, index, parent_index, data,single_ques1) + const formData:any = new FormData(); + formData.append('video_file', event); + this.pd_all_details_data = JSON.parse(localStorage.getItem('pd_all_details')) + let params = { + filename:'fileName6.mp4', + + "pd_id": this.pd_all_details_data.pdMasterList.pd_id, + "form_id": this.pd_all_details_data.FormData.form_id, + + } + formData.append('records',JSON.stringify(params)) + console.log(formData) + + this.SalesPdService.saveShortsVideo(formData).subscribe(apiresult=>{ + if(apiresult['dataStatus']){ + console.log(apiresult) + let result:any =apiresult + this.imageData = this.quesAnsForm.value.questions + //this.imageData[this.current_index].img_url = result.records.uri + console.log( this.current_index) + if (this.current_index != 'last') { + if (this.imageData[this.current_index].is_multiple == 1) { + console.log('multi'); + let img_param = {img_url: result.records.uri, is_base64: true}; + this.imageData[this.current_index].img_data.push(img_param); + console.log(this.imageData) + // this.sendImage(this.imageData, this.imageData[this.current_index].img_data.length - 1); + } else { + this.imageData[this.current_index].img_url = result.records.uri; + console.log(this.imageData[this.current_index]) + console.log(this.imageData) + // this.sendImage(this.imageData); + } + } + console.log( this.imageData) + + + } + }) + } + addvideo(param_data, index, parent_index, data,single_ques1) { + // this.loaderService.showMatSpinnerDialog('Fetching Data...') + // this.ngxService.start(); + let event = param_data.file + console.log(event.name) + let s:any = this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(event)); + + this.prev_url= s + + console.log(this.prev_url) + + console.log(this.quesAnsForm) + + console.log(parent_index) + console.log(this.tmp_ques) + console.log(parent_index['controls'].questions_group) + + this.tmp[0].value.group_title + console.log( this.tmp[0].value.question_key) + + console.log(data) + data[0].question = this.tmp[0].value.group_title + data[0].question_key = this.tmp[0].value.question_key + data=data.filter(group_indi=>!group_indi.hasOwnProperty('additional_field') && group_indi.additional_field != 1 ) + console.log(data) + console.log(single_ques1) + let single_ques = this.tmp_ques + + console.log(single_ques) + console.log(event, index); + this.imageData = this.quesAnsForm.value.questions + + console.log(this.quesAnsForm.value.questions) + // console.log(this.questions_JSON.questions) + console.log(this.imageData); + const reader = new FileReader(); + // let imagePath = event; + reader.readAsDataURL(event); + reader.onload = (_event) => { + // this.imageData = reader.result; + // this.cameraService.getPosition().then(geoCords => { + // let geoCoordinates; + // if (geoCords != 'error') { + // geoCoordinates = geoCords; + // } else { + // geoCoordinates = null; + // } + // console.log(geoCords); + const formData:any = new FormData(); + formData.append('video_file', event); + this.pd_all_details_data = JSON.parse(localStorage.getItem('pd_all_details')) + let params_data = { + filename: param_data.name, + + "pd_id": this.pd_all_details_data.pdMasterList.pd_id, + "form_id": this.pd_all_details_data.FormData.form_id, + + } + formData.append('records',JSON.stringify(params_data)) + console.log(formData) + + // console.log(param) + this.SalesPdService.saveShortsVideo(formData).subscribe(apiresult=>{ + console.log(apiresult) + if(apiresult['dataStatus']){ + console.log(this.imageData); + console.log(this.current_index); + // console.log(reader.result, geoCoordinates); + // this.pdTriggerService.addWatermarks(reader.result, geoCoordinates).then(watermarked_img => { + if (this.current_index != 'last') { + if (this.imageData[this.current_index].is_multiple == 1) { + console.log('multi'); + let img_param = {img_url: this.prev_url, is_base64: true, link: null}; + this.imageData[this.current_index].img_data.push(img_param); + console.log(this.imageData) + // this.sendImage(this.imageData, this.imageData[this.current_index].img_data.length - 1); + } else { + this.imageData[this.current_index].img_url = this.prev_url; + this.imageData[this.current_index].is_base64 = true; + this.imageData[this.current_index].link = null; + console.log(this.imageData) + // this.sendImage(this.imageData); + } + } else { + // this.getImageName().then(result => { + // console.log(result); + // this.imageData.push( { + // img_key: 'common_image', + // img_name:this.tmp[0].value.group_title, + // img_url: watermarked_img, + // fk_form_id: '', + // is_base64: true, + // link: null + // }); + // // let el = document.getElementById('dummy-img-more'); + // // el.scrollIntoView(); + // setTimeout(() => { + // this.dummyImgMoreRef.nativeElement.scrollIntoView({behavior: 'smooth', block: 'end'}); + // }, 1000); + // // this.sendImage(this.imageData); + // }); + } + console.log(this.prev_url); + console.log(single_ques.controls) + console.log(single_ques.value.question) + + this.image_question_name = single_ques.value.question + single_ques.controls.answer_value.setValue(this.prev_url) + // this.sales_pd_id = Number(this.sales_pd_id) + // console.log(this.sales_pd_id) + + // if(this.networkDetection.getCurrentNetworkStatus() == ConnectionStatus.online && (typeof(this.sales_pd_id) == 'string' ? !this.sales_pd_id.includes('local') : true) ) { + single_ques.controls.is_image_status.setValue(true) + single_ques.controls.is_loader.setValue(true); + single_ques.controls.is_saved.setValue(false); + let params={"fk_sales_pd_id":"","img":this.prev_url,"img_name":single_ques.value.question_key,"location": null} + let storage_param=this.questions_JSON + let form_structure=this.questions_JSON + form_structure.questions=this.quesAnsForm.getRawValue().questions + console.log( form_structure.questions) + form_structure.is_complete=1 + + + // else { + // single_ques.controls.is_image_status.setValue(true) + // single_ques.controls.is_loader.setValue(false); + // single_ques.controls.is_saved.setValue(true); + // } + this.emittedFormGroup = this.quesAnsForm.getRawValue() + // PASSING THE VALUE TO PARENT COMPONENT + this.imageUploadCheck.emit(this.emittedFormGroup); + this.pd_all_details_data = JSON.parse(localStorage.getItem('pd_all_details')) + console.log(this.pd_all_details_data) + // let param = { + // "pd_id": this.pd_all_details_data.pdMasterList.pd_id, + // "formid": this.pd_all_details_data.FormData.form_id, + // "company_id":null, + // "images": [ + // { + // "image": watermarked_img + // } + // ], + // "Name": single_ques.value.question_key, + // "link":geoCoordinates, + // "image_key":single_ques.value.question_key, + // "is_show_report":"1", + // "pd_image_alias_name":single_ques.value.question, + // "isLoader":true, + // "isSaved":false, + // "pd_document_id":null, + // "pd_document_name":single_ques.value.question + // } + let ind = parseInt(this.current_index)+1 + //let index_pdid = this.pd_index( single_ques.value.question_key) + let param ={ + + "pd_id": this.pd_all_details_data.pdMasterList.pd_id, + "formid": this.pd_all_details_data.FormData.form_id, + "image": this.prev_url, + "image_key": single_ques.value.question_key, + "location": null, + "is_show_report": "1", + "pd_image_alias_name": single_ques.value.question, + "pd_document_title": single_ques.value.question+' '+ind, + "pd_document_id": null + + } + + // } + // }) + + // this.SalesPdService.saveSalesPDImage(params,form_structure).subscribe(apiresult=>{ + // if(apiresult['dataStatus']){ + single_ques.controls.is_loader.setValue(false); + single_ques.controls.is_saved.setValue(true); + this.httpListener(apiresult); + form_structure.questions=this.quesAnsForm.getRawValue().questions + this.SalesPdService.updateSectionDataLocally(params,form_structure).subscribe(res=>{ + }) + storage_param.questions=this.quesAnsForm.getRawValue().questions + console.log( storage_param.questions) + let key_value = localStorage.getItem('sales_pd_id_PRIMARYKEY') + + // this.SalesPdService.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(key_value=>{ + console.log(key_value) + storage_param.sales_pd_id=key_value + // this.salesPDProvider.insertData_Replace('sec'+storage_param.section_id,storage_param) + // }) + // console.log("image saved successfully") + this.notifier.notify("success","Image Saved Successfully"); + + + console.log(this.tmp_ques) + // this.tmp[1].controls.questions_group + // console.log(parent_index['controls'].questions_group) + // let control: any = parent_index['controls'].questions_group as FormArray + this.tmp.length + console.log(this.tmp[0]) + let control: any = this.tmp[0].controls.questions_group + console.log(control) + console.log(this.current_index ) + parent_index + + control.push(this._fb.group({ 'questions': this._fb.array([]) })) + let sub_childControl: any = control.controls[this.current_index + 1].get('questions') as FormArray + console.log(sub_childControl) + console.log(data) + + + data.forEach((group_indi,arr_index )=> { + console.log(group_indi,arr_index) + delete group_indi.answer_value + sub_childControl.push(this.questionService.createValue(group_indi)) + this.questionService.addAdditionalControl(group_indi, sub_childControl, arr_index) + this.tmp = [] + + this.loaderService.closeMatSpinnerDialog() + }) + }else{ + let data:any = apiresult + this.notifier.notify("info",data.msg + ); + single_ques.controls.is_loader.setValue(false); + single_ques.controls.is_saved.setValue(false); + //this.SalesPdService.clear_local_key('sec'+storage_param.section_id) + // this.toastProvider.lenderappmessage("Something went wrong"); + } + + }) + // this.ngxService.stop(); + // }, err => { + // console.log('dk', err); + // //this.ngxService.stop(); + // }); + // }); + }; + } + addImage(event, index, parent_index, data,single_ques1) { // this.loaderService.showMatSpinnerDialog('Fetching Data...') // this.ngxService.start(); @@ -2071,6 +2410,10 @@ this.parent_control.push( parent_control) // SENDING SALES PD SECTION 9 STRUCTURE(photographs) ngOnDestroy(){ // console.clear() + let callapi = localStorage.getItem('callApi') + if(callapi == '1'){ + this.save_image() + } console.log("dirty check",this.quesAnsForm.dirty) if(this.local_ques_JSON.section_id == 9 && this.emittedFormGroup != null){ // FOR SENDING THE IMAGE SECTION (SECTION ID 9) JSON Structure @@ -2191,18 +2534,18 @@ this.parent_control.push( parent_control) if(element.hasOwnProperty('answer_value') ){ console.log(element) - if(element.answer_value != ''){ + if(element.answer_value != ''){ element.answer_value = 'saved' - } + } }else{ element.questions_group.forEach(e => { e.questions.forEach(c => { if(c.hasOwnProperty('answer_value') ){ console.log(c) - if(c.answer_value != ''){ + if(c.answer_value != ''){ c.answer_value = 'saved' - } + } } }); @@ -2263,4 +2606,5 @@ this.parent_control.push( parent_control) }); return ans } + } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.html index 09f13ab3a..7826f851c 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.html @@ -1,4 +1,4 @@ - diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.ts index 9baee8bd9..68760d44a 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/single-capture-btn/single-capture-btn.component.ts @@ -76,6 +76,7 @@ export class SingleCaptureBtnComponent { this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe( result => { console.log(result); + localStorage.setItem('callApi','1') this.singleDataEmitter.emit(result) this.loaderService.closeMatSpinnerDialog() }, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.html new file mode 100644 index 000000000..9189c42a1 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.html @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.scss b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.spec.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.spec.ts new file mode 100644 index 000000000..e4a38b9bc --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { VideoCaptureBtnComponent } from './video-capture-btn.component'; + +describe('VideoCaptureBtnComponent', () => { + let component: VideoCaptureBtnComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ VideoCaptureBtnComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(VideoCaptureBtnComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.ts new file mode 100644 index 000000000..94b3dc581 --- /dev/null +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component.ts @@ -0,0 +1,60 @@ +import { Component, OnInit, Output, EventEmitter, Input, Injectable } from '@angular/core'; +import { Ng2ImgMaxService } from 'ng2-img-max'; +import { LoaderService } from 'app/shared/loaderService/loader.service'; +@Component({ + selector: 'app-video-capture-btn', + templateUrl: './video-capture-btn.component.html', + styleUrls: ['./video-capture-btn.component.scss'] +}) +export class VideoCaptureBtnComponent implements OnInit { + + @Input() addMoreBtn; + @Output() videoDataEmitter = new EventEmitter + @Output() singleDataEmitter = new EventEmitter + sales_pd_type: string; + role_id: string; + + constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) { + this.role_id = localStorage.getItem('user_role') + this.sales_pd_type = localStorage.getItem('sales_pd_type') + console.log(this.sales_pd_type,this.videoDataEmitter) + } + + ngOnInit(): void { + console.log(this.addMoreBtn) + } + capturedImage(event){ + this.loaderService.showMatSpinnerDialog('Fetching Data...') + console.log(event); + console.log(this.sales_pd_type,this.videoDataEmitter) + let imageData= event.target.files[0] + let files = imageData + // var URL = window.URL; + //var URL = window.URL || window.webkitURL; + var file = new Blob([files],{"type" : "video\/mp4"}); + //var value = URL.createObjectURL(file); + console.log(file) + // this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe( + // result => { + let data ={file:file,name:event.target.files[0].name} + this.videoDataEmitter.emit(data) + //localStorage.setItem('callApi','1') + this.loaderService.closeMatSpinnerDialog() + // this.imageDataEmitter.emit(result) + // this.singleDataEmitter.emit(result) + // localStorage.setItem('callApi','1') + // this.loaderService.closeMatSpinnerDialog() + // }, + // error => { + // console.log('😢 Oh no!', error); + // } + // ); + + } + capture(event){ + event.preventDefault(); + let element:HTMLElement = document.getElementById('input-file2') as HTMLElement + element.click(); + } +} + diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html index 317f3bb28..23caf2984 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html @@ -120,9 +120,9 @@ delete
-
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts index 608bf3587..bd13f3772 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, Output, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms'; -import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatTableDataSource } from '@angular/material'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatTableDataSource, MatIconRegistry } from '@angular/material'; import { NotifierService } from 'angular-notifier'; import { PdTrigerService } from './../../../../../pd-service/pd-triger.service'; import { OtherApplicantDetailsComponent } from './../dialogue/other-applicant-details/other-applicant-details.component'; @@ -13,6 +13,7 @@ import { ImageCropComponent } from '../dialogue/image-crop/image-crop.component' import { ReplaySubject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FacialRecognitionModalComponent } from '../facial-recognition/facial-recognition-modal/facial-recognition-modal.component'; +import { DomSanitizer } from '@angular/platform-browser'; // import { ImageCropperComponent } from '../dialogue/image-cropper/image-cropper.component'; @Component({ @@ -108,8 +109,9 @@ export class GeneralInfoComponent implements OnInit { /********************** Declaration Section Ends Here *****************/ /** Constructor Section */ - constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef, private titleCase: TitleCasePipe, private imageRef: MatDialogRef) { + constructor(notifier: NotifierService, private _fb: FormBuilder, private _pd: PdTrigerService, private dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public pd_all_details: any, private dialogRef: MatDialogRef, private titleCase: TitleCasePipe, private imageRef: MatDialogRef,private sanitizer: DomSanitizer, private readonly matIconRegistry: MatIconRegistry) { console.log(this.pd_all_details) + this.matIconRegistry.addSvgIcon('digilocker', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/digilocker.svg')); this.pdid = this.pd_all_details.pdmaster_details.pd_id; this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name; this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id; diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.html index a9a22daa9..b01e226d5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.html @@ -90,8 +90,18 @@
No Images Captured
- image + +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.ts index 583de1a6a..2b3abe543 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/images-all/images-all.component.ts @@ -52,7 +52,7 @@ export class ImagesAllComponent implements OnInit { imageData: any; this._pd.getPDImgDetails(this.params).subscribe(result=>{ if(result.dataStatus) { this.records = result.records - + console.log( this.records) // if(this.records.is_cus_link_disabled != '1') { this.imageData =this.records.img_data; this.imageData.forEach(val=>{ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd2/start-pd2.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd2/start-pd2.component.ts index 06c43a073..7153c401e 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd2/start-pd2.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/start-pd2/start-pd2.component.ts @@ -194,17 +194,18 @@ export class StartPd2Component implements OnInit, OnDestroy { dialogRef.afterClosed() .subscribe(dataresult => { if(dataresult.update_status==true){ - setTimeout(()=>{ + // setTimeout(()=>{ checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString,this.fi_id); let data = { "pd_id": this.startPD, "regenerate":0, "random_string":this.randomString }; - },2000) - // this._pd.archivePDImages(data).subscribe(data => { + this._pd.archivePDImages(data).subscribe(data => { - // }) + }) + //},2000) + let data1 = { "pd_id": this.startPD, "regenerate":0, diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts index 45415bb35..d04329ba3 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/image-video/image-video.component.ts @@ -144,8 +144,10 @@ export class ImageVideoComponent implements OnInit { // disableClose: true, // panelClass:'video-chat' // }) + let user = localStorage.getItem('videocall_userid') if(event == 'PDGenie'){ - let url = window.location.origin+'/vchat/#/chat/'+this.master.random_string+';id='+this.master.pd_id+';type=2' + let url = window.location.origin+'/vchat/#/chat/'+this.master.random_string+';id='+this.master.pd_id+';type=2;uid='+user + window.open(url,'_blank') } else if(event == 'G_Meet'){ let url = this.google_Meet_Link diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts index 7bb109229..22a07abf2 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.ts @@ -193,6 +193,12 @@ export class ViewPdComponent implements OnInit, OnDestroy { this.mandatoryFieldsValidations = masterData[1].mandatory_fields; this.pd_QC_Rating = Number(this.pdMasterData.qc_rating); this.pdApplicantData = data.records.applicants_details; + let tmp =[] + this.pdApplicantData.forEach(element => { + tmp.push(element.applicant_name) + }); + console.log(tmp) + localStorage.setItem('pdApplicantData',JSON.stringify(tmp)) this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2); this.CustomerSegmentAbbr = this.pdMasterData[0].customer_segment_abbr; this.pdDocumentsData = data.records.pd_documnets; @@ -796,10 +802,14 @@ export class ViewPdComponent implements OnInit, OnDestroy { } onClickVideoChat(master) { - let videoChatLink = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1' + console.log(master) + let user = localStorage.getItem('videocall_userid') + let videoChatLink = window.location.origin+'/vchat/#/chat/'+this.pdMasterData[0].random_string+';id='+this.viewID+';type=1;uid='+user + console.log(videoChatLink) const dialogApplicant = this.dialog.open(ImageVideoComponent, { - data: {masterDetails:master,videoChatLink:videoChatLink,applicantNo:this.pdApplicantData[0].mobile_no,flag:1}, + data: {masterDetails:master,videoChatLink:videoChatLink,applicantNo:this.pdApplicantData[0].mobile_no,flag:1,userid:'fk_pd_allocated_to' +}, // position: { right: '0' }, maxWidth: '70vw', maxHeight: '60vw', diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts index 2c7331c84..c82783201 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/manage-pd.module.ts @@ -174,6 +174,7 @@ import { ImgExifService } from 'ng2-img-max/dist/src/img-exif.service'; import { ImgMaxPXSizeService } from 'ng2-img-max/dist/src/img-maxpx-size.service'; import { Ng2ImgMaxModule } from 'ng2-img-max'; import { CameraService } from './list-pd/start-pd/forms-dynamic/ques-template/providers/camera/camera.service'; +import { VideoCaptureBtnComponent } from './list-pd/start-pd/forms-dynamic/ques-template/video-capture-btn/video-capture-btn.component'; /** * Custom angular notifier options */ @@ -220,7 +221,7 @@ const pdCustomNotifierOptions: NotifierOptions = { @NgModule({ declarations: [QuesTemplateComponent,TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent,VendorPdAllocationComponent, DuplicatePdComponent,FacialRecognitionModalComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent,StartPd2Component, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent,PdCollectedDocsComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, NumberToWordsPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent ,ManageDailyPurchaseComponent, DailyPurchaseDetailsComponent, ManageRentalVerificationComponent, FuturePlansAndBusinessEnvironmentComponent, ImageCropComponent,CropToolsComponent,PurchaseCalculationComponent,QueriesDocsComponent, ImageDocsComponent,CustomTitleCaseDirective, SpeedDialFabComponent,VideoPlayerComponent, - DynamicFormComponent,DynamicQuestionTemplateComponent, ImagesAllComponent,AnswerOptionCreateDialogComponent,FormComponent,FormGroupComponent, ImageVideoComponent,CaptureBtnComponent, SingleCaptureBtnComponent,], + DynamicFormComponent,DynamicQuestionTemplateComponent, ImagesAllComponent,AnswerOptionCreateDialogComponent,FormComponent,FormGroupComponent, ImageVideoComponent,CaptureBtnComponent, SingleCaptureBtnComponent,VideoCaptureBtnComponent], imports: [ CommonModule, ManagePdRoutingModule, @@ -271,7 +272,7 @@ const pdCustomNotifierOptions: NotifierOptions = { MatVideoModule ], - exports: [FacialRecognitionModalComponent,DuplicatePdComponent,VendorPdAllocationComponent,PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent,StartPd2Component, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,CropToolsComponent,PurchaseCalculationComponent,CaptureBtnComponent, SingleCaptureBtnComponent,], + exports: [FacialRecognitionModalComponent,DuplicatePdComponent,VendorPdAllocationComponent,PdLocatedMapViewDirective, PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent,StartPd2Component, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent,PdCollectedDocsComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent, ConfirmAiDetailsComponent, RentalVerificationComponent, InitiateAdditionalPdComponent, DailyPurchaseDetailsComponent, ManageDailyPurchaseComponent,ManageRentalVerificationComponent,ImageCropComponent,CropToolsComponent,PurchaseCalculationComponent,CaptureBtnComponent, SingleCaptureBtnComponent,VideoCaptureBtnComponent], providers: [PdTrigerService,CameraService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}, {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective,QuesFormService], diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/assets/images/digilocker.svg b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/assets/images/digilocker.svg new file mode 100644 index 000000000..e69de29bb diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.html new file mode 100644 index 000000000..d4c59f4d4 --- /dev/null +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.html @@ -0,0 +1,87 @@ + +

+
+ Attach Digilocker Document's To Report +
+
+ + +
+

+
{{message}}
+ + + Available Digilocker Documents + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + Applicant Name {{element.applicant_name}} Document Name {{element.pd_document_name}} View +
+ + +
+
+ + + + + +
+ + + + + + diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.scss new file mode 100644 index 000000000..7c68a430b --- /dev/null +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.scss @@ -0,0 +1,53 @@ +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; + } + ::ng-deep { .no-padding > mat-dialog-container { + // background: black; + padding: 0; + // overflow-y: scroll !important; + } + } + .example-full-width { + width: 100%; + } + .mat-dialog-content{ + margin:0px !important; + } + // mat-placeholder{ + // margin-top: 20px; + // word-wrap: break-word; + // } + // input{ + // height:40px; + // } + + .mat-form-field-label { + white-space: normal; + } + + textarea.mat-input-element { + padding: 0px 0; + margin: 5px 0; + } + + .mat-input-placeholder { + white-space: normal; + } + + mat-form-field { + margin: 0 2%; + } +.paragraph_change { + color: #fff !important; + background-color: #e00201 !important; +} + + +table { + width: 100%; + } + .mat-elevation-z8{ + margin-top: 10px; + } + \ No newline at end of file diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.spec.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.spec.ts new file mode 100644 index 000000000..e1a24cdee --- /dev/null +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PdfMergeComponent } from './pdf-merge.component'; + +describe('PdfMergeComponent', () => { + let component: PdfMergeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PdfMergeComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PdfMergeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.ts new file mode 100644 index 000000000..9782dce24 --- /dev/null +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/pdf-merge/pdf-merge.component.ts @@ -0,0 +1,109 @@ +import { SelectionModel } from '@angular/cdk/collections'; +import { Component, Inject, OnInit } from '@angular/core'; +import { MatDialogRef, MatTableDataSource, MAT_DIALOG_DATA } from '@angular/material'; +import { QcService } from 'app/quality-check/qc-service/qc.service'; +export interface PeriodicElement { + name: string; + position: number; + weight: number; + symbol: string; +} +@Component({ + selector: 'app-pdf-merge', + templateUrl: './pdf-merge.component.html', + styleUrls: ['./pdf-merge.component.scss'] +}) + +export class PdfMergeComponent implements OnInit { + message: any; + digilock_list: any =[]; + + + + ELEMENT_DATA: PeriodicElement[] = [ + {position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'}, + {position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'}, + {position: 3, name: 'Lithium', weight: 6.941, symbol: 'Li'}, + {position: 4, name: 'Beryllium', weight: 9.0122, symbol: 'Be'}, + {position: 5, name: 'Boron', weight: 10.811, symbol: 'B'}, + + ]; + displayedColumns: string[] = ['select','applicant_name','pd_document_name','url']; + + selection = new SelectionModel(true, []); + dataSource: any =[]; + + constructor(private dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any, public pdTrigerService: QcService) { } + + ngOnInit() { + this.getPdfApi() + } + +getPdfApi(){ + console.log( this.data) + let data = {"pd_id": this.data.pd_id} + this.pdTrigerService.applicantWiseDigiLockerDocs(data).subscribe(data => { + let dataresult:any = data + console.log(dataresult) + if (dataresult.status == 200) { + this.digilock_list = dataresult.records + this.dataSource = new MatTableDataSource(this.digilock_list); + console.log( this.dataSource) + + }else{ + this.message = dataresult.msg + } + }) +} + /** Whether the number of selected elements matches the total number of rows. */ + isAllSelected() { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.data.length; +// console.log( numSelected,numRows) + return numSelected === numRows; +} + +/** Selects all rows if they are not all selected; otherwise clear selection. */ +toggleAllRows() { + if (this.isAllSelected()) { + this.selection.clear(); + return; + } + + this.selection.select(...this.dataSource.data); + // console.log( this.selection) +} + +/** The label for the checkbox on the passed row */ +checkboxLabel(row?: PeriodicElement): string { + if (!row) { + return `${this.isAllSelected() ? 'deselect' : 'select'} all`; + } + // console.log( this.selection) + return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.position + 1}`; + +} +view(url){ + + window.open(url, "_blank") + +} +confirmPdf(){ + console.log( this.selection) + if(this.selection.selected.length > 0){ + console.log(this.selection.selected) + let tmp =[] + this.selection.selected.forEach((element:any) => { + + tmp.push({'pd_document_id' :element.pd_document_id}) + + }); + console.log(tmp) + // localStorage.setItem('pdf-merge',JSON.stringify(tmp)) + this.dialogRef.close(tmp) + }else{ + this.dialogRef.close([]) + } +} +} diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html index 679f8d5a3..521585bed 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html @@ -43,35 +43,9 @@ PD Report - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts index 042a73e50..fbdabf60b 100755 --- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts +++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts @@ -11,6 +11,7 @@ import { QcService } from './../../qc-service/qc.service'; import { MatDialog, MatDialogRef, + MatIconRegistry, MAT_DIALOG_DATA, } from "@angular/material"; import{MatSidenav} from '@angular/material/sidenav' @@ -19,6 +20,7 @@ import { QcReviewComponent } from './qc-review/qc-review.component'; import { HttpResponse } from "@angular/common/http"; import { environment } from 'environments/environment'; import { QcNewComponent } from './qc-new/qc-new.component'; +import { PdfMergeComponent } from './pdf-merge/pdf-merge.component'; @@ -34,6 +36,7 @@ export class QcPdReportComponent implements OnInit { reason = ''; loadComponent: boolean=false; observer: MutationObserver; + pdf_merge_data: any = [] close(reason: string) { this.reason = reason; @@ -79,8 +82,12 @@ export class QcPdReportComponent implements OnInit { // ]; constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent, - private dialog: MatDialog, private sanitizer: DomSanitizer) { + private dialog: MatDialog, private sanitizer: DomSanitizer, private readonly matIconRegistry: MatIconRegistry,) { this.startPD = this.route.snapshot.params['pdid']; + this.matIconRegistry.addSvgIcon('digilocker', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/digilocker.svg')); + this.matIconRegistry.addSvgIcon('score', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/score.svg')); + this.matIconRegistry.addSvgIcon('notes', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/notes.svg')); + this.matIconRegistry.addSvgIcon('pic', this.sanitizer.bypassSecurityTrustResourceUrl('assets/images/picture_download.svg')); let encryptReportRandomString = atob(this.route.snapshot.params['string']); // this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD; @@ -189,7 +196,8 @@ export class QcPdReportComponent implements OnInit { reGeneratePFReport() { let data = { "pd_id": this.startPD, - "random_string":atob(this.route.snapshot.params['string']) + "random_string":atob(this.route.snapshot.params['string']), + "digilocker_merge":this.pdf_merge_data // "regenerate": "1" }; this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => { @@ -424,7 +432,34 @@ export class QcPdReportComponent implements OnInit { }); } + PdfMerge(){ + const dialogRef = this.dialog.open(PdfMergeComponent, { + data:{ + "pd_id":this.startPD, + }, + // position: { right: '0'}, + disableClose: true, + minHeight:'50%', + maxHeight:'90%', + minWidth: '60%', + maxWidth: '90%', + }); + dialogRef.afterClosed() + .subscribe(dataresult => { + if(dataresult instanceof Array){ + + if(dataresult.length>0){ + this.pdf_merge_data = dataresult + console.log( this.pdf_merge_data ) + + } + + } + + + }); + } changeDocumentEdit(): void { diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts index 19db1f544..61b9b8266 100755 --- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts +++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts @@ -672,5 +672,9 @@ export class QcService { // video_file -> exact file return this._http.post(this.apiUrl+'uploadVideoFile',params) } + applicantWiseDigiLockerDocs(params){ + + return this._http.post(this.apiUrl+'applicantWiseDigiLockerDocs',params ) + } } diff --git a/ng6-seed/src/app/quality-check/quality-check.module.ts b/ng6-seed/src/app/quality-check/quality-check.module.ts index cfa08c712..af7099edc 100755 --- a/ng6-seed/src/app/quality-check/quality-check.module.ts +++ b/ng6-seed/src/app/quality-check/quality-check.module.ts @@ -110,6 +110,7 @@ import { PdVisitTimeComponent } from './qc-list/pd-visit-time/pd-visit-time.comp import { UploadVideoComponent } from './upload-video/upload-video.component' import { MatVideoModule } from 'mat-video'; import { SpeedDialFabComponent } from './qc-list/qc-view/speed-dial-fab/speed-dial-fab.component'; +import { PdfMergeComponent } from './qc-list/qc-pd-report/pdf-merge/pdf-merge.component'; // import { PdfViewerModule } from 'ng2-pdf-viewer'; @@ -186,8 +187,8 @@ const customNotifierOptions: NotifierOptions = { AngularSplitModule.forRoot(), MatVideoModule ], - declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe, QcNewComponent, QcCusImagesComponent, PdVisitTimeComponent, UploadVideoComponent,SpeedDialFabComponent], - entryComponents: [PdVisitTimeComponent,PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,QcNewComponent, + declarations: [QualityCheckComponent,QcListComponent, QcViewComponent, QcStartComponent, QcPdReportComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, NumberToWordsPipe, QcNewComponent, QcCusImagesComponent, PdVisitTimeComponent, UploadVideoComponent,SpeedDialFabComponent, PdfMergeComponent], + entryComponents: [PdVisitTimeComponent,PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent,DialogChangeCurrentVenrsion, QcReviewComponent, ModelEditPdReportComponent, InitiateAdditionalPdComponent,QcNewComponent,PdfMergeComponent, BusinessAssetsInfoComponent, ClientInfoComponent, SupplierInfoComponent, diff --git a/ng6-seed/src/app/reports/smc-credit/smc-credit.component.html b/ng6-seed/src/app/reports/smc-credit/smc-credit.component.html index ed3786130..aba567d6f 100644 --- a/ng6-seed/src/app/reports/smc-credit/smc-credit.component.html +++ b/ng6-seed/src/app/reports/smc-credit/smc-credit.component.html @@ -112,6 +112,11 @@ {{row.applicant_name}} + + City + + {{row.city_name}} + Lender Applicant ID @@ -155,6 +160,16 @@ {{row.updatedon | date: 'dd-MM-yyyy hh:mm a'}} + + Video Call Initiated Person + + {{column_name_filter(row.video_call_initiate_user) }} + + + Video Count + + {{row.total_video }} +