diff --git a/ng6-seed/salespd_pwa__testing_07-09-2020.zip b/ng6-seed/salespd_pwa__testing_07-09-2020.zip new file mode 100644 index 0000000..4774a4b Binary files /dev/null and b/ng6-seed/salespd_pwa__testing_07-09-2020.zip differ diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.html b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.html new file mode 100644 index 0000000..2e162a3 --- /dev/null +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.html @@ -0,0 +1,3 @@ +

+ fly-hi-list-filter works! +

diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.scss b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.spec.ts b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.spec.ts new file mode 100644 index 0000000..901f87c --- /dev/null +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FlyHiListFilterComponent } from './fly-hi-list-filter.component'; + +describe('FlyHiListFilterComponent', () => { + let component: FlyHiListFilterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ FlyHiListFilterComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FlyHiListFilterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.ts b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.ts new file mode 100644 index 0000000..4cfe5b7 --- /dev/null +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-fly-hi-list-filter', + templateUrl: './fly-hi-list-filter.component.html', + styleUrls: ['./fly-hi-list-filter.component.scss'] +}) +export class FlyHiListFilterComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html index 04d9791..5737aa7 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.html @@ -49,6 +49,7 @@ +
{{details.sales_pd_id}} @@ -134,9 +135,145 @@
+
+ + + + + + +
{{details.sales_pd_id}}
+ +
+
+ + + + + {{details.sales_pd_sno}}
+ {{details.sales_pd_type_master}}
+ +
+
+ + + + {{details.applicant_name}} +
+ {{details.applicant_id}} + + +
+
+ + + {{details.short_name}}
+ {{details.abbr}} + + +
+
+ + + + -- + + + {{details.officer_name}} + + + + + + + + + -- + + + {{details.status}} + + + + + + + + {{details.createdon | date: 'dd/MM/yyyy'}} + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.scss b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.scss index 537921a..0e02d30 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.scss +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.scss @@ -139,5 +139,16 @@ p.note { font-size: 80%; } } + + ::ng-deep.mat-tab-body-content { + height: 100%; + overflow: hidden !important; + } + .mat-row { + min-width: max-content; + } + mat-table{ + width: 98%; + } diff --git a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts index 3e6c45b..9db41bb 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts +++ b/ng6-seed/src/app/fly-hi/fly-hi-list/fly-hi-list.component.ts @@ -1,19 +1,22 @@ -import { Component, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { FlyhiService } from '../services/flyhi.service'; import { Router, ActivatedRoute } from '@angular/router'; -import { MatDialog, MatTableDataSource, MatPaginator, MatSort } from '@angular/material'; +import { MatDialog, MatTableDataSource, MatPaginator, MatSort, PageEvent } from '@angular/material'; import { ConstantsProvider } from 'app/providers/constants/constants'; import { LoaderService } from 'app/shared/loaderService/loader.service'; import { SalesPdService } from 'app/sales-pd/services/sales-pd.service'; +import { ReGenerateReportComponent } from 'app/sales-pd/sales-pd-list/re-generate-report/re-generate-report.component'; @Component({ selector: 'app-fly-hi-list', templateUrl: './fly-hi-list.component.html', - styleUrls: ['./fly-hi-list.component.scss'] + styleUrls: ['./fly-hi-list.component.scss'], + encapsulation: ViewEncapsulation.None }) export class FlyHiListComponent implements OnInit { @ViewChild(MatPaginator) paginator: MatPaginator; @ViewChild(MatSort) sort: MatSort; + @Input() bindFilterValue: string; public dataLengthTab4: number; public dataSourceTab4 = new MatTableDataSource(); is_sales_login:boolean = false @@ -25,7 +28,12 @@ export class FlyHiListComponent implements OnInit { limitMsg: boolean = false; finallink: string; filter_drop_down_data: { product_ids: any[]; lender_ids: any[]; pd_status: any[]; }; - + length = 5; + pageIndex = 0; + pageSize = 10; + pageEvent: PageEvent; + displayedColumns = ['sales_pd_id','sales_pd_sno','applicant_name','short_name','officer_name','status','createdon','view' +]; constructor(private loaderService:LoaderService,private constantProvider:ConstantsProvider,private dialog:MatDialog,private route: ActivatedRoute, private router: Router,private _fly_Hi:FlyhiService,private SalesPDService:SalesPdService) { this.roleID = localStorage.getItem('user_role'); setTimeout(()=>{ @@ -320,20 +328,20 @@ export class FlyHiListComponent implements OnInit { } -// regeneratereport(data,option) -// { + regeneratereport(data,option) +{ -// const dialogRef = this.dialog.open(ReGenerateReportComponent,{ -// data: {pdid: data,option: option}, -// disableClose: true, -// minWidth: '30%', -// maxWidth: '40%', + const dialogRef = this.dialog.open(ReGenerateReportComponent,{ + data: {pdid: data,option: option}, + disableClose: true, + minWidth: '30%', + maxWidth: '40%', -// }) -// dialogRef.afterClosed() -// .subscribe(dataresult => { -// // this.viewPdDetails(this.viewID,this.masterRandomString) -// }) -// } + }) + dialogRef.afterClosed() + .subscribe(dataresult => { + // this.viewPdDetails(this.viewID,this.masterRandomString) + }) +} } diff --git a/ng6-seed/src/app/fly-hi/fly-hi.module.ts b/ng6-seed/src/app/fly-hi/fly-hi.module.ts index 596878a..1af98f5 100644 --- a/ng6-seed/src/app/fly-hi/fly-hi.module.ts +++ b/ng6-seed/src/app/fly-hi/fly-hi.module.ts @@ -29,7 +29,48 @@ import { AngularSplitModule } from 'angular-split'; import { FormComponent } from './forms-dynamic/form/form.component'; import { ImageVideoComponent } from './image-video/image-video.component'; import { AnswerOptionCreateDialogComponent } from './forms-dynamic/answer-option-create-dialog/answer-option-create-dialog.component'; - +import { FlyHiListFilterComponent } from './fly-hi-list/fly-hi-list-filter/fly-hi-list-filter.component'; +import { NotifierModule, NotifierOptions } from 'angular-notifier'; +const pdCustomNotifierOptions: NotifierOptions = { + position: { + horizontal: { + position: 'right', + distance: 12 + }, + vertical: { + position: 'top', + distance: 32, + gap: 10 + } + }, + theme: 'material', + behaviour: { + autoHide: 2000, + 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, @@ -79,10 +120,10 @@ import { AnswerOptionCreateDialogComponent } from './forms-dynamic/answer-option OwlDateTimeModule, OwlNativeDateTimeModule, AngularSplitModule, - MatVideoModule - + MatVideoModule, + NotifierModule.withConfig(pdCustomNotifierOptions), ], - declarations:[StartPd2Component,DynamicFormComponent,DynamicQuestionTemplateComponent,FormComponent,AnswerOptionCreateDialogComponent], + declarations:[StartPd2Component,DynamicFormComponent,DynamicQuestionTemplateComponent,FormComponent,AnswerOptionCreateDialogComponent, FlyHiListFilterComponent], exports:[StartPd2Component], entryComponents:[FlyHiListComponent,DynamicFormComponent,DynamicQuestionTemplateComponent,FormComponent], providers:[ConstantsProvider,{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' },{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, diff --git a/ng6-seed/src/app/fly-hi/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts b/ng6-seed/src/app/fly-hi/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts index fee277e..873e491 100644 --- a/ng6-seed/src/app/fly-hi/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts +++ b/ng6-seed/src/app/fly-hi/forms-dynamic/dynamic-form/dynamic-question-template/dynamic-question-template.component.ts @@ -434,10 +434,11 @@ export class DynamicQuestionTemplateComponent implements OnInit { this.local_city1=this.quesService.convertArrayNames(['city_id','city_name'], this.local_city1) // console.log( this.local_city1) this.city_array.push( this.local_city1) - + // val.answers = null if(this.city_array[this.json_index] == undefined){ val.answers = this.local_city1 }else{ + this.city_array[this.json_index] = this.local_city1 val.answers = this.city_array[this.json_index] } @@ -457,6 +458,7 @@ export class DynamicQuestionTemplateComponent implements OnInit { if(this.pincode_array[this.json_index] == undefined){ val.answers = this.local_pincode1 }else{ + this.pincode_array[this.json_index] = this.local_pincode1 val.answers = this.pincode_array[this.json_index] } // console.log( this.pincode_array,index) diff --git a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.html b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.html index a572feb..68f197e 100644 --- a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.html +++ b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.html @@ -56,4 +56,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts index dbc972d..6b10133 100644 --- a/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts +++ b/ng6-seed/src/app/fly-hi/forms-dynamic/form/form.component.ts @@ -501,7 +501,7 @@ export class FormComponent implements OnInit { this._flyhi.saveForm(params).subscribe(result=>{ if(result['dataStatus']) { this.loaderService.closeMatSpinnerDialog() - // this.notifier.notify("success","Saved Successfully"); + this.notifier.notify("success","Saved Successfully"); setTimeout(()=>{ this.dialogRef.close('refresh') },1500) diff --git a/ng6-seed/src/app/providers/constants/constants.ts b/ng6-seed/src/app/providers/constants/constants.ts index 5e0431b..a1bddc9 100755 --- a/ng6-seed/src/app/providers/constants/constants.ts +++ b/ng6-seed/src/app/providers/constants/constants.ts @@ -65,7 +65,7 @@ export class ConstantsProvider { lenUserPoolId: "ap-south-1_4kkhgsYo0", // Username lenClientId: "57t9fv113b5eab5pra127bbgn0", // ClientId for mobile } - return (environment.production === true ? production : testing); + return (environment.production === true && environment.typeofEnvironment === 1? production : testing); diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html index 5a78ecf..f037792 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.html @@ -76,8 +76,8 @@
-
-
+
+
diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss index f132be0..9e081b0 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.scss @@ -85,12 +85,39 @@ right: -10px; top: 4px; - background-color: #e00201 ; + } .top .thumbnail .date1 { // margin-right: 13px; position: absolute; right: -10px; top: 50px; - background-color: #e00201 ; + + } + + .thumbnail{ + max-width: 200px; + width: auto; + // height: 200px; + margin-top: 25px; + padding: 1.4%; + } + + .dummy-img { + width: 125px; + height: 120px; + } + + .dummy-img { + width: 200px; + height: 170px; + border: 3px dashed rgba(0, 0, 0, 0.2); + border-radius: 7px; + background: #eeee; + color: gray; + } + + .image-class { + width: 200px; + height: 170px; } \ No newline at end of file diff --git a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts index adf920b..6406a8c 100755 --- a/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts +++ b/ng6-seed/src/app/sales-pd/components/ques-template/ques-template.ts @@ -42,7 +42,8 @@ import { ImageEditComponent } from './image-edit/image-edit.component'; */ @Component({ selector: 'ques-template', - templateUrl: 'ques-template.html' + templateUrl: 'ques-template.html', + styleUrls: ['ques-template.scss'] }) export class QuesTemplateComponent { photoStructure = photoJSONStructure @@ -1607,6 +1608,7 @@ this.proceedonChangeProperty(modified) // return invalid; } onSubmit(flag){ + console.log(this.quesAnsForm.getRawValue()) // this.loaderService.showMatSpinnerDialog('Please wait...') //1-Submit 0-Draft diff --git a/ng6-seed/src/app/sales-pd/home/home.ts b/ng6-seed/src/app/sales-pd/home/home.ts index 7b199d7..abc7fcd 100755 --- a/ng6-seed/src/app/sales-pd/home/home.ts +++ b/ng6-seed/src/app/sales-pd/home/home.ts @@ -772,6 +772,7 @@ export class Section9 { console.log("Leaving on ionViewCanLeave"); } setGroupControl(event){ + console.log(event) this.formGroupValue=event } checkImageUploadingStatus(sec_value) { diff --git a/ng6-seed/src/app/sales-pd/sales-pd-list/re-generate-report/re-generate-report.component.ts b/ng6-seed/src/app/sales-pd/sales-pd-list/re-generate-report/re-generate-report.component.ts index 868fd08..204fc13 100644 --- a/ng6-seed/src/app/sales-pd/sales-pd-list/re-generate-report/re-generate-report.component.ts +++ b/ng6-seed/src/app/sales-pd/sales-pd-list/re-generate-report/re-generate-report.component.ts @@ -17,7 +17,9 @@ export class ReGenerateReportComponent implements OnInit { title:any; question:any; geolocation:FormControl = new FormControl('',Validators.compose([Validators.required])) - constructor(private loaderService:LoaderService,notifier: NotifierService,private SalesPDService:SalesPdService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; } + roleID: string; + constructor(private loaderService:LoaderService,notifier: NotifierService,private SalesPDService:SalesPdService,private dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; + this.roleID = localStorage.getItem('user_role'); } ngOnInit() { this.option=this.data.option; @@ -42,7 +44,7 @@ export class ReGenerateReportComponent implements OnInit { this.loaderService.showMatSpinnerDialog('Please wait...') if(option=='report') { - this.SalesPDService.generatesalereport(pdid) + this.SalesPDService.generatesalereport(pdid,this.roleID) .subscribe( data => { if (data.status == 200) { diff --git a/ng6-seed/src/app/sales-pd/section-list/section-list.component.html b/ng6-seed/src/app/sales-pd/section-list/section-list.component.html index 478dcc1..75fb05e 100644 --- a/ng6-seed/src/app/sales-pd/section-list/section-list.component.html +++ b/ng6-seed/src/app/sales-pd/section-list/section-list.component.html @@ -15,7 +15,7 @@    -    +