`);
+ // $('.warranty_productform').addClass('d-none');
+ // $('.add_serialNum').removeClass('d-none');
+ return;
+ }
+ else {
+ const warrantyEnabled = value[0].warrantyenabled;
+ if (warrantyEnabled == false) {
+ let phonenumber_updated = Number(phonenumber_inp)
+ $('.user_Warranty_details').removeClass('d-none')
+ // let strDate = new Date(value[0].purchasedate).toISOString().slice(0, 10);
+ let Warrentypayload =
+ {
+ "sku": value[0].sku,
+ "serialno": serial_no_inp,
+ "phonenumber": phonenumber_updated,
+ "contactname": contactname_inp,
+ "warrantyfromdate": value[0].purchasedate
+ }
+ warrentyService(Warrentypayload);
+ }
+ else {
+ // let warrantySerialnumber =$('.serial_no_warrantynumber').text()
+ let warrenty_date =value[0].warrantytodate
+ let userwarrenty_product = `
`;
+ let is_warranty_enable=value[0].warrantyenabled
+ debugger
+ $(".user_Warranty_details").html(userwarrenty_product);
+ if(is_warranty_enable == true){
+ $('.is_warranty_enable').text('Activated')
+ }
+ else{
+ $('.is_warranty_enable').text('Not Activated')
+ }
+ if(warrenty_date == "" ){
+ $('.warrenty_date').addClass('d-none')
+ }
+ else{
+ $('.warrenty_date').removeClass('d-none')
+ }
+ $('#Add_serial_number_inp').addClass('border-success')
+ $('.error_serial_num').addClass('d-none')
+ // $('.warranty_productform').addClass('d-none');
+ $('.add_serialNum').removeClass('d-none');
+ //Command: toastr["success"]("Warranty already enabled !")
+
+ }
+
+ }
+
+ })
+
+
+ }
+}
+else{
+ if(serial_no_inp == ''){
+ $('#Add_serial_number_inp').addClass('border-danger')
+ $('.error_serial_num').removeClass('d-none')
+ }
+ else if(phonenumber_inp == ''){
+ $('#Add_phonenumber_inp').addClass('border-danger');
+ $('.error_phonenumber').removeClass('d-none');
+
+
+ }
+}
+})
+async function warrentyService(Warrentypayload) {
+ // let d = new Date();
+ // // 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');
+ // $('.add_serialNum').removeClass('d-none');
+ // Command: toastr["warning"](res.data.message)
+ // toasterOpts();
+ $(".user_Warranty_details").html(`
No Serial number found / Product not Delivered
`);
+
+ }
+ else if(res.data.status == '0'){
+ // $('.warranty_productform').addClass('d-none');
+ // $('.add_serialNum').removeClass('d-none');
+ // Command: toastr["success"](res.data.message);
+ // toasterOpts();
+ $(".user_Warranty_details").html(`
${res.data.message}
`);
+ }
+}
+// function toasterOpts() {
+// toastr.options = {
+// "closeButton": true,
+// "debug": false,
+// "newestOnTop": true,
+// "progressBar": true,
+// "positionClass": "toast-top-center",
+// "preventDuplicates": true,
+// "showDuration": "300",
+// "hideDuration": "1000",
+// "timeOut": "3000",
+// "extendedTimeOut": "1000",
+// "showEasing": "swing",
+// "hideEasing": "linear",
+// "showMethod": "fadeIn",
+// "hideMethod": "fadeOut"
+// }
+// }
+}
diff --git a/dist/Js/myaccount/orderdetails.js b/dist/Js/myaccount/orderdetails.js
new file mode 100644
index 0000000..ec31961
--- /dev/null
+++ b/dist/Js/myaccount/orderdetails.js
@@ -0,0 +1,78 @@
+async function bindOrderDetails() {
+ debugger
+// validatesession()
+ const res = await getAPIServiceLocal(
+ "apis/v4/Bizgaze/integrations/products/salesorderdetailsbyphonenumber"
+ );
+ debugger;
+ console.log(res);
+ const orderDetailsres = JSON.parse(res.data.result);
+ console.log(orderDetailsres);
+ let new_arrr = orderDetailsres;
+ console.log(new_arrr);
+ $(".user_order_details").html(``)
+ console.log('hello')
+// $.each(new_arrr, function (key, value) {
+// console.log("a", value);
+
+// $(".user_order_details").append(user_order_details);
+// });
+ let user_order_details =``;
+ let order_itemTotal = '';
+ let order_netTotal = '' ;
+ let order_quantity = '' ;
+ let order_taxAmount = '' ;
+ for(let i=0;i
${order_itemTotal}${order_netTotal}${order_taxAmount} ${order_quantity}
ORDER PLACED
${current.OrderDate}
TOTAL
₹${updatedCurent_total}
Delivered TO
${current.OrganizationName}
ORDER NO: ${current.OrderNo}
View order details
Invoice
`;
+}
+ $(".user_order_details").append(user_order_details);
+ // $('.order_details_main_container').click(function(){
+ // window.localStorage.setItem("orderNumber", current.OrderNo);
+ // window.localStorage.setItem("orderDate", current.OrderNo);
+ // });
+ $('.order_details_main_container').click(function(){
+ let current_order_date= $(this).find('.order_date').text();
+ let current_serial_no= $(this).find('.serial_no').text();
+ let current_item_name= $(this).find('.order_item_name').text();
+ let current_order_itemTotal =$(this).find('.order_itemTotal').text();
+ let current_order_netTotal =$(this).find('.order_netTotal').text();
+ let current_order_tax =$(this).find('.order_tax').text();
+ let current_order_qty =$(this).find('.order_qty').text();
+
+ window.localStorage.setItem('orderDate',current_order_date);
+ window.localStorage.setItem('orderSerialno',current_serial_no);
+ window.localStorage.setItem('orderItemname',current_item_name);
+ window.localStorage.setItem('orderitemTotal',current_order_itemTotal);
+ window.localStorage.setItem('netTotal',current_order_netTotal)
+ window.localStorage.setItem('Qty',current_order_qty)
+ window.localStorage.setItem('tax',current_order_tax)
+ debugger;
+ // console.log(get_local_orderDate,get_local_orderSerialno)
+ $(this).attr('href','./orderdetails.html')
+ })
+}
+function toasterOpts(){
+ toastr.options = {
+ "closeButton": true,
+ "debug": false,
+ "newestOnTop": true,
+ "progressBar": true,
+ "positionClass": "toast-top-center",
+ "preventDuplicates": true,
+ "onclick": null,
+ "showDuration": "300",
+ "hideDuration": "1000",
+ "timeOut": "5000",
+ "extendedTimeOut": "1000",
+ "showEasing": "swing",
+ "hideEasing": "linear",
+ "showMethod": "fadeIn",
+ "hideMethod": "fadeOut"
+ }
+}
\ No newline at end of file
diff --git a/dist/Js/orderDetails/order_summary.js b/dist/Js/orderDetails/order_summary.js
new file mode 100644
index 0000000..7b9353e
--- /dev/null
+++ b/dist/Js/orderDetails/order_summary.js
@@ -0,0 +1,26 @@
+let current_orderDate =window.localStorage.getItem('orderDate')
+let current_orderSerialDate =window.localStorage.getItem('orderSerialno')
+let order_itemname =window.localStorage.getItem('orderItemname');
+let order_itemtotal =window.localStorage.getItem('orderitemTotal');
+let order_nettotal =window.localStorage.getItem('netTotal');
+let order_qty = window.localStorage.getItem('Qty')
+let order_tax = window.localStorage.getItem('tax')
+let Local_keys_update =['tax','Qty','netTotal','orderitemTotal']
+let summary =`
+
+
Order${current_orderSerialDate} (${order_qty} items)
+
Order placed on ${current_orderDate}
+
Paid by Credit Card
+
`;
+$('.order_price').html(order_itemtotal)
+$('.order_tax').html(order_tax)
+$('.Order_total').html(order_nettotal)
+$('.order_itemname').html(order_itemname)
+$('.order-summary').html(summary);
+$('.back_to_orders').click(function(){
+ debugger
+ for (key of Local_keys_update) {
+ window.localStorage.removeItem(key);
+ }
+ $(this).attr('href','./myaccount.html')
+})
\ No newline at end of file
diff --git a/dist/Js/warranty.js b/dist/Js/warranty.js
new file mode 100644
index 0000000..49d7fd8
--- /dev/null
+++ b/dist/Js/warranty.js
@@ -0,0 +1,207 @@
+function wattantyFunction() {
+ debugger;
+ let order_card = `
`;
+
+ $(".user_orders").append(order_card);
+ $(".add_serialNum").click(function () {
+ $(".warranty_productform").removeClass("d-none");
+ $(this).addClass("d-none");
+ });
+ $(".warranty_serialNumber_submit").click(async function () {
+ let serial_no_inp = $("#Add_serial_number_inp").val();
+ let phonenumber_inp = $("#Add_phonenumber_inp").val();
+ let contactname_inp = $("#Add_contactname_inp").val();
+ if (serial_no_inp && phonenumber_inp != "") {
+ $(".error_serial_num").addClass("d-none");
+ $(".error_phonenumber").addClass("d-none");
+ $("#Add_serial_number_inp").removeClass("border-danger");
+ $("#Add_phonenumber_inp").removeClass("border-danger");
+ let port = "https://anwi.bizgaze.app";
+ debugger;
+ let url = `${port}/apis/v4/Bizgaze/integrations/products/warrantyservice/serialno/${serial_no_inp}`;
+ console.log(url);
+ const STAT = `05b2f2ca510344968c65e1ebf49a5595`;
+ const config = {
+ url,
+ method: "get",
+ headers: {
+ Authorization: `stat ${STAT}`,
+ },
+ };
+ let response = await axios(config);
+ debugger;
+ console.log(response);
+ let product_res = response.data.result;
+ if (product_res != null) {
+ let warrenty_res = JSON.parse(product_res);
+ let new_arr = [warrenty_res];
+ $.each(new_arr, function (key, value) {
+ console.log(value);
+ if (response.data.result == "[]") {
+ // Command: toastr["error"]("Serial number not found !")
+ // toasterOpts();
+ // $('#Add_serial_number_inp').addClass('border-danger');
+ // $('.error_serial_num').removeClass('d-none')
+ $(".user_Warranty_details").html(
+ `
`
+ );
+ setTimeout(function(){
+ $('.bg-dangerLite').hide()
+ }, 1000)
+ // $('.warranty_productform').addClass('d-none');
+ // $('.add_serialNum').removeClass('d-none');
+ return;
+ } else {
+ const warrantyEnabled = value[0].warrantyenabled;
+ $('.warranty_status_main_container').addClass('d-none')
+ if (warrantyEnabled == false) {
+ let phonenumber_updated = Number(phonenumber_inp);
+ $(".user_Warranty_details").removeClass("d-none");
+ // let strDate = new Date(value[0].purchasedate).toISOString().slice(0, 10);
+ let Warrentypayload = {
+ sku: value[0].sku,
+ serialno: serial_no_inp,
+ phonenumber: phonenumber_updated,
+ contactname: contactname_inp,
+ warrantyfromdate: value[0].purchasedate,
+ };
+ warrentyService(Warrentypayload);
+ } else {
+ $('.backtoform').removeClass('d-none')
+ // let warrantySerialnumber =$('.serial_no_warrantynumber').text()
+ let warrenty_date = value[0].warrantytodate;
+ // let userwarrenty_product = `
Warranty For : ${value[0].itemname}
Serail NO : ${value[0].serialno}
Warrenty Expiry Date : ${value[0].warrantytodate}
Warranty Start Date : ${value[0].warrantyfromdate}
Warranty Status : ${value[0].warrantyenabled}
`;
+ let userwarrenty_product = `
Congratulations,
${value[0].contactname} for registering with anwi systems .You have successfully availed your warranty.
Here is your warranty Details
Serail No
${value[0].serialno}
warranty will be applicable till
${value[0].warrantytodate}
Order details
Itemname
${value[0].itemname}
Warranty details
Warranty Start
${value[0].warrantyfromdate}
Warranty status
{value[0].warrantyenabled}
Follow Below steps to request your warranty claim.
- Go to My account
- Tap on request claim
- Enter information and send claim request
`;
+ let is_warranty_enable = value[0].warrantyenabled;
+ debugger;
+ $(".user_Warranty_details").html(userwarrenty_product);
+ if (is_warranty_enable == true) {
+ $(".is_warranty_enable").text("Activated");
+ } else {
+ $(".is_warranty_enable").text("Not Activated");
+ }
+ if (warrenty_date == "") {
+ $(".warrenty_date").addClass("d-none");
+ } else {
+ $(".warrenty_date").removeClass("d-none");
+ }
+ $("#Add_serial_number_inp").addClass("border-success");
+ $(".error_serial_num").addClass("d-none");
+ $(".add_serialNum").removeClass("d-none");
+ }
+ }
+ });
+ }
+ } else {
+ if (serial_no_inp == "") {
+ $("#Add_serial_number_inp").addClass("border-danger");
+ $(".error_serial_num").removeClass("d-none");
+ } else if (phonenumber_inp == "") {
+ $("#Add_phonenumber_inp").addClass("border-danger");
+ $(".error_phonenumber").removeClass("d-none");
+ }
+ }
+ });
+ $('.warranty_serialNumber_check').click(async function(){
+ let serial_no_inp = $("#Add_serial_number_inp").val();
+ if (serial_no_inp != "") {
+ $(".error_serial_num").addClass("d-none");
+ $("#Add_serial_number_inp").removeClass("border-danger");
+ let port = "https://anwi.bizgaze.app";
+ debugger;
+ let url = `${port}/apis/v4/Bizgaze/integrations/products/warrantyservice/serialno/${serial_no_inp}`;
+ console.log(url);
+ const STAT = `05b2f2ca510344968c65e1ebf49a5595`;
+ const config = {
+ url,
+ method: "get",
+ headers: {
+ Authorization: `stat ${STAT}`,
+ },
+ };
+
+ let response = await axios(config);
+ debugger;
+ console.log(response);
+ let product_res = response.data.result;
+ if (product_res != null) {
+ if (response.data.result == "[]") {
+ $('.bg-dangerLite').removeClass('d-none')
+ $(".user_Warranty_details").html(
+ `
`
+ );
+
+ // );
+ setTimeout(function(){
+ $('.bg-dangerLite').hide()
+ }, 1000)
+ return;
+ }
+ else{
+ $('.bg-dangerLite').addClass('d-none')
+ $(".Add_phonenumber_inp_label").removeClass('d-none')
+ $("#Add_phonenumber_inp").removeClass('d-none')
+ $(".Add_Contact_inp_label").removeClass('d-none')
+ $("#Add_contactname_inp").removeClass('d-none')
+ $(".warranty_serialNumber_submit").removeClass('d-none')
+ $(this).addClass('d-none')
+ $(".Serial_numb_notfound").addClass('d-none')
+ }
+ }
+ } else {
+ if (serial_no_inp == "") {
+ $("#Add_serial_number_inp").addClass("border-danger");
+ $(".error_serial_num").removeClass("d-none");
+ }
+ }
+ })
+
+ async function warrentyService(Warrentypayload) {
+ // let d = new Date();
+ // // 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');
+ // $('.add_serialNum').removeClass('d-none');
+ // Command: toastr["warning"](res.data.message)
+ // toasterOpts();
+ $('.warranty_status_main_container').removeClass('d-none')
+ $('.bg-dangerLite').removeClass('d-none');
+ $(".user_Warranty_details").html(
+ `
No Serial number found / Product not Delivered
`
+ );
+ setTimeout(function(){
+ $('.bg-dangerLite').hide()
+ }, 1000)
+ } else if (res.data.status == "0") {
+ $(".user_Warranty_details").html(`
`);
+ }
+ }
+ // function toasterOpts() {
+ // toastr.options = {
+ // "closeButton": true,
+ // "debug": false,
+ // "newestOnTop": true,
+ // "progressBar": true,
+ // "positionClass": "toast-top-center",
+ // "preventDuplicates": true,
+ // "showDuration": "300",
+ // "hideDuration": "1000",
+ // "timeOut": "3000",
+ // "extendedTimeOut": "1000",
+ // "showEasing": "swing",
+ // "hideEasing": "linear",
+ // "showMethod": "fadeIn",
+ // "hideMethod": "fadeOut"
+ // }
+ // }
+}
+wattantyFunction();
diff --git a/dist/assets/imgs/checked.png b/dist/assets/imgs/checked.png
new file mode 100644
index 0000000..2828672
Binary files /dev/null and b/dist/assets/imgs/checked.png differ
diff --git a/dist/assets/imgs/guarantee.png b/dist/assets/imgs/guarantee.png
new file mode 100644
index 0000000..45f5276
Binary files /dev/null and b/dist/assets/imgs/guarantee.png differ
diff --git a/dist/assets/imgs/remove.png b/dist/assets/imgs/remove.png
new file mode 100644
index 0000000..9af2161
Binary files /dev/null and b/dist/assets/imgs/remove.png differ
diff --git a/w/index.html b/w/index.html
new file mode 100644
index 0000000..4c8d707
--- /dev/null
+++ b/w/index.html
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Anwi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Enter Your Details Below :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file