bug issue fix
This commit is contained in:
parent
60d5e319f6
commit
d45cadbf53
@ -408,8 +408,14 @@ const filteredItems = this.inputFieldGroups.filter(item => item.name === 'Mixed
|
||||
|
||||
|
||||
let results = [ ...this.mixedGas, ...mixProd];
|
||||
console.log(results)
|
||||
|
||||
if(results.length>0){
|
||||
const filteredItems = results.filter(item => !item.hasOwnProperty('name'));
|
||||
|
||||
console.log(filteredItems)
|
||||
|
||||
|
||||
if(results.length>0 && filteredItems.length == 0){
|
||||
|
||||
|
||||
|
||||
@ -466,6 +472,7 @@ const filteredItems = this.inputFieldGroups.filter(item => item.name === 'Mixed
|
||||
|
||||
|
||||
generatePDF(action = 'open') {
|
||||
console.log(this.setData)
|
||||
this.inputFieldGroups.forEach((element:any) => {
|
||||
|
||||
|
||||
@ -540,7 +547,7 @@ const filteredItems = this.inputFieldGroups.filter(item => item.name === 'Mixed
|
||||
alignment: 'right'
|
||||
},
|
||||
{
|
||||
text: `Date: ${new Date(this.setData.createdAt).toLocaleString()}`,
|
||||
text: `Date: ${new Date(this.setData.createdAt).toLocaleDateString('en-GB')}, ${new Date(this.setData.createdAt).toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', hour12: true })}`,
|
||||
alignment: 'right'
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<nb-card>
|
||||
<nb-card-header>
|
||||
<nb-card style="width: 55rem;height: 30rem;">
|
||||
<!-- <nb-card-header>
|
||||
|
||||
|
||||
<div class="row show-grid">
|
||||
@ -12,13 +12,13 @@
|
||||
Back
|
||||
</button>
|
||||
|
||||
<!-- <button style=" margin-left: 2rem;"(click)="generatePDF('print')" nbButton status="primary" hero>
|
||||
<button style=" margin-left: 2rem;"(click)="generatePDF('print')" nbButton status="primary" hero>
|
||||
Print
|
||||
</button> -->
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nb-card-header>
|
||||
</nb-card-header> -->
|
||||
|
||||
<nb-card-header>
|
||||
|
||||
|
||||
@ -169,4 +169,3 @@ color: red !important;
|
||||
::ng-deep .md-drppicker.double {
|
||||
width: 640px !important;
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import * as moment from 'moment';
|
||||
import { PageapiService } from '../../pageapi.service';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { NB_WINDOW_CONTEXT } from '@nebular/theme';
|
||||
@Component({
|
||||
selector: 'ngx-summary-details',
|
||||
templateUrl: './summary-details.component.html',
|
||||
@ -22,13 +23,14 @@ export class SummaryDetailsComponent implements OnInit {
|
||||
};
|
||||
productlistReturn:any =[];orderId:any=[];cusName:any =[];
|
||||
selectedDateRange:any =[];drivers:any =[];summaryaData:any=[];driverval:any=[];returnSummary:any =[];productlist:any=[];
|
||||
constructor(public _api:PageapiService,private route: ActivatedRoute, private router:Router) {
|
||||
|
||||
this.route.params.subscribe(params => {
|
||||
console.log(params) //log the entire params object
|
||||
console.log(params['orderId']) //log the value of id
|
||||
let orderId = params['orderId']
|
||||
this.orderId = orderId
|
||||
constructor(@Inject(NB_WINDOW_CONTEXT) public data: any,public _api:PageapiService,private route: ActivatedRoute, private router:Router) {
|
||||
console.log(data)
|
||||
|
||||
// this.route.params.subscribe(params => {
|
||||
console.log(data) //log the entire params object
|
||||
console.log(data.orderID) //log the value of id
|
||||
let orderId = data.orderID
|
||||
this.orderId = orderId
|
||||
this._api.getProductListSummary({orderId:orderId}).subscribe(res => {
|
||||
console.log(res)
|
||||
if(res.status == 200){
|
||||
@ -52,7 +54,7 @@ this.orderId = orderId
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,8 @@ import * as moment from 'moment';
|
||||
import { PageapiService } from '../pageapi.service';
|
||||
import { Router } from '@angular/router';
|
||||
import * as html2pdf from 'html2pdf.js'
|
||||
import { NbDialogService, NbToastrService, NbWindowControlButtonsConfig, NbWindowRef, NbWindowService } from '@nebular/theme';
|
||||
import { SummaryDetailsComponent } from './summary-details/summary-details.component';
|
||||
@Component({
|
||||
selector: 'ngx-summary-list',
|
||||
templateUrl: './summary-list.component.html',
|
||||
@ -23,7 +25,12 @@ export class SummaryListComponent implements OnInit {
|
||||
// ]
|
||||
};selectDate:any =[];driverId:any =[];DateDisplay:any =[];driverName:any =[];
|
||||
selectedDateRange:any =[];drivers:any =[];summaryaData:any=[];driverval:any=[];returnSummary:any =[];
|
||||
constructor(public _api:PageapiService, private router:Router) {
|
||||
|
||||
minimize = false;
|
||||
maximize = false;
|
||||
fullScreen = true;
|
||||
close = true;
|
||||
constructor(public _api:PageapiService, private router:Router,private windowService: NbWindowService,) {
|
||||
if(localStorage.getItem('dDate'))
|
||||
{
|
||||
this.dDate = this.reduceDate(localStorage.getItem('dDate'));
|
||||
@ -152,10 +159,10 @@ console.log(result)
|
||||
|
||||
}
|
||||
|
||||
view(data,name){
|
||||
localStorage.setItem('cusName',name)
|
||||
this.router.navigate(['/pages/summary/'+data])
|
||||
}
|
||||
// view(data,name){
|
||||
// localStorage.setItem('cusName',name)
|
||||
// this.router.navigate(['/pages/summary/'+data])
|
||||
// }
|
||||
|
||||
|
||||
onStartDateChanged(data){
|
||||
@ -220,6 +227,58 @@ console.log(result)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
view(param,name){
|
||||
|
||||
const buttonsConfig: NbWindowControlButtonsConfig = {
|
||||
minimize: this.minimize,
|
||||
maximize: this.maximize,
|
||||
fullScreen: this.fullScreen,
|
||||
close: this.close,
|
||||
};
|
||||
let config= {
|
||||
hasBackdrop: true,
|
||||
width: '500px',
|
||||
height: '300px',
|
||||
}
|
||||
|
||||
console.log(param,name)
|
||||
localStorage.setItem('cusName',name)
|
||||
let data:any = {orderID:param,title:'Summary Product List'}
|
||||
// let passData = {name:this.selectCustomer,product:results,customerData:this.selectCustomerData}
|
||||
|
||||
const windowRef: NbWindowRef = this.windowService.open(SummaryDetailsComponent,
|
||||
{
|
||||
title: `Summary Product List`,
|
||||
context:data,buttons: buttonsConfig ,
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Subscribe to the afterClosed event
|
||||
windowRef.onClose.subscribe((data) => {
|
||||
})
|
||||
// const dialogRef = this.dialogService.open(SummaryDetailsComponent, {
|
||||
// hasBackdrop: true,
|
||||
// dialogClass: 'custom-dialog-class', // Add your custom CSS class here
|
||||
// context: data
|
||||
// });
|
||||
|
||||
// dialogRef.onClose.subscribe((result) => {
|
||||
// // Execute custom logic when the dialog is closed
|
||||
// console.log(result);
|
||||
// // if(result == 1){
|
||||
// // this.getBranchDetails()
|
||||
// // this.toastrService.success('Branch Added Successfully','Branch');
|
||||
// // console.log('Window closed 123');
|
||||
// // }else if(result == 0){
|
||||
// // this.toastrService.success('Somthing is Wrong...!', 'Add Branch Failed..!');
|
||||
// // }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
download(){
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user