build issue

This commit is contained in:
venbainfotech 2021-12-18 12:14:33 +05:30
parent a81b8bf098
commit 853768756b
14 changed files with 138 additions and 55 deletions

View File

@ -12,6 +12,7 @@ export class AlertDialogComponent implements OnInit {
public dialogRef: MatDialogRef<AlertDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data) {
// this.notifier=notifier
console.log('AlertDialogComponent',data)
}
onNoClick(): void {

View File

@ -1,18 +1,17 @@
import { NgModule } from '@angular/core';
import { QuesTemplateComponent } from './ques-template/ques-template';
import { MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatListModule, MatExpansionModule, MatGridListModule, MatIconModule, MatInputModule, MatMenuModule, MatNativeDateModule, MatPaginatorModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatRippleModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSlideToggleModule, MatSnackBarModule, MatSortModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatStepperModule, MatFormFieldModule, MatAutocompleteModule } from '@angular/material';
import { HttpClientModule } from '@angular/common/http';
//import { IonicImageViewerModule } from 'ionic-img-viewer';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
import { QuesServiceProvider } from '../providers/ques-service/ques-service';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
//import { IonicModule } from 'ionic-angular';
//import { MyApp } from '../../../app/app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CaptureBtnComponent } from './ques-template/capture-btn/capture-btn.component';
import { SingleCaptureBtnComponent } from './ques-template/single-capture-btn/single-capture-btn.component';
import { QuestionServiceService } from '../services/question-service.service';
import { SharedModule } from 'app/shared/shared.module';
import { MaterialModule } from '../material_modules/material.module';
//import { SharedModule } from '../../../Shared/shared.module';
@ -21,12 +20,10 @@ import { QuestionServiceService } from '../services/question-service.service';
@NgModule({
declarations: [QuesTemplateComponent, CaptureBtnComponent, SingleCaptureBtnComponent],
imports: [MatButtonToggleModule,
,
BrowserModule,
BrowserAnimationsModule,
MatAutocompleteModule,
MatCardModule,
SharedModule,
MaterialModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
@ -53,7 +50,7 @@ import { QuestionServiceService } from '../services/question-service.service';
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatStepperModule,HttpClientModule,
MatStepperModule,
MatFormFieldModule,
NgxMatSelectSearchModule,
ReactiveFormsModule],

View File

@ -159,7 +159,7 @@ export class QuesTemplateComponent {
this.sales_pd_type = localStorage.getItem('sales_pd_type')
}
getSalesPDSectionFromApi(sales_pd_id){
alert('pass');
// alert('pass');
console.log(sales_pd_id)
this.loaderService.showMatSpinnerDialog('Fetching Data...')
// this.checkGroupandPatchValues()
@ -1500,7 +1500,7 @@ this.proceedonChangeProperty(modified)
// return invalid;
}
onSubmit(flag){ //1-Submit 0-Draft
alert(' enter save');
// alert(' enter save');
// this.submit_btn=true;
if(flag != 0){
@ -1567,13 +1567,13 @@ this.proceedonChangeProperty(modified)
console.log(storage_param);
storage_param.questions=this.quesAnsForm.getRawValue().questions
storage_param.is_complete=flag
alert('storageflg');
alert(storage_param.is_complete);
// alert('storageflg');
// alert(storage_param.is_complete);
this.spinner_access=true
if (this.submit_btn && flag == 0) {
alert('empty');
// alert('empty');
// this.insertSectionDataLocally(storage_param)
storage_param.questions=this.questions_JSON.questions
@ -1594,18 +1594,18 @@ this.proceedonChangeProperty(modified)
console.log(result,'local')
// storage_param.sales_pd_id = result
// this.SalesPdService.getData_fromLocal('sales_pd_id_PRIMARYKEY').then(result=>{
alert('raja')
// alert('raja')
// let result='43';
console.log('resultmaran');
console.log(result);
if(result != null && !this.submit_btn){
alert('a')
// alert('a')
console.log('storage_param');
console.log(storage_param);
this.sendSectiontoApi(storage_param)
}
else{
alert('finalelse');
// alert('finalelse');
console.log(storage_param);
console.log('finalelse');
this.sendDatatoApi(storage_param)
@ -1631,7 +1631,7 @@ this.proceedonChangeProperty(modified)
// }
}
sendSectiontoApi(params){
alert('lastsave');
// alert('lastsave');
console.log('lastsave');
console.log(params);
console.log('1158',this.local_ques_JSON.section_id)
@ -1656,7 +1656,7 @@ this.proceedonChangeProperty(modified)
},err=>this.loaderService.closeMatSpinnerDialog())
}
sendDatatoApi(section_data?){
alert('a');
// alert('a');
console.log('a');
console.log(section_data);
this.spinner_access=true
@ -1691,7 +1691,7 @@ this.proceedonChangeProperty(modified)
// })
}
saveSalesPDAPI(section_data){
alert('gayathri');
// alert('gayathri');
console.log(section_data);
console.log('gayathri');
let params:any={}
@ -1716,7 +1716,7 @@ this.proceedonChangeProperty(modified)
// })
}
else
if(!this.submit_btn){
if(!this.submit_btn){
this.sendSectiontoApi(section_data)
}
else if(apiresult.hasOwnProperty('pd_status') && apiresult['pd_status'] == 'DRAFT'){
@ -1732,12 +1732,12 @@ this.proceedonChangeProperty(modified)
const dialogRef = this.dialog.open(AlertDialogComponent, {
width: '500px',
data: {buttons:[{name:"Ok",visible:true,id:'ok'}],
data: {buttons:[{name:"Ok",visible:true,id:'ok'},{name:"Cancel",visible:true,id:'cancel'}],
msg:'Sales PD is incomplete'}
});
// let alert=this.SalesPdService.setAlertWithOkButton("<small>Sales PD is incomplete<small>",//"The Following sections are not Saved <b>"+section_dis_names+'</b>')
// this.notifier.notify("success","<small>Sales PD is incomplete<small>","The Following sections are not Saved <b>"+section_dis_names+'</b>')
// let alert=this.SalesPdService.setAlertWithOkButton("<small>Sales PD is incomplete<small>","The Following sections are not Saved <b>"+section_dis_names+'</b>')
// alert.present()
}

View File

@ -13,6 +13,8 @@ import { SectionListModule } from '../section-list/section-list.module';
import { SalesPdService } from '../services/sales-pd.service';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material';
import { ComponentsModule } from '../components/components.module';
import { SharedModule } from 'app/shared/shared.module';
import { MaterialModule } from '../material_modules/material.module';
//import {MatDialogModule } from '@angular/material/dialog';
@NgModule({
declarations: [
@ -28,9 +30,11 @@ import { ComponentsModule } from '../components/components.module';
Section8,
Section9
],
entryComponents:[HomePage,Section1,Section2,Section3,Section4,Section5,Section6,Section7,Section8,Section9,MatDialogModule],
entryComponents:[HomePage,Section1,Section2,Section3,Section4,Section5,Section6,Section7,Section8,Section9],
imports: [
SectionListModule,
SharedModule,
MaterialModule,
ComponentsModule,
// IonicPageModule.forChild(HomePage),
MatButtonModule,

View File

@ -131,9 +131,9 @@ export class HomePage{
}
// load pd view component
loadPdViewCompoent() {
this.dialogRef.close();
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
// this.router.navigate(['../../sales-pd-list/sectionlist'], {relativeTo: this.route});
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -149,6 +149,7 @@ export class HomePage{
templateUrl: 'home.html',
})
export class Section1 {
formGroupValue: any=null;
question_data: any={section_name:'',questions:[]};
raw_data:any;
section_local:number=1
@ -208,6 +209,15 @@ export class Section1 {
// this.sendData()
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -218,6 +228,7 @@ export class Section1 {
templateUrl: 'home.html',
})
export class Section2 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=2
@ -248,6 +259,15 @@ export class Section2 {
this.router.navigate([Section3], {relativeTo: this.route});
// this.navCtrl.push(Section3)
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -256,6 +276,7 @@ export class Section2 {
templateUrl: 'home.html',
})
export class Section3 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=3
@ -300,6 +321,15 @@ export class Section3 {
console.log("else part")
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -308,6 +338,7 @@ export class Section3 {
templateUrl: 'home.html',
})
export class Section4 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=4
@ -352,7 +383,15 @@ export class Section4 {
console.log("else part")
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@Component({
@ -360,6 +399,7 @@ export class Section4 {
templateUrl: 'home.html',
})
export class Section5 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=5
@ -404,6 +444,15 @@ export class Section5 {
console.log("else part")
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -412,6 +461,7 @@ export class Section5 {
templateUrl: 'home.html',
})
export class Section6 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=6
@ -456,6 +506,15 @@ export class Section6 {
console.log("else part")
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@Component({
@ -463,6 +522,7 @@ export class Section6 {
templateUrl: 'home.html',
})
export class Section7 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=7
@ -521,6 +581,16 @@ export class Section7 {
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@Component({
@ -528,6 +598,7 @@ export class Section7 {
templateUrl: 'home.html',
})
export class Section8 {
formGroupValue: any=null;
question_data: any;
raw_data:any;
section_local:number=8
@ -586,6 +657,16 @@ export class Section8 {
}
}
setGroupControl(event){
this.formGroupValue=event
}
// load pd view component
loadPdViewCompoent() {
// this.dialogRef.close();
// this.router.navigate(['sectionlist',this.product,this.sales_pd_type],{ relativeTo: this.route })
this.router.navigate(['../../sales-pd-list/list-pd'], {relativeTo: this.route});
}
}
@ -605,7 +686,7 @@ export class Section9 {
//network_status: ConnectionStatus
constructor(public dialogRef: MatDialogRef<SectionListComponent>,notifier: NotifierService,private route: ActivatedRoute,private router: Router,private dialog: MatDialog,private MatDialogModule:MatDialogModule,@Inject(MAT_DIALOG_DATA) public data: any) {
alert('section9')
// alert('section9')
console.log('data',data)
this.notifier = notifier;
// this.route.snapshot.params['section9'];

View File

@ -36,7 +36,7 @@
border-radius: 10px;" *ngFor="let val of productList" [value]="val.product_id" (change)="getProductForAlert($event)"><span>{{val.product_abbr}}</span></mat-radio-button>
</mat-radio-group><br/>
<button style="float: right;" type="submit" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Submit"
matTooltipPosition="above" (click)="sendProduct(1)" [disabled]="disableAfterSubmit===true">
matTooltipPosition="above" (click)="sendProduct()">
<mat-icon>save</mat-icon>
</button>
</mat-card-content>

View File

@ -19,7 +19,7 @@
<ng-template mat-tab-label>Sales PD</ng-template>
<mat-card-content style="padding: 0px !important;">
<app-advance-filter [drop_down_datas]="filter_drop_down_data" (filteredlistData)="filteredDataSource($event)"
(resetFilter)= "loadSalesPDDetails()"></app-advance-filter>
></app-advance-filter>
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
<br/>
<div class="example-container">

View File

@ -217,7 +217,7 @@ export class SalesPdComponent implements OnInit {
editForm(value_obj){
console.log(value_obj.sales_pd_id,value_obj.rand_string)
alert('abc');
// alert('abc');
console.log('value');
console.log(value_obj);
// let product= localStorage.getItem('product_id_salesPD')

View File

@ -1,5 +1,4 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SalesPdRoutingModule } from './sales-pd-routing.module';
import { SalesPdComponent } from './sales-pd-list/sales-pd.component';
@ -8,31 +7,30 @@ import { MaterialModule } from './material_modules/material.module';
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 { SectionListComponent } from './section-list/section-list.component';
import {Section9, HomePage } from './home/home';
import { QuesTemplateComponent } from './components/ques-template/ques-template';
import { MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatListModule, MatExpansionModule, MatGridListModule, MatIconModule, MatInputModule, MatMenuModule, MatNativeDateModule, MatPaginatorModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatRippleModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSlideToggleModule, MatSnackBarModule, MatSortModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule } from '@angular/material';
//import { FormComponent } from 'app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material';
import { HttpClientModule } from '@angular/common/http';
import { AlertDialogComponent } from 'app/lender-credit-pd/alert-dialog/alert-dialog.component';
import { SharedModule } from 'app/shared/shared.module';
import { StartPdModule } from 'app/personal-discussion/manage-pd/list-pd/start-pd/start-pd.module';
import { ConstantsProvider } from 'app/providers/constants/constants';
import { CaptureBtnComponent } from './components/ques-template/capture-btn/capture-btn.component';
import { SingleCaptureBtnComponent } from './components/ques-template/single-capture-btn/single-capture-btn.component';
import { HomePageModule } from './home/home.module';
import { CommonModule } from '@angular/common';
@NgModule({
imports: [
CommonModule,
SalesPdRoutingModule,
MaterialModule,
HttpClientModule,
SharedModule,
StartPdModule
StartPdModule,
HomePageModule,
CommonModule
],
declarations: [AlertDialogComponent,HomePage,SalesPdComponent,AdvanceFilterComponent,SectionListComponent,Section9,QuesTemplateComponent,CaptureBtnComponent,SingleCaptureBtnComponent],
entryComponents:[AlertDialogComponent,Section9,QuesTemplateComponent,HomePage,CaptureBtnComponent,SingleCaptureBtnComponent],
declarations: [AlertDialogComponent,SalesPdComponent,AdvanceFilterComponent],
entryComponents:[AlertDialogComponent,SalesPdComponent],
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: [] }]
})

View File

@ -20,11 +20,11 @@
<!-- </mat-card-title> -->
</mat-card-header>
<mat-card-content>
<div class="completed_note" *ngIf ="is_sync_btn && pd_completed.is_synced == false && pd_completed.is_completed &&
<!-- <div class="completed_note" *ngIf ="is_sync_btn && pd_completed.is_synced == false && pd_completed.is_completed &&
pd_completed.pd_complete_request_items != null">
<p >
PD is completed. Please click the sync button above to send the data to server when internet is available.</p>
</div>
</div> -->
<!-- <p *ngIf="categoryFormButtons.length == 0" style="text-align: center;">No Template Found</p> -->
<div fxLayout="row wrap">
<mat-card fxFlex.xs="100" fxFlex.sm="45" fxFlex.md="32" fxFlex.lg="32" fxFlex.xl="33" class="card-class" *ngFor="let sec of section_template" [ngClass]="{'border-disabled': sales_pd_id == null && sec.is_disabled,'border-saved-local': sales_pd_id != null && sec.hasOwnProperty('status') && sec.status == '1' && sec.hasOwnProperty('is_synced') && sec.is_synced == false,'border-saved': sales_pd_id != null && sec.hasOwnProperty('status') && sec.status == '1'}" (click)="goto(sec.order_id)">

View File

@ -54,9 +54,9 @@ export class SectionListComponent implements OnInit {
setTimeout(()=>{
this.getSectionStats()
},50)
alert('testing');
alert(this.product_id);
alert(this.sales_pd_type);
// alert('testing');
// alert(this.product_id);
// alert(this.sales_pd_type);
// this.listPDComponent.showListView(false);
// const elemSidebar = <HTMLElement>document.querySelector('.app-inner .mail-sidebar');
// const elemContent = <HTMLElement>document.querySelector('.app-inner .main-content');
@ -361,8 +361,8 @@ export class SectionListComponent implements OnInit {
}
goto(section_id){
alert('sectionid');
alert(section_id);
// alert('sectionid');
// alert(section_id);
//this.router.navigate(['../../../section9'],{ relativeTo: this.route })
//return;
// this.SalesPDService.insertData_Replace('sales_pd_id_PRIMARYKEY',value_obj.sales_pd_id).then(()=>{
@ -402,8 +402,8 @@ export class SectionListComponent implements OnInit {
loadTemplates(startID:string,type:number,sales_pd_type:string)
{
//alert('maran');
alert(startID);
alert(type);
// alert(startID);
// alert(type);
//alert(sales_pd_type);
this.loaderService.showMatSpinnerDialog('Please wait')

View File

@ -1,16 +1,18 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SectionListRoutingModule } from './section-list-routing.module';
import { SectionListComponent } from './section-list.component';
import { SharedModule } from 'app/shared/shared.module';
import { MaterialModule } from '../material_modules/material.module';
@NgModule({
imports: [
CommonModule,
SectionListRoutingModule,
SectionListComponent
SharedModule,
MaterialModule
],
declarations: []
declarations: [SectionListComponent],
entryComponents:[SectionListComponent]
})
export class SectionListModule {
static forRoot: any;

View File

@ -22,7 +22,7 @@ export class QuestionServiceService {
}
// FOR CREATING A FORM CONTROL DYNAMICALLY
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
alert('question');
// alert('question');
// this.curr_pd_info = this.apiService.curr_credit_pd_data
console.log(formgroup, ques_data)
const control: any = formgroup.get('questions') as FormArray

View File

@ -241,7 +241,7 @@ saveSalesPDSection(params){
let modified_params = params
// console.log("###################$%%",(key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true ) : true));
// if((key_value != null ? (typeof(key_value) == 'string' ? !key_value.includes('local') : true ) : true)) {
alert('positive');
// alert('positive');
return this._http.post(api_url+'saveSalesPDsection',{records:params}).pipe().subscribe(response=>{
// delete modified_params.questions
modified_params.is_synced = true;