This commit is contained in:
bitbucket 2022-01-19 10:49:50 +05:30
commit 70caeb9efc
29 changed files with 402 additions and 45 deletions

View File

@ -158,13 +158,21 @@
<!-- <mat-error *ngIf="pdMain.fk_pd_type.hasError('required')">PD Type Required.</mat-error> -->
</mat-form-field>
<mat-form-field style="width: 60%">
<!--<mat-form-field style="width: 60%">
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Amount <span *ngIf="pdMain.loan_amount.hasError('required')">*</span></mat-label>
<input matInput autocomplete="off" placeholder="Enter the amount" formControlName="loan_amount" OnlyNumber autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Required.</mat-error>
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
</mat-form-field>-->
<mat-form-field style="width: 60%">
<mat-label>{{lenderShortName == 'CFPL' ? 'Facility' :'Loan'}} Amount </mat-label>
<input matInput autocomplete="off" placeholder="Enter the amount" formControlName="loan_amount" OnlyNumber autocomplete="off">
<mat-hint align="start" style="font-size:90%" *ngIf="pdMain.loan_amount.value">{{"&#8377;"}} {{pdMain.loan_amount.value | numberToWords}} Only</mat-hint>
<mat-error *ngIf="pdMain.loan_amount.hasError('required')">Required.</mat-error>
<mat-error *ngIf="pdMain.loan_amount.hasError('pattern')">Enter valid amount. </mat-error>
</mat-form-field>
</mat-card-content>
</mat-card>
@ -277,7 +285,7 @@
<mat-error *ngIf="pdMain.additional_mobile_no.hasError('maxlength') || pdMain.additional_mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
</mat-form-field>
<mat-form-field style="width: 12%">
<mat-form-field style="width: 12%">
<input matInput autocomplete="off" placeholder="STD Code" formControlName="applicant_stdcode" type="text" ForMobileNumbers maxlength="5">
<mat-error *ngIf="pdMain.applicant_stdcode.hasError('maxlength') || pdMain.applicant_stdcode.hasError('minlength')">Enter Valid STD Code Number. </mat-error>
</mat-form-field> &nbsp; - &nbsp;

View File

@ -102,14 +102,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
this.filterList()
}
getProCusPDType(entity_id){
console.log(entity_id);
this._pd.getEntityPreferences(entity_id).subscribe(res=>{
if(res['dataStatus']){
console.log(res);
console.log('res');
this.productAllList=res['records'].products
this.pdTypeList=res['records'].pd_types
this.customerSegmentAllList=res['records'].customer_segments
this.finInstitutionList=res['records'].financial_institutions
let lender_other_config = res['records'].lender_other_config
lender_other_config = JSON.parse(lender_other_config)
if(lender_other_config != null){
this.removedControl = lender_other_config.non_mandatory_fields
@ -117,6 +121,8 @@ export class AddPdComponent implements OnInit, OnDestroy {
console.log('lendercofig',lender_config)
this._PDtriggerForm.controls[lender_config].clearValidators();
this._PDtriggerForm.controls[lender_config].updateValueAndValidity()
this._PDtriggerForm.controls['loan_amount'].clearValidators();
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity()
})
}
else{
@ -176,7 +182,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
applicant_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
company_name: [null],
remarks: [null],
// allocation_type: [null],
// allocation_type: [null],
// sub_allocation_type: [null],
coapplicants: this._fb.array([]),
addresses: this._fb.array([this.createAddresses()]),
@ -197,7 +203,14 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls.pd_branch_id.setValue(null);
this.productList = this.productAllList;
// if(this.lenderShortName == 'CLIX')
// {
// this._PDtriggerForm.controls['loan_amount'].setValue(null)
// this._PDtriggerForm.controls['loan_amount'].clearValidators()
// this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity()
// alert('clix');
// }
// if(this.lenderShortName == 'CLIX'){
// let getProductAbbr = this.productAllList.map(dval => dval.product_abbr);
@ -242,10 +255,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.pattern('^[0-9]*$')])
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
}
else{
this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required,Validators.pattern('^[0-9]*$')]);
this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
}
// else{
// this._PDtriggerForm.controls['loan_amount'].setValidators([Validators.required,Validators.pattern('^[0-9]*$')]);
// this._PDtriggerForm.controls['loan_amount'].updateValueAndValidity();
// }
// if(this.lenderShortName == "IIB"){ //FOR INDUSLAND BANK
// // console.log("entered");

View File

@ -5,7 +5,7 @@
margin-top: -5px;
display: block;
}
:host /deep/ {
:host {
mat-sidenav {
max-width: 400px;
max-height: 500px;

View File

@ -132,7 +132,7 @@
<mat-form-field>
<mat-select placeholder="Bank Name" formControlName="bank_name">
<mat-option>
<ngx-mat-select-search [formControl]="bankFilterCtrl"
<ngx-mat-select-search [formControl]="filterCtrl"
[placeholderLabel]="'Search Bank...'"
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
</mat-option>
@ -203,10 +203,10 @@
<mat-form-field >
<mat-select placeholder="Is this same AC used for?
" formControlName="same_ac_used_for">
<mat-option>Select</mat-option>
<mat-option value="personal">Personal</mat-option>
<mat-option value="" >Select</mat-option>
<!--<mat-option value="personal">Personal</mat-option>-->
<mat-option value="business">Business</mat-option>
<mat-option value="both">Both</mat-option>
<!--<mat-option value="both">Both</mat-option>-->
</mat-select>
</mat-form-field>
</div>
@ -249,12 +249,12 @@
</div>
<div style="border: 2px solid rgb(223, 213, 213);">
<mat-card-content>
<mat-card-header style="font-size: medium;">Business Details
<mat-card-header style="font-size: medium;">Business Banking Details
</mat-card-header>
<br>
<mat-form-field style="width:60% !important;">
<mat-select placeholder="Is the Business Infomation Available" formControlName="bank_info_available_business" (selectionChange)="onChangeAvailablebusiness($event.value)">
<mat-select placeholder="Is business Banking Information Available" formControlName="bank_info_available_business" (selectionChange)="onChangeAvailablebusiness($event.value)">
<mat-option>Select</mat-option>
<mat-option value="Yes">Yes</mat-option>
<mat-option value="No">No</mat-option>
@ -291,7 +291,7 @@
<mat-form-field>
<mat-select placeholder="Bank Name" formControlName="bank_name_business">
<mat-option>
<ngx-mat-select-search [formControl]="bankFilterCtrl"
<ngx-mat-select-search [formControl]="filterCtrl"
[placeholderLabel]="'Search Bank...'"
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
</mat-option>

View File

@ -56,7 +56,7 @@ export class BankingDetailsComponent implements OnInit {
image_doc_params: { pdid: number; form_id: any; company_id: string; };
form_id: string;
public bankFilterCtrl:FormControl = new FormControl();
public filterCtrl:FormControl = new FormControl();
public filtered_m_btLenderList:ReplaySubject<any> = new ReplaySubject<any>(1);
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
@ -178,6 +178,7 @@ export class BankingDetailsComponent implements OnInit {
// control.push(this.createBankarray());
} else {
result.forEach((datas, index) => {
datas.filterCtrl=''
// this.selectedBorrower(datas.applicant_name,index);
this.selectedAccTypeChanges(+datas.account_type, index)
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
@ -193,9 +194,10 @@ export class BankingDetailsComponent implements OnInit {
if (result1.length == 0) {
// control.push(this.createBankarray());
} else {
result1.forEach((datas, index) => {
result1.forEach((datas1, index) => {
datas1.filterCtrl=''
// this.selectedBorrower(datas.applicant_name,index);
this.selectedAccTypeChanges1(+datas.account_type_business, index)
this.selectedAccTypeChanges1(+datas1.account_type_business, index)
// this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
//control.push(this.createBankarray());
control1.push(this.createBusinessarray());
@ -215,8 +217,8 @@ export class BankingDetailsComponent implements OnInit {
this.filterList();
}
filterList() {
this.bankFilterCtrl.valueChanges.pipe().subscribe(()=>{
this.applyFilter(this.bankFilterCtrl.value,this.filtered_m_btLenderList,this.m_btLenderList,'lender_name')
this.filterCtrl.valueChanges.pipe().subscribe(()=>{
this.applyFilter(this.filterCtrl.value,this.filtered_m_btLenderList,this.m_btLenderList,'lender_name')
})
}
@ -263,6 +265,7 @@ export class BankingDetailsComponent implements OnInit {
this.bankingForm = this.fb.group({
banking_form_remark: [''],
bank_info_available:[''],
bank_info_available_business:[''],
itemRows: this.fb.array([]),
itemRows1: this.fb.array([]),
@ -283,7 +286,7 @@ export class BankingDetailsComponent implements OnInit {
bank_name: [''],
other_bank: [''],
account_type: [''],
filterCtrl:[''],
//salary: [''],
salary: this.pd_cus_segment.substring(0, 2) == 'SE' ? [''] : [''],
limit: [''],
@ -304,6 +307,7 @@ export class BankingDetailsComponent implements OnInit {
bank_name_business: [''],
other_bank_business: [''],
account_type_business: [''],
filterCtrl:[''],
//salary: [''],
salary_business: this.pd_cus_segment.substring(0, 2) == 'SE' ? [''] : [''],
limit_business: [''],

View File

@ -33,7 +33,7 @@
<div fxLayout="row wrap" fxLayoutGap="5px" fxLayoutAlign="start none">
<mat-form-field style="width: 95%;">
<mat-select placeholder="Is this the business address ? "
(selectionChange)="setRequiredValidation($event.value,itemrow,1);"
(selectionChange)="setRequiredValidation($event.value,itemrow,1);"
formControlName="business_address_availability" required>
<mat-option>Select</mat-option>
<mat-option value="yes">Yes</mat-option>

View File

@ -206,6 +206,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
reqparams.parent_pdid = this.parent_pdid;
reqparams.pd_id = this.pdid;
reqparams.pd_form_id = '22';
reqparams.company_id=this.company_id;
this.pdTrigerService.retriveForm(reqparams).subscribe(
data => {
if (data) {
@ -309,7 +310,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
let selectedCity = this.cityArr.filter(element => element.city_id == dataValue.city)[0];
// console.log(selectedCity,dataValue.city,selectedState);
let selectedPincode = this.pinArr.filter(element => element.pincode_id == dataValue.pincode)[0];
console.log(selectedAddressType)
console.log(selectedAddressType)
let addressType = dataValue.address_type != 1 && selectedAddressType ? selectedAddressType.address_type : dataValue.address_type_others;
console.log(addressType)

View File

@ -41,8 +41,7 @@ export class ImagesAllComponent implements OnInit { imageData: any;
// if(this.records.is_cus_link_disabled != '1') {
this.imageData =this.records.img_data;
this.imageData.forEach(val=>{
console.log('tamil');
console.log(val);
val.is_loader = false
val.is_saved = true
})

View File

@ -1134,4 +1134,35 @@ export class PdTrigerService {
// }
}
generatesalereport(params :any): Observable<any> {
// let httpParams = new HttpParams().set('pdid', countpdid);
// httpParams = httpParams.append('random_string',randomString);
return this._http.get(this.apiUrl + 'regenerateSaleReport?sales_pd_id=' +params)
.pipe(
catchError(this.handleError('role', []))
)
}
generatemail(params :any): Observable<any> {
// let httpParams = new HttpParams().set('pdid', countpdid);
// httpParams = httpParams.append('random_string',randomString);
return this._http.get(this.apiUrl + 'resendSaleReportMail?sales_pd_id=' +params)
.pipe(
catchError(this.handleError('role', []))
)
}
//generatesateliteimage(params :any): Observable<any> {
// console.log('params');
// console.log(params);
// // let httpParams = new HttpParams().set('pdid', countpdid);
// // httpParams = httpParams.append('random_string',randomString);
// return this._http.post(this.apiUrl + 'regenerateSatelliteImg',{ "records": params })
// .pipe(
// catchError(this.handleError('role', []))
// )
// }
generatesateliteimage(param:any): Observable<any>{
return this._http.post<any>(this.apiUrl + 'regenerateSatelliteImg',param )
}
}

View File

@ -5,7 +5,7 @@
margin-top: -5px;
display: block;
}
:host /deep/ {
:host {
// mat-sidenav {
// max-width: 400px;
// max-height: 500px;

View File

@ -2,7 +2,7 @@
<mat-card>
<div fxLayout="row" fxLayoutAlign="start center" class="mb-1">
<div class="ml-xs mr-xs" style="width: 100%;">
<mat-card-title><span>MW Sales PD MIS Report </span>
<mat-card-title><span>MW Sales PD MIS Report</span>
<button class="btn_export" mat-raised-button color="primary" (click)="exp.exportTable('xlsx',{fileName:'Sales PD MIS Report'})" [disabled]="dataLength == 0 ? true : false || dataLength == -1 ? true : false" >Excel Export</button>
@ -133,6 +133,11 @@
<td mat-cell *matCellDef="let row">
<span *ngIf="row.createdon" mat-line> {{row.createdon | date: 'dd-MM-yyyy hh:mm a'}}</span> </td>
</ng-container>
<ng-container matColumnDef="emp_id">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Emp ID</th>
<td mat-cell *matCellDef="let row">
<span *ngIf="row.mail_status" mat-line> {{row.smc_emp_code}}</span> </td>
</ng-container>
<ng-container matColumnDef="mail_status">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Mail Status</th>
<td mat-cell *matCellDef="let row">

View File

@ -43,6 +43,7 @@ export class MisReportsComponent implements OnInit {
'officer_name',
'status',
'createdon',
'emp_id',
'mail_status'
];
expandStatus: boolean=true;
@ -136,7 +137,7 @@ export class MisReportsComponent implements OnInit {
pageChange(e) {
console.log(e);
}
searchPanel(){
searchPanel(){
this.Loading=true;
this.reportform.value.from_date=this.pipe.transform(this.reportform.value.from_date,'yyyy-MM-dd')
this.reportform.value.to_date=this.pipe.transform(this.reportform.value.to_date,'yyyy-MM-dd')

View File

@ -0,0 +1,34 @@
<h2 mat-dialog-title> {{title}}</h2>
<mat-dialog-content>
<div fxFlex="100">
<p align="center">
{{question}}
</p>
<div align="center" *ngIf="option == 'location'">
<mat-form-field appearance="outline" style="width: 100%;">
<mat-label>Location</mat-label>
<textarea matInput autocomplete="off" placeholder="Geolocation" type="text" [formControl] = "geolocation"></textarea>
</mat-form-field>
</div>
</div>
</mat-dialog-content>
<mat-dialog-actions align="end" *ngIf="option == 'location'">
<button mat-raised-button color="primary" (click)="submit(this.data.pdid,this.data.option)"><strong>Save</strong></button>
<button mat-raised-button mat-dialog-close><strong> Cancel </strong></button>
</mat-dialog-actions>
<mat-dialog-actions align="end" *ngIf="option != 'location'">
<button mat-raised-button color="primary" (click)="submit(this.data.pdid,this.data.option)"><strong>Yes</strong></button>
<button mat-raised-button mat-dialog-close><strong> No </strong></button>
</mat-dialog-actions>
<!--<mat-dialog-actions align="end" >
<button mat-raised-button color="primary" (click)="overwritten_pd()"
> <strong>Complete anyway </strong></button>&nbsp;&nbsp;
<button mat-raised-button mat-dialog-close><strong> Ok </strong></button>
</mat-dialog-actions>-->

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReGenerateReportComponent } from './re-generate-report.component';
describe('ReGenerateReportComponent', () => {
let component: ReGenerateReportComponent;
let fixture: ComponentFixture<ReGenerateReportComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReGenerateReportComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReGenerateReportComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,114 @@
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
import { NotifierService } from "angular-notifier";
import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
import { FormControl, Validators } from '@angular/forms';
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
@Component({
selector: 'app-re-generate-report',
templateUrl: './re-generate-report.component.html',
styleUrls: ['./re-generate-report.component.scss']
})
export class ReGenerateReportComponent implements OnInit {
private notifier: NotifierService;
errorMessage:any[]=[];
option: any;
title:any;
question:any;
geolocation:FormControl = new FormControl('',Validators.compose([Validators.required]))
constructor(notifier: NotifierService,private _pdSales: PdTrigerService,private dialogRef: MatDialogRef<ReGenerateReportComponent>,@Inject(MAT_DIALOG_DATA) public data: any) { this.notifier = notifier; }
ngOnInit() {
this.option=this.data.option;
if(this.option=='report')
{
this.title='Re-Generate the Report';
this.question='Do you want to Re-Generate the Report';
}
else if(this.option=='mail')
{
this.title='Re-Sent the Email'
this.question='Do you want to Re-Sent the Email';
}
else
{
this.title='Geolocation'
this.question='Enter the Geolocation';
}
}
submit(pdid,option)
{
if(option=='report')
{
this._pdSales.generatesalereport(pdid)
.subscribe(
data => {
if (data.status == 200) {
this.dialogRef.close();
alert('generate report succussfully');
}
}
// , error => this.errorMessage = <any> error);
,error => {
this.errorMessage.push(error);
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
alert(error.html_format);
});
}
else if(option=='mail')
{
this._pdSales.generatemail(pdid)
.subscribe(
data => {
if (data.status == 200) {
this.dialogRef.close();
alert('mail sent succussfully');
this.notifier.notify('error','error');
}
}
// , error => this.errorMessage = <any> error);
,error => {
this.errorMessage.push(error);
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
alert(error.html_format);
});
}
else
{
let geolocation:any = {
"sales_pd_id":pdid,
"geo_location":this.geolocation.value
};
this._pdSales.generatesateliteimage(geolocation)
.subscribe(
data => {
if (data.status == 200) {
this.dialogRef.close();
alert('Saved succussfully');
}
}
// , error => this.errorMessage = <any> error);
,error => {
this.errorMessage.push(error);
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
alert(error.html_format);
});
}
}
}

View File

@ -17,7 +17,7 @@
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
(resetFilter)= "loadSalesPDDetails()"></app-advance-filter>
</div>
<!-- <mat-tab-group class="mt-1">
<!-- <mat-tab-group class="mt-1">
<mat-tab> -->
<!-- <ng-template mat-tab-label>Sales PD</ng-template> -->
@ -91,6 +91,30 @@
matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="Re-Generate">
<mat-cell class="cell" *matCellDef="let details;" style="justify-content: flex-start">
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="ReGenerate"
matTooltipPosition="above" color="primary" [matMenuTriggerFor]="menu1"><mat-icon>more_vert</mat-icon></button>
<mat-menu #menu1="matMenu">
<button mat-menu-item (click)="regeneratereport(details.sales_pd_id,'report')">
<mat-icon>autorenew</mat-icon>
<span>Re-Generate Report</span>
</button>
<button mat-menu-item (click)="regeneratereport(details.sales_pd_id,'location')">
<mat-icon>location_on</mat-icon>
<span>Re-Generate Location</span>
</button>
<button mat-menu-item (click)="regeneratereport(details.sales_pd_id,'mail')">
<mat-icon>email</mat-icon>
<span>Resent Mail</span>
</button>
</mat-menu>
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
</mat-row>
</mat-table>

View File

@ -1,7 +1,9 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatTableDataSource, MatPaginator, MatSort, PageEvent } from '@angular/material';
import { MatTableDataSource, MatPaginator, MatSort, PageEvent, MatDialog } from '@angular/material';
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
import { UserService } from 'app/settings/service/user.service';
import {ReGenerateReportComponent} from './../re-generate-report/re-generate-report.component'
@Component({
selector: 'app-sales-pd',
@ -13,7 +15,7 @@ export class SalesPdComponent implements OnInit {
public dataSourceTab4 = new MatTableDataSource();
filter_input:string='';
displayedColumns = ['SalesPdId','SalesPdSno','Applicant Name','Short Name','Officer Name','status','Create On','Action'];
displayedColumns = ['SalesPdId','SalesPdSno','Applicant Name','Short Name','Officer Name','status','Create On','Action','Re-Generate'];
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
@ -32,11 +34,11 @@ export class SalesPdComponent implements OnInit {
pageIndex = 0;
pageSize = 10;
pageEvent: PageEvent;
todaydate:Date = new Date();
todaydate:Date = new Date();
filter_drop_down_data: any;
common: any;
constructor(private _pdSales: PdTrigerService,private userService:UserService) {
constructor(private _pdSales: PdTrigerService,private userService:UserService,private dialog: MatDialog) {
this.common = JSON.parse(localStorage.getItem('commonSettings')).default_pd_list_count;
this.common = this.common.count+' '+this.common.factor
}
@ -104,6 +106,21 @@ export class SalesPdComponent implements OnInit {
alert(error.html_format);
});
}
regeneratereport(data,option)
{
const dialogRefqw = this.dialog.open(ReGenerateReportComponent, {
data: { pdid: data, option: option},
disableClose: true,
minWidth: '30%',
maxWidth: '40%',
});
dialogRefqw.afterClosed()
.subscribe(dataresult => {
// this.viewPdDetails(this.viewID,this.masterRandomString)
});
}
filteredDataSource(data){
console.log("From Parent",data);

View File

@ -8,14 +8,39 @@ import { MisReportsComponent } from './mis-reports/mis-reports.component';
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material';
import { AdvanceFilterComponent } from './sales-pd-list/advance-filter/advance-filter.component';
import { MAT_MOMENT_DATE_FORMATS, MomentDateAdapter } from '@angular/material-moment-adapter';
//import { MatMenuModule} from '@angular/material/menu';
import {
MatCardModule,
MatIconModule,
MatInputModule,
MatRadioModule,
MatButtonModule, MatTableModule, MatPaginatorModule,
MatProgressBarModule, MatDialogModule, MatSortModule,
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
MatTabsModule, MatCheckboxModule,
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
MatMenuModule, MatButtonToggleModule,MatChipsModule,MatProgressSpinnerModule,
MatAutocompleteModule, MatDatepickerModule } from '@angular/material';
import { ReGenerateReportComponent } from './re-generate-report/re-generate-report.component';
@NgModule({
imports: [
CommonModule,
SalesPdRoutingModule,
MaterialModule
MaterialModule,MatMenuModule,MatCardModule,
MatIconModule,
MatInputModule,
MatRadioModule,
MatButtonModule, MatTableModule, MatPaginatorModule,
MatProgressBarModule, MatDialogModule, MatSortModule,
MatToolbarModule, MatSelectModule, MatListModule, MatGridListModule,
MatTabsModule, MatCheckboxModule,
MatBadgeModule, MatExpansionModule, MatStepperModule, MatSidenavModule,
MatButtonToggleModule,MatChipsModule,MatProgressSpinnerModule,
MatAutocompleteModule, MatDatepickerModule
],
declarations: [SalesPdComponent, MisReportsComponent, AdvanceFilterComponent],
declarations: [SalesPdComponent, MisReportsComponent, AdvanceFilterComponent, ReGenerateReportComponent],
entryComponents:[ReGenerateReportComponent],
providers:[{ provide: MAT_DATE_LOCALE, useValue: 'en-GB' },{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}]
})

View File

@ -15,10 +15,12 @@ export class SalesPdService {
constructor(private _http:HttpClient) { }
salesPDMisReport(params): Observable<any>{
return this._http.post(api_url+'salesPDMisReport',params)
}
advancedFilter(params): Observable<any>{
return this._http.post(api_url+'filterSalesPDList',{"records":params})
}

View File

@ -0,0 +1,3 @@
<p>
otp works!
</p>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { OtpComponent } from './otp.component';
describe('OtpComponent', () => {
let component: OtpComponent;
let fixture: ComponentFixture<OtpComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ OtpComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OtpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-otp',
templateUrl: './otp.component.html',
styleUrls: ['./otp.component.scss']
})
export class OtpComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -17,6 +17,7 @@ import { ForgotPasswordComponent } from './forgot-password/forgot-password.compo
import { LockScreenComponent } from './lockscreen/lockscreen.component';
import { SessionRoutes } from './session.routing';
import { OtpComponent } from './otp/otp.component';
@NgModule({
imports: [
@ -38,6 +39,7 @@ import { SessionRoutes } from './session.routing';
RegisterComponent,
ForgotPasswordComponent,
LockScreenComponent,
OtpComponent,
]
})

View File

@ -164,7 +164,7 @@
</mat-option>
</mat-select>
<mat-error *ngIf="regForm.controls['designation'].hasError('required')" class="mat-text-warn">Designation is Required</mat-error>
</mat-form-field>
</mat-form-field>
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" *ngIf="roleAccess">
<mat-select matInput placeholder="PD Team" [formControl]="regForm.controls['pdteam']" >
@ -174,7 +174,8 @@
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="ml-xs mr-xs" *ngIf="regForm.controls['smc_agency_id']">
<mat-form-field class="ml-xs mr-xs" *ngIf="regForm.controls['smc_agency_id']&& vendor===true ">
<mat-select placeholder="Vendor" formControlName="smc_agency_id">
<mat-option>
Select

View File

@ -74,6 +74,7 @@ export class RegisterComponent implements OnInit {
configdata: any;
shortname: any;
vendorlist: any;
vendor: boolean;
constructor(
private router: Router, public fb: FormBuilder,public cb: FormBuilder, public AWS: AwsService, private cd: ChangeDetectorRef
,private elementRef: ElementRef,public users:UserService,notifier:NotifierService,private dialog: MatDialog) {
@ -331,6 +332,13 @@ console.log("cog",userData,this.usersData)
this.visible = false;
// alert(this.visible);
}
if(e.role_id=='28' ||e.role_id=='29')
{
this.vendor=true;
}
else{
this.vendor=false;
}
// if(e.value){
@ -396,7 +404,7 @@ getBranch(flag?){
if(this.types[0].entity_type_id == '2' && this.regForm.value.lenVenName.short_name == 'MWISE') {
//this.regForm.addControl('user_config',this.addUserConfigControls())
this.regForm.addControl('designation',new FormControl('',Validators.required))
this.regForm.addControl('smc_agency_id',new FormControl('',Validators.required))
this.regForm.addControl('smc_agency_id',new FormControl(''))
this.getvendor()
this.users.getEntityPreferences(this.regForm.value.lenVenName.entity_id).subscribe(res=>{
if(res['dataStatus']) {

View File

@ -19,7 +19,7 @@
<mat-video title="Recorded Video" [autoplay]="true" [preload]="true" [fullscreen]="true" [download]="true" color="primary" spinner="spin" poster="../../assets/images/img/video-icon.png">
<source matVideoSource [src]="videoSrc" type="video/webm">
</mat-video>
</mat-video>
</div>
<!-- <source src="tutorial.webm" type="video/webm"> -->
<!-- <track matVideoTrack src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English"> -->
@ -45,8 +45,8 @@
<p *ngIf="item.status" style="color:white;margin:0px;font-size:14px;">{{item.status}}</p>
</div>
<div fxLayout="column" align="end" fxLayoutAlign="flex-end">
<button *ngIf="item.url != '' && item.url" align="end" style="float: right" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Copy Link"
matTooltipPosition="right" (click)="_pd.copyToClipBoard(item.url)">
<button *ngIf="item.shorturl != '' && item.shorturl" align="end" style="float: right" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Copy Link"
matTooltipPosition="right" (click)="_pd.copyToClipBoard(item.shorturl)">
<mat-icon>link</mat-icon>
</button>

View File

@ -2,7 +2,7 @@
@import "../mixins/bi-app/bi-app-ltr";
@import "../app.variables";
@import "../mixins";
:host /deep/ {
:host {
[appAccordionToggle] {
cursor: pointer;
}
@ -86,7 +86,7 @@
}
}
.app-dark :host /deep/ {
.app-dark :host {
.messages-list {
.mat-list-item {
background: mat-color($dark-background, card);
@ -95,7 +95,7 @@
}
}
[dir="rtl"] :host /deep/ {
[dir="rtl"] :host {
.messages-nav {
mat-icon {
margin-right: 0;