@fishawack/lab-velocity 2.0.0-beta.40 → 2.0.0-beta.41
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/modules/AuthModule/js/router.js +17 -36
- package/_Build/vue/modules/AuthModule/routes/PCompanies/columns.js +268 -0
- package/_Build/vue/modules/AuthModule/routes/PCompanies/resource.js +172 -232
- package/_Build/vue/modules/AuthModule/routes/PUsers/columns.js +349 -0
- package/_Build/vue/modules/AuthModule/routes/PUsers/resource.js +143 -262
- package/_Build/vue/modules/resource/Children/create.vue +1 -1
- package/_Build/vue/modules/resource/Children/edit.vue +1 -1
- package/index.js +6 -0
- package/package.json +1 -1
- package/_Build/vue/modules/AuthModule/routes/PCompanies/form.vue +0 -205
- package/_Build/vue/modules/AuthModule/routes/PUsers/form.vue +0 -193
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-mutating-props -->
|
|
2
|
-
<template>
|
|
3
|
-
<form class="" @submit.prevent="submit">
|
|
4
|
-
<VelBasic
|
|
5
|
-
v-model="form.name"
|
|
6
|
-
name="name"
|
|
7
|
-
:error="form.errors"
|
|
8
|
-
type="text"
|
|
9
|
-
placeholder="Name"
|
|
10
|
-
label="Company name"
|
|
11
|
-
>
|
|
12
|
-
<template #label>
|
|
13
|
-
Company name <sup class="color-status-red-100">*</sup>
|
|
14
|
-
</template>
|
|
15
|
-
</VelBasic>
|
|
16
|
-
|
|
17
|
-
<VelSelect
|
|
18
|
-
v-if="method === 'patch'"
|
|
19
|
-
v-model="form.primary_contact"
|
|
20
|
-
name="primary_contact"
|
|
21
|
-
:error="form.errors"
|
|
22
|
-
placeholder="Primary Contact"
|
|
23
|
-
label="Primary Contact"
|
|
24
|
-
:options="
|
|
25
|
-
users?.map(({ name, id }) => ({
|
|
26
|
-
label: name,
|
|
27
|
-
value: id,
|
|
28
|
-
}))
|
|
29
|
-
"
|
|
30
|
-
/>
|
|
31
|
-
|
|
32
|
-
<hr class="my-3 hr-muted" />
|
|
33
|
-
|
|
34
|
-
<p class="my-0">Domain/s <sup class="color-status-red-100">*</sup></p>
|
|
35
|
-
|
|
36
|
-
<ul class="list-none pl-0 mt mb-2">
|
|
37
|
-
<li
|
|
38
|
-
v-for="(path, index) in form.domains"
|
|
39
|
-
:key="index"
|
|
40
|
-
class="mb-0.5"
|
|
41
|
-
>
|
|
42
|
-
<el-input
|
|
43
|
-
v-model="form.domains[index]"
|
|
44
|
-
placeholder="avalerehealth.com"
|
|
45
|
-
>
|
|
46
|
-
<template #prepend>@</template>
|
|
47
|
-
<template #append>
|
|
48
|
-
<VelButton
|
|
49
|
-
type="danger"
|
|
50
|
-
@click="form.domains.splice(index, 1)"
|
|
51
|
-
>
|
|
52
|
-
<GSvg class="vel-icon" name="icon-trash" />
|
|
53
|
-
</VelButton>
|
|
54
|
-
</template>
|
|
55
|
-
</el-input>
|
|
56
|
-
|
|
57
|
-
<small
|
|
58
|
-
v-if="form.errors && form.errors.has(`domains.${index}`)"
|
|
59
|
-
class="form__error vel-basic__error"
|
|
60
|
-
v-text="form.errors.first(`domains.${index}`)"
|
|
61
|
-
></small>
|
|
62
|
-
</li>
|
|
63
|
-
</ul>
|
|
64
|
-
|
|
65
|
-
<div>
|
|
66
|
-
<VelButton @click="form.domains.push('')">
|
|
67
|
-
Add Domain
|
|
68
|
-
|
|
69
|
-
<GIcon
|
|
70
|
-
name="icon-plus"
|
|
71
|
-
embed
|
|
72
|
-
asis
|
|
73
|
-
class="fill-0 icon--0.5 ml"
|
|
74
|
-
/>
|
|
75
|
-
</VelButton>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<VelBasic
|
|
79
|
-
v-model="form.seats"
|
|
80
|
-
name="seats"
|
|
81
|
-
:error="form.errors"
|
|
82
|
-
type="number"
|
|
83
|
-
placeholder="Company seats"
|
|
84
|
-
label="Company seats"
|
|
85
|
-
min="0"
|
|
86
|
-
class="mb-0 mt-2"
|
|
87
|
-
>
|
|
88
|
-
<template #label>
|
|
89
|
-
Company seats <sup class="color-status-red-100">*</sup>
|
|
90
|
-
</template>
|
|
91
|
-
</VelBasic>
|
|
92
|
-
|
|
93
|
-
<hr class="my-5 hr-muted" />
|
|
94
|
-
|
|
95
|
-
<template v-if="$store.getters.can('edit roles')">
|
|
96
|
-
<VelFormRole :form="form" />
|
|
97
|
-
|
|
98
|
-
<hr class="my-5 hr-muted" />
|
|
99
|
-
</template>
|
|
100
|
-
|
|
101
|
-
<template v-if="$store.getters.can('edit sso')">
|
|
102
|
-
<h3 class="h3 mb-2">SSO Settings</h3>
|
|
103
|
-
|
|
104
|
-
<VelSelect
|
|
105
|
-
v-model="form.sso_type"
|
|
106
|
-
name="sso_type"
|
|
107
|
-
:error="form.errors"
|
|
108
|
-
placeholder="Please Select"
|
|
109
|
-
label="Provider"
|
|
110
|
-
clearable
|
|
111
|
-
:options="[
|
|
112
|
-
{
|
|
113
|
-
value: 'azure',
|
|
114
|
-
label: 'azure',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
value: 'google',
|
|
118
|
-
label: 'google',
|
|
119
|
-
},
|
|
120
|
-
]"
|
|
121
|
-
/>
|
|
122
|
-
<VelBasic
|
|
123
|
-
v-model="form.sso_client_id"
|
|
124
|
-
name="sso_client_id"
|
|
125
|
-
:error="form.errors"
|
|
126
|
-
type="text"
|
|
127
|
-
placeholder="Key"
|
|
128
|
-
label="Key"
|
|
129
|
-
/>
|
|
130
|
-
<VelBasic
|
|
131
|
-
v-model="form.sso_tenant"
|
|
132
|
-
name="sso_tenant"
|
|
133
|
-
:error="form.errors"
|
|
134
|
-
type="text"
|
|
135
|
-
placeholder="Tenant"
|
|
136
|
-
label="Tenant"
|
|
137
|
-
/>
|
|
138
|
-
<VelBasic
|
|
139
|
-
v-model="form.sso_client_secret"
|
|
140
|
-
name="sso_client_secret"
|
|
141
|
-
:error="form.errors"
|
|
142
|
-
type="password"
|
|
143
|
-
placeholder="Secret"
|
|
144
|
-
label="Secret"
|
|
145
|
-
/>
|
|
146
|
-
|
|
147
|
-
<hr class="my-3 hr-muted" />
|
|
148
|
-
</template>
|
|
149
|
-
|
|
150
|
-
<VelFormFooter :form="form" />
|
|
151
|
-
</form>
|
|
152
|
-
</template>
|
|
153
|
-
|
|
154
|
-
<!-- eslint-disable vue/no-mutating-props -->
|
|
155
|
-
<script>
|
|
156
|
-
import axios from "axios";
|
|
157
|
-
import VelButton from "../../../../components/basic/Button.vue";
|
|
158
|
-
import VelSelect from "../../../../components/form/Select.vue";
|
|
159
|
-
import VelBasic from "../../../../components/form/basic.vue";
|
|
160
|
-
import VelFormRole from "../../../../components/layout/FormRole.vue";
|
|
161
|
-
import VelFormFooter from "../../../../components/layout/FormFooter.vue";
|
|
162
|
-
import { ElInput } from "element-plus";
|
|
163
|
-
|
|
164
|
-
export default {
|
|
165
|
-
components: {
|
|
166
|
-
VelFormFooter,
|
|
167
|
-
VelFormRole,
|
|
168
|
-
VelButton,
|
|
169
|
-
VelSelect,
|
|
170
|
-
VelBasic,
|
|
171
|
-
ElInput,
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
props: {
|
|
175
|
-
form: {
|
|
176
|
-
required: true,
|
|
177
|
-
type: Object,
|
|
178
|
-
},
|
|
179
|
-
submit: {
|
|
180
|
-
required: true,
|
|
181
|
-
type: Function,
|
|
182
|
-
},
|
|
183
|
-
method: {
|
|
184
|
-
type: String,
|
|
185
|
-
default: "post",
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
data() {
|
|
190
|
-
return {
|
|
191
|
-
users: [],
|
|
192
|
-
};
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
mounted() {
|
|
196
|
-
axios
|
|
197
|
-
.getAll(
|
|
198
|
-
`/api/users?filter[company_id]=${this.$route.params.companiesId}`,
|
|
199
|
-
)
|
|
200
|
-
.then((res) => {
|
|
201
|
-
this.users = res.data.data;
|
|
202
|
-
});
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
</script>
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
<!-- eslint-disable vue/no-mutating-props -->
|
|
2
|
-
<template>
|
|
3
|
-
<form class="" @submit.prevent="submit">
|
|
4
|
-
<template v-if="method !== 'patch'">
|
|
5
|
-
<VelBasic
|
|
6
|
-
v-model="form.name"
|
|
7
|
-
name="name"
|
|
8
|
-
:error="form.errors"
|
|
9
|
-
type="text"
|
|
10
|
-
placeholder="Name"
|
|
11
|
-
label="Name"
|
|
12
|
-
/>
|
|
13
|
-
|
|
14
|
-
<VelBasic
|
|
15
|
-
v-model="form.email"
|
|
16
|
-
placeholder="Email"
|
|
17
|
-
label="Email"
|
|
18
|
-
type="text"
|
|
19
|
-
name="email"
|
|
20
|
-
:error="form.errors"
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
Company: <span v-text="company?.name" />
|
|
24
|
-
|
|
25
|
-
<hr class="my-3 hr-muted" />
|
|
26
|
-
|
|
27
|
-
<template v-if="isSSOCompany">
|
|
28
|
-
<p class="mb-3">
|
|
29
|
-
This user belongs to an SSO-enabled company. They
|
|
30
|
-
will authenticate via SSO on first login. No
|
|
31
|
-
password is required.
|
|
32
|
-
</p>
|
|
33
|
-
</template>
|
|
34
|
-
<template v-else>
|
|
35
|
-
<VelCheckbox
|
|
36
|
-
v-model="form.notify_user"
|
|
37
|
-
name="notify_user"
|
|
38
|
-
:error="form.errors"
|
|
39
|
-
label="Send email to notify user of account and password"
|
|
40
|
-
/>
|
|
41
|
-
<VelCheckbox
|
|
42
|
-
v-model="form.force_password_change"
|
|
43
|
-
name="force_password_change"
|
|
44
|
-
:error="form.errors"
|
|
45
|
-
label="Force password change on first login"
|
|
46
|
-
/>
|
|
47
|
-
<VelCheckbox
|
|
48
|
-
v-model="form.set_password"
|
|
49
|
-
name="set_password"
|
|
50
|
-
:error="form.errors"
|
|
51
|
-
label="Auto generate password"
|
|
52
|
-
/>
|
|
53
|
-
<template v-if="!form.set_password">
|
|
54
|
-
<VelBasic
|
|
55
|
-
v-model="form.password"
|
|
56
|
-
name="password"
|
|
57
|
-
:error="form.errors"
|
|
58
|
-
type="password"
|
|
59
|
-
placeholder="Password"
|
|
60
|
-
label="Password"
|
|
61
|
-
/>
|
|
62
|
-
<VelBasic
|
|
63
|
-
v-model="form.password_confirmation"
|
|
64
|
-
name="password_confirmation"
|
|
65
|
-
:error="form.errors"
|
|
66
|
-
type="password"
|
|
67
|
-
placeholder="Password Confirmation"
|
|
68
|
-
label="Password Confirmation"
|
|
69
|
-
/>
|
|
70
|
-
</template>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<hr class="my-5 hr-muted" />
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<template v-if="$store.getters.can('edit roles')">
|
|
77
|
-
<template v-if="enableRoles">
|
|
78
|
-
<VelButton
|
|
79
|
-
@click="
|
|
80
|
-
form.roles = [];
|
|
81
|
-
enableRoles = false;
|
|
82
|
-
"
|
|
83
|
-
>
|
|
84
|
-
Reset roles
|
|
85
|
-
</VelButton>
|
|
86
|
-
<VelFormRole :form="form" />
|
|
87
|
-
</template>
|
|
88
|
-
<template v-else>
|
|
89
|
-
<VelButton @click="enableRoles = true">
|
|
90
|
-
<GIcon
|
|
91
|
-
name="icon-plus"
|
|
92
|
-
embed
|
|
93
|
-
asis
|
|
94
|
-
class="fill-0 icon--0.5 mr"
|
|
95
|
-
/>
|
|
96
|
-
Override roles
|
|
97
|
-
</VelButton>
|
|
98
|
-
<p class="mt-2">
|
|
99
|
-
Roles will be inherited from the company level.
|
|
100
|
-
</p>
|
|
101
|
-
</template>
|
|
102
|
-
<hr class="my-5 hr-muted" />
|
|
103
|
-
</template>
|
|
104
|
-
|
|
105
|
-
<VelFormFooter :loading="form.processing" />
|
|
106
|
-
</form>
|
|
107
|
-
</template>
|
|
108
|
-
|
|
109
|
-
<script>
|
|
110
|
-
import axios from "axios";
|
|
111
|
-
import { debounce } from "lodash";
|
|
112
|
-
import VelButton from "../../../../components/basic/Button.vue";
|
|
113
|
-
import VelCheckbox from "../../../../components/form/Checkbox.vue";
|
|
114
|
-
import VelBasic from "../../../../components/form/basic.vue";
|
|
115
|
-
import VelFormRole from "../../../../components/layout/FormRole.vue";
|
|
116
|
-
import VelFormFooter from "../../../../components/layout/FormFooter.vue";
|
|
117
|
-
|
|
118
|
-
export default {
|
|
119
|
-
components: {
|
|
120
|
-
VelFormFooter,
|
|
121
|
-
VelFormRole,
|
|
122
|
-
VelCheckbox,
|
|
123
|
-
VelButton,
|
|
124
|
-
VelBasic,
|
|
125
|
-
},
|
|
126
|
-
props: {
|
|
127
|
-
form: {
|
|
128
|
-
required: true,
|
|
129
|
-
type: Object,
|
|
130
|
-
},
|
|
131
|
-
submit: {
|
|
132
|
-
required: true,
|
|
133
|
-
type: Function,
|
|
134
|
-
},
|
|
135
|
-
method: {
|
|
136
|
-
type: String,
|
|
137
|
-
default: "post",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
data() {
|
|
142
|
-
return {
|
|
143
|
-
companies: null,
|
|
144
|
-
enableRoles: null,
|
|
145
|
-
company: null,
|
|
146
|
-
};
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
computed: {
|
|
150
|
-
domain() {
|
|
151
|
-
return this.form.email?.split("@")[1];
|
|
152
|
-
},
|
|
153
|
-
isSSOCompany() {
|
|
154
|
-
return !!this.company?.sso_enabled;
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
watch: {
|
|
159
|
-
"form.roles": {
|
|
160
|
-
handler(newVal) {
|
|
161
|
-
if (this.enableRoles === null) {
|
|
162
|
-
this.enableRoles = newVal.length > 0;
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
"form.email": debounce(function () {
|
|
167
|
-
if (this.domain) {
|
|
168
|
-
axios
|
|
169
|
-
.get("/api/companies", {
|
|
170
|
-
params: {
|
|
171
|
-
"filter[domains.domain]": this.domain,
|
|
172
|
-
},
|
|
173
|
-
})
|
|
174
|
-
.then((res) => {
|
|
175
|
-
this.company = res.data.data[0];
|
|
176
|
-
})
|
|
177
|
-
.catch((error) => {
|
|
178
|
-
console.error("Error fetching company:", error);
|
|
179
|
-
this.company = null;
|
|
180
|
-
});
|
|
181
|
-
} else {
|
|
182
|
-
this.company = null;
|
|
183
|
-
}
|
|
184
|
-
}, 500),
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
mounted() {
|
|
188
|
-
axios.getAll("/api/companies").then((res) => {
|
|
189
|
-
this.companies = res.data.data;
|
|
190
|
-
});
|
|
191
|
-
},
|
|
192
|
-
};
|
|
193
|
-
</script>
|