@enso-ui/teams 4.0.7 → 4.0.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enso-ui/teams",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.11",
|
|
4
4
|
"description": "Basic teams package",
|
|
5
5
|
"main": "src/bulma/pages/teams/Index.vue",
|
|
6
6
|
"scripts": {
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"@fortawesome/fontawesome-svg-core": "^1.2.2",
|
|
29
29
|
"@fortawesome/free-solid-svg-icons": "^5.2.0",
|
|
30
30
|
"@fortawesome/vue-fontawesome": "3.0.0-5",
|
|
31
|
-
"v-tooltip": "4.0.0-alpha.1",
|
|
32
31
|
"vue": "^3.0"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
@@ -70,7 +70,7 @@ library.add(faPlus, faSearch, faSpinner);
|
|
|
70
70
|
export default {
|
|
71
71
|
name: 'Index',
|
|
72
72
|
|
|
73
|
-
inject: ['errorHandler', 'i18n', 'route'],
|
|
73
|
+
inject: ['errorHandler', 'http', 'i18n', 'route'],
|
|
74
74
|
|
|
75
75
|
components: { Fa, Team },
|
|
76
76
|
|
|
@@ -99,7 +99,7 @@ export default {
|
|
|
99
99
|
fetch() {
|
|
100
100
|
this.loading = true;
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
this.http.get(this.route('administration.teams.index'))
|
|
103
103
|
.then(({ data }) => {
|
|
104
104
|
this.teams = data;
|
|
105
105
|
this.loading = false;
|
|
@@ -10,14 +10,11 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
|
-
import { VTooltip } from 'v-tooltip';
|
|
14
13
|
import Avatar from '@enso-ui/users/src/bulma/pages/users/components/Avatar.vue';
|
|
15
14
|
|
|
16
15
|
export default {
|
|
17
16
|
name: 'AvatarList',
|
|
18
17
|
|
|
19
|
-
directives: { tooltip: VTooltip },
|
|
20
|
-
|
|
21
18
|
components: { Avatar },
|
|
22
19
|
|
|
23
20
|
inject: ['route'],
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
</span>
|
|
41
41
|
</a>
|
|
42
42
|
<a class="button is-naked is-success is-outlined"
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
@click="store();"
|
|
44
|
+
v-if="team.name">
|
|
45
45
|
<span class="icon">
|
|
46
46
|
<fa icon="check"
|
|
47
47
|
size="sm"/>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</a>
|
|
50
50
|
<a class="button is-naked is-danger is-outlined"
|
|
51
51
|
@click="destroy"
|
|
52
|
-
v-if="team.id !== null">
|
|
52
|
+
v-if="team.id !== null && team.users.length === 0">
|
|
53
53
|
<span class="icon">
|
|
54
54
|
<fa icon="trash"/>
|
|
55
55
|
</span>
|
|
@@ -98,7 +98,7 @@ library.add([faBan, faPencilAlt, faTrash, faCheck]);
|
|
|
98
98
|
export default {
|
|
99
99
|
name: 'Team',
|
|
100
100
|
|
|
101
|
-
inject: ['errorHandler', 'i18n', 'route', 'toastr'],
|
|
101
|
+
inject: ['errorHandler', 'http', 'i18n', 'route', 'toastr'],
|
|
102
102
|
|
|
103
103
|
directives: { focus },
|
|
104
104
|
|
|
@@ -111,6 +111,8 @@ export default {
|
|
|
111
111
|
},
|
|
112
112
|
},
|
|
113
113
|
|
|
114
|
+
emits: ['cancel', 'create', 'destroy'],
|
|
115
|
+
|
|
114
116
|
data: () => ({
|
|
115
117
|
loading: false,
|
|
116
118
|
}),
|
|
@@ -119,7 +121,7 @@ export default {
|
|
|
119
121
|
store() {
|
|
120
122
|
this.loading = true;
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
this.http.post(this.route('administration.teams.store'), this.team)
|
|
123
125
|
.then(({ data }) => {
|
|
124
126
|
this.loading = false;
|
|
125
127
|
this.toastr.success(data.message);
|
|
@@ -138,7 +140,7 @@ export default {
|
|
|
138
140
|
destroy() {
|
|
139
141
|
this.loading = true;
|
|
140
142
|
|
|
141
|
-
|
|
143
|
+
this.http.delete(this.route('administration.teams.destroy', this.team.id))
|
|
142
144
|
.then(({ data }) => {
|
|
143
145
|
this.loading = false;
|
|
144
146
|
this.toastr.success(data.message);
|