@itutoring/itutoring_application_js_api 1.7.12 → 1.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apiController.js +2 -0
- package/modules/CustomerPortal.js +2 -17
- package/package.json +1 -1
package/apiController.js
CHANGED
|
@@ -63,6 +63,8 @@ class APIController
|
|
|
63
63
|
CookiesManager.RemoveCookie("session_url");
|
|
64
64
|
|
|
65
65
|
id = urlParams.get("vid");
|
|
66
|
+
const date = new Date();
|
|
67
|
+
date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
|
|
66
68
|
CookiesManager.SetCookie("session_url", id, date.toUTCString());
|
|
67
69
|
}
|
|
68
70
|
else
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import APIController from "./../apiController";
|
|
10
|
-
import Customer from "./../objects/Customer";
|
|
11
10
|
|
|
12
11
|
class CustomerPortal
|
|
13
12
|
{
|
|
@@ -21,25 +20,11 @@ class CustomerPortal
|
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* Customer must be logged in otherwise this method will return null object.
|
|
24
|
-
* @returns Customer
|
|
23
|
+
* @returns Customer (CRM Object)
|
|
25
24
|
*/
|
|
26
25
|
static async GetCustomerInfo()
|
|
27
26
|
{
|
|
28
|
-
var
|
|
29
|
-
if (customerString == "null")
|
|
30
|
-
{
|
|
31
|
-
return null;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
var customerArray = JSON.parse(customerString);
|
|
35
|
-
|
|
36
|
-
var customer = new Customer();
|
|
37
|
-
customer.Email = customerArray['Email'];
|
|
38
|
-
customer.FirstName = customerArray['FirstName'];
|
|
39
|
-
customer.LastName = customerArray['LastName'];
|
|
40
|
-
customer.ID = customerArray['ID'];
|
|
41
|
-
customer.Phone = customerArray['Phone'];
|
|
42
|
-
|
|
27
|
+
var customer = await APIController.Get(this.#MODULE, this.#GET_CUSTOMER_INFO);
|
|
43
28
|
return customer;
|
|
44
29
|
}
|
|
45
30
|
}
|