Pārlūkot izejas kodu

Added login and warranty along with toaster

ananthvijay 2 gadus atpakaļ
vecāks
revīzija
a92277bb70
11 mainītis faili ar 1708 papildinājumiem un 294 dzēšanām
  1. 305
    4
      dist/Js/auth/apiservice.js
  2. 593
    4
      dist/Js/auth/login.js
  3. 1
    1
      dist/Js/footer.js
  4. 9
    9
      dist/Js/navbar.js
  5. 73
    2
      dist/css/main.css
  6. 83
    0
      dist/css/style.css
  7. 24
    20
      dist/toaster/toastr.css
  8. 38
    0
      index.html
  9. 445
    131
      login.html
  10. 122
    109
      myaccount.html
  11. 15
    14
      orderdetails.html

+ 305
- 4
dist/Js/auth/apiservice.js Parādīt failu

@@ -1,12 +1,26 @@
1
-let SERVERNAME = 'https://anwi.bizgaze.app';
2
-const STAT = '05b2f2ca510344968c65e1ebf49a5595';
3
-
1
+// let SERVERNAME = 'https://anwi.bizgaze.app';
2
+let SERVERNAME = 'https://beta.bizgaze.app';
3
+//let SERVERNAME = 'http://localhost:3088';
4
+const STAT = 'b276960fddf84e8cb63de6e32d31529b';
5
+async function getStatAPIService(url,data={}){
6
+    let config = {
7
+        url,
8
+        method:'get',
9
+        data:data,
10
+        headers: {
11
+            'Authorization': `stat ${STAT}`,
12
+            'Content-Type': 'application/json'
13
+        },
14
+    }
15
+    let response = await axios(config);
4 16
 
17
+    return response;
18
+}
5 19
 
6 20
 async function postStatAPIService(url,data={}){
7 21
     let config = {
8 22
         url,
9
-        method:'get',
23
+        method:'post',
10 24
         data:data,
11 25
         headers: {
12 26
             'Authorization': `stat ${STAT}`,
@@ -17,3 +31,290 @@ async function postStatAPIService(url,data={}){
17 31
 
18 32
     return response;
19 33
 }
34
+
35
+
36
+async function postAPIServiceWarranty(url,data={}){
37
+    let SERVERURL = 'https://anwi.bizgaze.app';
38
+    let config = {
39
+        url:`${SERVERURL}/${url}`,
40
+        method:'post',
41
+        data:data,
42
+        headers: {
43
+            'Authorization': `Basic 6cdcfe22-1623-4740-97e0-363d518c0e8a`,
44
+            'Content-Type': 'application/json'
45
+        },
46
+    }
47
+    let response = await axios(config);
48
+
49
+    return response;
50
+}
51
+async function postAPIService(url,data={}){
52
+     let SERVERURL = 'https://beta.bizgaze.app';
53
+    //let SERVERURL = 'http://localhost:3088';
54
+    let config = {
55
+        url:`${SERVERURL}/${url}`,
56
+        method:'post',
57
+        data:data,
58
+    }
59
+    let response = await axios(config);
60
+
61
+    return response;
62
+}
63
+
64
+
65
+async function postAPIServiceLocal(url,data={}){
66
+    let config = {
67
+      url:`${SERVERNAME}/${url}`,
68
+        method:'post',
69
+        data:JSON.stringify(data),
70
+        headers: {
71
+            'Authorization': `Basic c86af480-b5ef-43af-8ce9-503e5b831e2e`,
72
+            'Content-Type': 'application/json'
73
+        },
74
+    }
75
+    let response = await axios(config);
76
+
77
+    return response;
78
+}
79
+async function getAPIServiceLocal(url){
80
+    let SERVERURL = 'https://anwi.bizgaze.app';
81
+    let config = {
82
+      url:`${SERVERURL}/${url}`,
83
+        method:'get',
84
+        headers: {
85
+            'Authorization': `Basic ed40b74d-561a-47af-b03b-4f29c5ff6937`,
86
+            'Content-Type': 'application/json'
87
+        },
88
+    }
89
+    let response = await axios(config);
90
+
91
+    return response;
92
+}
93
+
94
+
95
+class API_SERVICE_CLASS{
96
+    baseURL = '';
97
+    token='';
98
+    statToken=STAT;
99
+    Instance = null;
100
+    
101
+    constructor(baseurl){
102
+        this.Instance = this;
103
+        this.baseURL = baseurl;
104
+
105
+        this.getService = this.getService.bind(this);
106
+        this.postService = this.postService.bind(this);
107
+        this.justGetAPIService =this.justGetAPIService.bind(this);
108
+        this.justPostAPIService = this.justPostAPIService.bind(this);
109
+        
110
+    }
111
+
112
+    getService(url,isStat = false){
113
+       return this.baseService(this.buildURL(url),'get',isStat);
114
+    }
115
+
116
+    postService(url,data,isStat = false){
117
+        return this.baseService(this.buildURL(url),'post',isStat,data);
118
+    }
119
+
120
+    
121
+
122
+    async baseService(url,method,isStat,data){
123
+        let isPost = method == 'get' ? false : true;
124
+        const cookieData = COOKIE_HELPER_ACTIONS.getCookie();
125
+       if(!isStat){
126
+        if(!cookieData) return window.location.href = "/"
127
+       }
128
+        let token = isStat ?`stat ${this.statToken}` : `Basic ${cookieData.token}`;
129
+        // let token = isStat ?`stat ${this.statToken}` : `Basic ${this.token}`;
130
+        let successResFun = this.buildSuccessResponse;
131
+        let failureResFun = this.buildFailureResponse;
132
+        let config = {
133
+            url,
134
+            method,
135
+            headers:{
136
+               'Authorization': token,
137
+               'Content-Type': 'application/json'
138
+            }
139
+        }
140
+
141
+        if(isPost){
142
+            config['data'] = data;
143
+        }
144
+
145
+        try {
146
+            let response 
147
+           try {
148
+            response = await axios(config);
149
+            if(response.data === true || response.data === false){
150
+                return successResFun(response.data)
151
+            }
152
+            if(response.data.code == '417'){
153
+                window.location.href = '/index.html'
154
+                return failureResFun(response.data)
155
+            }
156
+            if(response.data.code != '0'){
157
+                return failureResFun(response.data)
158
+            }
159
+            return successResFun(response.data)
160
+            
161
+           } catch (error) {
162
+            return failureResFun(error)
163
+           }
164
+            
165
+        } catch (error) {
166
+            return failureResFun(error)
167
+        }
168
+
169
+    }
170
+
171
+
172
+    buildURL(url){
173
+        return `${this.baseURL}/${url}`;
174
+    }
175
+
176
+    buildSuccessResponse(response){
177
+        return {
178
+            isError : false,
179
+            errorMsg : null,
180
+            response:response,
181
+        }
182
+    }
183
+
184
+    buildFailureResponse(error){
185
+        return {
186
+            isError : true,
187
+            errorMsg : error,
188
+            response:null,
189
+        }
190
+    }
191
+
192
+    async justAPI_BaseService(){
193
+        let isPost = method == 'get' ? false : true;
194
+
195
+    
196
+        let successResFun = this.buildSuccessResponse;
197
+        let failureResFun = this.buildFailureResponse;
198
+        let config = {
199
+            url,
200
+            method,
201
+            headers:{
202
+               
203
+               'Content-Type': 'application/json'
204
+            }
205
+        }
206
+
207
+        if(isPost){
208
+            config['data'] = data;
209
+        }
210
+
211
+        try {
212
+            let response 
213
+           try {
214
+            response = await axios(config);
215
+            if(response.data.code == '417'){
216
+                // window.location.href = '/index.html'
217
+                return failureResFun(response.data)
218
+            }
219
+            if(response.data.code != '0'){
220
+                return failureResFun(response.data)
221
+            }
222
+            return successResFun(response.data)
223
+            
224
+           } catch (error) {
225
+            return failureResFun(error)
226
+           }
227
+            
228
+        } catch (error) {
229
+            return failureResFun(error)
230
+        }
231
+    }
232
+
233
+    justGetAPIService(url){
234
+        return this.justAPI_BaseService('get',url)
235
+    }
236
+    justPostAPIService(url){
237
+        return this.justAPI_BaseService('post',url)
238
+    }
239
+
240
+
241
+    isValid(){
242
+        const cookieData = COOKIE_HELPER_ACTIONS.getCookie();
243
+        if(!cookieData){
244
+          return  justGetAPIService('/Account/Session/Validate')
245
+        }
246
+    }
247
+
248
+    
249
+}
250
+
251
+const API_SERVICES = new API_SERVICE_CLASS(SERVERNAME);
252
+
253
+const API_SERVICES_ACTIONS = {
254
+    postAPIService:API_SERVICES.postService,
255
+    getAPIService:API_SERVICES.getService
256
+}
257
+
258
+
259
+// cookie helper
260
+const AUTH = 'AUTH'
261
+
262
+class COOKIE_HELPER_CLASS{
263
+    constructor(){
264
+        this.getCookie = this.getCookie.bind(this);
265
+    }
266
+    getCookie(){
267
+        let cookieVal = Cookies.get(AUTH);
268
+        if(!cookieVal){
269
+            return null;
270
+        }
271
+    return JSON.parse(cookieVal)
272
+    };
273
+    setCookie(value){
274
+        debugger;
275
+        return Cookies.set(AUTH,value)
276
+    };
277
+
278
+    removeCookie(token){
279
+        Cookies.remove(token)
280
+}
281
+    async validateToken() {
282
+        return await API_SERVICES_ACTIONS.getAPIService(`Account/Session/Validate`)
283
+    }
284
+}
285
+
286
+
287
+const COOKIE_HELPER = new COOKIE_HELPER_CLASS();
288
+const COOKIE_HELPER_ACTIONS ={
289
+    getCookie : COOKIE_HELPER.getCookie,
290
+    setCookie :COOKIE_HELPER.setCookie,
291
+    removeAuthCookie:COOKIE_HELPER.removeCookie.bind(null,AUTH)
292
+}
293
+function setCookieManual(token){
294
+    Cookies.set(AUTH,{
295
+        token,
296
+        userId:null
297
+    })
298
+}
299
+
300
+async function checkValidAuth(cb,redirect=undefined){
301
+    debugger;
302
+   document.querySelector('auth-loader').show();
303
+    const res = await COOKIE_HELPER.validateToken();
304
+    debugger
305
+    if(!res.response){
306
+        if(redirect){
307
+            window.location.href =redirect;
308
+         document.querySelector('auth-loader').hide();
309
+         return;
310
+        }
311
+        window.location.href = '/';
312
+         document.querySelector('auth-loader').hide();
313
+        return;
314
+    }
315
+    
316
+   setTimeout(()=>{
317
+    document.querySelector('auth-loader').hide();
318
+    cb();
319
+   },300);
320
+}

+ 593
- 4
dist/Js/auth/login.js Parādīt failu

@@ -1,8 +1,597 @@
1
+function initLogin() {
2
+  // alert('as')
3
+  // Command: toastr["success"]("Logged in successfully")
4
+  // Command: toastr["success"]("My name is Inigo Montoya. You killed my father. Prepare to die!")
1 5
 
6
+  // toasterOpts();
7
+  let reg_name, reg_email, reg_number, reg_pwd, reg_otp_email;
8
+  let loginForm = $("#login_form");
9
+  let registerForm = $("#register_form");
2 10
 
3
-function authFunction(){
4
-    console.log("hello");
5
-    postAPIService()
11
+  $("#register_form .otp-input-group input.press").on("paste", function (p) {
12
+    var data = p.originalEvent.clipboardData.getData("text");
13
+    var dataLength = data.length;
14
+
15
+    for (var i = 0; i < dataLength; i++) {
16
+      var input = $(
17
+        '#register_form .otp-input-group input[tabindex="' + (i + 1) + '"]'
18
+      );
19
+      input.val(data.charAt(i));
20
+      if (input.val().length >= input.attr("maxlength")) {
21
+        var nextInput = $(
22
+          '#register_form .otp-input-group input[tabindex="' + (i + 2) + '"]'
23
+        );
24
+        if (nextInput) {
25
+          nextInput.focus();
26
+        }
27
+      }
28
+    }
29
+    p.preventDefault();
30
+  });
31
+
32
+  $('#register_form .otp-input-group input[type="text"]').on(
33
+    "keyup",
34
+    function (e) {
35
+      if ($(this).val().length >= $(this).attr("maxlength")) {
36
+        if (e.keyCode !== 9 && e.keyCode !== 16) {
37
+          var tabIndex = parseInt($(this).attr("tabindex")) + 1;
38
+          $(
39
+            '#register_form .otp-input-group input[tabindex="' +
40
+              $(this).attr("tabindex") +
41
+              '"]'
42
+          ).val($(this).val());
43
+          $(
44
+            '#register_form .otp-input-group input[tabindex="' + tabIndex + '"]'
45
+          ).focus();
46
+        }
47
+      } else {
48
+        if (e.keyCode === 8) {
49
+          var tabIndex = parseInt($(this).attr("tabindex")) - 1;
50
+          $(
51
+            '#register_form .otp-input-group input[tabindex="' + tabIndex + '"]'
52
+          ).focus();
53
+        }
54
+      }
55
+    }
56
+  );
57
+
58
+  loginForm.find("#User_Email,#User_password").keypress(function (e) {
59
+    if (e.which == 13) $("#Login_btn").click();
60
+  });
61
+
62
+  $("#Login_btn").click(function () {
63
+    // loginForm.find(".loader-btn").show();
64
+    let userEmail = loginForm.find("#User_Email").val();
65
+    let userPassword = loginForm.find("#User_password").val();
66
+    let emailInput = loginForm.find(".email-login-inputgroup");
67
+    let passwordInput = loginForm.find(".password-login-inputgroup");
68
+    if (userEmail == "") {
69
+      emailInput.find("#User_Email").addClass("is-invalid");
70
+      emailInput.find(".form-floating").addClass("is-invalid");
71
+      emailInput.find(".invalid-feedback").text("Please enter your email");
72
+      loginForm.find(".loader-btn").hide();
73
+      $(this).show();
74
+    }
75
+    if (userPassword == "") {
76
+      passwordInput.find("#User_password").addClass("is-invalid");
77
+      passwordInput.find(".form-floating").addClass("is-invalid");
78
+      loginForm.find(".loader-btn").hide();
79
+      $(this).show();
80
+    } else {
81
+      emailInput.find("#User_Email").removeClass("is-invalid");
82
+      emailInput.find(".form-floating").removeClass("is-invalid");
83
+      passwordInput.find("#User_password").removeClass("is-invalid");
84
+      passwordInput.find(".form-floating").removeClass("is-invalid");
85
+      if (validateEmail(userEmail)) {
86
+         let port = "https://beta.bizgaze.app";
87
+      // let port = "http://localhost:3088";
88
+        let url = `${port}/account/getuserbyphoneormail/${userEmail}/${userEmail}`;
89
+        getDataStatAxios(url, userEmail);
90
+      } else {
91
+        loginForm.find(".loader-btn").hide();
92
+        $(this).show();
93
+        emailInput.find("#User_Email").addClass("is-invalid");
94
+        emailInput.find(".form-floating").addClass("is-invalid");
95
+        emailInput.find(".invalid-feedback").text("Please enter a valid email");
96
+      }
97
+    }
98
+  });
99
+  async function getDataStatAxios(url, userEmail) {
100
+    const config = {
101
+      url,
102
+      method: "get",
103
+    };
104
+    let response = await axios(config);
105
+    if (response.data.result == null) {
106
+      toasterOpts();
107
+      Command: toastr["error"]("Please enter Valid email / password");
108
+    } else {
109
+      let userEmail = $("#User_Email").val();
110
+      let userPassword = $("#User_password").val();
111
+      const loginPayload = {
112
+        username: userEmail,
113
+        Password: userPassword,
114
+        UnibaseId: "",
115
+        RememberMe: false,
116
+      };
117
+      $("#Login_btn").hide();
118
+      $(".loader-btn").show();
119
+      const res = await postAPIService(
120
+        `bizgaze/crm/webapi/crmuserlogin`,
121
+        loginPayload
122
+      );
123
+      debugger;
124
+      console.log(res);
125
+      $(".loader-btn").hide();
126
+      $("#Login_btn").show();
127
+      if (res.data.message == "200") {
128
+        debugger;
129
+        // Command: toastr["success"]("Logged in successfully")
130
+        // toasterOpts();
131
+        COOKIE_HELPER_ACTIONS.setCookie({
132
+          token: res.data.result.sessionId,
133
+          userid: res.data.result.userId,
134
+        });
135
+        // setInitLoginLocal();
136
+        window.localStorage.setItem("Useremail", userEmail);
137
+        //window.localStorage.setItem("Userpassword", userPassword);
138
+        window.localStorage.setItem("Isloggedintoaster", true);
139
+        window.localStorage.setItem("Isloggedin", true);
140
+        window.location.href = `./index.html`;
141
+      } else {
142
+        toasterOpts();
143
+      Command: toastr["error"](res.data.message)
144
+      }
145
+    }
146
+  }
147
+
148
+  // this function will be triggered on new user registration
149
+  async function userRegistration() {
150
+    reg_form = $("#register_form");
151
+    // reg_name = $("#User_Name").val();
152
+    reg_email = reg_form.find("#User_Email").val();
153
+    // reg_otp_email = $("#User_otp_Email").val();
154
+    // reg_number = $("#user_number").val();
155
+    reg_pwd = reg_form.find("#User_password").val();
156
+    let userName = reg_email.split("@");
157
+    let otpRes = null;
158
+    const userRegistratioNPayload = {
159
+      organizationtypeid: "2",
160
+      organizationid: "0",
161
+      contactid: "0",
162
+      userid: "0",
163
+      username: "0",
164
+      users_phonenumber: "0",
165
+      password: reg_pwd,
166
+      users_emailaddress: "0",
167
+      emailaddress: reg_email,
168
+      contactname: userName[0],
169
+      phonenumber: "0",
170
+      branchid: "0",
171
+      tenantname: "Anwi Systems",
172
+      rolename: "Customer Admin",
173
+      currencyid: "0",
174
+      customerformuniqueid: "Bizgaze_Platform_Crm_RegisterCRMUser",
175
+    };
176
+    debugger;
177
+    $('#register_btn').hide()
178
+    $(".loader-btn").show();
179
+    debugger;
180
+    const res = await postAPIService(
181
+      `bizgaze/crm/webapi/registercrmuser`,
182
+      userRegistratioNPayload
183
+    );
184
+    console.log(res, "register");
185
+    $(".loader-btn").hide();
186
+    $('#register_btn').show()
187
+    if (res.data.code == "404" ) {
188
+      toasterOpts();
189
+      Command: toastr["error"](res.data.message)
190
+      return;
191
+    }
192
+     else {
193
+      $("#register_form .email-password-group").hide();
194
+      $("#register_form .register_otp.otp-input-group").show();
195
+    }
196
+  
197
+    $("#proceed").click(async function () {
198
+      let userEnterOtp = "";
199
+      let userEmail = registerForm.find("#User_Email").val();
200
+      $(".otp-input-group input").each(function () {
201
+        let presVal = $(this).val();
202
+        userEnterOtp += presVal;
203
+      });
204
+      console.log(userEnterOtp);
205
+      debugger;
206
+      const userotppayload = {
207
+        email: userEmail,
208
+        otpid: res.data.result.OtpId,
209
+        userotp: userEnterOtp,
210
+      };
211
+      $(".loader-btn").show();
212
+      $('#proceed').hide()
213
+      otpRes = await postAPIService(
214
+        `bizgaze/crm/webapi/ValidateOtp`,
215
+        userotppayload
216
+      );
217
+      $(".loader-btn").hide();
218
+      $('#proceed').show()
219
+      debugger;
220
+      console.log(otpRes, "otp");
221
+      const verifyotpStatus = otpRes.data.result;
222
+      if (verifyotpStatus == "Otp verified successfully") {
223
+        const loginPayload = {
224
+          username: reg_email,
225
+          Password: reg_pwd,
226
+          UnibaseId: "",
227
+          RememberMe: false,
228
+        };
229
+        const res = await postAPIService(
230
+          `bizgaze/crm/webapi/crmuserlogin`,
231
+          loginPayload
232
+        );
233
+        if (res.data.message == "200") {
234
+          debugger;
235
+          // Command: toastr["success"]("Logged in successfully")
236
+          // toasterOpts();
237
+          COOKIE_HELPER_ACTIONS.setCookie({
238
+            token: res.data.result.sessionId,
239
+            userid: res.data.result.userId,
240
+          });
241
+          // setInitLoginLocal();
242
+          window.localStorage.setItem("Useremail", userEmail);
243
+          //window.localStorage.setItem("Userpassword", userPassword);
244
+          window.localStorage.setItem("isaccountCreated", true);
245
+          window.location.href = `./index.html`;
246
+        } else {
247
+          toasterOpts();
248
+        Command: toastr["error"](res.data.message)
249
+        }       
250
+      } else {
251
+        toasterOpts();
252
+        Command: toastr["error"]("Please enter Valid OTP");
253
+      }
254
+    });
255
+  }
256
+
257
+  // to validate password on keyup in password input field
258
+  function passwordValidate(pswd) {
259
+    if (pswd.length < 8) {
260
+      $("#chck_length").removeClass("pswd_valid").addClass("pswd_invalid");
261
+    } else {
262
+      $("#chck_length").removeClass("pswd_invalid").addClass("pswd_valid");
263
+    }
264
+    // validate uppercase letter
265
+    if (pswd.match(/[A-Z]/)) {
266
+      $("#chck_capital").removeClass("pswd_invalid").addClass("pswd_valid");
267
+    } else {
268
+      $("#chck_capital").removeClass("pswd_valid").addClass("pswd_invalid");
269
+    }
270
+    //validate special letter
271
+    if (pswd.match(/[!@#$%^&*]/)) {
272
+      $("#chck_special").removeClass("pswd_invalid").addClass("pswd_valid");
273
+    } else {
274
+      $("#chck_special").removeClass("pswd_valid").addClass("pswd_invalid");
275
+    }
276
+    let pswdVal = $("#register_form #User_password").val();
277
+    let pattern = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/;
278
+    if (pswdVal.match(pattern)) {
279
+      $(".pswd_info").hide();
280
+    } else {
281
+      $(".pswd_info").show();
282
+    }
283
+    //validate number
284
+    if (pswd.match(/\d/)) {
285
+      $("#chck_number").removeClass("pswd_invalid").addClass("pswd_valid");
286
+    } else {
287
+      $("#chck_number").removeClass("pswd_valid").addClass("pswd_invalid");
288
+    }
289
+  }
290
+
291
+  //you have to use keyup, because keydown will not catch the currently entered value
292
+  $("#register_form #User_password")
293
+    .keyup(function () {
294
+      // set password variable
295
+      var pswd = $(this).val();
296
+      passwordValidate(pswd);
297
+    })
298
+    .focus(function () {
299
+      let pswdVal = $("#register_form #User_password").val();
300
+      let pattern = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{11,}$/;
301
+      if (pswdVal.match(pattern)) {
302
+        $(".pswd_info").hide();
303
+      } else {
304
+        $(".pswd_info").show();
305
+      }
306
+    })
307
+    .blur(function () {
308
+      $(".pswd_info").hide();
309
+    });
310
+
311
+  // function to validate user entered email
312
+  function validateEmail(userEmail) {
313
+    var pattern =
314
+      /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
315
+    return $.trim(userEmail).match(pattern) ? true : false;
316
+  }
317
+
318
+  // function to validate user entered password
319
+  function validatepassword(userPassword) {
320
+    var pattern = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{11,}$/;
321
+    return $.trim(userPassword).match(pattern) ? true : false;
322
+  }
323
+
324
+  registerForm.find("#User_Email,#User_password").keypress(function (e) {
325
+    if (e.which == 13) $("#register_btn").click();
326
+  });
327
+
328
+  // this will be triggered on clicking continue in signup form
329
+  $("#register_btn").click(function () {
330
+    registerForm.find(".loader-btn").show();
331
+    $(this).hide();
332
+    let userEmail = registerForm.find("#User_Email").val();
333
+    let userPassword = registerForm.find("#User_password").val();
334
+    let emailInput = registerForm.find(".email-login-inputgroup");
335
+    let passwordInput = registerForm.find(".password-login-inputgroup");
336
+    if (userEmail == "") {
337
+      emailInput.find("#User_Email").addClass("is-invalid");
338
+      emailInput.find(".form-floating").addClass("is-invalid");
339
+      emailInput.find(".invalid-feedback").text("Please enter your email");
340
+      registerForm.find(".loader-btn").hide();
341
+      $(this).show();
342
+    }
343
+    if (userPassword == "") {
344
+      passwordInput.find("#User_password").addClass("is-invalid");
345
+      passwordInput.find(".form-floating").addClass("is-invalid");
346
+      registerForm.find(".loader-btn").hide();
347
+      $(this).show();
348
+    } else {
349
+      emailInput.find("#User_Email").removeClass("is-invalid");
350
+      emailInput.find(".form-floating").removeClass("is-invalid");
351
+      passwordInput.find("#User_password").removeClass("is-invalid");
352
+      passwordInput.find(".form-floating").removeClass("is-invalid");
353
+      if (validateEmail(userEmail) && validatepassword(userPassword)) {
354
+        userRegistration();
355
+        $("#register_form .otp-input-group .otp-sent-email").text(userEmail);
356
+      } else {
357
+        emailInput.find("#User_Email").addClass("is-invalid");
358
+        emailInput.find(".form-floating").addClass("is-invalid");
359
+        emailInput.find(".invalid-feedback").text("Please enter a valid email");
360
+        registerForm.find(".loader-btn").hide();
361
+        $(this).show();
362
+      }
363
+    }
364
+  });
365
+  $(".pswd_eye").click(function(){
366
+    let eyeClass = $(this).find('svg').hasClass("fa-eye-slash");
367
+    if(eyeClass == true){
368
+         $(this).find('svg').removeClass("fa-eye-slash"); 
369
+        $(this).find('svg').addClass("fa-eye");
370
+        $(this).siblings('input').attr('type','password')
371
+      }else{
372
+        $(this).find('svg').removeClass("fa-eye");
373
+        $(this).find('svg').addClass("fa-eye-slash");  
374
+        $(this).siblings('input').attr('type','text')
375
+    }
376
+})
377
+  
378
+  $("#forgotPassword").click(function () {
379
+    $(".login-email-password-div").hide();
380
+    $(".login-forgot-password-div").show();
381
+  });
382
+  $("#forgot_Password_Back").click(function () {
383
+    $(".login-forgot-password-div").hide();
384
+    $(".login-email-password-div").show();
385
+  });
386
+  $("#forgot_password_submit").click(async function () {
387
+    let forgot_email = $("#forgot_User_Email").val();
388
+    if(forgot_email == ''){
389
+$('#forgot_User_Email').addClass('is-invalid')
390
+$('#forgot_User_Email').after(`<div class="invalid-feedback">Please enter Valid email</div>`);
391
+return
392
+    }
393
+    else{
394
+    debugger;
395
+  let port = "https://beta.bizgaze.app";
396
+   // let port = "http://localhost:3088";
397
+    let url = `${port}/account/getuserbyphoneormail/${forgot_email}/${forgot_email}`;
398
+    const config = {
399
+      url,
400
+      method: "get",
401
+    };
402
+    $(".loader-btn").show();
403
+    $('#forgot_password_submit').hide()
404
+    let response = await axios(config);
405
+    debugger;
406
+    console.log(response);
407
+    $(".loader-btn").hide();
408
+    $('#forgot_password_submit').show()
409
+    if (response.data.result != null) {
410
+      debugger;
411
+      console.log(response.data);
412
+      const forgotpassPayload = {
413
+        firstname: "",
414
+        lastname: "",
415
+        contactnumber: "",
416
+        email: "",
417
+        tenantname: "",
418
+        contactoremail: response.data.result.email,
419
+        IsSignup: false,
420
+        IsRegisterUser: false,
421
+        IsForgotPswd: true,
422
+        UnibaseId: response.data.result.userName,
423
+        OtpId: 0,
424
+        UserOtp: "",
425
+      };
426
+      $('#forgot_password_submit').hide()
427
+      $(".loader-btn").show();
428
+      const forgetpassRes = await postAPIService(
429
+        `account/sendotp`,
430
+        forgotpassPayload
431
+      );
432
+      $(".loader-btn").hide();
433
+      console.log(forgetpassRes);
434
+      $(".email-validation").hide();
435
+      $('.user_email').html(forgot_email)
436
+      $(".otp-validation .otp-input-group").show();
437
+      $(".otp-validation .otp-input-group").on("paste", function (p) {
438
+        let data = p.originalEvent.clipboardData.getData("text");
439
+        let dataLength = data.length;
440
+        for (let i = 0; i < dataLength; i++) {
441
+          let input = $(
442
+            '.otp-validation .otp-input-group input[tabindex="' + (i + 1) + '"]'
443
+          );
444
+          input.val(data.charAt(i));
445
+          if (input.val().length >= input.attr("maxlength")) {
446
+            let nextInput = $(
447
+              '.otp-validation .otp-input-group input[tabindex="' +
448
+                (i + 2) +
449
+                '"]'
450
+            );
451
+            if (nextInput) {
452
+              nextInput.focus();
453
+            }
454
+          }
455
+        }
456
+        p.preventDefault();
457
+      });
458
+
459
+      $('.otp-validation .otp-input-group input[type="text"]').on(
460
+        "keyup",
461
+        function (e) {
462
+          if ($(this).val().length >= $(this).attr("maxlength")) {
463
+            if (e.keyCode !== 9 && e.keyCode !== 16) {
464
+              let tabIndex = parseInt($(this).attr("tabindex")) + 1;
465
+              $(
466
+                '.otp-validation .otp-input-group input[tabindex="' +
467
+                  $(this).attr("tabindex") +
468
+                  '"]'
469
+              ).val($(this).val());
470
+              $(
471
+                '.otp-validation .otp-input-group input[tabindex="' +
472
+                  tabIndex +
473
+                  '"]'
474
+              ).focus();
475
+            }
476
+          } else {
477
+            if (e.keyCode === 8) {
478
+              let tabIndex = parseInt($(this).attr("tabindex")) - 1;
479
+              $(
480
+                '.otp-validation .otp-input-group input[tabindex="' +
481
+                  tabIndex +
482
+                  '"]'
483
+              ).focus();
484
+            }
485
+          }
486
+        }
487
+      );
488
+      $("#Forgot_pass_proceed").click(async function () {
489
+        debugger;
490
+        let userotp='';
491
+        $(".otp-validation .otp-input-group input").each(function () {
492
+          let presVal = $(this).val();
493
+          userotp += presVal;
494
+        });
495
+        console.log(userotp);
496
+          const validateForgotpass = {
497
+           email: forgot_email,
498
+            otpid: forgetpassRes.data,
499
+            userotp: userotp,
500
+          };
501
+          $('#Forgot_pass_proceed').hide()
502
+          $(".loader-btn").show();
503
+          const forgetpassResotp = await postAPIService(
504
+            `hyperfusion/validateotp`,
505
+            validateForgotpass
506
+         );
507
+         $(".loader-btn").hide();
508
+         $('#Forgot_pass_proceed').show()
509
+          console.log(forgetpassResotp);
510
+          const Resotp = forgetpassResotp.data.result;
511
+          if (Resotp == "Otp verified successfully") {
512
+            $(".login-forgot-password-details-div").show();
513
+        $(".otp-validation .otp-input-group").hide();
514
+          } else {
515
+      toasterOpts()
516
+            Command: toastr["error"]("Please enter Valid OTP");
517
+          }
518
+      });
519
+      $("#forgot_password_details_submit").click(async function () {
520
+        debugger;
521
+        let pswdone =$("#forgot-password-input-one").val();
522
+        let pswdtwo =$("#forgot-password-input-two").val();
523
+        if(pswdone == pswdtwo) {
524
+          const forgotpassPayload = {
525
+            username: response.data.result.userName,
526
+            password: pswdtwo,
527
+          };
528
+          $("#forgot_password_details_submit").hide();
529
+          $(".loader-btn").show();
530
+          const forgetpassRes = await postAPIService(
531
+            `account/UpdatePassword`,
532
+            forgotpassPayload
533
+          );
534
+          console.log(forgetpassRes);
535
+          $(".loader-btn").hide();
536
+          $("#forgot_password_details_submit").show();
537
+          window.localStorage.setItem('Ispasswordupdate',true)
538
+          window.location.href = `./myaccount.html`;
539
+        }else {
540
+          $("#forgot-password-input-one").addClass('is-invalid');
541
+          $("#forgot-password-input-two").addClass('is-invalid')
542
+          $('.password_display').text('Passwords are not matched !').addClass('text-danger')
543
+        }
544
+     
545
+      
546
+      });
547
+    } 
548
+    else{
549
+      $('#forgot_User_Email').addClass('is-invalid');
550
+      $('#forgot_User_Email').after(`<div class="invalid-feedback">Please enter Valid email</div>`);
551
+   
552
+    }
553
+  }
554
+  });
555
+  $(".user_pass")
556
+  .keyup(function () {
557
+    // set password variable
558
+    var pswd = $(this).val();
559
+    passwordValidate(pswd);
560
+    $('.pswd_info').hide();
561
+    $(this).parent().siblings('.pswd_info').show();
562
+  })
563
+  .focus(function () {
564
+    let pswdVal = $(this).val();
565
+    let pattern = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9]).{8,}$/;
566
+    if (pswdVal.match(pattern)) {
567
+      $(this).parent().siblings('.pswd_info').hide();
568
+    } else {
569
+      $(this).parent().siblings('.pswd_info').show();
570
+    }
571
+  })
572
+  .blur(function () {
573
+    $(this).parent().siblings('.pswd_info').hide();
574
+  });
575
+
576
+  function toasterOpts(){
577
+    toastr.options = {
578
+      "closeButton": true,
579
+      "debug": false,
580
+      "newestOnTop": true,
581
+      "progressBar": true,
582
+      "positionClass": "toast-top-center",
583
+      "preventDuplicates": true,
584
+      "onclick": null,
585
+      "showDuration": "300",
586
+      "hideDuration": "1000",
587
+      "timeOut": "5000",
588
+      "extendedTimeOut": "1000",
589
+      "showEasing": "swing",
590
+      "hideEasing": "linear",
591
+      "showMethod": "fadeIn",
592
+      "hideMethod": "fadeOut"
593
+    }
594
+  }
6 595
 }
7 596
 
8
-authFunction();
597
+initLogin();

+ 1
- 1
dist/Js/footer.js Parādīt failu

@@ -218,7 +218,7 @@ $(document).ready(function () {
218 218
   </div>
219 219
     <div class="footer-main-container d-none d-sm-block ">
220 220
         <div class="footer-logo py-3
221
-                container"> <img src="./dist/assets/imgs/anwi-logo-2.png" class="img-fluid "  alt="anwi"> </div>
221
+                container"> <img src="../dist/assets/imgs/anwi-logo-2.png" class="img-fluid "  alt="anwi"> </div>
222 222
         <hr class="container-fluid
223 223
                 text-white">
224 224
         <div class="footer-content-main-container">

+ 9
- 9
dist/Js/navbar.js Parādīt failu

@@ -6,8 +6,8 @@ let nav_html = `
6 6
                         <div class="header-bottom-flex">
7 7
                             <div class="logo-menu-wrap d-flex">
8 8
                                 <div class="logo">
9
-                                    <a href="index.html">
10
-                                        <img src="./dist/assets/imgs/anwi-logo-1.png" alt="logo" class="w-50">
9
+                                    <a href="../index.html">
10
+                                        <img src="../dist/assets/imgs/anwi-logo-1.png" alt="logo" class="w-50">
11 11
                                     </a>
12 12
                                 </div>
13 13
                                 <div class="main-menu menu-lh-1 main-menu-padding-1">
@@ -26,7 +26,7 @@ let nav_html = `
26 26
                             </div>
27 27
                             <div class="header-action-wrap header-action-flex header-action-width header-action-mrg-1">
28 28
                                 <div class="same-style">
29
-                                    <a href="#"><i class="fa-solid fa-user"></i></a>
29
+                                <a href="./myaccount.html" class="my_avatar"><i class="fa-solid fa-user"></i></a>
30 30
                                 </div>
31 31
                                 <div class="same-style header-cart">
32 32
                                     <a class="cart-active1" href="#"><i class="fa-solid fa-cart-shopping"></i></a>
@@ -49,8 +49,8 @@ let nav_html = `
49 49
                                     </button>
50 50
                                 </div>
51 51
                                 <div class="mobile-logo mobile-logo-width ps-3">
52
-                                    <a href="index.html">
53
-                                        <img alt="" src="./dist/assets/imgs/anwi-logo-1.png" class="w-50">
52
+                                    <a href="../index.html">
53
+                                        <img alt="" src="../dist/assets/imgs/anwi-logo-1.png" class="w-50">
54 54
                                     </a>
55 55
                                 </div>
56 56
                             </div>
@@ -58,7 +58,7 @@ let nav_html = `
58 58
                         <div class="col-6">
59 59
                             <div class="header-action-wrap header-action-flex header-action-mrg-1">
60 60
                                 <div class="same-style">
61
-                                    <a href="#"><i class="fa-solid fa-user"></i></a>
61
+                                <a href="./myaccount.html" class="my_avatar"><i class="fa-solid fa-user"></i></a>
62 62
                                 </div>
63 63
                                 <div class="same-style header-cart">
64 64
                                     <a class="cart-active1" href="#"><i class="fa-solid fa-cart-shopping"></i></a>
@@ -75,8 +75,8 @@ let nav_html = `
75 75
             <div class="row pb-2 border-bottom">
76 76
                 <div class="col-6">
77 77
                     <div class="mobile-logo mobile-logo-width">
78
-                        <a href="index.html">
79
-                            <img alt="" src="./dist/assets/imgs/anwi-logo-1.png" class="w-75">
78
+                        <a href="../index.html">
79
+                            <img alt="" src="../dist/assets/imgs/anwi-logo-1.png" class="w-75">
80 80
                         </a>
81 81
                     </div>
82 82
                 </div>
@@ -135,7 +135,7 @@ $(".menu-negative-mrg2,.menu-negative-mrg3,.menu-negative-mrg4").css("width",wid
135 135
    $(".header-area").removeClass("bg-white");
136 136
    $(".main-menu").find("nav ul li a").addClass("text-white");
137 137
    $(".header-bottom.sticky-bar").removeClass("sticky-bar");
138
-   let src =`./dist/assets/imgs/anwi-logo-2.png`;
138
+   let src =`../dist/assets/imgs/anwi-logo-2.png`;
139 139
     $(".logo-menu-wrap").find("a img").attr("src",src);
140 140
     $(".main-body").find("iframe").attr("width",width);
141 141
     if (width <= 575 && width >= 390) {

+ 73
- 2
dist/css/main.css Parādīt failu

@@ -719,7 +719,10 @@ span.transform_fyro_text {
719 719
     border-left: 0px !important;
720 720
     border-bottom: 1px solid #0A1039 !important;
721 721
 }
722
-#get_otp,#proceed{
722
+#Login_btn,
723
+#register_btn,
724
+#proceed,
725
+#forgot_password_submit {
723 726
     border: none;
724 727
     background-color: #0A1039;
725 728
     text-transform: uppercase;
@@ -1524,4 +1527,72 @@ display: none;
1524 1527
   }
1525 1528
 }
1526 1529
   
1527
-/* end new styles */
1530
+/* end new styles */
1531
+
1532
+/* login verifiacation */
1533
+/* Styles for verification */
1534
+.pswd_info {
1535
+    position: absolute;
1536
+    top: 100%;
1537
+    width: 250px;
1538
+    padding: 10px;
1539
+    background: #fefefe;
1540
+    font-size: .7rem;
1541
+    border-radius: 5px;
1542
+    box-shadow: 0 1px 3px #ccc;
1543
+    border: 1px solid #ddd;
1544
+    display: none;
1545
+}
1546
+
1547
+.pswd_info::before {
1548
+    content: "\25B2";
1549
+    position: absolute;
1550
+    top: -12px;
1551
+    left: 45%;
1552
+    font-size: 14px;
1553
+    line-height: 14px;
1554
+    color: #ddd;
1555
+    text-shadow: none;
1556
+    display: block;
1557
+}
1558
+
1559
+.pswd_invalid {
1560
+    background: url(images/invalid.png) no-repeat 0 50%;
1561
+    padding-left: 22px;
1562
+    line-height: 24px;
1563
+    color: #ec3f41;
1564
+}
1565
+
1566
+.pswd_valid {
1567
+    background: url(images/valid.png) no-repeat 0 50%;
1568
+    padding-left: 22px;
1569
+    line-height: 24px;
1570
+    color: #3a7d34;
1571
+}
1572
+
1573
+#toast-container > div{
1574
+    opacity: 1 !important;
1575
+    color: #000 !important;
1576
+    margin-top: 20px !important;
1577
+}
1578
+/* .toast-close-button{
1579
+    color:#000 !important;
1580
+}
1581
+.toast-success{
1582
+    background: #fff !important;
1583
+}
1584
+.toast-error{
1585
+    background: #fff !important;
1586
+} */
1587
+.h-50p {
1588
+    height: 50px !important;
1589
+}
1590
+.warranty_row{
1591
+    background: url(../assets/imgs/allin_imgs/desktop_bg.png);
1592
+    background-size: cover;
1593
+    background-position: center center;
1594
+}
1595
+.warranty-card .card{
1596
+    background: rgb(22,62,96);
1597
+background: linear-gradient(75deg, rgb(56 89 118) 51%, rgb(107 18 111) 89%)
1598
+}

+ 83
- 0
dist/css/style.css Parādīt failu

@@ -31618,4 +31618,87 @@ h4.checkout-title::before {
31618 31618
 .sticky-bar{
31619 31619
   border-bottom: 1px solid #f9f9f9 !important;
31620 31620
   box-shadow: 0 3px 6px 0 rgba(0,0,0,.2) !important;
31621
+}
31622
+
31623
+.order_details_btn {
31624
+  width: 180px;
31625
+  height: 30px;
31626
+}
31627
+
31628
+
31629
+/* added by rahul  */
31630
+.authBox .form-floating label {
31631
+  /* height: 58px; */
31632
+}
31633
+
31634
+.loginContainer .form-floating label {
31635
+  padding: 0.75rem 0.75rem;
31636
+}
31637
+
31638
+/* otp box input css goes here */
31639
+.otp-input-group .col {
31640
+  margin: 0px 5px;
31641
+}
31642
+
31643
+.otp-input-group .col input {
31644
+  text-align: center;
31645
+}
31646
+
31647
+.bg-gradient-anwi {
31648
+  background: linear-gradient(112.1deg, rgb(63, 76, 119) -14.8%, rgb(32, 38, 57) 100.4%);
31649
+}
31650
+
31651
+.loginContainer .nav-pills .nav-link.active {
31652
+  background: linear-gradient(112.1deg, rgb(63, 76, 119) -14.8%, rgb(32, 38, 57) 100.4%) !important;
31653
+  color: #fff;
31654
+}
31655
+
31656
+.loginContainer .nav-pills .nav-link {
31657
+  color: #272e47;
31658
+  font-weight: 500;
31659
+}
31660
+
31661
+/* login loader css  */
31662
+.loader-btn {
31663
+  position: relative;
31664
+  display: inline-block;
31665
+  padding: 12px 24px;
31666
+  border-radius: 4px;
31667
+  border: none;
31668
+  background-color: #4CAF50;
31669
+  color: #fff;
31670
+  font-size: 18px;
31671
+  text-align: center;
31672
+  cursor: pointer;
31673
+  transition: background-color 0.3s ease;
31674
+  height: 38px;
31675
+}
31676
+
31677
+.loader-btn .loader {
31678
+  position: absolute;
31679
+  top: 25%;
31680
+  left: 48%;
31681
+  /* transform: translate(-50%, -50%); */
31682
+  width: 20px;
31683
+  height: 20px;
31684
+  border-radius: 50%;
31685
+  border: 2px solid #fff;
31686
+  border-top-color: #000;
31687
+  animation: loader-rotate 0.8s linear infinite;
31688
+  /* opacity: 0; */
31689
+  transition: opacity 0.3s ease;
31690
+}
31691
+
31692
+.loader-btn.loading .loader {
31693
+  opacity: 1;
31694
+}
31695
+
31696
+.loader-btn .btn-text {
31697
+  z-index: 1;
31698
+}
31699
+
31700
+@keyframes loader-rotate {
31701
+  to {
31702
+    transform: rotate(360deg);
31703
+  }
31621 31704
 }

+ 24
- 20
dist/toaster/toastr.css Parādīt failu

@@ -20,9 +20,9 @@
20 20
   float: right;
21 21
   font-size: 20px;
22 22
   font-weight: bold;
23
-  color: #FFFFFF;
24
-  -webkit-text-shadow: 0 1px 0 #ffffff;
25
-  text-shadow: 0 1px 0 #ffffff;
23
+  color: #000000;
24
+  -webkit-text-shadow: 0 1px 0 #000000;
25
+  text-shadow: 0 1px 0 #000000;
26 26
   opacity: 0.8;
27 27
   -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
28 28
   filter: alpha(opacity=80);
@@ -111,13 +111,13 @@ button.toast-close-button {
111 111
   border-radius: 3px 3px 3px 3px;
112 112
   background-position: 15px center;
113 113
   background-repeat: no-repeat;
114
-  -moz-box-shadow: 0 0 12px #999999;
115
-  -webkit-box-shadow: 0 0 12px #999999;
116
-  box-shadow: 0 0 12px #999999;
114
+  -moz-box-shadow:0 0.313rem 1.563rem rgba(0,0,0,.1);
115
+  -webkit-box-shadow: 0 0.313rem 1.563rem rgba(0,0,0,.1);
116
+  border-radius: 0.25em;
117
+  box-shadow: 0 0.313rem 1.563rem rgba(0,0,0,.1);
117 118
   color: #FFFFFF;
118
-  opacity: 0.8;
119
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
120
-  filter: alpha(opacity=80);
119
+  transition: transform 300ms ease-in-out;
120
+
121 121
 }
122 122
 #toast-container > div.rtl {
123 123
   direction: rtl;
@@ -125,9 +125,9 @@ button.toast-close-button {
125 125
   background-position: right 15px center;
126 126
 }
127 127
 #toast-container > div:hover {
128
-  -moz-box-shadow: 0 0 12px #000000;
129
-  -webkit-box-shadow: 0 0 12px #000000;
130
-  box-shadow: 0 0 12px #000000;
128
+  -moz-box-shadow:0 0.313rem 1.563rem rgba(0,0,0,.1);
129
+  -webkit-box-shadow: 0 0.313rem 1.563rem rgba(0,0,0,.1);
130
+  box-shadow:0 0.313rem 1.563rem rgba(0,0,0,.1);
131 131
   opacity: 1;
132 132
   -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
133 133
   filter: alpha(opacity=100);
@@ -137,10 +137,10 @@ button.toast-close-button {
137 137
   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
138 138
 }
139 139
 #toast-container > .toast-error {
140
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
140
+  background-image: url("../assets/imgs/remove.png") !important;
141 141
 }
142 142
 #toast-container > .toast-success {
143
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
143
+  background-image: url("../assets/imgs/checked.png") !important;
144 144
 }
145 145
 #toast-container > .toast-warning {
146 146
   background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
@@ -161,10 +161,12 @@ button.toast-close-button {
161 161
   background-color: #030303;
162 162
 }
163 163
 .toast-success {
164
-  background-color: #51A351;
164
+  background-color: #ffffff;
165
+  font-weight: 500;
165 166
 }
166 167
 .toast-error {
167
-  background-color: #BD362F;
168
+  background-color: #ffffff;
169
+  font-weight: 500;
168 170
 }
169 171
 .toast-info {
170 172
   background-color: #2F96B4;
@@ -177,10 +179,12 @@ button.toast-close-button {
177 179
   left: 0;
178 180
   bottom: 0;
179 181
   height: 4px;
180
-  background-color: #000000;
181
-  opacity: 0.4;
182
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
183
-  filter: alpha(opacity=40);
182
+}
183
+.toast-error .toast-progress {
184
+  background-color: #FF3055;
185
+}
186
+.toast-success .toast-progress {
187
+  background-color: #32BEA6;
184 188
 }
185 189
 /*Responsive Design*/
186 190
 @media all and (max-width: 240px) {

+ 38
- 0
index.html Parādīt failu

@@ -29,6 +29,7 @@
29 29
     <link rel="stylesheet" href="./dist/css/style.css">
30 30
     <link rel="stylesheet" href="./dist/css/fontawesome.all.min.css">
31 31
     <link rel="stylesheet" href="./dist/css/fontawesome.min.css">
32
+    <link rel="stylesheet" href="./dist/toaster/toastr.css" />
32 33
 
33 34
     <title>Anwi</title>
34 35
     <style>
@@ -366,6 +367,8 @@
366 367
     <script src="./dist/js/axios.min.js"></script>
367 368
     <script src="./dist/js/footer.js"></script>
368 369
     <script src="./dist/js/cookies.min.js"></script>
370
+    <script src="./dist/js/auth/apiservice.js"></script>
371
+    <script src="./dist/toaster/toastr.js"></script>
369 372
     <script src="./dist/js/fontawesome.all.js"></script>
370 373
     <script src="./dist/js/fontawesome.min.js"></script>
371 374
     <script src="./dist/js/vendor/modernizr-3.11.7.min.js"></script>
@@ -386,6 +389,41 @@
386 389
 
387 390
 
388 391
     <script>
392
+            $(document).ready(function() {
393
+        let Newuser =window.localStorage.getItem('isaccountCreated');
394
+        let Loginstatus =window.localStorage.getItem('Isloggedintoaster')
395
+        if(Newuser == 'true'){
396
+            toasteropts()
397
+            Command: toastr["success"]("Account Created Successfully");
398
+            window.localStorage.removeItem('isaccountCreated')
399
+            return
400
+        }
401
+        if(Loginstatus == 'true'){
402
+            toasteropts()
403
+            Command: toastr["success"]("Logged In Successfully");
404
+            window.localStorage.removeItem('Isloggedintoaster')
405
+            return
406
+        }
407
+    function toasteropts(){
408
+       toastr.options = {
409
+      "closeButton": true,
410
+      "debug": false,
411
+      "newestOnTop": true,
412
+      "progressBar": true,
413
+      "positionClass": "toast-top-center",
414
+      "preventDuplicates": true,
415
+      "onclick": null,
416
+      "showDuration": "300",
417
+      "hideDuration": "1000",
418
+      "timeOut": "5000",
419
+      "extendedTimeOut": "1000",
420
+      "showEasing": "swing",
421
+      "hideEasing": "linear",
422
+      "showMethod": "fadeIn",
423
+      "hideMethod": "fadeOut"
424
+    }
425
+    }
426
+});
389 427
 
390 428
         $(".slick-prev").addClass("btn text-white");
391 429
         $(".slick-next").addClass("btn text-white");

+ 445
- 131
login.html Parādīt failu

@@ -5,34 +5,33 @@
5 5
     <meta charset="UTF-8" />
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7 7
     <meta http-equiv="X-UA-Compatible" content="ie=edge" />
8
-    <link rel="shortcut icon" type="image/x-icon" href="./dist/assets/imgs/favicon.gif">
8
+
9 9
     <link rel="stylesheet" href="./libs/bootstrap/css/bootstrap.min.css" />
10 10
     <link rel="stylesheet" href="./dist/css/main.css" />
11
-    <link rel="stylesheet" href="./styles/style.css">
12
-    <link rel="stylesheet" href="./style.css">
13
-    <link rel="stylesheet" href="./libs/owlcarousel/Css/owl.carousel.min.css">
14
-    <link rel="stylesheet" href="./libs/owlcarousel/Css/owl.theme.default.min.css">
15
-    <link rel="stylesheet" href="./dist/css/login.css">
16
-
17
-
18
-    
19
-
20
-    <link rel="stylesheet" href="./dist/css/vendor/bootstrap.min.css">
21
-    <link rel="stylesheet" href="./dist/css/vendor/bootstrap.min.css">
22
-    <link rel="stylesheet" href="./dist/css/vendor/vandella.css">
23
-    <link rel="stylesheet" href="./dist/css/vendor/jellybelly.css">
24
-    <!-- <link rel="stylesheet" href="./dist/css/vendor/icofont.min.css"> -->
25
-    <link rel="stylesheet" href="./dist/css/vendor/fontello.css">
26
-    <link rel="stylesheet" href="./dist/css/plugins/easyzoom.css">
27
-    <link rel="stylesheet" href="./dist/css/plugins/slick.css">
28
-    <link rel="stylesheet" href="./dist/css/plugins/nice-select.css">
29
-    <link rel="stylesheet" href="./dist/css/plugins/animate.css">
30
-    <link rel="stylesheet" href="./dist/css/plugins/magnific-popup.css">
31
-    <link rel="stylesheet" href="./dist/css/plugins/jquery-ui.css">
32
-    <link rel="stylesheet" href="./dist/css/style.css">
33
-    <link rel="stylesheet" href="./dist/css/fontawesome.all.min.css">
34
-    <link rel="stylesheet" href="./dist/css/fontawesome.min.css">
35
-    <title>Login | Anwi</title>
11
+    <link rel="stylesheet" href="./styles/style.css" />
12
+    <link rel="stylesheet" href="./style.css" />
13
+    <link rel="stylesheet" href="./libs/owlcarousel/Css/owl.carousel.min.css" />
14
+    <link rel="stylesheet" href="./libs/owlcarousel/Css/owl.theme.default.min.css" />
15
+    <link rel="stylesheet" href="./dist/css/login.css" />
16
+
17
+    <link rel="stylesheet" href="./dist/css/vendor/bootstrap.min.css" />
18
+    <link rel="stylesheet" href="./dist/css/vendor/bootstrap.min.css" />
19
+    <link rel="stylesheet" href="./dist/css/vendor/vandella.css" />
20
+    <link rel="stylesheet" href="./dist/css/vendor/jellybelly.css" />
21
+    <link rel="stylesheet" href="./dist/css/vendor/fontello.css" />
22
+    <link rel="stylesheet" href="./dist/css/plugins/easyzoom.css" />
23
+    <link rel="stylesheet" href="./dist/css/plugins/slick.css" />
24
+    <link rel="stylesheet" href="./dist/css/plugins/nice-select.css" />
25
+    <link rel="stylesheet" href="./dist/css/plugins/animate.css" />
26
+    <link rel="stylesheet" href="./dist/css/plugins/magnific-popup.css" />
27
+    <link rel="stylesheet" href="./dist/css/plugins/jquery-ui.css" />
28
+    <link rel="stylesheet" href="./dist/css/style.css" />
29
+    <link rel="stylesheet" href="./dist/css/fontawesome.all.css" />
30
+    <!-- <link rel="stylesheet" href="./dist/css/fontawesome.min.css" /> -->
31
+    <!-- <link rel="stylesheet" href="./libs/toaster/toastr.js" /> -->
32
+    <link rel="stylesheet" href="./dist/toaster/toastr.css" />
33
+    <title>Anwi</title>
34
+
36 35
     <style>
37 36
         html {
38 37
             height: 100%;
@@ -48,65 +47,432 @@
48 47
     <!-- navbar -->
49 48
     <div id="navbar-head" class="bg-white"></div>
50 49
     <!-- end-navbar -->
51
-
52 50
     <!-- main-body -->
53
-
54 51
     <section class="mainLogin h-100 mt-0 myaccount-content p-0">
55
-        <div class="loginContainer mainLogin bg-gradient-anwi mt-0 pt-md-5 h-100 satoshi_font">
56
-            <div class="container pt-5">
52
+        <div
53
+            class="loginContainer mainLogin bg-gradient-violet mt-0 pt-md-5 h-100 satoshi_font d-flex align-items-center">
54
+            <div class="container">
55
+                <div class="spinner d-flex justify-content-center align-items-center">
56
+                    <div class="spinner-border d-none" role="status">
57
+                        <span class="visually-hidden">Loading...</span>
58
+                    </div>
59
+                </div>
57 60
                 <div class="row justify-content-center">
58
-                 <div class="col-md-5 col-12 pt-5">
59
-                    <form class="authBox bg-white pb-md-2 mx-auto account-details-form rounded-3">
60
-                        <div class="formContanerAuth ">
61
-                            <div>
62
-                                <span class="authHeading satoshi_font text-theme-color fs-4">Login</span>
63
-                                <!-- <span class="satoshi_font">or</span> <span class="satoshi_font authHeading text-theme-color">Signup</span> -->
64
-                            </div>
65
-                            <div class="space-login"></div>
66
-                            <div>
67
-                                <label class="text-danger fs-9 d-none" id="not_valid">Please Enter a valid Number</label>
68
-                                <label class="text-danger fs-9 d-none" id="empt_num">Number should not be empty!</label>
69
-                                <label class="text-danger fs-9 d-none pb-1" id="otp_valid">OTP Should not be Empty!</label>
70
-                                <label for="user_number" class="required user_number">Mobile / Email</label>
71
-                                <input type="text" class="form-control shadow-none border-bottom-theme rounded-0" maxlength="10" autocomplete="off" id="user_number" pattern="/^-?\d+\.?\d*$/" onKeyPress="if(this.value.length==10) return false;">
72
-                            </div>
73
-                            <div class="otp-form d-flex justify-content-between d-none pb-2">
74
-                                <!-- <input type="text" class="form-input form-control users_otp" id="users_otp" placeholder="Please Enter your Otp"/> -->
75
-                                <input id="users_otp1" type="password" maxlength="1" tabindex="1" autocomplete="off" name="user-otp" class="form-control shadow-none w-25 me-2"/>
76
-                                <input id="users_otp2" type="password" maxlength="1" tabindex="2" autocomplete="off" name="user-otp" class="form-control shadow-none w-25 me-2"/>
77
-                                <input id="users_otp3" type="password" maxlength="1" tabindex="3" autocomplete="off" name="user-otp" class="form-control shadow-none w-25 me-2"/>
78
-                                <input id="users_otp4" type="password" maxlength="1" tabindex="4" autocomplete="off" name="user-otp" class="form-control shadow-none w-25 me-2"/>
61
+                    <div>
62
+                        <div class="bg-white rounded-3 authBox mx-auto p-5">
63
+                            <div class="text-warning fs-9 fw-500 error-div" style="display: none;">
64
+                                <svg class="svg-inline--fa fa-arrow-circle-o-left font-30 pb-1" aria-hidden="true"
65
+                                    focusable="false" data-prefix="fas" data-icon="arrow-circle-o-left" role="img"
66
+                                    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg="">
67
+                                    <g class="missing">
68
+                                        <path fill="currentColor"
69
+                                            d="M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z">
70
+                                        </path>
71
+                                        <circle fill="currentColor" cx="256" cy="364" r="28">
72
+                                            <animate attributeType="XML" repeatCount="indefinite" dur="2s"
73
+                                                attributeName="r" values="28;14;28;28;14;28;"></animate>
74
+                                            <animate attributeType="XML" repeatCount="indefinite" dur="2s"
75
+                                                attributeName="opacity" values="1;0;1;1;0;1;"></animate>
76
+                                        </circle>
77
+                                        <path fill="currentColor" opacity="1"
78
+                                            d="M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z">
79
+                                            <animate attributeType="XML" repeatCount="indefinite" dur="2s"
80
+                                                attributeName="opacity" values="1;0;0;0;0;1;"></animate>
81
+                                        </path>
82
+                                        <path fill="currentColor" opacity="0"
83
+                                            d="M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z">
84
+                                            <animate attributeType="XML" repeatCount="indefinite" dur="2s"
85
+                                                attributeName="opacity" values="0;0;1;1;0;0;"></animate>
86
+                                        </path>
87
+                                    </g>
88
+                                </svg>
79 89
                             </div>
80
-                            <div class="otp_text d-none">
81
-                                <p class="mb-0">Please enter your OTP</p>
82
-                            </div>
83
-                            <div class="space-login"></div>
84
-        
85
-                            <div class="satoshi_font">
86
-                                <div class="text-center">
87
-                                   By continuing, I agree to the
88
-                                    <a href="#" class="text-theme-color text-decoration-underline fs-9">Terms of Use</a> &amp;
89
-                                    <a href="#" class="text-theme-color text-decoration-underline fs-9">Privacy Policy</a>
90
+                            <ul class="nav nav-pills mb-3 justify-content-center border rounded-3" id="pills-tab"
91
+                                role="tablist">
92
+                                <li class="nav-item w-50" role="presentation">
93
+                                    <button class="nav-link active w-100" id="pills-login-tab" data-bs-toggle="pill"
94
+                                        data-bs-target="#pills-login" type="button" role="tab"
95
+                                        aria-controls="pills-login" aria-selected="true">Login</button>
96
+                                </li>
97
+                                <li class="nav-item w-50" role="presentation">
98
+                                    <button class="nav-link w-100" id="pills-registration-tab" data-bs-toggle="pill"
99
+                                        data-bs-target="#pills-registration" type="button" role="tab"
100
+                                        aria-controls="pills-registration" aria-selected="false">Signup</button>
101
+                                </li>
102
+                            </ul>
103
+                            <div class="tab-content" id="pills-tabContent">
104
+                                <div class="tab-pane fade show active" id="pills-login" role="tabpanel"
105
+                                    aria-labelledby="pills-login-tab" tabindex="0">
106
+                                    <form id="login_form">
107
+                                        <div class="login-email-password-div">
108
+                                            <div class="input-group has-validation email-login-inputgroup">
109
+                                                <div class="form-floating py-0">
110
+                                                    <input type="email" class="form-control shadow-none h-50p"
111
+                                                        id="User_Email" placeholder="Enter Your Email"
112
+                                                        autocomplete="off">
113
+                                                    <label for="User_Email">Email address</label>
114
+                                                </div>
115
+                                                <div class="invalid-feedback">
116
+                                                    Please enter your email.
117
+                                                </div>
118
+                                            </div>
119
+                                            <div class="input-group has-validation mt-3 password-login-inputgroup">
120
+                                                <div class="form-floating py-0" id="password-input-div">
121
+                                                    <input type="password" class="form-control shadow-none h-50p"
122
+                                                        id="User_password" placeholder="Password"
123
+                                                        autocomplete="no password">
124
+                                                    <label for="User_password">Password</label>
125
+                                                </div>
126
+                                                <div class="invalid-feedback">
127
+                                                    Please enter your password.
128
+                                                </div>
129
+                                            </div>
130
+                                            <div class="mt-1">
131
+                                                <a href="#" class="text-theme-color fs-9 fw-500"
132
+                                                    id="forgotPassword">Forgot password?</a>
133
+                                            </div>
134
+                                            <div class="fs-7 mt-2 satoshi_font">
135
+                                                By continuing, I agree to the
136
+                                                <a href="#"
137
+                                                    class="text-theme-color text-decoration-underline fs-7 fw-600">Terms
138
+                                                    of
139
+                                                    Use</a>
140
+                                                &amp;
141
+                                                <a href="#"
142
+                                                    class="text-theme-color text-decoration-underline fs-7 fw-600">Privacy
143
+                                                    Policy</a>
144
+                                            </div>
145
+                                            <div class="mt-3 ">
146
+                                                <div>
147
+                                                    <div class="btn bg-gradient-anwi w-100 loader-btn"
148
+                                                        style="display: none;">
149
+                                                        <span class="loader"></span>
150
+                                                    </div>
151
+                                                    <a href="#" class="btn bg-gradient-anwi w-100 fw-500" id="Login_btn"
152
+                                                        type="submit">Login</a>
153
+                                                </div>
154
+                                            </div>
155
+                                        </div>
156
+                                        <div class="login-forgot-password-div" style="display:none">
157
+                                            <div
158
+                                                class="font-16 d-flex justify-content-end font-w600 text-darkgrey w-100 backtologin">
159
+                                                <!-- <span>Forgot Password?</span> -->
160
+                                                <a href="./login.html" class="" id="forgot_Password_Back"><span
161
+                                                        class=" cursor-pointer text-center d-flex align-items-center"><i
162
+                                                            class="fa-solid fa-arrow-left"></i></span></a>
163
+                                            </div>
164
+                                            <div class="email-validation">
165
+                                                <div class="font-14 w-100">Please enter your email address.
166
+                                                </div>
167
+                                                <div class="input-group has-validation forgot-password-inputgroup">
168
+                                                    <div class="form-floating py-0">
169
+                                                        <input type="email" class="form-control shadow-none h-50p"
170
+                                                            id="forgot_User_Email" placeholder="Enter Your Email"
171
+                                                            autocomplete="off">
172
+                                                        <label for="forgot_User_Email">Email address</label>
173
+                                                    </div>
174
+                                                    <div class="invalid-feedback">
175
+                                                        Please enter your email.
176
+                                                    </div>
177
+                                                </div>
178
+                                                <div class="mt-3">
179
+                                                    <div>
180
+                                                        <div class="btn bg-gradient-anwi w-100 loader-btn"
181
+                                                            style="display: none;">
182
+                                                            <span class="loader"></span>
183
+                                                        </div>
184
+                                                        <a href="#" class="btn bg-gradient-anwi w-100 text-white fw-500"
185
+                                                            id="forgot_password_submit" type="submit">Submit</a>
186
+                                                    </div>
187
+                                                </div>
188
+                                            </div>
189
+                                            <div class="otp-validation">
190
+                                                <div class="otp-input-group mt-3" style="display: none;">
191
+                                                    <div>
192
+                                                        <h4 class="text-center">Enter OTP</h4>
193
+                                                        <div class="text-center">we have sent an OTP to this Email
194
+                                                        </div>
195
+                                                        <p class="user_email text-center"></p>
196
+                                                        <div class="otp-sent-email fw-600 text-center"></div>
197
+                                                    </div>
198
+                                                    <div class="d-flex my-4">
199
+                                                        <div class="col">
200
+                                                            <div class="form-group">
201
+                                                                <input type="text" class="press form-control"
202
+                                                                    name="code" maxlength="1" tabindex="1"
203
+                                                                    autocomplete="off">
204
+                                                            </div>
205
+                                                        </div>
206
+
207
+                                                        <div class="col">
208
+                                                            <div class="form-group">
209
+                                                                <input type="text" class="press form-control"
210
+                                                                    name="code" maxlength="1" tabindex="2"
211
+                                                                    autocomplete="off">
212
+                                                            </div>
213
+                                                        </div>
214
+
215
+                                                        <div class="col">
216
+                                                            <div class="form-group">
217
+                                                                <input type="text" class="press form-control"
218
+                                                                    name="code" maxlength="1" tabindex="3"
219
+                                                                    autocomplete="off">
220
+                                                            </div>
221
+                                                        </div>
222
+
223
+                                                        <div class="col">
224
+                                                            <div class="form-group">
225
+                                                                <input type="text" class="press form-control"
226
+                                                                    name="code" maxlength="1" tabindex="4"
227
+                                                                    autocomplete="off">
228
+                                                            </div>
229
+                                                        </div>
230
+
231
+                                                        <div class="col">
232
+                                                            <div class="form-group">
233
+                                                                <input type="text" class="press form-control"
234
+                                                                    name="code" maxlength="1" tabindex="5"
235
+                                                                    autocomplete="off">
236
+                                                            </div>
237
+                                                        </div>
238
+
239
+                                                        <div class="col">
240
+                                                            <div class="form-group">
241
+                                                                <input type="text" class="press form-control"
242
+                                                                    name="code" maxlength="1" tabindex="6"
243
+                                                                    autocomplete="off">
244
+                                                            </div>
245
+                                                        </div>
246
+                                                    </div>
247
+                                                    <div>
248
+                                                        <div class="btn bg-gradient-anwi w-100 loader-btn"
249
+                                                            style="display: none;">
250
+                                                            <span class="loader"></span>
251
+                                                        </div>
252
+                                                        <a href="#" class="bg-gradient-anwi btn fw-500 text-white w-100"
253
+                                                            id="Forgot_pass_proceed" type="submit">CONFIRM</a>
254
+                                                    </div>
255
+                                                </div>
256
+                                            </div>
257
+                                        </div>
258
+
259
+                                        <div class="login-forgot-password-details-div" style="display:none">
260
+                                            <!-- <div
261
+                                                class="font-16 d-flex justify-content-between font-w600 text-darkgrey w-100 backtologin">
262
+                                            <span>Forgot Password?</span>
263
+                                                <a href="#" class=""
264
+                                                    id="forgot_Password_Details_Back"><span
265
+                                                        class=" cursor-pointer text-center d-flex align-items-center"><i
266
+                                                            class="fa-solid fa-arrow-left"></i></span></a>
267
+                                            </div> -->
268
+                                            <div class="font-14 w-100 password_display">Please Enter your New Password.
269
+                                            </div>
270
+                                            <div class="input-group has-validation forgot-password-details-inputgroup">
271
+                                                <div class=" align-items-center d-flex form-floating position-relative py-0">
272
+                                                    <input type="password"
273
+                                                        class="form-control shadow-none h-50p user_pass"
274
+                                                        id="forgot-password-input-one" placeholder="Enter New Password "
275
+                                                        autocomplete="off">
276
+                                                        <span class="end-0 pswd_eye me-2 position-absolute"><svg
277
+                                                            class="svg-inline--fa fa-eye" aria-hidden="true"
278
+                                                            focusable="false" data-prefix="fas" data-icon="eye"
279
+                                                            role="img" xmlns="http://www.w3.org/2000/svg"
280
+                                                            viewBox="0 0 576 512" data-fa-i2svg="">
281
+                                                            <path fill="currentColor"
282
+                                                                d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z">
283
+                                                            </path>
284
+                                                        </svg><!-- <i class="fa-solid fa-eye"></i> Font Awesome fontawesome.com --></span>
285
+                                                    <label for="forgot-password-input-one">Enter New Password</label>
286
+                                                </div>
287
+                                                <div class="invalid-feedback">
288
+                                                    Please enter your Password.
289
+                                                </div>
290
+                                                <div class="pswd_info" style="display: none;z-index: 1;">
291
+                                                    <p>Password must contain:</p>
292
+                                                    <ul>
293
+                                                        <li id="chck_capital" class="invalid">At least <strong>one
294
+                                                                capital
295
+                                                                letter</strong></li>
296
+                                                        <li id="chck_special" class="invalid">At least <strong>one
297
+                                                                special
298
+                                                                letter</strong></li>
299
+                                                        <li id="chck_number" class="invalid">At least <strong>one
300
+                                                                number</strong></li>
301
+                                                        <li id="chck_length" class="invalid">At least <strong>8
302
+                                                                characters</strong></li>
303
+                                                    </ul>
304
+                                                </div>
305
+                                            </div>
306
+                                            <div
307
+                                                class="input-group has-validation forgot-password-details-inputgroup mt-4">
308
+                                                <div class="form-floating py-0">
309
+                                                    <input type="text" class="form-control shadow-none h-50p user_pass"
310
+                                                        id="forgot-password-input-two"
311
+                                                        placeholder="Confirm New Password" autocomplete="off">
312
+                                                    <label for="forgot-password-input-two">Confirm New Password</label>
313
+                                                </div>
314
+                                                <div class="invalid-feedback">
315
+                                                    Please enter your Password.
316
+                                                </div>
317
+                                            </div>
318
+                                            <div class="mt-3 ">
319
+                                                <div>
320
+                                                    <div class="btn bg-gradient-anwi w-100 loader-btn"
321
+                                                        style="display: none;">
322
+                                                        <span class="loader"></span>
323
+                                                    </div>
324
+                                                    <a href="#" class="btn bg-gradient-anwi w-100 text-white fw-500"
325
+                                                        id="forgot_password_details_submit" type="submit">Submit</a>
326
+                                                </div>
327
+                                            </div>
328
+                                        </div>
329
+                                    </form>
330
+                                </div>
331
+                                <div class="tab-pane fade" id="pills-registration" role="tabpanel"
332
+                                    aria-labelledby="pills-registration-tab" tabindex="0">
333
+                                    <form id="register_form">
334
+                                        <div class="email-password-group">
335
+                                            <div class="input-group has-validation email-login-inputgroup">
336
+                                                <div class="form-floating py-0">
337
+                                                    <input type="email" class="form-control shadow-none h-50p"
338
+                                                        id="User_Email" placeholder="Enter Your Email"
339
+                                                        autocomplete="off">
340
+                                                    <label for="User_Email">Email address</label>
341
+                                                </div>
342
+                                                <div class="invalid-feedback">
343
+                                                    Please enter your email.
344
+                                                </div>
345
+                                            </div>
346
+                                            <div class="input-group has-validation mt-3 password-login-inputgroup">
347
+                                                <div class="align-items-center d-flex form-floating position-relative py-0"
348
+                                                    id="password-input-div">
349
+                                                    <input type="password" class="form-control shadow-none h-50p"
350
+                                                        id="User_password" placeholder="Password"
351
+                                                        autocomplete="no password" required="">
352
+                                                    <span class="end-0 pswd_eye me-2 position-absolute"><svg
353
+                                                            class="svg-inline--fa fa-eye" aria-hidden="true"
354
+                                                            focusable="false" data-prefix="fas" data-icon="eye"
355
+                                                            role="img" xmlns="http://www.w3.org/2000/svg"
356
+                                                            viewBox="0 0 576 512" data-fa-i2svg="">
357
+                                                            <path fill="currentColor"
358
+                                                                d="M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z">
359
+                                                            </path>
360
+                                                        </svg><!-- <i class="fa-solid fa-eye"></i> Font Awesome fontawesome.com --></span>
361
+                                                    <label for="User_password">Password</label>
362
+                                                </div>
363
+                                                <div class="invalid-feedback">
364
+                                                    Please enter your password.
365
+                                                </div>
366
+                                                <div class="pswd_info" style="display: none;">
367
+                                                    <p>Password must contain:</p>
368
+                                                    <ul>
369
+                                                        <li id="chck_capital" class="invalid">At least <strong>one
370
+                                                                capital
371
+                                                                letter</strong></li>
372
+                                                        <li id="chck_special" class="invalid">At least <strong>one
373
+                                                                special
374
+                                                                letter</strong></li>
375
+                                                        <li id="chck_number" class="invalid">At least <strong>one
376
+                                                                number</strong></li>
377
+                                                        <li id="chck_length" class="invalid">At least <strong>8
378
+                                                                characters</strong></li>
379
+                                                    </ul>
380
+                                                </div>
381
+                                            </div>
382
+                                            <div class="fs-7 mt-2 satoshi_font">
383
+                                                By continuing, I agree to the
384
+                                                <a href="#"
385
+                                                    class="text-theme-color text-decoration-underline fs-7 fw-600">Terms
386
+                                                    of
387
+                                                    Use</a>
388
+                                                &amp;
389
+                                                <a href="#"
390
+                                                    class="text-theme-color text-decoration-underline fs-7 fw-600">Privacy
391
+                                                    Policy</a>
392
+                                            </div>
393
+                                            <div class="mt-3 ">
394
+                                                <div>
395
+                                                    <div class="btn bg-gradient-anwi w-100 loader-btn"
396
+                                                        style="display: none;">
397
+                                                        <span class="loader"></span>
398
+                                                    </div>
399
+                                                    <a href="#" class="btn bg-gradient-anwi text-white w-100 fw-500"
400
+                                                        id="register_btn" type="submit">REGISTER</a>
401
+                                                </div>
402
+                                            </div>
403
+                                        </div>
404
+
405
+                                        <div class="register_otp otp-input-group mt-3" style="display: none;">
406
+                                            <div>
407
+                                                <h4 class="text-center">Enter OTP</h4>
408
+                                                <div class="text-center">we have sent an OTP to this Email </div>
409
+                                                <div class="otp-sent-email fw-600 text-center"></div>
410
+                                            </div>
411
+                                            <div class="d-flex my-4">
412
+                                                <div class="col">
413
+                                                    <div class="form-group">
414
+                                                        <input type="text" class="press form-control" name="code"
415
+                                                            maxlength="1" tabindex="1" autocomplete="off">
416
+                                                    </div>
417
+                                                </div>
418
+
419
+                                                <div class="col">
420
+                                                    <div class="form-group">
421
+                                                        <input type="text" class="press form-control" name="code"
422
+                                                            maxlength="1" tabindex="2" autocomplete="off">
423
+                                                    </div>
424
+                                                </div>
425
+
426
+                                                <div class="col">
427
+                                                    <div class="form-group">
428
+                                                        <input type="text" class="press form-control" name="code"
429
+                                                            maxlength="1" tabindex="3" autocomplete="off">
430
+                                                    </div>
431
+                                                </div>
432
+
433
+                                                <div class="col">
434
+                                                    <div class="form-group">
435
+                                                        <input type="text" class="press form-control" name="code"
436
+                                                            maxlength="1" tabindex="4" autocomplete="off">
437
+                                                    </div>
438
+                                                </div>
439
+
440
+                                                <div class="col">
441
+                                                    <div class="form-group">
442
+                                                        <input type="text" class="press form-control" name="code"
443
+                                                            maxlength="1" tabindex="5" autocomplete="off">
444
+                                                    </div>
445
+                                                </div>
446
+
447
+                                                <div class="col">
448
+                                                    <div class="form-group">
449
+                                                        <input type="text" class="press form-control" name="code"
450
+                                                            maxlength="1" tabindex="6" autocomplete="off">
451
+                                                    </div>
452
+                                                </div>
453
+                                            </div>
454
+                                            <div>
455
+                                                <div class="btn bg-gradient-anwi w-100 loader-btn"
456
+                                                    style="display: none;">
457
+                                                    <span class="loader"></span>
458
+                                                </div>
459
+                                                <a href="#" class="btn btn-primary w-100 fw-500" id="proceed"
460
+                                                    type="submit">CONFIRM</a>
461
+                                            </div>
462
+                                        </div>
463
+
464
+                                    </form>
90 465
                                 </div>
91
-                            </div>
92
-                            <div class="space-login"></div>
93
-                            <div class="single-input-item">
94
-                                <a href="#" class="btn w-100 check-btn sqr-btn  text-white" id="get_otp">Continue</a>
95
-                                <a href="#" class="btn w-100 btn-info text-white d-none" id="proceed">Proceed</a>
96
-                            </div>
97
-                            <div class="space-login"></div>
98
-                            <div class="text-dark">Have trouble logging in? <a href="#" class="text-theme-color text-decoration-underline">Get help</a>
99 466
                             </div>
100 467
                         </div>
101
-                    </form>
102
-                 </div>
468
+                    </div>
103 469
                 </div>
104 470
             </div>
105 471
         </div>
106 472
     </section>
473
+    <!-- footer -->
107 474
 
108 475
 
109
-    <!-- footer -->
110 476
     <!-- <div id="footer-head"></div> -->
111 477
     <!-- end-footer -->
112 478
     <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script>
@@ -115,7 +481,7 @@
115 481
     <script src="./dist/js/auth/apiservice.js"></script>
116 482
     <script src="./dist/js/navbar.js"></script>
117 483
     <script src="./dist/js/footer.js"></script>
118
-    <script src="./dist/js/auth/login.js"></script>
484
+    <!-- <script src="./dist/js/auth/login.js"></script> -->
119 485
     <script src="./dist/js/vendor/modernizr-3.11.7.min.js"></script>
120 486
     <script src="./dist/js/vendor/jquery-v3.6.0.min.js"></script>
121 487
     <script src="./dist/js/vendor/jquery-migrate-v3.3.2.min.js"></script>
@@ -129,67 +495,15 @@
129 495
     <script src="./dist/js/plugins/isotope.js"></script>
130 496
     <script src="./dist/js/plugins/jquery-ui.js"></script>
131 497
     <script src="./dist/js/plugins/magnific-popup.js"></script>
132
-    <script src="./dist/js/axios.min.js"></script>
133
-    <script src="./dist/js/cookies.min.js"></script>
134
-    <script src="./dist/js/fontawesome.all.js"></script>
135
-    <script src="./dist/js/fontawesome.min.js"></script>
498
+    <script src="./libs/axios.min.js"></script>
499
+    <script src="./libs/cookies.min.js"></script>
500
+    <script src="../dist/js/fontawesome.all.js"></script>
501
+    <script src="./dist/js/utils/CookieHelper.js"></script>
502
+    <script src="./dist/toaster/toastr.js"></script>
503
+    <script src="./dist/js/auth/login.js"></script>
136 504
     <!-- Main JS -->
137 505
     <script src="./dist/js/main.js"></script>
138 506
 
139
-    <script>
140
-        $("#get_otp").click(function(){
141
-            let empty_num = $("#user_number").val();
142
-            if(empty_num !== "" ){
143
-                $("#empt_num").removeClass("d-none");
144
-                $("#not_valid").addClass("d-none");
145
-            }
146
-            else if(empty_num.length >= 9){
147
-                $("#empt_num").addClass("d-none");
148
-                $("#not_valid").removeClass("d-none");
149
-            }
150
-            else{
151
-                $("#empt_num").addClass("d-none");
152
-                $("#not_valid").addClass("d-none")
153
-                $(this).addClass("d-none");
154
-                $("#user_number").addClass("d-none");
155
-                $(".user_number").addClass("d-none");
156
-
157
-                $(".otp-form").removeClass("d-none");
158
-                $(".otp_text").removeClass("d-none");
159
-                $("#proceed").removeClass("d-none");
160
-            }
161
-        });
162
-        $("#proceed").click(function(){
163
-
164
-            $(".otp-form").find("input").each(function(){
165
-                let otp_val = $(this).val();
166
-                if(otp_val !== ""){
167
-                    $("#otp_valid").removeClass("d-none");
168
-                }else{
169
-                    $("#otp_valid").addClass("d-none");
170
-                    window.location.href = `/myaccount.html`;
171
-                }
172
-            })
173
-            
174
-        });
175
-
176
-        $('.otp-form').find('input[type="password"]').on('keyup', function (e) {
177
-            if (this.value.length >= this.maxLength) {
178
-              if (e.keyCode !== 9 && e.keyCode !== 16) {
179
-                var tabIndex = this.tabIndex + 1;
180
-                $('.otp-form').find("input[tabindex='" + this.tabIndex + "']").val(this.value);
181
-                $('.otp-form').find("input[tabindex='" + tabIndex + "']").focus();
182
-              }
183
-            }
184
-            else {
185
-              if (e.keyCode === 8) {
186
-                var tabIndex = this.tabIndex - 1;
187
-                $('.otp-form').find("input[tabindex='" + tabIndex + "']").focus();
188
-              }
189
-
190
-            }
191
-          });
192
-    </script>
193 507
 </body>
194 508
 
195 509
 </html>

+ 122
- 109
myaccount.html Parādīt failu

@@ -5,7 +5,6 @@
5 5
     <meta charset="UTF-8" />
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7 7
     <meta http-equiv="X-UA-Compatible" content="ie=edge" />
8
-    <link rel="shortcut icon" type="image/x-icon" href="./dist/assets/imgs/favicon.gif">
9 8
     <link rel="stylesheet" href="./libs/bootstrap/css/bootstrap.min.css" />
10 9
     <link rel="stylesheet" href="./dist/css/main.css" />
11 10
     <link rel="stylesheet" href="./style.css">
@@ -25,14 +24,16 @@
25 24
     <link rel="stylesheet" href="./dist/css/style.css">
26 25
     <link rel="stylesheet" href="./dist/css/fontawesome.all.min.css">
27 26
     <link rel="stylesheet" href="./dist/css/fontawesome.min.css">
28
-    <title>My Account | Anwi</title>
27
+    <link rel="stylesheet" href="./dist//toaster/toastr.css">
28
+    <title>Anwi</title>
29 29
 </head>
30 30
 
31
-<body class="my_account_page">
31
+<body class="my_account_page d-none">
32 32
     <!-- navbar -->
33 33
     <div id="navbar-head" class="bg-white"></div>
34 34
       <!-- end-navbar -->
35 35
     <!-- main-body -->
36
+    <auth-loader></auth-loader>
36 37
     <main class="shopping-cart-main-container main-body pb-0">
37 38
       <section class="pt-5">
38 39
         <div class="my-account-wrapper bg-gradient-violet py-md-5">
@@ -49,13 +50,12 @@
49 50
                                 <div class="col-lg-3 col-md-4">
50 51
                                     <div class="myaccount-tab-menu nav" role="tablist">
51 52
                                         <a href="#dashboad" class="" data-bs-toggle="tab">Overview</a>
52
-                                        <a href="#orders" data-bs-toggle="tab" class="active"> My Orders</a>
53
-                                        <a href="#warrenty" data-bs-toggle="tab">Warranty Products </a>
53
+                                        <a href="#orders" data-bs-toggle="tab" class="active"> Orders</a>
54
+                                        <a href="#warrenty" data-bs-toggle="tab" class="d-none">Warranty</a>
54 55
                                         <a href="#payment-method" data-bs-toggle="tab" class="d-none"> Payment Method</a>
55
-                                       
56 56
                                         <a href="#account-info" data-bs-toggle="tab">Profile</a>
57 57
                                         <a href="#address-edit" data-bs-toggle="tab">address</a>
58
-                                        <a href="./login.html">Logout</a>
58
+                                        <a href="./login.html" class="User_logout">Logout</a>
59 59
                                     </div>
60 60
                                 </div>
61 61
                                 <!-- My Account Tab Menu End -->
@@ -187,70 +187,7 @@
187 187
                                         </div>
188 188
                                         <!-- Single Tab Content End -->
189 189
                                         <!-- Single Tab Content Start -->
190
-                                        <div class="tab-pane fade active show" id="orders" role="tabpanel">
191
-                                            <div class="myaccount-content">
192
-                                                <h3>Orders</h3>
193
-                                                <div class="border-0 border-bottom card rounded-0 shadow-sm mb-2 order-cards">
194
-                                                    <div class="row align-items-center">
195
-                                                        <div class="col-md-3 text-center">
196
-                                                            <img src="./dist/assets/imgs/Navbar/ora_ddr4_desktop.png" class="img-fluid w-75"/>
197
-                                                        </div>
198
-                                                        <div class="col-md-9">
199
-                                                            <div class="row ps-md-2 ps-3">
200
-                                                                <div class="col-md-5">
201
-                                                                    <div>Serial No : <span class="text-secondary fs-9">#7907987897348</span></div>
202
-                                                                    <div>Purchase Date : <span class="text-secondary fs-9">Feb 1, 2023</span></div>
203
-                                                                </div>
204
-                                                                <div class="col-md-7">
205
-                                                                    <div class="fs-9">Warrenty Expairy Date : <span class="bg-warning px-2 fs-9 rounded-2">Mar 20, 2023</span></div>
206
-                                                                    <div class="row">
207
-                                                                            <div class="col-md-5 col-6"> Status :</div>
208
-                                                                            <div class="col-md-7 col-6"><span class="btn btn-success py-0 fs-9">Running</span></div>
209
-                                                                    </div>
210
-                                                                </div>
211
-                                                            </div>
212
-                                                        </div>
213
-                                                    </div>
214
-                                                    <div class="p-3">
215
-                                                        <p class="text-success d-done">Add Product Serial Number</p>
216
-                                                        <div class="d-none">
217
-                                                            <button class="btn btn-primary me-2">Send Remainder</button>
218
-                                                            <button class="btn btn-primary">Extended warranty History</button>
219
-                                                        </div>
220
-                                                    </div>
221
-                                                </div>
222
-                                                <div class="border-0 border-bottom card rounded-0 shadow-sm mb-2 order-cards">
223
-                                                    
224
-                                                    <div class="row align-items-center">
225
-                                                        <div class="col-md-3  text-center">
226
-                                                            <img src="./dist/assets/imgs/Navbar/ora_ddr4_desktop.png" class="img-fluid w-75"/>
227
-                                                        </div>
228
-                                                        <div class="col-md-9">
229
-                                                            <div class="row  ps-md-2 ps-3">
230
-                                                                <div class="col-md-5">
231
-                                                                    <div class="fs-9">Serial No : <span class="text-secondary fs-9">#7907987897348</span></div>
232
-                                                                    <div class="fs-9">Purchase Date : <span class="text-secondary fs-9">Feb 1, 2023</span></div>
233
-                                                                </div>
234
-                                                                <div class="col-md-7">
235
-                                                                    <div class="fs-9">Warrenty Expairy Date : <span class="bg-warning px-2 fs-9 rounded-2">Mar 20, 2023</span></div>
236
-                                                                    <div class="row">
237
-                                                                        <div class="col-md-5 col-6"> Status :</div>
238
-                                                                        <div class="col-md-7 col-6"> <span class="btn btn-success py-0 fs-9">Running</span></div>
239
-                                                                    </div>
240
-                                                                </div>
241
-                                                            </div>
242
-                                                        </div>
243
-                                                    </div>
244
-                                                    <div class="p-3">
245
-                                                        <p class="text-success d-none">Add Product Serial Number</p>
246
-                                                        <div class="d-none">
247
-                                                            <button class="btn btn-primary me-2">Send Remainder</button>
248
-                                                            <button class="btn btn-primary">Extended warranty History</button>
249
-                                                        </div>
250
-                                                    </div>
251
-                                                </div>
252
-                                            </div>
253
-                                        </div>
190
+                                       
254 191
                                         <!-- Single Tab Content End -->
255 192
                                         <!-- Single Tab Content Start -->
256 193
                                         <div class="tab-pane fade" id="payment-method" role="tabpanel">
@@ -288,49 +225,79 @@
288 225
                                                
289 226
                                             </div>
290 227
                                         </div>
228
+                                        <div class="tab-pane fade active show" id="orders" role="tabpanel">
229
+                                            <div class="myaccount-content">
230
+                                                <h3>Order Details</h3>
231
+                                                <div class="user_order_details border rounded mb-3">
232
+                                                </div>
233
+                                            </div>
234
+                                         
235
+                                        </div>
291 236
                                         <div class="tab-pane fade" id="warrenty" role="tabpanel">
292
-                                            <div class="myaccount-content pb-0">
293
-                                                <div id="product-2" class="tab-pane  active pb-5">
294
-                                                    <h5 class="mb-md-4">Enter your Product Serial no. :</h5>
295
-                                                    <div class="row ">
296
-                                                        <div class="col-md-12">
297
-                                                            <form>
298
-                                                                <div class="row pt-2">
299
-                                                                    <div class="col-md-6">
300
-                                                                        <div class="col-md-12 pb-4 d-none">
301
-                                                                            <input type="text" class="form-control border-0 shadow-none  border-bottom" placeholder="Enetr Mobile Number.." required />
302
-                                                                        </div>
303
-                                                                        <div class="col-md-12 text-center d-none py-md-4 py-2">
304
-                                                                            <sapn class="p-2 shadow bg-gray rounded-2">Or</span>
305
-                                                                        </div>
306
-                                                                        <div class="col-md-12 pb-4">
307
-                                                                            <input type="text"
308
-                                                                                class="form-control border-0 shadow-none  border-bottom"
309
-                                                                                placeholder="Enetr Serial Number.." required />
310
-                                                                        </div>
311
-                                                                        <div class="col-md-12 pb-4 d-none">
312
-                                                                            <input type="text"
313
-                                                                                class="form-control border-0 shadow-none  border-bottom"
314
-                                                                                placeholder="Enetr captcha" required />
315
-                                                                        </div>
316
-                                                                        <div class="col-md-12 pb-4 px-md-2 text-center d-none">
317
-                                                                            <span class="fw-bold pe-3">W p 5 C n</span> <span
318
-                                                                                class="cursor-pointer text-primary">Refresh captcha</span>
319
-                                                                        </div>
320
-                                                                        <div class="col-md-6 pb-4 px-md-2">
237
+                                                <div class="myaccount-content">
238
+                                                    <h3>Warranty Order Details</h3>
239
+                                                    <div class="user_orders">
240
+    
241
+                                                    </div>
242
+                                                    <div class="border-0 border-bottom card rounded-0 shadow-sm mb-2 order-cards d-none">
243
+                                                        <div class="row align-items-center">
244
+                                                            <div class="col-md-3">
245
+                                                                <img src="./dist/assets/imgs/Navbar/ora_ddr4_desktop.png" class="img-fluid w-75"/>
246
+                                                            </div>
247
+                                                            <div class="col-md-9">
248
+                                                                <div class="row">
249
+                                                                    <div class="col-md-5">
250
+                                                                        <div>Serail NO: <span class="text-secondary fs-9 serial_no">#7907987897348</span></div>
251
+                                                                        <div>Purchase Date : <span class="text-secondary fs-9 purchase_date">Feb 1, 2023</span></div>
252
+                                                                    </div>
253
+                                                                    <div class="col-md-7">
254
+                                                                        <div class="fs-9">Warrenty Expairy Date : <span class="bg-warning px-2 fs-9 rounded-2 warrenty_date">Mar 20, 2023</span></div>
255
+                                                                        <div class="row">
256
+                                                                                <div class="col-md-5"> Status :</div>
257
+                                                                                <div class="col-md-7"> <span class="btn btn-success py-0 fs-9">Running</span></div>
321 258
                                                                         </div>
322
-                                                                        <div class="col-md-12 pb-4 text-center">
323
-                                                                            <span class="action_btn">
324
-                                                                                <button class="btn border px-5">Submit</button>
325
-                                                                            </span>
259
+                                                                    </div>
260
+                                                                </div>
261
+                                                            </div>
262
+                                                        </div>
263
+                                                        <div class="p-3">
264
+                                                            <div class="d-none">
265
+                                                                <button class="btn btn-primary me-2">Send Remainder</button>
266
+                                                                <button class="btn btn-primary">Extended warranty History</button>
267
+                                                            </div>
268
+                                                        </div>
269
+                                                    </div>
270
+                                                    <div class="border-0 border-bottom card rounded-0 shadow-sm mb-2 order-cards d-none">
271
+                                                        
272
+                                                        <div class="row align-items-center">
273
+                                                            <div class="col-md-3">
274
+                                                                <img src="./dist/assets/imgs/Navbar/ora_ddr4_desktop.png" class="img-fluid w-75"/>
275
+                                                            </div>
276
+                                                            <div class="col-md-9">
277
+                                                                <div class="row">
278
+                                                                    <div class="col-md-5">
279
+                                                                        <div class="fs-9">Product ID : <span class="text-secondary fs-9">#7907987897348</span></div>
280
+                                                                        <div class="fs-9">Purchase Date : <span class="text-secondary fs-9">Feb 1, 2023</span></div>
281
+                                                                    </div>
282
+                                                                    <div class="col-md-7">
283
+                                                                        <div class="fs-9">Warrenty Expairy Date : <span class="bg-warning px-2 fs-9 rounded-2">Mar 20, 2023</span></div>
284
+                                                                        <div class="row">
285
+                                                                            <div class="col-md-5"> Status :</div>
286
+                                                                            <div class="col-md-7"> <span class="btn btn-success py-0 fs-9">Running</span></div>
326 287
                                                                         </div>
327 288
                                                                     </div>
328 289
                                                                 </div>
329
-                                                            </form>
290
+                                                            </div>
291
+                                                        </div>
292
+                                                        <div class="p-3">
293
+                                                            <div class="d-none">
294
+                                                                <button class="btn btn-primary me-2">Send Remainder</button>
295
+                                                                <button class="btn btn-primary">Extended warranty History</button>
296
+                                                            </div>
330 297
                                                         </div>
331 298
                                                     </div>
332 299
                                                 </div>
333
-                                            </div>
300
+                                           
334 301
                                         </div>
335 302
                                         <!-- Single Tab Content End -->
336 303
                                         <!-- Single Tab Content Start -->
@@ -409,11 +376,13 @@
409 376
     <!-- footer -->
410 377
     <div id="footer-head"></div>
411 378
     <!-- end-footer -->
412
-    <!-- <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script> -->
379
+    <!-- <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="./libs/bootstrap/js/bootstrap.bundle.min.js"></script> -->
413 380
     <script src="./dist/js/jquery.min.js"></script>
414 381
     <script src="./dist/js/navbar.js"></script>
415 382
     <script src="./dist/js/footer.js"></script>
416
-    <script src="./dist/js/cookies.min.js"></script>
383
+    <script src="./dist/Js/components/authloader/authloader.js"></script>
384
+    <script src="./dist/js/auth/apiservice.js"></script>
385
+    <script src="./libs/cookies.min.js"></script>
417 386
     <script src="./dist/js/fontawesome.all.js"></script>
418 387
     <script src="./dist/js/fontawesome.min.js"></script>
419 388
     <script src="./dist/js/vendor/modernizr-3.11.7.min.js"></script>
@@ -429,16 +398,60 @@
429 398
     <script src="./dist/js/plugins/isotope.js"></script>
430 399
     <script src="./dist/js/plugins/jquery-ui.js"></script>
431 400
     <script src="./dist/js/plugins/magnific-popup.js"></script>
432
-    <!-- Main JS -->
401
+    <!-- Main JS --> 
402
+    <script src="./dist//toaster/toastr.js"></script>
403
+    <!-- <script src="./dist/js/auth/apiservice.js"></script> -->
404
+    <script src="./dist/js/localstorage/loginauthlocal.js"></script>
405
+    <!-- <script src="./dist/js/utils/CookieHelper.js"></script> -->
406
+    <script src="./libs/axios.min.js"></script>
407
+    <script src="./dist/js/myaccount/orderdetails.js"></script>
408
+    <script src="./dist/js/myaccount/myaccount_warrenty.js"></script>
409
+    <script src="./dist/Js/myaccount/Myaccount.js"></script>
433 410
     <script src="./dist/js/main.js"></script>
434 411
 
412
+
435 413
     <script>
414
+        $(document).ready(function() {
415
+            let Userpassword_update =window.localStorage.getItem('Ispasswordupdate')
416
+        if(Userpassword_update == 'true'){
417
+            toasteropts()
418
+            Command: toastr["success"]("Password Updated Successfully");
419
+            window.localStorage.removeItem('Ispasswordupdate')
420
+            return
421
+        }
422
+    function toasteropts(){
423
+       toastr.options = {
424
+      "closeButton": true,
425
+      "debug": false,
426
+      "newestOnTop": true,
427
+      "progressBar": true,
428
+      "positionClass": "toast-top-center",
429
+      "preventDuplicates": true,
430
+      "onclick": null,
431
+      "showDuration": "300",
432
+      "hideDuration": "1000",
433
+      "timeOut": "5000",
434
+      "extendedTimeOut": "1000",
435
+      "showEasing": "swing",
436
+      "hideEasing": "linear",
437
+      "showMethod": "fadeIn",
438
+      "hideMethod": "fadeOut"
439
+    }
440
+    }
441
+});
436 442
         $(".order-cards").each(function(){
437 443
             $(".order-cards").css("cursor","pointer")
438 444
             $(this).click(function(){
439 445
                 window.location.href = "./orderdetails.html";
440 446
             })
441 447
         })
448
+        $('.User_logout').click(function(){
449
+            window.localStorage.removeItem("Useremail");
450
+            window.localStorage.removeItem("Userpassword"); 
451
+            window.localStorage.setItem('Isloggedin',false)
452
+            COOKIE_HELPER_ACTIONS.removeAuthCookie();
453
+        })
454
+        
442 455
     </script>
443 456
 </body>
444 457
 

+ 15
- 14
orderdetails.html Parādīt failu

@@ -39,7 +39,7 @@
39 39
         <div class="container pb-5">
40 40
             <div class="row pb-4">
41 41
                 <div class="col-6">
42
-                    <a href="myaccount.html" class="fw-600 text-a-color"> Back to Orders</a>
42
+                    <a href="#" class="fw-600 text-a-color back_to_orders"> Back to Orders</a>
43 43
                 </div>
44 44
                 <div class="col-6 text-end">
45 45
                     <a href="#" class="fw-600 text-a-color">Need Help ?</a>
@@ -73,7 +73,7 @@
73 73
                                     <img src="./dist/assets/imgs/Home/Shopping-cart-item-img.png" class="img-fluid order_img"/>
74 74
                                 </div>
75 75
                                 <div class="col-md-8 position-relative">
76
-                                    <p class="mb-0 fs-6">14inch laptop</p>
76
+                                    <p class="mb-0 fs-6 order_itemname"></p>
77 77
                                     <p class="mb-3 fs-6 fw-600 d-flex align-items-center">
78 78
                                         <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-currency-rupee" viewBox="0 0 16 16">
79 79
                                             <path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path>
@@ -110,7 +110,7 @@
110 110
                                     <img src="./dist/assets/imgs/Home/Shopping-cart-item-img.png" class="img-fluid order_img"/>
111 111
                                 </div>
112 112
                                 <div class="col-md-8 position-relative">
113
-                                    <p class="mb-0 fs-6">14inch laptop</p>
113
+                                    <p class="mb-0 fs-6 order_itemname"></p>
114 114
                                     <p class="mb-3 fs-6 fw-600 d-flex align-items-center">
115 115
                                         <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-currency-rupee" viewBox="0 0 16 16">
116 116
                                             <path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path>
@@ -125,12 +125,7 @@
125 125
                 <div class="col-md-4">
126 126
                     <div class="Order_details_section mb-2">
127 127
                         <div class="card rounded-0 border-0 order-summary">
128
-                                <div class="card-body">
129
-                                    <div>
130
-                                        <p class="mb-0 fs-6 fw-500">Order<span># AN309630760202</span></span><span class="text-secondary fs-9"> (1 items)</p>
131
-                                        <p class="mb-0 fs-6">Order placed on 4th March 2023</p>
132
-                                        <p class="mb-0 fs-9">Paid by Credit Card</p>
133
-                                    </div>
128
+                               
134 129
                                 </div>
135 130
                         </div>
136 131
                         <div class="card rounded-0 border-top-0">
@@ -143,15 +138,17 @@
143 138
                                                     <p class="fs-9 mb-0">Order Amount</p> 
144 139
                                                 </div>
145 140
                                                 <div class="col-6 text-end">
146
-                                                    <p class="fs-7 mb-0">₹32,000.00</p>
141
+                                               <svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" fill="currentColor" class="bi bi-currency-rupee" viewBox="0 0 16 16">
142
+                                            <path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path>
143
+                                        </svg><span class="order_price fs-7">32,000</span>
147 144
                                                 </div>
148 145
                                             </div>
149 146
                                             <div class="row align-items-center">
150 147
                                                 <div class="col-6">
151
-                                                    <p class="fs-9 mb-0">Order Savings</p>
148
+                                                    <p class="fs-9 mb-0">Tax</p>
152 149
                                                 </div>
153 150
                                                 <div class="col-6 text-end">
154
-                                                    <p class="fs-7 mb-0 text-order-brown">-₹1000.00</p>
151
+                                                    <p class="fs-7 mb-0 text-order-brown order_tax">-₹1000.00</p>
155 152
                                                 </div>
156 153
                                             </div>
157 154
                                             <div class="row align-items-center">
@@ -164,10 +161,13 @@
164 161
                                             </div>
165 162
                                             <div class="row align-items-center">
166 163
                                                 <div class="col-6">
167
-                                                    <p class="fs-9 mb-1 fw-500">Order Toatal</p>
164
+                                                    <p class="fs-9 mb-1 fw-500">Order Total</p>
168 165
                                                 </div>
169 166
                                                 <div class="col-6 text-end">
170
-                                                    <p class="fs-7 mb-1 fw-500">₹31,000.00</p>
167
+                                                    <svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" fill="currentColor" class="bi bi-currency-rupee" viewBox="0 0 16 16">
168
+                                                        <path d="M4 3.06h2.726c1.22 0 2.12.575 2.325 1.724H4v1.051h5.051C8.855 7.001 8 7.558 6.788 7.558H4v1.317L8.437 14h2.11L6.095 8.884h.855c2.316-.018 3.465-1.476 3.688-3.049H12V4.784h-1.345c-.08-.778-.357-1.335-.793-1.732H12V2H4v1.06Z"></path>
169
+                                                    </svg>
170
+                                                    <span class="fs-7 mb-1 fw-500 Order_total"></span>
171 171
                                                 </div>
172 172
                                             </div>
173 173
     
@@ -248,6 +248,7 @@
248 248
     <script src="./dist/js/plugins/isotope.js"></script>
249 249
     <script src="./dist/js/plugins/jquery-ui.js"></script>
250 250
     <script src="./dist/js/plugins/magnific-popup.js"></script>
251
+    <script src="./dist/js/orderDetails/order_summary.js"></script>
251 252
     <!-- Main JS -->
252 253
     <script src="./dist/js/main.js"></script>
253 254
 

Notiek ielāde…
Atcelt
Saglabāt