@fishawack/lab-velocity 1.4.6 → 1.4.8
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/AuthModule/js/AuthStore.js +2 -2
- package/AuthModule/js/FakeAPI.js +3 -3
- package/README.md +52 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ const store = {
|
|
|
40
40
|
actions: {
|
|
41
41
|
getUser({ commit }, { errors, query = "" }) {
|
|
42
42
|
return axios
|
|
43
|
-
.get(`/api/
|
|
43
|
+
.get(`/api/users/self${query}`, {
|
|
44
44
|
params: {
|
|
45
45
|
include: "company"
|
|
46
46
|
}
|
|
@@ -62,4 +62,4 @@ const store = {
|
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
|
-
export default store;
|
|
65
|
+
export default store;
|
package/AuthModule/js/FakeAPI.js
CHANGED
|
@@ -12,7 +12,7 @@ axios.interceptors.request.use(
|
|
|
12
12
|
|
|
13
13
|
axios.interceptors.response.use(
|
|
14
14
|
response => {
|
|
15
|
-
return response;
|
|
15
|
+
return response;
|
|
16
16
|
},
|
|
17
17
|
error => {
|
|
18
18
|
return Promise.resolve(error);
|
|
@@ -24,7 +24,7 @@ function retrieveResponse(request) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const fakes = {
|
|
27
|
-
"/api/
|
|
27
|
+
"/api/users/self": {
|
|
28
28
|
"get" : {
|
|
29
29
|
"data":{
|
|
30
30
|
"id": 2,
|
|
@@ -81,4 +81,4 @@ const fakes = {
|
|
|
81
81
|
"two_factor": false
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
}
|
|
84
|
+
}
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
### What
|
|
4
4
|
|
|
5
|
-
Avalere Health branded style system
|
|
5
|
+
Avalere Health branded style system
|
|
6
6
|
|
|
7
7
|
### Why
|
|
8
8
|
|
|
@@ -15,3 +15,54 @@ Prevent code repetition.
|
|
|
15
15
|
```bash
|
|
16
16
|
npm install @fishawack/lab-velocity
|
|
17
17
|
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Auth Module
|
|
21
|
+
Frontend files to to work with the Hydrate Module.
|
|
22
|
+
#### Installation
|
|
23
|
+
|
|
24
|
+
##### Import Axios File
|
|
25
|
+
import axios from "axios";
|
|
26
|
+
import "@fishawack/lab-velocity/AuthModule/js/AuthAxios.js";
|
|
27
|
+
|
|
28
|
+
##### Import Routes File
|
|
29
|
+
Inside Router.js file
|
|
30
|
+
import { authRoutes, configureRoutes } from "@fishawack/lab-velocity/AuthModule/js/AuthRoutes";
|
|
31
|
+
|
|
32
|
+
let routes = require("./routes.js")(null, store).concat(authRoutes(null,store,store.state.auth.authBase));
|
|
33
|
+
Add routes to createRouter call
|
|
34
|
+
|
|
35
|
+
add method call after createRouter
|
|
36
|
+
configureRoutes(router);
|
|
37
|
+
##### Import Store
|
|
38
|
+
import AuthStore from "@fishawack/lab-velocity/AuthModule/js/AuthStore.js";
|
|
39
|
+
Inside createStore method add
|
|
40
|
+
modules: {
|
|
41
|
+
auth: AuthStore
|
|
42
|
+
},
|
|
43
|
+
Inside VuexPersistedState add
|
|
44
|
+
paths:["auth"]
|
|
45
|
+
|
|
46
|
+
At bottom of file set
|
|
47
|
+
window.store = store;
|
|
48
|
+
##### SVGS
|
|
49
|
+
Ensure Content has Velocity pulled in
|
|
50
|
+
{
|
|
51
|
+
"lftp": "ftp-fishawack.egnyte.com",
|
|
52
|
+
"location": "Shared/FW/Knutsford/Digital/Auto-Content/Lab/Velocity"
|
|
53
|
+
}
|
|
54
|
+
Copy out the svg folder contents into the svg files within vue.
|
|
55
|
+
|
|
56
|
+
##### ENV VARS
|
|
57
|
+
HYDRATE_LOGO=example-logo
|
|
58
|
+
HYDRATE_REDIRECT=index
|
|
59
|
+
|
|
60
|
+
HYDRATE_LOGO=example-logo(No Default set, name of svg logo to display on page)
|
|
61
|
+
HYDRATE_ROUTE=(Default auth if not configured)
|
|
62
|
+
HYDRATE_REDIRECT=(Default index if not configured)
|
|
63
|
+
HYDRATE_ADMIN=true (DO NOT use unless on Admin site and want to disable auth flows and only use sso login)
|
|
64
|
+
HYDRATE_CONTACT=(Default mailto:EP@avalerehealth, Email for contact us button)
|
|
65
|
+
|
|
66
|
+
##### Verify dependencies are installed
|
|
67
|
+
Axios
|
|
68
|
+
form-backend-validation
|
package/index.js
CHANGED
|
@@ -31,4 +31,4 @@ export { default as Icon } from "./Icon.vue";
|
|
|
31
31
|
export { default as Svg } from "./Svg.vue";
|
|
32
32
|
export { default as Loader } from "./layout/Loader.vue";
|
|
33
33
|
|
|
34
|
-
export {authRoutes} from './AuthModule/js/
|
|
34
|
+
export { authRoutes } from './AuthModule/js/AuthRoutes.js';
|