flyhi advance filter and sales link issue

This commit is contained in:
venbainfotech 2022-07-08 17:27:23 +05:30
parent a410cc9465
commit 976ea5e4ed
8 changed files with 166 additions and 32 deletions

View File

@ -0,0 +1,18 @@
<div class="example-header">
<button mat-icon-button (click)="previousClicked('month')">
<mat-icon>keyboard_arrow_left</mat-icon>
</button>
<span class="example-header-label">{{monthLabel}}</span>
<button mat-icon-button (click)="nextClicked('month')">
<mat-icon>keyboard_arrow_right</mat-icon>
</button>
<button mat-icon-button class="example-double-arrow" (click)="previousClicked('year')">
<mat-icon>keyboard_arrow_left</mat-icon>
</button>
<span class="example-header-label">{{yearLabel}}</span>
<button mat-icon-button class="example-double-arrow" (click)="nextClicked('year')">
<mat-icon>keyboard_arrow_right</mat-icon>
</button>
</div>

View File

@ -36,6 +36,11 @@
</mat-select>
</mat-form-field>
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile">
<input matInput type="text" formControlName="pd_applicant_name" placeholder="Applicant Name">
</mat-form-field>
</div>
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile">
<mat-select multiple formControlName="pd_products" placeholder="Products">
@ -45,33 +50,35 @@
</div> -->
</div>
<div fxLayout="row wrap">
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile" >
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile" >
<input matInput [matDatepicker]="picker" [max]="todaydate" formControlName="pd_from_date" placeholder="Choose a From date">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker touchUi=true #picker [calendarHeaderComponent]="exampleHeader"></mat-datepicker>
</mat-form-field>
<!-- <mat-form-field class="web mobile" >
<input matInput [matDatepicker]="picker" [max]="todaydate"
formControlName="pd_from_date" placeholder="Choose a From date" >
<mat-datepicker-toggle matSuffix [for]="picker" ></mat-datepicker-toggle>
<mat-datepicker touchUi=true #picker ></mat-datepicker>
</mat-form-field>
</div>
</mat-form-field> -->
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile" >
<mat-form-field class="web mobile" >
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" [max]="todaydate" formControlName="pd_to_date" placeholder="Choose a To date">
<mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
<mat-datepicker touchUi=true #picker1 [calendarHeaderComponent]="exampleHeader"></mat-datepicker>
</mat-form-field>
<!-- <mat-form-field class="web mobile" >
<input matInput [matDatepicker]="picker1" [min]="searchForm.get('pd_from_date').value" [max]="todaydate"
formControlName="pd_to_date" placeholder="Choose a To date" >
<mat-datepicker-toggle matSuffix [for]="picker1" ></mat-datepicker-toggle>
<mat-datepicker touchUi=true #picker1 ></mat-datepicker>
</mat-form-field>
</mat-form-field> -->
</div>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="33.33" fxFlex.lg="33.33" fxFlex.xl="33.33">
<mat-form-field class="web mobile">
<input matInput type="text" formControlName="pd_applicant_name" placeholder="Applicant Name">
</mat-form-field>
</div>
</div>
<!-- <mat-form-field style="width:30%">
<mat-select multiple formControlName="pd_city" placeholder="City">

View File

@ -1,9 +1,21 @@
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { OnInit, Output, EventEmitter, Input} from '@angular/core';
import { DatePipe } from '@angular/common';
import { FormGroup, FormBuilder } from '@angular/forms';
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
import { SalesPdService } from 'app/sales-pd/services/sales-pd.service';
import { FlyhiService } from 'app/fly-hi/services/flyhi.service';
import { takeUntil } from 'rxjs/operators';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Inject,
OnDestroy
} from '@angular/core';
import {MatCalendar} from '@angular/material/datepicker';
import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';
import {Subject} from 'rxjs';
@Component({
selector: 'app-flyhi-advance-filter',
@ -11,7 +23,7 @@ import { FlyhiService } from 'app/fly-hi/services/flyhi.service';
styleUrls: ['./flyhi-advance-filter.component.scss']
})
export class FlyhiAdvanceFilterComponent implements OnInit {
exampleHeader = ExampleHeader;
searchForm:FormGroup;
todaydate: any;
pdStatus: any=[];
@ -38,11 +50,12 @@ export class FlyhiAdvanceFilterComponent implements OnInit {
this.todaydate = new Date();
this.getDropdown();
let local:any = JSON.parse(localStorage.getItem('user_details'));
if(local.userid != ''){
this.is_sales_login = true
}
}
setTimeout(()=>{
if(local.userid != ''){
this.is_sales_login = true
}
},4000)
}
ngOnInit() {
let local:any = JSON.parse(localStorage.getItem('user_details'));
@ -151,3 +164,72 @@ export class FlyhiAdvanceFilterComponent implements OnInit {
}
}
/** Custom header component for datepicker. */
@Component({
selector: 'example-header',
styles: [`
.example-header {
display: flex;
align-items: center;
padding: 0.5em;
}
.example-header-label {
flex: 1;
height: 1em;
font-weight: 500;
text-align: center;
}
.example-double-arrow .mat-icon {
margin: -22%;
}
`],
templateUrl: './custom-calendar.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ExampleHeader<D> implements OnDestroy {
private _destroyed = new Subject<void>();
constructor(
private _calendar: MatCalendar<D>, private _dateAdapter: DateAdapter<D>,
@Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats, cdr: ChangeDetectorRef) {
_calendar.stateChanges
.pipe(takeUntil(this._destroyed))
.subscribe(() => cdr.markForCheck());
}
ngOnDestroy() {
this._destroyed.next();
this._destroyed.complete();
}
get monthLabel() {
return this._dateAdapter
.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
.toLocaleUpperCase().split(" ")[0];
}
get yearLabel() {
return this._dateAdapter
.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel).split(" ")[1];
}
previousClicked(mode: 'month' | 'year') {
this._calendar.activeDate = mode === 'month' ?
this._dateAdapter.addCalendarMonths(this._calendar.activeDate, -1) :
this._dateAdapter.addCalendarYears(this._calendar.activeDate, -1);
}
nextClicked(mode: 'month' | 'year') {
this._calendar.activeDate = mode === 'month' ?
this._dateAdapter.addCalendarMonths(this._calendar.activeDate, 1) :
this._dateAdapter.addCalendarYears(this._calendar.activeDate, 1);
}
}
/** Copyright 2020 Google LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license */

View File

@ -7,6 +7,7 @@ import { SalesPdService } from '../services/sales-pd.service';
import { ConstantsProvider } from 'app/providers/constants/constants';
import { LoaderService } from 'app/shared/loaderService/loader.service';
import { ReGenerateReportComponent } from './re-generate-report/re-generate-report.component';
import { environment } from 'environments/environment';
@Component({
selector: 'app-sales-pd',
templateUrl: './sales-pd.component.html',
@ -114,7 +115,15 @@ export class SalesPdComponent implements OnInit {
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
let link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
let link
if(environment.production == true){
console.log(environment.production)
link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
}else {
console.log(!environment.production)
link ="http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
}
var string:any = {
EmpName:user.user_first_name,
EmpCode:"",
@ -277,8 +286,15 @@ editForm(value_obj){
// https://gstapp.smcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U&PDID=123&Email=manojsahrawat@smcfinance.com
//let link = "http://gstapp.devopsmcfinance.com/home?saltkey=VQDa79tyBlpu7ZuKt6U"
let link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
var string:any = {
let link
if(environment.production == true){
console.log(environment.production)
link ="https://salesapp.smcfinance.com/app/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
}else {
console.log(!environment.production)
link ="http://salesapp.devopsmcfinance.com/secure?saltkey=VQDa79tyBlpu7ZuKt6U"
}
var string:any = {
EmpName:user.user_first_name,
EmpCode:"",
PDID:val.sales_pd_sno,

View File

@ -23,7 +23,7 @@ import { CommonModule } from '@angular/common';
import { ReGenerateReportComponent } from './sales-pd-list/re-generate-report/re-generate-report.component';
import { FlyHiListComponent } from 'app/fly-hi/fly-hi-list/fly-hi-list.component';
import { ImageVideoComponent } from 'app/fly-hi/image-video/image-video.component';
import { FlyhiAdvanceFilterComponent } from 'app/fly-hi/fly-hi-list/flyhi-advance-filter/flyhi-advance-filter.component';
import { FlyhiAdvanceFilterComponent, ExampleHeader } from 'app/fly-hi/fly-hi-list/flyhi-advance-filter/flyhi-advance-filter.component';
@NgModule({
imports: [
SalesPdRoutingModule,
@ -36,8 +36,8 @@ import { FlyhiAdvanceFilterComponent } from 'app/fly-hi/fly-hi-list/flyhi-advanc
MatDialogModule,
MatTooltipModule
],
declarations: [FlyhiAdvanceFilterComponent,ImageVideoComponent,AlertDialogComponent,FlyHiListComponent,SalesPdComponent,AdvanceFilterComponent, ReGenerateReportComponent],
entryComponents:[ImageVideoComponent,AlertDialogComponent,SalesPdComponent,ReGenerateReportComponent],
declarations: [ExampleHeader,FlyhiAdvanceFilterComponent,ImageVideoComponent,AlertDialogComponent,FlyHiListComponent,SalesPdComponent,AdvanceFilterComponent, ReGenerateReportComponent],
entryComponents:[ExampleHeader,FlyhiAdvanceFilterComponent,ImageVideoComponent,AlertDialogComponent,SalesPdComponent,ReGenerateReportComponent],
providers:[ConstantsProvider,{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' },{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS},{ provide: MatDialogRef, useValue: {} },{ provide: MAT_DIALOG_DATA, useValue: [] }],
bootstrap: [SalesPdComponent],

View File

@ -17,10 +17,15 @@
<mat-form-field style="width: 100%">
<input matInput placeholder="E-Mail" type="text" name="email" required [(ngModel)]="email">
</mat-form-field>
<mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
<mat-form-field>
<input matInput placeholder="Password" minlength= "8" [type]="hide ? 'password' : 'text'" name="password" [(ngModel)]="password" required>
<mat-icon class="passwordIcon" matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
<!-- <mat-hint *ngIf="!passwordInput.value">Enter your password</mat-hint> -->
</mat-form-field>
<!-- <mat-form-field style="width: 100%" class="mb-1">
<input matInput placeholder="Password" minlength= "8" type="password" name="password" required [(ngModel)]="password">
</mat-form-field> -->
<button class="mat-green" mat-raised-button>SIGN IN</button><br/>
<div>
<a *ngIf="email" class="mat-text-warn mb-0" (click)="forgotpassword();">Forgot password?</a></div>

View File

@ -38,4 +38,8 @@
.bottom-sec,.mat-green{
color:white !important;
font-weight: 700;
}
.passwordIcon{
font-size: larger !important;
color: #f34325 !important;
}

View File

@ -45,12 +45,14 @@ export class LoginComponent implements OnInit{
};
commonDetails: any;
dialogRef: MatDialogRef<OtpComponent, any>;
hide: boolean;
constructor(
private router: Router, public aws: AwsService, public dialog: MatDialog,
public shared:CognitoService,private dashBoardService:DashboardService , private loaderService:LoaderService) {
}
ngOnInit(){
this.hide = true;
this.loggedInCheck();
}