diff --git a/src/app/pages/order/order-form/order-form.component.ts b/src/app/pages/order/order-form/order-form.component.ts index d54e606..183ebea 100644 --- a/src/app/pages/order/order-form/order-form.component.ts +++ b/src/app/pages/order/order-form/order-form.component.ts @@ -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' }, { diff --git a/src/app/pages/summary-list/summary-details/summary-details.component.html b/src/app/pages/summary-list/summary-details/summary-details.component.html index 9cae11a..689131a 100644 --- a/src/app/pages/summary-list/summary-details/summary-details.component.html +++ b/src/app/pages/summary-list/summary-details/summary-details.component.html @@ -1,5 +1,5 @@ - - + + + - + --> diff --git a/src/app/pages/summary-list/summary-details/summary-details.component.scss b/src/app/pages/summary-list/summary-details/summary-details.component.scss index 0ac0151..0dcc0e6 100644 --- a/src/app/pages/summary-list/summary-details/summary-details.component.scss +++ b/src/app/pages/summary-list/summary-details/summary-details.component.scss @@ -169,4 +169,3 @@ color: red !important; ::ng-deep .md-drppicker.double { width: 640px !important; } - \ No newline at end of file diff --git a/src/app/pages/summary-list/summary-details/summary-details.component.ts b/src/app/pages/summary-list/summary-details/summary-details.component.ts index 60d7d07..7453050 100644 --- a/src/app/pages/summary-list/summary-details/summary-details.component.ts +++ b/src/app/pages/summary-list/summary-details/summary-details.component.ts @@ -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 }) - }); + // }); } diff --git a/src/app/pages/summary-list/summary-list.component.ts b/src/app/pages/summary-list/summary-list.component.ts index a20876e..be0e2a0 100644 --- a/src/app/pages/summary-list/summary-list.component.ts +++ b/src/app/pages/summary-list/summary-list.component.ts @@ -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(){ diff --git a/vnms-admin-14-07-2023.zip b/vnms-admin-14-07-2023.zip deleted file mode 100644 index ee0e207..0000000 Binary files a/vnms-admin-14-07-2023.zip and /dev/null differ diff --git a/vnms_admin_de-05-09-2023.zip b/vnms_admin_de-05-09-2023.zip deleted file mode 100644 index b40acbd..0000000 Binary files a/vnms_admin_de-05-09-2023.zip and /dev/null differ diff --git a/vnms_admin_fe-04-09-23.zip b/vnms_admin_fe-04-09-23.zip deleted file mode 100644 index 0d39522..0000000 Binary files a/vnms_admin_fe-04-09-23.zip and /dev/null differ diff --git a/vnms_admin_fe.zip b/vnms_admin_fe.zip deleted file mode 100644 index 0b8db3a..0000000 Binary files a/vnms_admin_fe.zip and /dev/null differ diff --git a/vnms_admin_fe_2_9.zip b/vnms_admin_fe_2_9.zip deleted file mode 100644 index b5755db..0000000 Binary files a/vnms_admin_fe_2_9.zip and /dev/null differ