@fishawack/lab-velocity 2.0.0-beta.5 → 2.0.0-beta.50
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/README.md +467 -36
- package/_Build/js/libs/build-id.js +14 -0
- package/_Build/js/libs/filters.js +36 -0
- package/_Build/js/libs/globals.js +7 -0
- package/_Build/js/libs/router.js +22 -0
- package/_Build/js/libs/routes.js +29 -0
- package/_Build/js/libs/store.js +21 -0
- package/_Build/js/libs/utility.js +161 -0
- package/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/components/form/Avatar.vue +90 -0
- package/_Build/vue/components/form/Checkbox.vue +10 -0
- package/_Build/vue/components/form/InputNumber.vue +1 -1
- package/_Build/vue/components/form/Select.vue +223 -33
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/_Build/vue/components/layout/Alert.vue +5 -5
- package/_Build/vue/components/layout/Audit.vue +143 -0
- package/_Build/vue/{modules/AuthModule/components/VBreadcrumbs.vue → components/layout/Breadcrumbs.vue} +4 -4
- package/_Build/vue/{modules/AuthModule/components → components/layout}/Chips.vue +2 -2
- package/_Build/vue/components/layout/Footer.vue +11 -10
- package/_Build/vue/{modules/AuthModule/components/VFormFooter.vue → components/layout/FormFooter.vue} +13 -7
- package/_Build/vue/{modules/AuthModule/components → components/layout}/FormRole.vue +10 -8
- package/_Build/vue/components/layout/Layout.vue +94 -0
- package/_Build/vue/components/layout/Navigation.vue +77 -0
- package/_Build/vue/{modules/AuthModule/components/VPageHeader.vue → components/layout/PageHeader.vue} +14 -8
- package/_Build/vue/components/layout/SideBar.vue +26 -0
- package/_Build/vue/{modules/AuthModule/components/VTable.vue → components/layout/Table.vue} +37 -16
- package/_Build/vue/{modules/AuthModule/components/VTableSorter.vue → components/layout/TableSorter.vue} +108 -52
- package/_Build/vue/components/layout/TokenDisplay.vue +52 -0
- package/_Build/vue/components/layout/pageTitle.vue +1 -1
- package/_Build/vue/components/navigation/MenuItem.vue +7 -2
- package/_Build/vue/components/navigation/MenuItemGroup.vue +7 -2
- package/_Build/vue/modules/AuthModule/js/axios.js +21 -1
- package/_Build/vue/modules/AuthModule/js/guest-request.js +32 -0
- package/_Build/vue/modules/AuthModule/js/impersonation-banner.js +102 -0
- package/_Build/vue/modules/AuthModule/js/router.js +91 -114
- package/_Build/vue/modules/AuthModule/js/store.js +23 -6
- package/_Build/vue/modules/AuthModule/routes/PCompanies/columns.js +268 -0
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +213 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/columns.js +58 -0
- package/_Build/vue/modules/AuthModule/routes/PIntegrations/resource.js +79 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/columns.js +78 -0
- package/_Build/vue/modules/AuthModule/routes/PTeams/resource.js +251 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordAction.vue +51 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/SetPasswordDialog.vue +138 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/columns.js +349 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +239 -0
- package/_Build/vue/modules/AuthModule/routes/account-exists.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +28 -32
- package/_Build/vue/modules/AuthModule/routes/container.vue +2 -11
- package/_Build/vue/modules/AuthModule/routes/expired-reset.vue +4 -4
- package/_Build/vue/modules/AuthModule/routes/expired-verification.vue +10 -9
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +44 -58
- package/_Build/vue/modules/AuthModule/routes/forgot.vue +10 -5
- package/_Build/vue/modules/AuthModule/routes/login.vue +12 -19
- package/_Build/vue/modules/AuthModule/routes/logincallback.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/loginsso.vue +14 -10
- package/_Build/vue/modules/AuthModule/routes/logout.vue +17 -5
- package/_Build/vue/modules/AuthModule/routes/logoutheadless.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/register.vue +24 -28
- package/_Build/vue/modules/AuthModule/routes/reset.vue +20 -14
- package/_Build/vue/modules/AuthModule/routes/success-forgot.vue +14 -8
- package/_Build/vue/modules/AuthModule/routes/success-reset.vue +2 -2
- package/_Build/vue/modules/AuthModule/routes/success-verify.vue +1 -3
- package/_Build/vue/modules/AuthModule/routes/verify.vue +11 -14
- package/_Build/vue/modules/resource/Children/create.vue +81 -0
- package/_Build/vue/modules/resource/Children/edit.vue +106 -0
- package/_Build/vue/modules/resource/Children/index.vue +42 -0
- package/_Build/vue/modules/resource/Children/partials/form.vue +111 -0
- package/_Build/vue/modules/resource/Children/show.vue +166 -0
- package/_Build/vue/modules/resource/index.js +561 -0
- package/_Build/vue/modules/resource/parent.vue +63 -0
- package/_Build/vue/modules/resource/trashable.js +104 -0
- package/_base.scss +0 -1
- package/_defaults.scss +2 -13
- package/_variables.scss +9 -4
- package/{modules/_AuthModule.scss → components/_auth.scss} +19 -68
- package/components/_datepicker.scss +1 -0
- package/components/_descriptions.scss +2 -0
- package/components/_footer.scss +1 -0
- package/components/_form.scss +18 -0
- package/components/_header.scss +3 -27
- package/components/_layout.scss +56 -0
- package/components/_menu.scss +0 -5
- package/components/_sidebar.scss +12 -27
- package/components/_table.scss +3 -0
- package/components/_token-display.scss +41 -0
- package/general.scss +1 -0
- package/index.js +31 -1
- package/package.json +7 -4
- package/vendor.scss +0 -1
- package/_Build/vue/components/layout/sideBar.vue +0 -25
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +0 -251
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/create.vue +0 -62
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/edit.vue +0 -98
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/index.vue +0 -90
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +0 -173
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +0 -262
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +0 -36
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +0 -103
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +0 -169
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +0 -120
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +0 -36
- package/components/_input.scss +0 -0
- package/modules/_AuthVariables.scss +0 -7
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/AuthModal.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components → components/layout}/Chip.vue +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VPasswordValidation.vue → components/layout/PasswordValidation.vue} +0 -0
- /package/_Build/vue/{modules/AuthModule/components/VRoleLegend.vue → components/layout/RoleLegend.vue} +0 -0
- /package/{modules → components}/_modal.scss +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-table :data="audits" v-loading="loading">
|
|
4
|
+
<el-table-column label="Old" :fit="false">
|
|
5
|
+
<template #default="scope">
|
|
6
|
+
<template v-if="scope?.row?.event !== 'created'">
|
|
7
|
+
<p
|
|
8
|
+
:key="key"
|
|
9
|
+
v-for="{ key, value } in formatValues(
|
|
10
|
+
scope?.row?.old_values,
|
|
11
|
+
)"
|
|
12
|
+
class="truncate color-9"
|
|
13
|
+
>
|
|
14
|
+
<strong>{{ ucfirst(key) }}</strong
|
|
15
|
+
><br />{{ value }}
|
|
16
|
+
</p>
|
|
17
|
+
</template>
|
|
18
|
+
</template>
|
|
19
|
+
</el-table-column>
|
|
20
|
+
|
|
21
|
+
<el-table-column label="New" :fit="false">
|
|
22
|
+
<template #default="scope">
|
|
23
|
+
<template v-if="scope?.row?.event === 'created'">
|
|
24
|
+
<span class="color-13">Resource Created</span>
|
|
25
|
+
</template>
|
|
26
|
+
<template v-else>
|
|
27
|
+
<p
|
|
28
|
+
:key="key"
|
|
29
|
+
v-for="{ key, value } in formatValues(
|
|
30
|
+
scope?.row?.new_values,
|
|
31
|
+
)"
|
|
32
|
+
class="truncate"
|
|
33
|
+
>
|
|
34
|
+
<strong>{{ ucfirst(key) }}</strong
|
|
35
|
+
><br />{{ value }}
|
|
36
|
+
</p>
|
|
37
|
+
</template>
|
|
38
|
+
</template>
|
|
39
|
+
</el-table-column>
|
|
40
|
+
|
|
41
|
+
<el-table-column label="User" :fit="false">
|
|
42
|
+
<template #default="scope">
|
|
43
|
+
<span :title="scope?.row?.user?.email">
|
|
44
|
+
{{ scope?.row?.user?.name || scope?.row?.user?.email }}
|
|
45
|
+
</span>
|
|
46
|
+
</template>
|
|
47
|
+
</el-table-column>
|
|
48
|
+
|
|
49
|
+
<el-table-column label="Date" :fit="false">
|
|
50
|
+
<template #default="scope">
|
|
51
|
+
<span :title="dateFormat(scope?.row?.created_at)">
|
|
52
|
+
{{ calendarFormat(scope?.row?.created_at) }}
|
|
53
|
+
</span>
|
|
54
|
+
</template>
|
|
55
|
+
</el-table-column>
|
|
56
|
+
</el-table>
|
|
57
|
+
|
|
58
|
+
<el-pagination
|
|
59
|
+
v-if="meta.last_page > 1"
|
|
60
|
+
v-model:current-page="page"
|
|
61
|
+
layout="prev, pager, next"
|
|
62
|
+
:total="meta.total"
|
|
63
|
+
:page-size="meta.per_page"
|
|
64
|
+
class="mt-3 justify-center"
|
|
65
|
+
@update:current-page="fetchAudits"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
import { ElTable, ElTableColumn, ElPagination } from "element-plus";
|
|
72
|
+
import {
|
|
73
|
+
ucfirst,
|
|
74
|
+
calendarFormat,
|
|
75
|
+
dateFormat,
|
|
76
|
+
} from "../../../js/libs/filters.js";
|
|
77
|
+
import axios from "axios";
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
components: {
|
|
81
|
+
ElTable,
|
|
82
|
+
ElTableColumn,
|
|
83
|
+
ElPagination,
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
props: {
|
|
87
|
+
auditableType: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
auditableId: {
|
|
92
|
+
type: [Number, String],
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
data() {
|
|
98
|
+
return {
|
|
99
|
+
audits: [],
|
|
100
|
+
meta: {},
|
|
101
|
+
loading: false,
|
|
102
|
+
page: 1,
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
mounted() {
|
|
107
|
+
this.fetchAudits();
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
methods: {
|
|
111
|
+
ucfirst,
|
|
112
|
+
calendarFormat,
|
|
113
|
+
dateFormat,
|
|
114
|
+
|
|
115
|
+
formatValues(values) {
|
|
116
|
+
if (!values) return [];
|
|
117
|
+
return Object.entries(values)
|
|
118
|
+
.filter(([key, value]) => value)
|
|
119
|
+
.map(([key, value]) => ({ key, value }));
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
async fetchAudits() {
|
|
123
|
+
this.loading = true;
|
|
124
|
+
try {
|
|
125
|
+
const res = await axios.get("/api/audits", {
|
|
126
|
+
params: {
|
|
127
|
+
"filter[auditable_type]": this.auditableType,
|
|
128
|
+
"filter[auditable_id]": this.auditableId,
|
|
129
|
+
include: "user",
|
|
130
|
+
page: this.page,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
this.audits = res.data.data;
|
|
134
|
+
this.meta = res.data.meta;
|
|
135
|
+
} catch (err) {
|
|
136
|
+
console.error("Failed to load audits", err);
|
|
137
|
+
} finally {
|
|
138
|
+
this.loading = false;
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
</script>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
4
4
|
<div class="grid__1/1">
|
|
5
5
|
<div class="flex items-center">
|
|
6
|
-
<
|
|
6
|
+
<VelBreadcrumbs :crumbs="items" />
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
|
-
import
|
|
14
|
+
import VelBreadcrumbs from "../navigation/Breadcrumbs.vue";
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
|
-
name: "
|
|
17
|
+
name: "Breadcrumbs",
|
|
18
18
|
components: {
|
|
19
|
-
|
|
19
|
+
VelBreadcrumbs,
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="chips">
|
|
3
3
|
<template v-for="(item, index) in array" :key="item.name">
|
|
4
|
-
<
|
|
4
|
+
<VelChip
|
|
5
5
|
class="chip--round"
|
|
6
6
|
:name="item.name"
|
|
7
7
|
:label="`${item.label}${index < array.length - 1 ? ',' : ''}`"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
export default {
|
|
15
15
|
components: {
|
|
16
|
-
|
|
16
|
+
VelChip: require("./Chip.vue").default,
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
props: {
|
|
@@ -8,25 +8,25 @@
|
|
|
8
8
|
<div class="vel-footer__bottom">
|
|
9
9
|
<div class="vel-footer__bottom__links">
|
|
10
10
|
<p class="color-0">©2025 Avalere Health.</p>
|
|
11
|
-
<
|
|
11
|
+
<VelLink
|
|
12
12
|
underline
|
|
13
13
|
class="color-0 ml"
|
|
14
14
|
href="https://avalerehealth.com/privacy-policy/"
|
|
15
15
|
target="_blank"
|
|
16
|
-
>Privacy Policy</
|
|
16
|
+
>Privacy Policy</VelLink
|
|
17
17
|
>
|
|
18
|
-
<
|
|
18
|
+
<VelLink
|
|
19
19
|
underline
|
|
20
20
|
class="color-0 ml"
|
|
21
21
|
href="https://avalerehealth.com/corporate-policies/"
|
|
22
22
|
target="_blank"
|
|
23
|
-
>Corporate policies and compliance</
|
|
23
|
+
>Corporate policies and compliance</VelLink
|
|
24
24
|
>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="vel-footer__bottom__end">
|
|
27
27
|
<p class="color-0">Have a question?</p>
|
|
28
|
-
<
|
|
29
|
-
>Contact our Support Team</
|
|
28
|
+
<VelLink underline class="color-0 ml" :href="contact"
|
|
29
|
+
>Contact our Support Team</VelLink
|
|
30
30
|
>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
@@ -34,17 +34,18 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script>
|
|
37
|
-
import
|
|
37
|
+
import VelLink from "../basic/link.vue";
|
|
38
38
|
|
|
39
39
|
export default {
|
|
40
|
+
components: {
|
|
41
|
+
VelLink,
|
|
42
|
+
},
|
|
43
|
+
|
|
40
44
|
props: {
|
|
41
45
|
contact: {
|
|
42
46
|
required: true,
|
|
43
47
|
type: String,
|
|
44
48
|
},
|
|
45
49
|
},
|
|
46
|
-
components: {
|
|
47
|
-
elLink,
|
|
48
|
-
},
|
|
49
50
|
};
|
|
50
51
|
</script>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="grid items-center my-4">
|
|
3
3
|
<slot>
|
|
4
|
-
<
|
|
4
|
+
<VelButton type="primary" native-type="submit" :loading="loading">
|
|
5
5
|
Save changes
|
|
6
|
-
</
|
|
6
|
+
</VelButton>
|
|
7
7
|
|
|
8
|
-
<
|
|
8
|
+
<VelButton tag="a" class="ml-2" @click="$router.go(-1)">
|
|
9
9
|
Discard changes
|
|
10
|
-
</
|
|
10
|
+
</VelButton>
|
|
11
11
|
|
|
12
|
-
<
|
|
12
|
+
<VelButton
|
|
13
13
|
v-if="method === 'patch' && preview"
|
|
14
14
|
class="ml-2"
|
|
15
15
|
tag="a"
|
|
@@ -18,14 +18,20 @@
|
|
|
18
18
|
link
|
|
19
19
|
>
|
|
20
20
|
<span v-text="`Preview`" />
|
|
21
|
-
</
|
|
21
|
+
</VelButton>
|
|
22
22
|
</slot>
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script>
|
|
27
|
+
import VelButton from "../basic/Button.vue";
|
|
28
|
+
|
|
27
29
|
export default {
|
|
28
|
-
name: "
|
|
30
|
+
name: "FormFooter",
|
|
31
|
+
|
|
32
|
+
components: {
|
|
33
|
+
VelButton,
|
|
34
|
+
},
|
|
29
35
|
|
|
30
36
|
props: {
|
|
31
37
|
loading: {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<template v-if="readonly">
|
|
6
6
|
<p>Roles</p>
|
|
7
7
|
<div v-if="!overrides" class="my-2">
|
|
8
|
-
<
|
|
8
|
+
<VelChip
|
|
9
9
|
class="mr mb inline-block"
|
|
10
10
|
name="inherited"
|
|
11
11
|
label="Inherited"
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
:key="roles.find((d) => d.id === role)"
|
|
18
18
|
class="mr mb inline-block"
|
|
19
19
|
>
|
|
20
|
-
<
|
|
20
|
+
<VelChip
|
|
21
21
|
:name="roles.find((d) => d.id === role)?.name"
|
|
22
22
|
:label="roles.find((d) => d.id === role)?.label"
|
|
23
23
|
/>
|
|
24
24
|
</li>
|
|
25
25
|
</ul>
|
|
26
26
|
</template>
|
|
27
|
-
<
|
|
27
|
+
<VelSelect
|
|
28
28
|
v-else
|
|
29
29
|
v-model="form.roles"
|
|
30
30
|
class="mt-2"
|
|
@@ -49,21 +49,23 @@
|
|
|
49
49
|
:key="index"
|
|
50
50
|
class="mr mb inline-block"
|
|
51
51
|
>
|
|
52
|
-
<
|
|
52
|
+
<VelChip :name="permission.name" :label="permission.label" />
|
|
53
53
|
</li>
|
|
54
54
|
</ul>
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
|
-
<
|
|
57
|
+
<VelRoleLegend class="mt-2" />
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script>
|
|
61
61
|
import axios from "axios";
|
|
62
|
+
import VelSelect from "../form/Select.vue";
|
|
62
63
|
|
|
63
64
|
export default {
|
|
64
65
|
components: {
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
VelRoleLegend: require("./RoleLegend.vue").default,
|
|
67
|
+
VelChip: require("./Chip.vue").default,
|
|
68
|
+
VelSelect,
|
|
67
69
|
},
|
|
68
70
|
|
|
69
71
|
props: {
|
|
@@ -89,7 +91,7 @@ export default {
|
|
|
89
91
|
|
|
90
92
|
computed: {
|
|
91
93
|
permissions() {
|
|
92
|
-
const allPermissions = this.form.roles.reduce((acc, id) => {
|
|
94
|
+
const allPermissions = (this.form.roles || []).reduce((acc, id) => {
|
|
93
95
|
return acc.concat(
|
|
94
96
|
this.roles.find((d) => d.id === id)?.permissions || [],
|
|
95
97
|
);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vel-app">
|
|
3
|
+
<VelHeader class="justify-end-dive">
|
|
4
|
+
<router-link :to="{ name: 'index' }">
|
|
5
|
+
<GSvg
|
|
6
|
+
class="logo"
|
|
7
|
+
style="width: 180px"
|
|
8
|
+
embed
|
|
9
|
+
asis
|
|
10
|
+
:name="$store.state.auth.logo"
|
|
11
|
+
/>
|
|
12
|
+
</router-link>
|
|
13
|
+
<template #links>
|
|
14
|
+
<div
|
|
15
|
+
v-if="$store.getters.authenticated"
|
|
16
|
+
class="flex items-center pr"
|
|
17
|
+
>
|
|
18
|
+
<GIcon
|
|
19
|
+
class="icon fill-1 icon--0.5 mr-0.5"
|
|
20
|
+
name="icon-account-circle"
|
|
21
|
+
embed
|
|
22
|
+
asis
|
|
23
|
+
/>
|
|
24
|
+
<span>{{ $store?.state?.auth?.user?.name }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex items-center px">
|
|
27
|
+
<router-link
|
|
28
|
+
v-if="$store.getters.authenticated"
|
|
29
|
+
:to="{ name: 'auth.logout' }"
|
|
30
|
+
class="vel-logout"
|
|
31
|
+
>Logout</router-link
|
|
32
|
+
>
|
|
33
|
+
<router-link
|
|
34
|
+
v-else
|
|
35
|
+
:to="{ name: 'auth.login' }"
|
|
36
|
+
class="vel-logout"
|
|
37
|
+
>Login</router-link
|
|
38
|
+
>
|
|
39
|
+
</div>
|
|
40
|
+
<VelButton
|
|
41
|
+
v-if="$root.spaUrl"
|
|
42
|
+
class="ml"
|
|
43
|
+
type="primary"
|
|
44
|
+
tag="a"
|
|
45
|
+
round
|
|
46
|
+
:href="`${$root.spaUrl}?authenticated=1`"
|
|
47
|
+
>
|
|
48
|
+
<span v-text="`Access ${$root.appName}`" />
|
|
49
|
+
</VelButton>
|
|
50
|
+
</template>
|
|
51
|
+
</VelHeader>
|
|
52
|
+
<div class="vel-content">
|
|
53
|
+
<VelSideBar>
|
|
54
|
+
<template #navigation>
|
|
55
|
+
<VelNavigation v-bind="$attrs" />
|
|
56
|
+
</template>
|
|
57
|
+
<template #expand>
|
|
58
|
+
<GIcon
|
|
59
|
+
class="icon icon--0.5"
|
|
60
|
+
name="icon-keyboard-tab"
|
|
61
|
+
embed
|
|
62
|
+
asis
|
|
63
|
+
/>
|
|
64
|
+
</template>
|
|
65
|
+
</VelSideBar>
|
|
66
|
+
<main class="vel-main">
|
|
67
|
+
<div class="vel-main__inner">
|
|
68
|
+
<slot />
|
|
69
|
+
</div>
|
|
70
|
+
<VelFooter contact="mailTo:det@avalerehealth.com">
|
|
71
|
+
<GSvg
|
|
72
|
+
class="logo fill-0"
|
|
73
|
+
style="width: 180px"
|
|
74
|
+
embed
|
|
75
|
+
asis
|
|
76
|
+
:name="$store.state.auth.logo"
|
|
77
|
+
/>
|
|
78
|
+
</VelFooter>
|
|
79
|
+
</main>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script>
|
|
85
|
+
export default {
|
|
86
|
+
components: {
|
|
87
|
+
VelHeader: require("./Header.vue").default,
|
|
88
|
+
VelSideBar: require("./SideBar.vue").default,
|
|
89
|
+
VelFooter: require("./Footer.vue").default,
|
|
90
|
+
VelNavigation: require("./Navigation.vue").default,
|
|
91
|
+
VelButton: require("../basic/Button.vue").default,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
</script>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VMenu>
|
|
3
|
+
<template v-for="(link, lkey) in links" :key="lkey">
|
|
4
|
+
<MenuItem v-if="!link.children" :index="lkey">
|
|
5
|
+
<router-link :to="link.href">
|
|
6
|
+
<GIcon
|
|
7
|
+
class="icon icon--0.5"
|
|
8
|
+
:name="link.icon"
|
|
9
|
+
asis
|
|
10
|
+
embed
|
|
11
|
+
/>
|
|
12
|
+
<span>{{ link.title }}</span>
|
|
13
|
+
</router-link>
|
|
14
|
+
</MenuItem>
|
|
15
|
+
<SubMenu v-else :id="lkey" :index="lkey">
|
|
16
|
+
<template #title>
|
|
17
|
+
<GIcon
|
|
18
|
+
class="icon icon--0.5"
|
|
19
|
+
:name="link.icon"
|
|
20
|
+
asis
|
|
21
|
+
embed
|
|
22
|
+
/>
|
|
23
|
+
<span>{{ link.title }}</span>
|
|
24
|
+
</template>
|
|
25
|
+
<MenuItem
|
|
26
|
+
v-for="(child, cindex) in link.children"
|
|
27
|
+
:key="cindex"
|
|
28
|
+
:index="lkey + '-1-' + cindex"
|
|
29
|
+
>
|
|
30
|
+
<router-link :to="child.href">
|
|
31
|
+
<span>{{ child.title }}</span>
|
|
32
|
+
</router-link>
|
|
33
|
+
</MenuItem>
|
|
34
|
+
</SubMenu>
|
|
35
|
+
</template>
|
|
36
|
+
</VMenu>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
export default {
|
|
41
|
+
name: "Navigation",
|
|
42
|
+
|
|
43
|
+
components: {
|
|
44
|
+
VMenu: require("../navigation/Menu.vue").default,
|
|
45
|
+
MenuItem: require("../navigation/MenuItem.vue").default,
|
|
46
|
+
SubMenu: require("../navigation/SubMenu.vue").default,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
props: {
|
|
50
|
+
links: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: () => [
|
|
53
|
+
{
|
|
54
|
+
title: "Home",
|
|
55
|
+
href: { name: "index" },
|
|
56
|
+
icon: "icon-home",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: "Companies",
|
|
60
|
+
href: { name: "companies.index" },
|
|
61
|
+
icon: "icon-cases",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "Users",
|
|
65
|
+
href: { name: "users.index" },
|
|
66
|
+
icon: "icon-user",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: "Utilities",
|
|
70
|
+
href: { name: "index" },
|
|
71
|
+
icon: "icon-utility",
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
2
|
+
<div class="flex flex-wrap items-start gap" style="row-gap: 16px">
|
|
3
|
+
<div class="flex justify-start items-center">
|
|
4
4
|
<span v-if="icon">
|
|
5
5
|
<div
|
|
6
6
|
class="p-1.5 mr-2 border-radius border border-solid border-muted flex items-center justify-center"
|
|
7
7
|
>
|
|
8
|
-
<GIcon
|
|
8
|
+
<GIcon
|
|
9
|
+
class="fill-1 icon--0.5"
|
|
10
|
+
:name="icon"
|
|
11
|
+
embed
|
|
12
|
+
artboard
|
|
13
|
+
/>
|
|
9
14
|
</div>
|
|
10
15
|
</span>
|
|
11
16
|
|
|
12
17
|
<h2 class="m-0 font-500 text-secondary">{{ title }}</h2>
|
|
13
18
|
</div>
|
|
14
19
|
|
|
15
|
-
<div
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
<div
|
|
21
|
+
class="flex flex-wrap gap items-center justify-end"
|
|
22
|
+
style="margin-left: auto"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
19
25
|
</div>
|
|
20
26
|
</div>
|
|
21
27
|
</template>
|
|
22
28
|
|
|
23
29
|
<script>
|
|
24
30
|
export default {
|
|
25
|
-
name: "
|
|
31
|
+
name: "PageHeader",
|
|
26
32
|
|
|
27
33
|
props: {
|
|
28
34
|
icon: {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vel-sidebar" :class="{ active: active }">
|
|
3
|
+
<div class="vel-sidebar__inner">
|
|
4
|
+
<div class="vel-sidebar__top">
|
|
5
|
+
<slot name="navigation" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="vel-sidebar__bottom">
|
|
8
|
+
<button class="vel-sidebar__button" @click="active = !active">
|
|
9
|
+
<slot name="expand"> > </slot>
|
|
10
|
+
</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "SideBar",
|
|
19
|
+
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
active: true,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
</script>
|