From bf783a338bf16137e6664736db4b60c5c8d4a76c Mon Sep 17 00:00:00 2001 From: sachinganesh Date: Mon, 1 May 2023 14:23:56 +0530 Subject: [PATCH] code added --- dist/Js/auth/apiservice.js | 3 +- dist/Js/main.js | 15 +++- dist/Js/myaccount/orderdetails.js | 62 +++++++-------- dist/Js/navbar.js | 14 +++- dist/Js/orderDetails/order_summary.js | 96 +++++++++++------------- dist/Js/productdetails/productdetails.js | 21 +++--- dist/Js/products/products.js | 8 +- dist/Js/shoppingcart/addtocart.js | 51 +++++++++---- dist/Js/shoppingcart/shoppingcart.js | 1 - dist/Js/utils/helpers.js | 1 + dist/Js/warranty.js | 1 + dist/css/style.css | 14 +++- orderdetails.html | 40 +--------- productdetails.html | 7 +- w/index.html | 7 +- 15 files changed, 176 insertions(+), 165 deletions(-) diff --git a/dist/Js/auth/apiservice.js b/dist/Js/auth/apiservice.js index cabc3ae..d922703 100644 --- a/dist/Js/auth/apiservice.js +++ b/dist/Js/auth/apiservice.js @@ -1,6 +1,7 @@ //let SERVERNAME = 'https://anwi.bizgaze.app'; //let SERVERNAME = 'http://beta.bizgaze.com'; - let SERVERNAME = 'http://localhost:3088'; + let SERVERNAME = 'https://qa.anwisystems.com'; + //let SERVERNAME = 'http://localhost:3088'; //template const STAT = '8041f78ba55b4847bc4aacaeae9d24ef'; diff --git a/dist/Js/main.js b/dist/Js/main.js index bfc287c..847c4b5 100644 --- a/dist/Js/main.js +++ b/dist/Js/main.js @@ -4,6 +4,11 @@ /*-- Menu Stick -----------------------------------*/ + + let width = $(window).width(); + + + var header = $('.sticky-bar'); var win = $(window); let ele_page = $("body").hasClass("product_pg"); @@ -22,12 +27,12 @@ let img_src = `./dist/assets/imgs/anwi-logo-2.png`; $(".logo-menu-wrap").find("a img").attr("src",img_src); $(".main-menu").find("nav ul li a").addClass("text-white"); - debugger; + $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff"); $('.header-bottom-flex').find('svg path').attr('fill','#fff') } else { header.addClass('stick'); - debugger; + $(".header-bottom").addClass("sticky-bar stick"); let src = `./dist/assets/imgs/anwi-logo-1.png`; $(".logo-menu-wrap").find("a img").attr("src",src); @@ -1446,6 +1451,12 @@ } ] }); + + setTimeout(()=>{ + if(width<=600){ + $('.same-style').find('svg path').attr('fill','#000') + } + },300) })(jQuery); diff --git a/dist/Js/myaccount/orderdetails.js b/dist/Js/myaccount/orderdetails.js index 4bb1930..6605bca 100644 --- a/dist/Js/myaccount/orderdetails.js +++ b/dist/Js/myaccount/orderdetails.js @@ -1,13 +1,13 @@ async function bindOrderDetails() { - let user_number =$('.User_phoneum').text(); -// validatesession() -debugger -let cookieRes = COOKIE_HELPER_ACTIONS.getCookie(); - let { userId} = cookieRes; - //let userId = '106631380000048'; - debugger; -let port = SERVERNAME; -// let port = "http://localhost:3088"; + let user_number = $('.User_phoneum').text(); + // validatesession() + debugger + let cookieRes = COOKIE_HELPER_ACTIONS.getCookie(); + let { userId } = cookieRes; + //let userId = '106631380000048'; + debugger; + let port = SERVERNAME; + // let port = "http://localhost:3088"; let url = `${port}/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`; // /apis/v4/bizgaze/integrations/products/salesorderdetailsbyorgid/phonenumber/ // https://anwi.bizgaze.app/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/{organizationid} @@ -17,11 +17,11 @@ let port = SERVERNAME; headers: { 'Authorization': `stat ${STAT} `, 'Content-Type': 'application/json' - } + } }; debugger let res = await axios(config); - if(res.data.result == '[]' || res.data.result === null){ + if (res.data.result == '[]' || res.data.result === null) { $(".user_order_details").append(`
No orders Found
`); return; } @@ -31,19 +31,19 @@ let port = SERVERNAME; console.log(new_arrr); $(".user_order_details").html(``) console.log('hello') - let user_order_details =``; + let user_order_details = ``; let order_itemTotal = ''; - let order_netTotal = '' ; - let order_quantity = '' ; - let order_taxAmount = '' ; - for(let i=0;i + let order_netTotal = ''; + let order_quantity = ''; + let order_taxAmount = ''; + for (let i = 0; i < new_arrr.length; i++) { + let current = new_arrr[i] + let updatedCurent_total = current.nettotal.toLocaleString() + order_itemTotal = current.itemtotal; + order_netTotal = current.nettotal; + order_quantity = current.Quantity; + order_taxAmount = current.taxamount; + user_order_details += `
@@ -102,17 +102,17 @@ let port = SERVERNAME;
`; -} + } $(".user_order_details").append(user_order_details); - $('.order_details_main_container').click(function(){ - let current_serial_no= $(this).find('.serial_no').text(); + $('.order_details_main_container').click(function () { + let current_serial_no = $(this).find('.serial_no').text(); // window.localStorage.setItem('orderDate',current_order_date); - window.localStorage.setItem('orderSerialno',current_serial_no); - window.localStorage.setItem('Userphonenumber',user_number); - $(this).attr('href','./orderdetails.html') - }) + // window.localStorage.setItem('orderSerialno',current_serial_no); + // window.localStorage.setItem('Userphonenumber',user_number); + $(this).attr('href', `./orderdetails.html#${current_serial_no}`) + }) } -function toasterOpts(){ +function toasterOpts() { toastr.options = { "closeButton": true, "debug": false, diff --git a/dist/Js/navbar.js b/dist/Js/navbar.js index f7a42a6..98a46db 100644 --- a/dist/Js/navbar.js +++ b/dist/Js/navbar.js @@ -1,7 +1,7 @@ navINIT(); function navINIT() { - if(!window.location.href.includes('orderconfirmation')){ + if(!window.location.href.includes('orderconfirmation')&&!window.location.href.includes('/w/')){ loadCart(); } @@ -92,7 +92,7 @@ function navINIT() {