asv-hlps 1.2.31 → 1.2.34

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.
@@ -17,4 +17,5 @@ export interface BillPayment {
17
17
  bank?: Bank;
18
18
  account?: Account;
19
19
  encoder?: User;
20
+ receiptRef: string;
20
21
  }
@@ -29,7 +29,7 @@ const useReadonlyFetchTobs = (url, httpService, urlParam, valueProp = "id", labe
29
29
  (0, react_1.useEffect)(() => {
30
30
  getDatas();
31
31
  return () => { };
32
- }, []);
32
+ }, [tobs]);
33
33
  // const options = useMemo(() => selectOptionsToLabelAndValue(tobs, valueProp, labelProp), []);
34
34
  const options = (0, react_utils_1.selectOptionsToLabelAndValue)(tobs, valueProp, labelProp);
35
35
  return { tobs, options };
@@ -45,8 +45,8 @@ class AuthService {
45
45
  };
46
46
  this.login = (tob, httpService) => __awaiter(this, void 0, void 0, function* () {
47
47
  try {
48
- const { data: token } = yield httpService.post("auth/login", tob);
49
- this.setStorageToken(token);
48
+ const { data: jwt } = yield httpService.post("auth/login", tob);
49
+ this.setStorageToken(jwt.token);
50
50
  return true;
51
51
  }
52
52
  catch (error) {
@@ -62,8 +62,8 @@ class AuthService {
62
62
  this.authUser = () => {
63
63
  try {
64
64
  // const jwt = localStorage.getItem(tokenKey);
65
- const jwt = this.getStorageToken();
66
- return (0, jwt_decode_1.default)(jwt);
65
+ const token = this.getStorageToken();
66
+ return (0, jwt_decode_1.default)(token);
67
67
  }
68
68
  catch (ex) {
69
69
  return null;
@@ -17,4 +17,5 @@ export interface BillPayment {
17
17
  bank?: Bank;
18
18
  account?: Account;
19
19
  encoder?: User;
20
+ receiptRef: string;
20
21
  }
@@ -27,7 +27,7 @@ const useReadonlyFetchTobs = (url, httpService, urlParam, valueProp = "id", labe
27
27
  useEffect(() => {
28
28
  getDatas();
29
29
  return () => { };
30
- }, []);
30
+ }, [tobs]);
31
31
  // const options = useMemo(() => selectOptionsToLabelAndValue(tobs, valueProp, labelProp), []);
32
32
  const options = selectOptionsToLabelAndValue(tobs, valueProp, labelProp);
33
33
  return { tobs, options };
@@ -39,8 +39,8 @@ export class AuthService {
39
39
  };
40
40
  this.login = (tob, httpService) => __awaiter(this, void 0, void 0, function* () {
41
41
  try {
42
- const { data: token } = yield httpService.post("auth/login", tob);
43
- this.setStorageToken(token);
42
+ const { data: jwt } = yield httpService.post("auth/login", tob);
43
+ this.setStorageToken(jwt.token);
44
44
  return true;
45
45
  }
46
46
  catch (error) {
@@ -56,8 +56,8 @@ export class AuthService {
56
56
  this.authUser = () => {
57
57
  try {
58
58
  // const jwt = localStorage.getItem(tokenKey);
59
- const jwt = this.getStorageToken();
60
- return jwtDecode(jwt);
59
+ const token = this.getStorageToken();
60
+ return jwtDecode(token);
61
61
  }
62
62
  catch (ex) {
63
63
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.2.31",
3
+ "version": "1.2.34",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",