@fishawack/lab-velocity 2.0.0-beta.5 → 2.0.0-beta.7
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/_Build/vue/components/basic/Button.vue +1 -1
- package/_Build/vue/components/form/Select.vue +2 -2
- package/_Build/vue/components/form/Spinner.vue +5 -0
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/Upload/upload.vue +19 -11
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/partials/form.vue +20 -12
- package/_Build/vue/modules/AuthModule/adminRoutes/PCompanies/Children/show.vue +12 -8
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/partials/form.vue +18 -13
- package/_Build/vue/modules/AuthModule/adminRoutes/PUsers/Children/show.vue +7 -4
- package/_Build/vue/modules/AuthModule/components/FormRole.vue +3 -1
- package/_Build/vue/modules/AuthModule/components/VFormFooter.vue +12 -6
- package/_Build/vue/modules/AuthModule/components/VTable.vue +14 -5
- package/_Build/vue/modules/AuthModule/components/VTableSorter.vue +24 -12
- package/_base.scss +0 -1
- package/_defaults.scss +2 -13
- package/_variables.scss +9 -4
- package/{modules/_AuthModule.scss → components/_auth.scss} +0 -7
- package/package.json +1 -1
- package/vendor.scss +0 -1
- package/components/_input.scss +0 -0
- package/modules/_AuthVariables.scss +0 -7
- /package/{modules → components}/_modal.scss +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div class="grid__1/1 grid justify-between mb-4 items-end">
|
|
7
7
|
<h2 class="h1">User import</h2>
|
|
8
8
|
<div>
|
|
9
|
-
<
|
|
9
|
+
<VelButton
|
|
10
10
|
tag="a"
|
|
11
11
|
type="secondary"
|
|
12
12
|
href="/media/content/files/example.csv"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
artboard
|
|
20
20
|
/>
|
|
21
21
|
Download example file
|
|
22
|
-
</
|
|
22
|
+
</VelButton>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="grid__1/1">
|
|
26
|
-
<
|
|
26
|
+
<VelSelect
|
|
27
27
|
v-model="form.roles"
|
|
28
28
|
placeholder="Select"
|
|
29
29
|
multiple
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]"
|
|
43
43
|
/>
|
|
44
44
|
|
|
45
|
-
<
|
|
45
|
+
<VelSelect
|
|
46
46
|
v-if="form.roles && form.roles.length"
|
|
47
47
|
v-model="form.permissions"
|
|
48
48
|
placeholder="Select"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<div class="grid__1/1">
|
|
80
80
|
<hr class="my-3 hr-muted" />
|
|
81
81
|
|
|
82
|
-
<
|
|
82
|
+
<VelUpload
|
|
83
83
|
ref="upload"
|
|
84
84
|
v-model="form.files"
|
|
85
85
|
name="files"
|
|
@@ -89,15 +89,15 @@
|
|
|
89
89
|
:on-exceed="handleExceed"
|
|
90
90
|
>
|
|
91
91
|
<template #trigger>
|
|
92
|
-
<
|
|
92
|
+
<VelButton
|
|
93
93
|
class="mt"
|
|
94
94
|
type="primary"
|
|
95
95
|
:disabled="form.processing || form.files.length"
|
|
96
|
-
>Select file</
|
|
96
|
+
>Select file</VelButton
|
|
97
97
|
>
|
|
98
98
|
</template>
|
|
99
99
|
|
|
100
|
-
<
|
|
100
|
+
<VelButton
|
|
101
101
|
class="ml relative button--spinner"
|
|
102
102
|
type="success"
|
|
103
103
|
:disabled="form.processing || !form.files.length"
|
|
@@ -106,14 +106,14 @@
|
|
|
106
106
|
<span :class="{ active: !form.processing }"
|
|
107
107
|
>Upload</span
|
|
108
108
|
>
|
|
109
|
-
<
|
|
110
|
-
</
|
|
109
|
+
<VelSpinner :class="{ active: form.processing }" />
|
|
110
|
+
</VelButton>
|
|
111
111
|
|
|
112
112
|
<small class="block my color-muted"
|
|
113
113
|
>Upload one spreadsheet with a size less than
|
|
114
114
|
50MB</small
|
|
115
115
|
>
|
|
116
|
-
</
|
|
116
|
+
</VelUpload>
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
@@ -124,6 +124,10 @@
|
|
|
124
124
|
|
|
125
125
|
import Form from "form-backend-validation";
|
|
126
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";
|
|
127
131
|
|
|
128
132
|
export default {
|
|
129
133
|
name: "Create",
|
|
@@ -131,6 +135,10 @@ export default {
|
|
|
131
135
|
components: {
|
|
132
136
|
VBreadcrumbs: require("../../../../components/VBreadcrumbs.vue")
|
|
133
137
|
.default,
|
|
138
|
+
VelButton,
|
|
139
|
+
VelSelect,
|
|
140
|
+
VelUpload,
|
|
141
|
+
VelSpinner,
|
|
134
142
|
},
|
|
135
143
|
|
|
136
144
|
data() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- eslint-disable vue/no-mutating-props -->
|
|
2
2
|
<template>
|
|
3
3
|
<form class="" @submit.prevent="submit">
|
|
4
|
-
<
|
|
4
|
+
<VelBasic
|
|
5
5
|
v-model="form.name"
|
|
6
6
|
name="name"
|
|
7
7
|
:error="form.errors"
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
<template #label>
|
|
13
13
|
Company name <sup class="color-status-red-100">*</sup>
|
|
14
14
|
</template>
|
|
15
|
-
</
|
|
15
|
+
</VelBasic>
|
|
16
16
|
|
|
17
|
-
<
|
|
17
|
+
<VelSelect
|
|
18
18
|
v-if="method === 'patch'"
|
|
19
19
|
v-model="form.primary_contact"
|
|
20
20
|
name="primary_contact"
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
>
|
|
46
46
|
<template #prepend>@</template>
|
|
47
47
|
<template #append>
|
|
48
|
-
<
|
|
48
|
+
<VelButton
|
|
49
49
|
type="danger"
|
|
50
50
|
@click="form.domains.splice(index, 1)"
|
|
51
51
|
>
|
|
52
52
|
<GSvg class="vel-icon" name="trash" />
|
|
53
|
-
</
|
|
53
|
+
</VelButton>
|
|
54
54
|
</template>
|
|
55
55
|
</el-input>
|
|
56
56
|
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
</ul>
|
|
64
64
|
|
|
65
65
|
<div>
|
|
66
|
-
<
|
|
66
|
+
<VelButton @click="form.domains.push('')">
|
|
67
67
|
Add Domain
|
|
68
68
|
|
|
69
69
|
<GIcon name="icon-plus" embed asis class="fill-0 ml" />
|
|
70
|
-
</
|
|
70
|
+
</VelButton>
|
|
71
71
|
</div>
|
|
72
72
|
|
|
73
73
|
<hr class="my-5 hr-muted" />
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<template v-if="$store.getters.can('edit sso')">
|
|
82
82
|
<h3 class="h3 mb-2">SSO Settings</h3>
|
|
83
83
|
|
|
84
|
-
<
|
|
84
|
+
<VelSelect
|
|
85
85
|
v-model="form.sso_type"
|
|
86
86
|
name="sso_type"
|
|
87
87
|
:error="form.errors"
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
]"
|
|
101
101
|
/>
|
|
102
|
-
<
|
|
102
|
+
<VelBasic
|
|
103
103
|
v-model="form.sso_client_id"
|
|
104
104
|
name="sso_client_id"
|
|
105
105
|
:error="form.errors"
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
placeholder="Key"
|
|
108
108
|
label="Key"
|
|
109
109
|
/>
|
|
110
|
-
<
|
|
110
|
+
<VelBasic
|
|
111
111
|
v-model="form.sso_tenant"
|
|
112
112
|
name="sso_tenant"
|
|
113
113
|
:error="form.errors"
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
placeholder="Tenant"
|
|
116
116
|
label="Tenant"
|
|
117
117
|
/>
|
|
118
|
-
<
|
|
118
|
+
<VelBasic
|
|
119
119
|
v-model="form.sso_client_secret"
|
|
120
120
|
name="sso_client_secret"
|
|
121
121
|
:error="form.errors"
|
|
@@ -134,11 +134,19 @@
|
|
|
134
134
|
<!-- eslint-disable vue/no-mutating-props -->
|
|
135
135
|
<script>
|
|
136
136
|
import axios from "axios";
|
|
137
|
+
import VelButton from "../../../../../../components/basic/Button.vue";
|
|
138
|
+
import VelSelect from "../../../../../../components/form/Select.vue";
|
|
139
|
+
import VelBasic from "../../../../../../components/form/basic.vue";
|
|
140
|
+
import { ElInput } from "element-plus";
|
|
137
141
|
|
|
138
142
|
export default {
|
|
139
143
|
components: {
|
|
140
144
|
VFormFooter: require("../../../../components/VFormFooter.vue").default,
|
|
141
145
|
FormRole: require("../../../../components/FormRole.vue").default,
|
|
146
|
+
VelButton,
|
|
147
|
+
VelSelect,
|
|
148
|
+
VelBasic,
|
|
149
|
+
ElInput,
|
|
142
150
|
},
|
|
143
151
|
|
|
144
152
|
props: {
|
|
@@ -151,8 +159,8 @@ export default {
|
|
|
151
159
|
type: Function,
|
|
152
160
|
},
|
|
153
161
|
method: {
|
|
154
|
-
required: true,
|
|
155
162
|
type: String,
|
|
163
|
+
default: "post",
|
|
156
164
|
},
|
|
157
165
|
},
|
|
158
166
|
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
Temporarily disabled
|
|
22
22
|
-->
|
|
23
23
|
|
|
24
|
-
<
|
|
24
|
+
<VelButton
|
|
25
25
|
v-if="company.primary_contact"
|
|
26
26
|
type="primary"
|
|
27
27
|
@click="sendWelcome"
|
|
28
28
|
>
|
|
29
29
|
Send welcome email
|
|
30
|
-
</
|
|
30
|
+
</VelButton>
|
|
31
31
|
|
|
32
|
-
<
|
|
32
|
+
<VelButton
|
|
33
33
|
v-if="$store.getters.can('write companies')"
|
|
34
34
|
tag="a"
|
|
35
35
|
type="primary"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
artboard
|
|
48
48
|
/>
|
|
49
49
|
Edit company
|
|
50
|
-
</
|
|
50
|
+
</VelButton>
|
|
51
51
|
</VPageHeader>
|
|
52
52
|
|
|
53
53
|
<hr class="my-3 hr-muted" />
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
:fixed-height="false"
|
|
110
110
|
>
|
|
111
111
|
<template #table-action>
|
|
112
|
-
<
|
|
112
|
+
<VelButton
|
|
113
113
|
type="primary"
|
|
114
114
|
tag="a"
|
|
115
115
|
class="ml-2"
|
|
@@ -127,14 +127,13 @@
|
|
|
127
127
|
class="fill-0 mr-0.5"
|
|
128
128
|
/>
|
|
129
129
|
Create new {{ jsonData.label }}
|
|
130
|
-
</
|
|
130
|
+
</VelButton>
|
|
131
131
|
</template>
|
|
132
132
|
</VTableSorter>
|
|
133
133
|
</template>
|
|
134
134
|
|
|
135
135
|
<div v-else class="absolute transform-center text-center">
|
|
136
|
-
<
|
|
137
|
-
<p v-text="`Loading...`" />
|
|
136
|
+
<VelSpinner class="fill-5" />
|
|
138
137
|
</div>
|
|
139
138
|
</div>
|
|
140
139
|
</div>
|
|
@@ -142,6 +141,8 @@
|
|
|
142
141
|
|
|
143
142
|
<script>
|
|
144
143
|
import axios from "axios";
|
|
144
|
+
import VelButton from "../../../../../components/basic/Button.vue";
|
|
145
|
+
import VelSpinner from "../../../../../components/form/Spinner.vue";
|
|
145
146
|
|
|
146
147
|
export default {
|
|
147
148
|
name: "PShow",
|
|
@@ -150,6 +151,9 @@ export default {
|
|
|
150
151
|
VBreadcrumbs: require("../../../components/VBreadcrumbs.vue").default,
|
|
151
152
|
VTableSorter: require("../../../components/VTableSorter.vue").default,
|
|
152
153
|
VPageHeader: require("../../../components/VPageHeader.vue").default,
|
|
154
|
+
FormRole: require("../../../components/FormRole.vue").default,
|
|
155
|
+
VelSpinner,
|
|
156
|
+
VelButton,
|
|
153
157
|
},
|
|
154
158
|
props: {
|
|
155
159
|
breadcrumbs: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<form class="" @submit.prevent="submit">
|
|
4
4
|
<template v-if="method !== 'patch'">
|
|
5
|
-
<
|
|
5
|
+
<VelBasic
|
|
6
6
|
v-model="form.name"
|
|
7
7
|
name="name"
|
|
8
8
|
:error="form.errors"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
label="Name"
|
|
12
12
|
/>
|
|
13
13
|
|
|
14
|
-
<
|
|
14
|
+
<VelBasic
|
|
15
15
|
v-model="form.email"
|
|
16
16
|
placeholder="Email"
|
|
17
17
|
label="Email"
|
|
@@ -24,26 +24,26 @@
|
|
|
24
24
|
|
|
25
25
|
<hr class="my-3 hr-muted" />
|
|
26
26
|
|
|
27
|
-
<
|
|
27
|
+
<VelCheckbox
|
|
28
28
|
v-model="form.notify_user"
|
|
29
29
|
name="notify_user"
|
|
30
30
|
:error="form.errors"
|
|
31
31
|
label="Send email to notify user of account and password"
|
|
32
32
|
/>
|
|
33
|
-
<
|
|
33
|
+
<VelCheckbox
|
|
34
34
|
v-model="form.force_password_change"
|
|
35
35
|
name="force_password_change"
|
|
36
36
|
:error="form.errors"
|
|
37
37
|
label="Force password change on first login"
|
|
38
38
|
/>
|
|
39
|
-
<
|
|
39
|
+
<VelCheckbox
|
|
40
40
|
v-model="form.set_password"
|
|
41
41
|
name="set_password"
|
|
42
42
|
:error="form.errors"
|
|
43
43
|
label="Auto generate password"
|
|
44
44
|
/>
|
|
45
45
|
<template v-if="!form.set_password">
|
|
46
|
-
<
|
|
46
|
+
<VelBasic
|
|
47
47
|
v-model="form.password"
|
|
48
48
|
name="password"
|
|
49
49
|
:error="form.errors"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
placeholder="Password"
|
|
52
52
|
label="Password"
|
|
53
53
|
/>
|
|
54
|
-
<
|
|
54
|
+
<VelBasic
|
|
55
55
|
v-model="form.password_confirmation"
|
|
56
56
|
name="password_confirmation"
|
|
57
57
|
:error="form.errors"
|
|
@@ -66,22 +66,21 @@
|
|
|
66
66
|
|
|
67
67
|
<template v-if="$store.getters.can('edit roles')">
|
|
68
68
|
<template v-if="enableRoles">
|
|
69
|
-
<
|
|
70
|
-
type="secondary"
|
|
69
|
+
<VelButton
|
|
71
70
|
@click="
|
|
72
71
|
form.roles = [];
|
|
73
72
|
enableRoles = false;
|
|
74
73
|
"
|
|
75
74
|
>
|
|
76
75
|
Reset roles
|
|
77
|
-
</
|
|
76
|
+
</VelButton>
|
|
78
77
|
<FormRole :form="form" />
|
|
79
78
|
</template>
|
|
80
79
|
<template v-else>
|
|
81
|
-
<
|
|
80
|
+
<VelButton @click="enableRoles = true">
|
|
82
81
|
<GIcon name="icon-plus" embed asis class="fill-0 mr" />
|
|
83
82
|
Override roles
|
|
84
|
-
</
|
|
83
|
+
</VelButton>
|
|
85
84
|
<p class="mt-2">
|
|
86
85
|
Roles will be inherited from the company level.
|
|
87
86
|
</p>
|
|
@@ -96,11 +95,17 @@
|
|
|
96
95
|
<script>
|
|
97
96
|
import axios from "axios";
|
|
98
97
|
import { debounce } from "lodash";
|
|
98
|
+
import VelButton from "../../../../../../components/basic/Button.vue";
|
|
99
|
+
import VelCheckbox from "../../../../../../components/form/Checkbox.vue";
|
|
100
|
+
import VelBasic from "../../../../../../components/form/basic.vue";
|
|
99
101
|
|
|
100
102
|
export default {
|
|
101
103
|
components: {
|
|
102
104
|
VFormFooter: require("../../../../components/VFormFooter.vue").default,
|
|
103
105
|
FormRole: require("../../../../components/FormRole.vue").default,
|
|
106
|
+
VelCheckbox,
|
|
107
|
+
VelButton,
|
|
108
|
+
VelBasic,
|
|
104
109
|
},
|
|
105
110
|
props: {
|
|
106
111
|
form: {
|
|
@@ -112,8 +117,8 @@ export default {
|
|
|
112
117
|
type: Function,
|
|
113
118
|
},
|
|
114
119
|
method: {
|
|
115
|
-
required: true,
|
|
116
120
|
type: String,
|
|
121
|
+
default: "post",
|
|
117
122
|
},
|
|
118
123
|
},
|
|
119
124
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
icon="icon-user"
|
|
14
14
|
:title="`${user.name} ${user.last_name ?? ''}`"
|
|
15
15
|
>
|
|
16
|
-
<
|
|
16
|
+
<VelButton
|
|
17
17
|
v-if="$store.getters.can('write users')"
|
|
18
18
|
tag="a"
|
|
19
19
|
type="primary"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
artboard
|
|
32
32
|
/>
|
|
33
33
|
Edit user
|
|
34
|
-
</
|
|
34
|
+
</VelButton>
|
|
35
35
|
</VPageHeader>
|
|
36
36
|
|
|
37
37
|
<hr class="my-3 hr-muted" />
|
|
@@ -69,8 +69,7 @@
|
|
|
69
69
|
</template>
|
|
70
70
|
|
|
71
71
|
<div v-else class="absolute transform-center text-center">
|
|
72
|
-
<
|
|
73
|
-
<p v-text="`Loading...`" />
|
|
72
|
+
<VelSpinner />
|
|
74
73
|
</div>
|
|
75
74
|
</div>
|
|
76
75
|
</div>
|
|
@@ -78,6 +77,8 @@
|
|
|
78
77
|
|
|
79
78
|
<script>
|
|
80
79
|
import axios from "axios";
|
|
80
|
+
import VelButton from "../../../../../components/basic/Button.vue";
|
|
81
|
+
import VelSpinner from "../../../../../components/form/Spinner.vue";
|
|
81
82
|
|
|
82
83
|
export default {
|
|
83
84
|
name: "PShow",
|
|
@@ -86,6 +87,8 @@ export default {
|
|
|
86
87
|
VBreadcrumbs: require("../../../components/VBreadcrumbs.vue").default,
|
|
87
88
|
VPageHeader: require("../../../components/VPageHeader.vue").default,
|
|
88
89
|
FormRole: require("../../../components/FormRole.vue").default,
|
|
90
|
+
VelButton,
|
|
91
|
+
VelSpinner,
|
|
89
92
|
},
|
|
90
93
|
|
|
91
94
|
props: {
|
|
@@ -24,7 +24,7 @@
|
|
|
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"
|
|
@@ -59,11 +59,13 @@
|
|
|
59
59
|
|
|
60
60
|
<script>
|
|
61
61
|
import axios from "axios";
|
|
62
|
+
import VelSelect from "../../../components/form/Select.vue";
|
|
62
63
|
|
|
63
64
|
export default {
|
|
64
65
|
components: {
|
|
65
66
|
VRoleLegend: require("./VRoleLegend.vue").default,
|
|
66
67
|
Chip: require("./Chip.vue").default,
|
|
68
|
+
VelSelect,
|
|
67
69
|
},
|
|
68
70
|
|
|
69
71
|
props: {
|
|
@@ -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,15 +18,21 @@
|
|
|
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 "../../../components/basic/Button.vue";
|
|
28
|
+
|
|
27
29
|
export default {
|
|
28
30
|
name: "VFormFooter",
|
|
29
31
|
|
|
32
|
+
components: {
|
|
33
|
+
VelButton,
|
|
34
|
+
},
|
|
35
|
+
|
|
30
36
|
props: {
|
|
31
37
|
loading: {
|
|
32
38
|
type: Boolean,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-table
|
|
3
3
|
:data="$props.data"
|
|
4
|
-
:height="fixedHeight ? 762 :
|
|
4
|
+
:height="fixedHeight ? 762 : undefined"
|
|
5
5
|
style="width: 100%"
|
|
6
6
|
@sort-change="handleSort"
|
|
7
7
|
>
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
v-if="$props.displayShowAction"
|
|
48
48
|
:to="$props.targetAction($props.data[scope.$index])"
|
|
49
49
|
>
|
|
50
|
-
<
|
|
50
|
+
<VelButton size="small" type="primary">
|
|
51
51
|
{{ `View` }}
|
|
52
|
-
</
|
|
52
|
+
</VelButton>
|
|
53
53
|
</router-link>
|
|
54
54
|
<router-link
|
|
55
55
|
v-if="$props.displayEditAction"
|
|
56
56
|
class="ml"
|
|
57
57
|
:to="$props.editAction($props.data[scope.$index])"
|
|
58
58
|
>
|
|
59
|
-
<
|
|
59
|
+
<VelButton size="small">
|
|
60
60
|
{{ `Edit` }}
|
|
61
|
-
</
|
|
61
|
+
</VelButton>
|
|
62
62
|
</router-link>
|
|
63
63
|
</template>
|
|
64
64
|
</el-table-column>
|
|
@@ -67,9 +67,18 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script>
|
|
70
|
+
import { ElTable, ElTableColumn } from "element-plus";
|
|
71
|
+
import VelButton from "../../../components/basic/Button.vue";
|
|
72
|
+
|
|
70
73
|
export default {
|
|
71
74
|
name: "VTable",
|
|
72
75
|
|
|
76
|
+
components: {
|
|
77
|
+
ElTable,
|
|
78
|
+
ElTableColumn,
|
|
79
|
+
VelButton,
|
|
80
|
+
},
|
|
81
|
+
|
|
73
82
|
props: {
|
|
74
83
|
data: {
|
|
75
84
|
type: [Array, Object],
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="flex justify-end items-end grid__2/3">
|
|
16
|
-
<
|
|
16
|
+
<VelBasic
|
|
17
17
|
v-if="jsonData.searchable"
|
|
18
18
|
ref="search"
|
|
19
19
|
v-model="search"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
<template #prepend
|
|
28
28
|
><GIcon embed asis name="icon-search"
|
|
29
29
|
/></template>
|
|
30
|
-
</
|
|
30
|
+
</VelBasic>
|
|
31
31
|
<slot v-if="displayActions" name="table-action">
|
|
32
|
-
<
|
|
32
|
+
<VelButton
|
|
33
33
|
v-if="displayEditAction"
|
|
34
34
|
size="large"
|
|
35
35
|
type="primary"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
class="fill-0 mr-0.5"
|
|
49
49
|
/>
|
|
50
50
|
Create new {{ jsonData.label }}
|
|
51
|
-
</
|
|
51
|
+
</VelButton>
|
|
52
52
|
</slot>
|
|
53
53
|
</div>
|
|
54
54
|
</slot>
|
|
@@ -93,23 +93,32 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
<div v-else class="absolute transform-center text-center">
|
|
96
|
-
<
|
|
97
|
-
<p v-text="`Loading...`" />
|
|
96
|
+
<VelSpinner />
|
|
98
97
|
</div>
|
|
99
98
|
</template>
|
|
100
99
|
|
|
101
100
|
<script>
|
|
101
|
+
import axios from "axios";
|
|
102
|
+
import { ElPagination } from "element-plus";
|
|
103
|
+
import VelButton from "../../../components/basic/Button.vue";
|
|
104
|
+
import VelBasic from "../../../components/form/basic.vue";
|
|
105
|
+
import VelSpinner from "../../../components/form/Spinner.vue";
|
|
106
|
+
|
|
102
107
|
export default {
|
|
103
108
|
name: "VTableSorter",
|
|
104
109
|
|
|
105
110
|
components: {
|
|
106
111
|
VTable: require("./VTable.vue").default,
|
|
112
|
+
VelButton,
|
|
113
|
+
VelBasic,
|
|
114
|
+
ElPagination,
|
|
115
|
+
VelSpinner,
|
|
107
116
|
},
|
|
108
117
|
|
|
109
118
|
props: {
|
|
110
119
|
jsonData: {
|
|
111
120
|
required: true,
|
|
112
|
-
type:
|
|
121
|
+
type: Object,
|
|
113
122
|
},
|
|
114
123
|
fixedHeight: {
|
|
115
124
|
default: true,
|
|
@@ -193,11 +202,14 @@ export default {
|
|
|
193
202
|
`page=${page}`,
|
|
194
203
|
];
|
|
195
204
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
205
|
+
const query = mergedQuery.join("&");
|
|
206
|
+
|
|
207
|
+
return axios
|
|
208
|
+
.get(`/api/${this.$props.api}${query ? "?" + query : ""}`)
|
|
209
|
+
.then((res) => {
|
|
210
|
+
return res.data;
|
|
211
|
+
})
|
|
212
|
+
.catch(this.$root.errors);
|
|
201
213
|
},
|
|
202
214
|
|
|
203
215
|
getStatusLabel(status) {
|
package/_base.scss
CHANGED
package/_defaults.scss
CHANGED
|
@@ -5,16 +5,5 @@
|
|
|
5
5
|
$colors: variables.dynamic("color", module-variables("variables"));
|
|
6
6
|
|
|
7
7
|
// Override lab-ui defaults here, e.g $button: $color6;
|
|
8
|
-
$
|
|
9
|
-
|
|
10
|
-
margin-left: 0;
|
|
11
|
-
padding: 0px 5 * $spacing;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
body {
|
|
15
|
-
font-family: $primaryFont, sans-serif;
|
|
16
|
-
font-size: get-ratio(16px);
|
|
17
|
-
line-height: 1.5;
|
|
18
|
-
color: $color1;
|
|
19
|
-
background-color: $color3;
|
|
20
|
-
}
|
|
8
|
+
$fontColor: $color6 !default;
|
|
9
|
+
$fontFamily: $primaryFont, sans-serif !default;
|
package/_variables.scss
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@import "@fishawack/lab-ui/_variables.scss";
|
|
2
|
-
// Set global variables here, e.g $color6: red;
|
|
3
|
-
@import "./modules/AuthVariables";
|
|
4
2
|
|
|
3
|
+
// Set global variables here, e.g $color6: red;
|
|
5
4
|
$primaryFont: "Inter";
|
|
6
5
|
$primaryFontThin: "Inter-Thin";
|
|
7
6
|
$primaryFontExtraLight: "Inter-ExtraLight";
|
|
@@ -10,11 +9,10 @@ $primaryFontRegular: "Inter-Regular";
|
|
|
10
9
|
$primaryFontMedium: "Inter-Medium";
|
|
11
10
|
$primaryFontSemiBold: "Inter-SemiBold";
|
|
12
11
|
$primaryFontBold: "Inter-Bold";
|
|
13
|
-
|
|
14
12
|
$secondaryFont: "NotoSerif";
|
|
15
13
|
$secondaryFontMedium: "NotoSerif-Medium";
|
|
16
|
-
// Colors
|
|
17
14
|
|
|
15
|
+
// Colors
|
|
18
16
|
$color1: #2d2d2d;
|
|
19
17
|
$color2: #333333;
|
|
20
18
|
$color3: #f7f7f7;
|
|
@@ -29,3 +27,10 @@ $color11: #8c8c8c; //Used
|
|
|
29
27
|
$color12: #5c5c5c;
|
|
30
28
|
$color13: #3c976e;
|
|
31
29
|
$colorAlert: #d53a3a;
|
|
30
|
+
|
|
31
|
+
// Spacing
|
|
32
|
+
$spacing: 8px;
|
|
33
|
+
|
|
34
|
+
// Auth
|
|
35
|
+
$am-spacing: 8px;
|
|
36
|
+
$am-highlight: #3c976e;
|
package/package.json
CHANGED
package/vendor.scss
CHANGED
package/components/_input.scss
DELETED
|
File without changes
|
|
File without changes
|