add new changes
Dieser Commit ist enthalten in:
Vendored
+22
-22
@@ -1,5 +1,5 @@
|
||||
async function addressDetails() {
|
||||
debugger;
|
||||
|
||||
// const user_addr_num =$("#Profile_Phone_num").val();
|
||||
getbillinginfoBind();
|
||||
let addr_phone = $('#phonenumber');
|
||||
@@ -14,7 +14,7 @@ async function addressDetails() {
|
||||
|
||||
function renderCustomStateDropdown(stateList) {
|
||||
let html = ``;
|
||||
debugger;;
|
||||
|
||||
let maxLen = stateList.length > 10 ? 10 : stateList.length
|
||||
for (let i = 0; i < maxLen; i++) {
|
||||
let currItem = stateList[i];
|
||||
@@ -24,7 +24,7 @@ async function addressDetails() {
|
||||
$('.stateBox').html(html);
|
||||
|
||||
$('.stateoption').off().click(function (e) {
|
||||
debugger;
|
||||
|
||||
const name = $(e.target).data('name');
|
||||
const id = $(e.target).data('value');
|
||||
$('#state').val(name);
|
||||
@@ -70,32 +70,32 @@ async function addressDetails() {
|
||||
`apis/v4/bizgaze/integrations/anwiauth/getbillinginfo/contactid/${cookieRes.userId}`
|
||||
);
|
||||
let res = JSON.parse(response.result);
|
||||
debugger;
|
||||
|
||||
console.log(res);
|
||||
res = res[res.length - 1];
|
||||
debugger
|
||||
addr_phone.val(res.phonenumber);
|
||||
$('#Profile_User_name').val(res.organizationname)
|
||||
$('#Profile_Phone_num').val(res.phonenumber)
|
||||
|
||||
addr_phone.val(res?.phonenumber);
|
||||
$('#Profile_User_name').val(res?.organizationname)
|
||||
$('#Profile_Phone_num').val(res?.phonenumber)
|
||||
let Profileusername = $('#Profile_User_name').val()
|
||||
let Profileuserphone = $('#Profile_Phone_num').val()
|
||||
$('.overview_user_name').html(Profileusername);
|
||||
$('.overview_user_phone').html(Profileuserphone);
|
||||
if (res.cityid == "0") {
|
||||
if (res?.cityid == "0") {
|
||||
$(".profile_Address").html(
|
||||
`<div class=User_address><button class="btn btn-outline-primary create_address" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle" viewBox="0 0 16 16"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/><path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/></svg> ADD NEW ADDRESS</button></div>`
|
||||
);
|
||||
|
||||
$(".address_edit").hide();
|
||||
$(".create_address").on("click", function () {
|
||||
debugger
|
||||
|
||||
$(this).hide();
|
||||
$('.saveaddress').hide()
|
||||
$(".addresslist").show();
|
||||
$(".Createaddress").show();
|
||||
getCountryStateCurrency();
|
||||
});
|
||||
$('.Createaddress').on('click', async function () {
|
||||
$('.Createaddress').off().on('click', async function () {
|
||||
if (addr_zip.val() == "" || addr_addrline.val() == "") {
|
||||
// toastr.error('Required Feilds are Empty!');
|
||||
// if(addr_phone.val() == '' || addr_phone.val().length <10){
|
||||
@@ -128,16 +128,16 @@ async function addressDetails() {
|
||||
})
|
||||
} else {
|
||||
$(".profile_Address").html(
|
||||
`<div class=User_address><address><p><strong class="">${res.organizationname}</strong><p>${res.addressline},${res.cityname},${res.zipcode}<p>Mobile: ${res.phonenumber}</address></div>`
|
||||
`<div class=User_address><address><p><strong class="">${res?.organizationname}</strong><p>${res?.addressline},${res?.cityname},${res?.zipcode}<p>Mobile: ${res?.phonenumber}</address></div>`
|
||||
);
|
||||
$('#state').val(res.cityname)
|
||||
$('#state').attr('data-id',res.cityid);
|
||||
$('#zipcode').val(res.zipcode);
|
||||
$('#addressdes').val(res.addressline);
|
||||
$('#state').val(res?.cityname)
|
||||
$('#state').attr('data-id',res?.cityid);
|
||||
$('#zipcode').val(res?.zipcode);
|
||||
$('#addressdes').val(res?.addressline);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
} debugger
|
||||
}
|
||||
|
||||
|
||||
$(".address_edit").on("click", function () {
|
||||
@@ -160,7 +160,7 @@ async function addressDetails() {
|
||||
.off("click")
|
||||
.click(async function () {
|
||||
|
||||
debugger
|
||||
|
||||
if (addr_zip.val() == "" || addr_addrline.val() == "") {
|
||||
// toastr.error('Required Feilds are Empty!');
|
||||
// if(addr_phone.val() == '' || addr_phone.val().length <10){
|
||||
@@ -201,7 +201,7 @@ async function addressDetails() {
|
||||
let limit = 10;
|
||||
let results = [];
|
||||
let maxLen = stateArr.length > 10 ? 10 :stateArr.length;
|
||||
debugger
|
||||
|
||||
for(let i=0;i<stateArr.length;i++){
|
||||
let currItem = stateArr[i];
|
||||
let stateName = currItem.cityname.toLowerCase();
|
||||
@@ -305,12 +305,12 @@ async function addressDetails() {
|
||||
}
|
||||
|
||||
function createBillingForm() {
|
||||
debugger;
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
|
||||
let { userId, name } = cookieRes;
|
||||
const ctyId = await getCountryId();
|
||||
let stateId = parseInt($("#state").val());
|
||||
let stateId = $("#state").data('id');
|
||||
let payload = {
|
||||
cityid: stateId,
|
||||
CityName: $(`[data-id="${stateId}"`).html(),
|
||||
@@ -344,7 +344,7 @@ async function addressDetails() {
|
||||
}
|
||||
|
||||
async function AddresssaveForm() {
|
||||
debugger;
|
||||
|
||||
let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
|
||||
let { userId, name } = cookieRes;
|
||||
const { errorMsg, isError, response } =
|
||||
|
||||
Vendored
@@ -1,6 +1,7 @@
|
||||
function initmyaccount(){
|
||||
$('.my_account_page').removeClass('d-none')
|
||||
myProfile();
|
||||
supportTicketMain();
|
||||
bindOrderDetails();
|
||||
wattantyFunction();
|
||||
addressDetails()
|
||||
|
||||
Vendored
+8
-8
@@ -1,5 +1,5 @@
|
||||
function myProfile() {
|
||||
debugger
|
||||
|
||||
getbillinginfoBind()
|
||||
async function getbillinginfoBind(){
|
||||
let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
|
||||
@@ -8,16 +8,16 @@ function myProfile() {
|
||||
`apis/v4/bizgaze/integrations/anwiauth/getbillinginfo/contactid/${cookieRes.userId}`
|
||||
);
|
||||
let res = JSON.parse(response.result);
|
||||
debugger;
|
||||
|
||||
console.log(res);
|
||||
res = res[res.length - 1];
|
||||
$('#Profile_User_name').val(res.organizationname)
|
||||
$('#Profile_Phone_num').val(res.phonenumber)
|
||||
$('#Profile_User_name').val(res?.organizationname)
|
||||
$('#Profile_Phone_num').val(res?.phonenumber)
|
||||
let Profileusername =$('#Profile_User_name').val()
|
||||
let Profileuserphone=$('#Profile_Phone_num').val()
|
||||
$('.overview_user_name').html(Profileusername);
|
||||
$('.overview_user_phone').html(Profileuserphone);
|
||||
$(".profile_Address").html(`<div class=User_address><address><p><strong>${res.organizationname}</strong><p>${res.addressline},${res.cityname}<br>${res.statename},${res.zipcode}<p>Mobile: ${res.phonenumber}</address></div>`
|
||||
$(".profile_Address").html(`<div class=User_address><address><p><strong>${res?.organizationname}</strong><p>${res?.addressline},${res?.cityname}<br>${res?.statename},${res?.zipcode}<p>Mobile: ${res?.phonenumber}</address></div>`
|
||||
);
|
||||
}
|
||||
let countryId = null;
|
||||
@@ -60,14 +60,14 @@ function myProfile() {
|
||||
$(".update_profile_pass").on("click", async function () {
|
||||
let userEmail = window.localStorage.getItem("Useremail");
|
||||
console.log(userEmail);
|
||||
let port = "http://beta.bizgaze.com";
|
||||
let port = SERVERNAME;
|
||||
// let port = "http://localhost:3088";
|
||||
let url = `${port}/account/getuserbyphoneormail/${userEmail}/${userEmail}`;
|
||||
const config = {
|
||||
url,
|
||||
method: "get",
|
||||
};
|
||||
debugger;
|
||||
|
||||
|
||||
let response = await axios(config);
|
||||
let usernameId = response.data.result.userName;
|
||||
@@ -129,7 +129,7 @@ function myProfile() {
|
||||
$('.profile_edit_cancel').trigger('click')
|
||||
})
|
||||
async function ProfilesaveForm() {
|
||||
debugger
|
||||
|
||||
let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
|
||||
let { userId, name } = cookieRes;
|
||||
const { errorMsg, isError, response } =
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
function wattantyFunction(){
|
||||
|
||||
debugger
|
||||
|
||||
let order_card = `<div class=warranty_product><div class="py-3 warranty_productform"><div class=mb-3><label class=form-label for=Add_serial_number_inp>Enter Your Serial Number</label><input class=form-control id=Add_serial_number_inp required><label class="form-label text-danger d-none error_serial_num" for=Add_serial_number_inp >Serial Number Not Found</label></div><div class=mb-3><label class=form-label for=Add_phonenumber_inp>Enter Your Phone Number</label> <input class=form-control id=Add_phonenumber_inp required><label class="text-danger d-none form-label error_phonenumber" for=Add_phonenumber_inp>Enter Valid Phone Number</label></div><div class=mb-3><label class=form-label for=Add_contactname_inp>Enter Your Contactname</label> <input class=form-control id=Add_contactname_inp required></div><div class="serial_submit text-end"><button class="btn btn-dark warranty_serialNumber_submit" type="button">Submit</button></div></div></div>`;
|
||||
|
||||
$(".user_orders").append(order_card);
|
||||
@@ -18,7 +18,7 @@ $('.warranty_serialNumber_submit').click(async function () {
|
||||
$('#Add_serial_number_inp').removeClass('border-danger')
|
||||
$('#Add_phonenumber_inp').removeClass('border-danger');
|
||||
let port = SERVERNAME;
|
||||
debugger
|
||||
|
||||
let url = `${port}/apis/v4/Bizgaze/integrations/products/warrantyservice/serialno/${serial_no_inp}`;
|
||||
console.log(url);
|
||||
// const STAT = `05b2f2ca510344968c65e1ebf49a5595`
|
||||
@@ -31,7 +31,7 @@ $('.warranty_serialNumber_submit').click(async function () {
|
||||
};
|
||||
|
||||
let response = await axios(config);
|
||||
debugger
|
||||
|
||||
console.log(response)
|
||||
let product_res = response.data.result
|
||||
if (product_res != null) {
|
||||
@@ -70,7 +70,7 @@ $('.warranty_serialNumber_submit').click(async function () {
|
||||
let warrenty_date =value[0].warrantytodate
|
||||
let userwarrenty_product = `<div class="border-3 border-start my-3 order-cards ps-4 rounded-0" id='order-cards'> <div class="col-md-12 "><b>Warranty For :</b> ${value[0].itemname}</div><div class="row align-items-center"> <div class=col-md-12> <div class="col-md-6 my-2"><span>Serail NO :</span> <span class="fs-9 text-secondary serial_no_warrantynumber">${value[0].serialno}</span> </div><div class="col-md-6 my-2"><span> Warrenty Expiry Date :</span> <span class=" fs-9 text-secondary rounded-2 warrenty_date">${value[0].warrantytodate}</span> </div><div class="my-2 col-md-6"><span> Warranty Start Date :</span> <span class="fs-9 text-secondary purchase_date">${value[0].warrantyfromdate}</span> </div><div class="col-md-6 my-2"> <span> Warranty Status : </span><span class="bg-success btn fs-9 is_warranty_enable py-0 text-white"> ${value[0].warrantyenabled}</span> </div></div></div></div>`;
|
||||
let is_warranty_enable=value[0].warrantyenabled
|
||||
debugger
|
||||
|
||||
$(".user_Warranty_details").html(userwarrenty_product);
|
||||
if(is_warranty_enable == true){
|
||||
$('.is_warranty_enable').text('Activated')
|
||||
@@ -117,9 +117,9 @@ async function warrentyService(Warrentypayload) {
|
||||
// // let strDate = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
|
||||
// let strDate = new Date().toISOString().slice(0, 10)
|
||||
// console.log(strDate)
|
||||
debugger
|
||||
|
||||
const res = await postAPIServiceWarranty(`apis/v4/bizgaze/transact/items/savewarrantyasync`, Warrentypayload);
|
||||
debugger
|
||||
|
||||
console.log(res)
|
||||
if (res.data.status == 2) {
|
||||
// $('.warranty_productform').addClass('d-none');
|
||||
|
||||
Vendored
+51
-13
@@ -1,11 +1,12 @@
|
||||
async function bindOrderDetails() {
|
||||
let user_number = $('.User_phoneum').text();
|
||||
// validatesession()
|
||||
debugger
|
||||
|
||||
let cookieRes = COOKIE_HELPER_ACTIONS.getCookie();
|
||||
let { userId } = cookieRes;
|
||||
//let userId = '106631380000048';
|
||||
debugger;
|
||||
|
||||
console.log(cookieRes);
|
||||
let port = SERVERNAME;
|
||||
// let port = "http://localhost:3088";
|
||||
let url = `${port}/apis/v4/Bizgaze/integrations/products/salesorderdetailsbyorgid/organizationid/${userId}`;
|
||||
@@ -19,14 +20,14 @@ async function bindOrderDetails() {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
};
|
||||
debugger
|
||||
|
||||
let res = await axios(config);
|
||||
if (res.data.result == '[]' || res.data.result === null) {
|
||||
$(".user_order_details").append(`<div><h6 class="text-center">No orders Found</h6></div>`);
|
||||
return;
|
||||
}
|
||||
const orderDetailsres = JSON.parse(res.data.result);
|
||||
console.log(orderDetailsres);
|
||||
console.log(orderDetailsres,"order");
|
||||
let new_arrr = orderDetailsres;
|
||||
console.log(new_arrr);
|
||||
$(".user_order_details").html(``)
|
||||
@@ -36,14 +37,16 @@ async function bindOrderDetails() {
|
||||
let order_netTotal = '';
|
||||
let order_quantity = '';
|
||||
let order_taxAmount = '';
|
||||
|
||||
for (let i = 0; i < new_arrr.length; i++) {
|
||||
let current = new_arrr[i]
|
||||
console.log(current);
|
||||
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 += `<a href="" class="order_details_main_container">
|
||||
user_order_details += `<div href="" class="order_details_main_container">
|
||||
<div class="border-3 mb-3 card">
|
||||
<div class="text-dark card-body px-0 pt-0">
|
||||
<div class="d-none">
|
||||
@@ -53,7 +56,7 @@ async function bindOrderDetails() {
|
||||
<span class="order_qty">${order_quantity}</span>
|
||||
</div>
|
||||
<div class="bg-gray-4 p-2 m-0 border-bottom">
|
||||
<p class="m-0 fw-600 text-secondary">ORDER NO: <span class="text-blue fs-9 serial_no ">${current.OrderNo}</span>
|
||||
<p class="m-0 fw-600 text-secondary">ORDER NO: <span class="text-blue fs-9 serial_no serial_no_btn "><u class="cursor-pointer">${current.OrderNo}</u></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="bg-gray-4 p-2 row g-0">
|
||||
@@ -76,8 +79,17 @@ async function bindOrderDetails() {
|
||||
<div class="col-md-4 ms-auto">
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<p class="mb-1 text-info fw-500"> View order details </p>
|
||||
<p class="mb-0 text-info fw-500">Invoice</p>
|
||||
<div>
|
||||
<p class="mb-1 text-info fw-500"> View order details </p>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<p class="mb-0 text-info fw-500 text-center">Invoice</p>
|
||||
<p class="mb-1 fw-500 d-flex gap-2 pt-1">
|
||||
<span data-invoiceid="${current.invoiceid}" class="invoicedownload w-100 cursor-pointer bg-white rounded p-1 d-flex align-items-center justify-content-around"> <i class="fa-solid fa-file-invoice p-1 "></i></span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,16 +113,42 @@ async function bindOrderDetails() {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>`;
|
||||
</div>`;
|
||||
}
|
||||
$(".user_order_details").append(user_order_details);
|
||||
$('.order_details_main_container').click(function () {
|
||||
let current_serial_no = $(this).find('.serial_no').text();
|
||||
$('.serial_no_btn').click(function () {
|
||||
// order_details_main_container
|
||||
let current_serial_no = $(this).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#${current_serial_no}`)
|
||||
})
|
||||
// $(this).attr('href', `./orderdetails.html#${current_serial_no}`);
|
||||
|
||||
window.location.href = `/orderdetails.html#${current_serial_no}`;
|
||||
});
|
||||
|
||||
$('.invoicedownload').off('click').click(async function (e){
|
||||
let invoiceId = $(this).data('invoiceid');
|
||||
console.log(invoiceId);
|
||||
$(this).html(`<div style="width:15px;height:15px" class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>`)
|
||||
let res = await API_SERVICES_ACTIONS.postAPIService(`apis/v4/unibase/platform/templates/generatetemplatepdf/printprovideruniquekey/Bizgaze_Extension_Transact_Transact_PrintProvider_InvoicePrint/pkid/${invoiceId}`);
|
||||
|
||||
if(res.isError){
|
||||
toasterHelper(`error`,err.errorMsg,`toast-top-right`);
|
||||
return;
|
||||
}
|
||||
|
||||
res=JSON.parse(res.response.result);
|
||||
let {FilePath:fileLink} = res;
|
||||
let link = buildLinkWithServerName(fileLink);
|
||||
console.log(link);
|
||||
window.open(link, "_blank");
|
||||
|
||||
$(this).html(`<i class="fa-solid fa-file-invoice p-1 "></i>`)
|
||||
|
||||
});
|
||||
}
|
||||
function toasterOpts() {
|
||||
toastr.options = {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren