diff --git a/src/app/pages/customer/customer.component.ts b/src/app/pages/customer/customer.component.ts
index 8a6f512..a9744d8 100644
--- a/src/app/pages/customer/customer.component.ts
+++ b/src/app/pages/customer/customer.component.ts
@@ -78,6 +78,7 @@ export class CustomerComponent {
title: 'City',
type: 'string',
},
+
@@ -275,6 +276,7 @@ export class CustomerComponent {
customer.forEach((element:any, index) => {
element.index = index +1
element.type =element['CusDetails.cusType']
+ element.gst =element['CusDetails.gst']
});
this.customer = customer
diff --git a/src/app/pages/order/order-form/order-form.component.html b/src/app/pages/order/order-form/order-form.component.html
index e25ede3..b97f13c 100644
--- a/src/app/pages/order/order-form/order-form.component.html
+++ b/src/app/pages/order/order-form/order-form.component.html
@@ -161,11 +161,12 @@
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 dbd2ef1..5fe42ea 100644
--- a/src/app/pages/order/order-form/order-form.component.ts
+++ b/src/app/pages/order/order-form/order-form.component.ts
@@ -53,7 +53,7 @@ fieldTitle:any ='New Order'
position: NbGlobalPosition = NbGlobalPhysicalPosition.TOP_RIGHT;
preventDuplicates = false;
status: NbComponentStatus = 'primary';
- inputFieldGroups:any = [{id:'', qty: '1', productSpec: '' }];
+ inputFieldGroups:any = [{id:'', qty: '1', productSpec: '' , productName : '' }];
selectCustomerData :any =[];selectStatus:any =[];CancelReason:any =[];selectDriver:any =[];drivers:any =[];
invoice = new Invoice();
hiddenBtn= false;
@@ -61,6 +61,7 @@ fieldTitle:any ='New Order'
delArr:any=[]
selectedProductId: number | undefined = null;
addFormBtn: any;
+ selectedProductName: any;
constructor(private dialogService: NbDialogService,private route :ActivatedRoute,private router: Router,public _api:PageapiService,private toastrService: NbToastrService,private service: SmartTableData ,private windowService: NbWindowService) {
this._api.orderDetails_observable$.subscribe((res) => {
@@ -674,45 +675,47 @@ console.log(filteredItems)
getAnswerProduct(orderId){
- console.log(orderId)
+ console.log(orderId)
-
+
- let param={orderId:orderId}
- this._api.getProductList(param).subscribe(res => {
-
+ let param={orderId:orderId}
+ this._api.getProductList(param).subscribe(res => {
+
if(res.status == 200){
-let result = res.data
+ let result = res.data
-this.ResultDisplay = result
-console.log(result)
- this.inputFieldGroups =[];
+ this.ResultDisplay = result
+ console.log(result)
+ this.inputFieldGroups =[];
-// setTimeout(() => {
-
+ // setTimeout(() => {
+ console.log('gwm');
+ console.log(result);
-result.forEach(element => {
+ result.forEach(element => {
- this.inputFieldGroups.push({id:parseInt(element.productId ) , qty: element.qty, productSpec: element.productSpec , primaryId:element.id})
-
+ this.inputFieldGroups.push({id:parseInt(element.productId ) , qty: element.qty, productSpec: element.productSpec , primaryId:element.id ,
+ productName :element.productName });
+
-})
-// }, 1000);
-console.log( this.inputFieldGroups);
+ })
+ // }, 1000);
+ console.log( this.inputFieldGroups);
-result.forEach(element => {
- console.log(element)
- if(element.ProductDetails.length>0){
+ result.forEach(element => {
+ console.log(element)
+ if(element.ProductDetails.length>0){
-
- // if(element.ProductDetails[0].productName =="Mixed Gas"){
- // console.log("hiiii")
- // element.name = element.ProductDetails[0].productName
- // element.qty = parseInt(element.qty)
- // element.price = this.setData['OrderDetails.CusDetails.cusType']
- // this.invoice.products.push(element)
- // }
+
+ // if(element.ProductDetails[0].productName =="Mixed Gas"){
+ // console.log("hiiii")
+ // element.name = element.ProductDetails[0].productName
+ // element.qty = parseInt(element.qty)
+ // element.price = this.setData['OrderDetails.CusDetails.cusType']
+ // this.invoice.products.push(element)
+ // }
}
@@ -911,25 +914,41 @@ this.onCreateConfirm()
// })
}
-
-checkProductArray() {
- // console.log(this.inputFieldGroups)
- const hasNullId = this.inputFieldGroups.some((group) => group.id === null);
-// console.log(hasNullId)
-if (!hasNullId) {
- // There's an object with id = null in the inputFieldGroups array
- // console.log('There is an object with id = null');
- return this.product;
-} else {
- // There is no object with id = null in the inputFieldGroups array
- // Filter products based on the condition (productName !== 'Mixed Gas' in inputFieldGroups)
- const filteredProducts = this.product.filter((product) => {
- const isSelected = this.inputFieldGroups.some((group) => group.id === product.id);
- return product.productName === 'Mixed Gas' || !isSelected;
+onDropdownChange(event: any) {
+ // Find the selected product in the array and get its name
+ const selectedProduct = this.checkProductArray().find(product => product.id === event);
+ if (selectedProduct) {
+ this.selectedProductName = selectedProduct.productName;
+ } else {
+ this.selectedProductName = ''; // If no product found, clear the selected product name
+ }
+ console.log(this.selectedProductName);
+
+ this.inputFieldGroups.forEach(element => {
+ if(element.id == event){
+ element.productName = this.selectedProductName;
+ }
});
- return filteredProducts;
}
+checkProductArray() {
+ // console.log(this.inputFieldGroups)
+ const hasNullId = this.inputFieldGroups.some((group) => group.id === null);
+ // console.log(hasNullId)
+ if (!hasNullId) {
+ // There's an object with id = null in the inputFieldGroups array
+ // console.log('There is an object with id = null');
+ return this.product;
+ } else {
+ // There is no object with id = null in the inputFieldGroups array
+ // Filter products based on the condition (productName !== 'Mixed Gas' in inputFieldGroups)
+ const filteredProducts = this.product.filter((product) => {
+ const isSelected = this.inputFieldGroups.some((group) => group.id === product.id );
+ return product.productName === 'Mixed Gas' || !isSelected;
+ });
+
+ return filteredProducts;
+ }
}
@@ -943,7 +962,7 @@ addInputFieldGroup() {
}
// this.inputFieldGroups.push({id:null, qty: '1', productSpec: '' });
// Add a new input field group to the array
- const newGroup = { id: null, qty: 1, productSpec: '', isNew: true };
+ const newGroup = { id: null, qty: 1, productSpec: '', isNew: true , productName : '' };
this.inputFieldGroups.push(newGroup);
console.log(this.inputFieldGroups)
//this.childButtonEvent.emit( this.inputFieldGroups);
diff --git a/src/app/pages/order/order.component.html b/src/app/pages/order/order.component.html
index d800066..99ecf28 100644
--- a/src/app/pages/order/order.component.html
+++ b/src/app/pages/order/order.component.html
@@ -2,46 +2,14 @@
-
- Order Management
+
-
-
+
-
+
+
@@ -443,7 +422,7 @@
|
{{ i+1}}. Product Name: {{ product.productName }} - {{ product.qty }}
- 1"> No's No
+ 1"> Nos No
, Mixed Gas: {{ product.productSpec }}
diff --git a/src/app/pages/pages-menu.ts b/src/app/pages/pages-menu.ts
index ba53fed..d56fa89 100644
--- a/src/app/pages/pages-menu.ts
+++ b/src/app/pages/pages-menu.ts
@@ -16,12 +16,12 @@ export const MENU_ITEMS: NbMenuItem[] = [
link: '/pages/order',
},
{
- title: 'Delivery Summary',
- link: '/pages/summary',
+ title: 'Out For Delivery Sheet',
+ link: '/pages/delivery-sheet',
},
{
- title: 'Delivery Sheet',
- link: '/pages/delivery-sheet',
+ title: 'Delivered Summary',
+ link: '/pages/summary',
},
{
title: 'Return Sheet',
diff --git a/src/favicon.ico b/src/favicon.ico
deleted file mode 100644
index d4340cf..0000000
Binary files a/src/favicon.ico and /dev/null differ
diff --git a/src/favicon.png b/src/favicon.png
index 9d11611..d67a58f 100644
Binary files a/src/favicon.png and b/src/favicon.png differ
diff --git a/vnms-live-13-3-24.zip b/vnms-live-23-3-24.zip
similarity index 73%
rename from vnms-live-13-3-24.zip
rename to vnms-live-23-3-24.zip
index 55b3408..0bd9b42 100644
Binary files a/vnms-live-13-3-24.zip and b/vnms-live-23-3-24.zip differ
|