@fishawack/lab-velocity 2.0.0-beta.11 → 2.0.0-beta.13
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 +148 -6
- package/_Build/vue/components/layout/Alert.vue +5 -5
- 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} +2 -2
- package/_Build/vue/{modules/AuthModule/components → components/layout}/FormRole.vue +7 -7
- package/_Build/vue/components/layout/Layout.vue +74 -0
- package/_Build/vue/components/layout/Navigation.vue +77 -0
- package/_Build/vue/{modules/AuthModule/components/VPageHeader.vue → components/layout/PageHeader.vue} +7 -2
- package/_Build/vue/components/layout/SideBar.vue +26 -0
- package/_Build/vue/{modules/AuthModule/components/VTable.vue → components/layout/Table.vue} +6 -15
- package/_Build/vue/{modules/AuthModule/components/VTableSorter.vue → components/layout/TableSorter.vue} +15 -17
- 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/router.js +21 -89
- package/_Build/vue/modules/AuthModule/js/store.js +13 -4
- package/_Build/vue/modules/AuthModule/{adminRoutes/PCompanies/Children/partials → routes/PCompanies}/form.vue +15 -8
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +180 -0
- package/_Build/vue/modules/AuthModule/{adminRoutes/PUsers/Children/partials → routes/PUsers}/form.vue +15 -8
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +214 -0
- package/_Build/vue/modules/AuthModule/routes/change-password.vue +9 -8
- package/_Build/vue/modules/AuthModule/routes/container.vue +2 -11
- package/_Build/vue/modules/AuthModule/routes/force-reset.vue +9 -8
- package/_Build/vue/modules/AuthModule/routes/register.vue +9 -8
- package/_Build/vue/modules/AuthModule/routes/reset.vue +9 -8
- package/_Build/vue/modules/resource/Children/create.vue +76 -0
- package/_Build/vue/modules/resource/Children/edit.vue +109 -0
- package/_Build/vue/modules/resource/Children/index.vue +51 -0
- package/_Build/vue/modules/resource/Children/partials/form.vue +53 -0
- package/_Build/vue/modules/resource/Children/show.vue +145 -0
- package/_Build/vue/modules/resource/index.js +112 -0
- package/_Build/vue/modules/resource/parent.vue +41 -0
- package/components/_descriptions.scss +2 -0
- package/components/_footer.scss +1 -0
- package/components/_header.scss +3 -27
- package/components/_layout.scss +56 -0
- package/components/_sidebar.scss +12 -27
- package/index.js +7 -1
- package/package.json +3 -2
- package/_Build/vue/components/layout/sideBar.vue +0 -25
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +0 -259
- 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/show.vue +0 -267
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/parent.vue +0 -36
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/create.vue +0 -113
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/edit.vue +0 -101
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/index.vue +0 -112
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +0 -123
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/parent.vue +0 -36
- /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
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VBreadcrumbs :items="breadcrumbs" class="mb-8" container-classes="m-0" />
|
|
3
|
-
|
|
4
|
-
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
5
|
-
<div class="grid__1/2">
|
|
6
|
-
<div class="grid__1/1 grid justify-between mb-4 items-end">
|
|
7
|
-
<h2 class="h1">User import</h2>
|
|
8
|
-
<div>
|
|
9
|
-
<VelButton
|
|
10
|
-
tag="a"
|
|
11
|
-
type="secondary"
|
|
12
|
-
href="/media/content/files/example.csv"
|
|
13
|
-
download
|
|
14
|
-
>
|
|
15
|
-
<GIcon
|
|
16
|
-
class="fill-1 mr-0.5"
|
|
17
|
-
name="icon-download"
|
|
18
|
-
embed
|
|
19
|
-
artboard
|
|
20
|
-
/>
|
|
21
|
-
Download example file
|
|
22
|
-
</VelButton>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="grid__1/1">
|
|
26
|
-
<VelSelect
|
|
27
|
-
v-model="form.roles"
|
|
28
|
-
placeholder="Select"
|
|
29
|
-
multiple
|
|
30
|
-
name="roles"
|
|
31
|
-
:error="form.errors"
|
|
32
|
-
label="Roles"
|
|
33
|
-
:options="[
|
|
34
|
-
{
|
|
35
|
-
label: 'Administrator',
|
|
36
|
-
value: '1',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: 'Subscriber',
|
|
40
|
-
value: '2',
|
|
41
|
-
},
|
|
42
|
-
]"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<VelSelect
|
|
46
|
-
v-if="form.roles && form.roles.length"
|
|
47
|
-
v-model="form.permissions"
|
|
48
|
-
placeholder="Select"
|
|
49
|
-
multiple
|
|
50
|
-
name="permissions"
|
|
51
|
-
:error="form.errors"
|
|
52
|
-
label="Permissions"
|
|
53
|
-
:options="[
|
|
54
|
-
{
|
|
55
|
-
label: `Inherit Permissions`,
|
|
56
|
-
value: null,
|
|
57
|
-
},
|
|
58
|
-
//{ // temporarily disabled as not used yet
|
|
59
|
-
// label: "Approve Content",
|
|
60
|
-
// value: "2"
|
|
61
|
-
//},
|
|
62
|
-
{
|
|
63
|
-
label: 'View content',
|
|
64
|
-
value: '3',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: 'Write content',
|
|
68
|
-
value: '4',
|
|
69
|
-
disabled: !form.roles.includes(1),
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: 'Delete content',
|
|
73
|
-
value: '5',
|
|
74
|
-
disabled: !form.roles.includes(1),
|
|
75
|
-
},
|
|
76
|
-
]"
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
<div class="grid__1/1">
|
|
80
|
-
<hr class="my-3 hr-muted" />
|
|
81
|
-
|
|
82
|
-
<VelUpload
|
|
83
|
-
ref="upload"
|
|
84
|
-
v-model="form.files"
|
|
85
|
-
name="files"
|
|
86
|
-
label="Upload spreadsheet"
|
|
87
|
-
:auto-upload="false"
|
|
88
|
-
:limit="1"
|
|
89
|
-
:on-exceed="handleExceed"
|
|
90
|
-
>
|
|
91
|
-
<template #trigger>
|
|
92
|
-
<VelButton
|
|
93
|
-
class="mt"
|
|
94
|
-
type="primary"
|
|
95
|
-
:disabled="form.processing || form.files.length"
|
|
96
|
-
>Select file</VelButton
|
|
97
|
-
>
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<VelButton
|
|
101
|
-
class="ml relative button--spinner"
|
|
102
|
-
type="success"
|
|
103
|
-
:disabled="form.processing || !form.files.length"
|
|
104
|
-
@click="submitUpload"
|
|
105
|
-
>
|
|
106
|
-
<span :class="{ active: !form.processing }"
|
|
107
|
-
>Upload</span
|
|
108
|
-
>
|
|
109
|
-
<VelSpinner :class="{ active: form.processing }" />
|
|
110
|
-
</VelButton>
|
|
111
|
-
|
|
112
|
-
<small class="block my color-muted"
|
|
113
|
-
>Upload one spreadsheet with a size less than
|
|
114
|
-
50MB</small
|
|
115
|
-
>
|
|
116
|
-
</VelUpload>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</template>
|
|
121
|
-
|
|
122
|
-
<script>
|
|
123
|
-
"use strict";
|
|
124
|
-
|
|
125
|
-
import Form from "form-backend-validation";
|
|
126
|
-
import { ElMessageBox, genFileId } from "element-plus";
|
|
127
|
-
import VelButton from "../../../../../../components/basic/Button.vue";
|
|
128
|
-
import VelSelect from "../../../../../../components/form/Select.vue";
|
|
129
|
-
import VelUpload from "../../../../../../components/form/Upload.vue";
|
|
130
|
-
import VelSpinner from "../../../../../../components/form/Spinner.vue";
|
|
131
|
-
|
|
132
|
-
export default {
|
|
133
|
-
name: "Create",
|
|
134
|
-
|
|
135
|
-
components: {
|
|
136
|
-
VBreadcrumbs: require("../../../../components/VBreadcrumbs.vue")
|
|
137
|
-
.default,
|
|
138
|
-
VelButton,
|
|
139
|
-
VelSelect,
|
|
140
|
-
VelUpload,
|
|
141
|
-
VelSpinner,
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
data() {
|
|
145
|
-
return {
|
|
146
|
-
id: null,
|
|
147
|
-
breadcrumbs: [
|
|
148
|
-
{
|
|
149
|
-
href: {
|
|
150
|
-
name: "index",
|
|
151
|
-
},
|
|
152
|
-
text: "Home",
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
form: new Form(
|
|
156
|
-
{
|
|
157
|
-
step: 0,
|
|
158
|
-
files: [],
|
|
159
|
-
roles: [2],
|
|
160
|
-
permissions: [null],
|
|
161
|
-
company_id: null,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
http: window.axios,
|
|
165
|
-
},
|
|
166
|
-
),
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
watch: {
|
|
171
|
-
"form.roles": {
|
|
172
|
-
handler(newVal) {
|
|
173
|
-
const subscriptions = [
|
|
174
|
-
3, // view content
|
|
175
|
-
4, // write content
|
|
176
|
-
5, // delete content
|
|
177
|
-
];
|
|
178
|
-
|
|
179
|
-
if (!newVal.includes(1)) {
|
|
180
|
-
this.form.permissions = this.form.permissions.filter(
|
|
181
|
-
(item) => subscriptions.includes(item),
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
if (!newVal.includes(2)) {
|
|
185
|
-
this.form.permissions = this.form.permissions.filter(
|
|
186
|
-
(item) => !subscriptions.includes(item),
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
async mounted() {
|
|
195
|
-
this.id = this.$route.params.id;
|
|
196
|
-
this.form.company_id = this.id;
|
|
197
|
-
window.axios.get(`/api/companies/${this.id}`).then((res) => {
|
|
198
|
-
const company = res.data.data;
|
|
199
|
-
this.breadcrumbs.push(
|
|
200
|
-
{
|
|
201
|
-
href: {
|
|
202
|
-
name: "companies.show",
|
|
203
|
-
param: this.id,
|
|
204
|
-
},
|
|
205
|
-
text: company.name,
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
href: {
|
|
209
|
-
name: "companies.pload",
|
|
210
|
-
},
|
|
211
|
-
text: "User upload",
|
|
212
|
-
},
|
|
213
|
-
);
|
|
214
|
-
});
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
methods: {
|
|
218
|
-
submitUpload() {
|
|
219
|
-
this.form.post(`/api/users/import`).then(({ data }) => {
|
|
220
|
-
this.open(data);
|
|
221
|
-
});
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
handleExceed(files) {
|
|
225
|
-
this.$refs.upload.clearFiles();
|
|
226
|
-
|
|
227
|
-
const file = files[0];
|
|
228
|
-
file.uid = genFileId();
|
|
229
|
-
|
|
230
|
-
this.$refs.upload.handleStart(file);
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
open(data) {
|
|
234
|
-
let html = "Succesfully imported all users";
|
|
235
|
-
|
|
236
|
-
if (data.length > 0) {
|
|
237
|
-
html =
|
|
238
|
-
"Errors detected on upload following emails were not added to the system<table>";
|
|
239
|
-
for (let x = 0; x < data.length; x++) {
|
|
240
|
-
html += `<tr><td>${data[x].email}</td></tr>`;
|
|
241
|
-
}
|
|
242
|
-
html += "</table>";
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
ElMessageBox.alert(html, {
|
|
246
|
-
confirmButtonText: "Ok",
|
|
247
|
-
dangerouslyUseHTMLString: true,
|
|
248
|
-
})
|
|
249
|
-
.then(() => {
|
|
250
|
-
this.$router.replace({
|
|
251
|
-
name: "companies.show",
|
|
252
|
-
params: { id: this.id },
|
|
253
|
-
});
|
|
254
|
-
})
|
|
255
|
-
.catch(() => {});
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
};
|
|
259
|
-
</script>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VBreadcrumbs :items="breadcrumbs" class="mb-8" container-classes="m-0" />
|
|
3
|
-
|
|
4
|
-
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
5
|
-
<div class="grid__1/1">
|
|
6
|
-
<div class="grid__1/1 mb-4">
|
|
7
|
-
<h2 class="h1">Create Company</h2>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="mt grid__1/2">
|
|
10
|
-
<XForm ref="form" :form="form" :submit="submit" />
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import Form from "form-backend-validation";
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
name: "PCreate",
|
|
21
|
-
|
|
22
|
-
components: {
|
|
23
|
-
VBreadcrumbs: require("../../../components/VBreadcrumbs.vue").default,
|
|
24
|
-
XForm: require("./partials/form.vue").default,
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
props: {
|
|
28
|
-
breadcrumbs: {
|
|
29
|
-
type: Array,
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
form: new Form({
|
|
37
|
-
name: null,
|
|
38
|
-
domains: [],
|
|
39
|
-
roles: [],
|
|
40
|
-
sso_client_id: undefined,
|
|
41
|
-
sso_tenant: undefined,
|
|
42
|
-
sso_client_secret: undefined,
|
|
43
|
-
sso_type: undefined,
|
|
44
|
-
}),
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
methods: {
|
|
49
|
-
async submit() {
|
|
50
|
-
try {
|
|
51
|
-
let res = await this.form.post(`/api/companies`);
|
|
52
|
-
this.$router.replace({
|
|
53
|
-
name: "companies.show",
|
|
54
|
-
params: { id: res.data.id },
|
|
55
|
-
});
|
|
56
|
-
} catch (e) {
|
|
57
|
-
console.log(e);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
</script>
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VBreadcrumbs
|
|
3
|
-
:items="addBreadcrumbs"
|
|
4
|
-
class="mb-8"
|
|
5
|
-
container-classes="m-0"
|
|
6
|
-
/>
|
|
7
|
-
|
|
8
|
-
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
9
|
-
<div class="grid__1/1">
|
|
10
|
-
<div class="grid__1/1 mb-4">
|
|
11
|
-
<h2 class="h1">Edit Company</h2>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="grid__1/2">
|
|
14
|
-
<XForm
|
|
15
|
-
:id="id"
|
|
16
|
-
ref="form"
|
|
17
|
-
:form="form"
|
|
18
|
-
:submit="submit"
|
|
19
|
-
method="patch"
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
import Form from "form-backend-validation";
|
|
28
|
-
export default {
|
|
29
|
-
name: "PEdit",
|
|
30
|
-
|
|
31
|
-
components: {
|
|
32
|
-
VBreadcrumbs: require("../../../components/VBreadcrumbs.vue").default,
|
|
33
|
-
XForm: require("./partials/form.vue").default,
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
props: {
|
|
37
|
-
breadcrumbs: {
|
|
38
|
-
type: Array,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
id: null,
|
|
46
|
-
form: new Form({
|
|
47
|
-
name: null,
|
|
48
|
-
domains: [],
|
|
49
|
-
roles: [],
|
|
50
|
-
primary_contact: null,
|
|
51
|
-
sso_client_id: undefined,
|
|
52
|
-
sso_tenant: undefined,
|
|
53
|
-
sso_client_secret: undefined,
|
|
54
|
-
sso_type: undefined,
|
|
55
|
-
}),
|
|
56
|
-
addBreadcrumbs: [...this.$props.breadcrumbs],
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
async mounted() {
|
|
61
|
-
this.id = this.$route.params.id;
|
|
62
|
-
window.axios
|
|
63
|
-
.get(`/api/companies/${this.id}?include=primary_contact`)
|
|
64
|
-
.then((res) => {
|
|
65
|
-
const company = res.data.data;
|
|
66
|
-
this.form.name = company.name;
|
|
67
|
-
this.form.primary_contact = company?.primary_contact?.id;
|
|
68
|
-
this.form.domains = company.domains;
|
|
69
|
-
this.form.roles = company.roles.map((val) => val.id);
|
|
70
|
-
this.form.sso_client_id = company.sso_client_id;
|
|
71
|
-
this.form.sso_tenant = company.sso_tenant;
|
|
72
|
-
this.form.sso_client_secret = company.sso_client_secret;
|
|
73
|
-
this.form.sso_type = company.sso_type;
|
|
74
|
-
this.addBreadcrumbs.push({
|
|
75
|
-
href: {
|
|
76
|
-
name: "companies.show",
|
|
77
|
-
param: this.id,
|
|
78
|
-
},
|
|
79
|
-
text: company.name,
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
methods: {
|
|
85
|
-
async submit() {
|
|
86
|
-
try {
|
|
87
|
-
let res = await this.form.patch(`/api/companies/${this.id}`);
|
|
88
|
-
this.$router.replace({
|
|
89
|
-
name: "companies.show",
|
|
90
|
-
params: { id: res.data.id },
|
|
91
|
-
});
|
|
92
|
-
} catch (e) {
|
|
93
|
-
console.log(e);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
</script>
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<VBreadcrumbs :items="breadcrumbs" class="mb-8" container-classes="m-0" />
|
|
3
|
-
|
|
4
|
-
<div class="container px-6 tablet:px-4 mobile:px-2 mb-8 ml-0 mr-0">
|
|
5
|
-
<div class="grid__1/1">
|
|
6
|
-
<h2 class="h1 pb-4">
|
|
7
|
-
{{ breadcrumbs[breadcrumbs.length - 1].text }}
|
|
8
|
-
</h2>
|
|
9
|
-
|
|
10
|
-
<VTableSorter
|
|
11
|
-
key="PIndex"
|
|
12
|
-
:json-data="jsonData"
|
|
13
|
-
api="companies"
|
|
14
|
-
:fixed-height="false"
|
|
15
|
-
:display-edit-action="$store.getters.can('write companies')"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<VRoleLegend class="mt-5" />
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
24
|
-
export default {
|
|
25
|
-
name: "PIndex",
|
|
26
|
-
|
|
27
|
-
components: {
|
|
28
|
-
VBreadcrumbs: require("../../../components/VBreadcrumbs.vue").default,
|
|
29
|
-
VTableSorter: require("../../../components/VTableSorter.vue").default,
|
|
30
|
-
VRoleLegend: require("../../../components/VRoleLegend.vue").default,
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
props: {
|
|
34
|
-
breadcrumbs: {
|
|
35
|
-
type: Array,
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
jsonData: {
|
|
43
|
-
label: "company",
|
|
44
|
-
multiLabel: "companies",
|
|
45
|
-
pageLink: "companies",
|
|
46
|
-
api: "/api/companies",
|
|
47
|
-
searchable: {
|
|
48
|
-
label: "Search companies",
|
|
49
|
-
value: "name",
|
|
50
|
-
},
|
|
51
|
-
tableStructure: [
|
|
52
|
-
{
|
|
53
|
-
label: "Name",
|
|
54
|
-
key: "name",
|
|
55
|
-
sortable: true,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: "Total users",
|
|
59
|
-
key: "user_count",
|
|
60
|
-
sortable: false,
|
|
61
|
-
width: "150",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: "Role",
|
|
65
|
-
component: {
|
|
66
|
-
module: (row) => {
|
|
67
|
-
if (row.roles.length === 1)
|
|
68
|
-
return require("../../../components/Chip.vue")
|
|
69
|
-
.default;
|
|
70
|
-
|
|
71
|
-
return require("../../../components/Chips.vue")
|
|
72
|
-
.default;
|
|
73
|
-
},
|
|
74
|
-
props: (row) =>
|
|
75
|
-
row.roles.length === 1
|
|
76
|
-
? {
|
|
77
|
-
name: row.roles[0].name,
|
|
78
|
-
label: row.roles[0].label,
|
|
79
|
-
}
|
|
80
|
-
: { array: row.roles },
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
mounted() {},
|
|
89
|
-
};
|
|
90
|
-
</script>
|