@enso-ui/teams 4.0.10 → 5.0.0

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.10",
3
+ "version": "5.0.0",
4
4
  "description": "Basic teams package",
5
5
  "main": "src/bulma/pages/teams/Index.vue",
6
6
  "scripts": {
@@ -24,9 +24,10 @@
24
24
  "@enso-ui/directives": "^2.0",
25
25
  "@enso-ui/select": "^3.0",
26
26
  "@enso-ui/transitions": "^2.0",
27
- "@enso-ui/ui": "^5.0",
27
+ "@enso-ui/ui": "^6.0",
28
+ "@enso-ui/users": "^3.0",
28
29
  "@fortawesome/fontawesome-svg-core": "^1.2.2",
29
- "@fortawesome/free-solid-svg-icons": "^5.2.0",
30
+ "@fortawesome/free-solid-svg-icons": "^5.11.2",
30
31
  "@fortawesome/vue-fontawesome": "3.0.0-5",
31
32
  "vue": "^3.0"
32
33
  },
@@ -44,9 +44,9 @@
44
44
  @create="teams.unshift($event); team = null"/>
45
45
  </div>
46
46
  <div class="column is-one-third-widescreen is-half-tablet"
47
- v-for="(team, index) in filteredTeams"
47
+ v-for="(filteredTeam, index) in filteredTeams"
48
48
  :key="index">
49
- <team :team="team"
49
+ <team :team="filteredTeam"
50
50
  @destroy="teams.splice(index, 1)"/>
51
51
  </div>
52
52
  <div class="column"
@@ -70,10 +70,10 @@ library.add(faPlus, faSearch, faSpinner);
70
70
  export default {
71
71
  name: 'Index',
72
72
 
73
- inject: ['errorHandler', 'i18n', 'route'],
74
-
75
73
  components: { Fa, Team },
76
74
 
75
+ inject: ['errorHandler', 'http', 'i18n', 'route'],
76
+
77
77
  data: () => ({
78
78
  loading: false,
79
79
  ready: false,
@@ -99,7 +99,7 @@ export default {
99
99
  fetch() {
100
100
  this.loading = true;
101
101
 
102
- axios.get(this.route('administration.teams.index'))
102
+ this.http.get(this.route('administration.teams.index'))
103
103
  .then(({ data }) => {
104
104
  this.teams = data;
105
105
  this.loading = false;
@@ -98,11 +98,13 @@ library.add([faBan, faPencilAlt, faTrash, faCheck]);
98
98
  export default {
99
99
  name: 'Team',
100
100
 
101
- inject: ['errorHandler', 'i18n', 'route', 'toastr'],
102
-
103
101
  directives: { focus },
104
102
 
105
- components: { AvatarList, EnsoSelect, Fa, Fade },
103
+ components: {
104
+ AvatarList, EnsoSelect, Fa, Fade,
105
+ },
106
+
107
+ inject: ['errorHandler', 'http', 'i18n', 'route', 'toastr'],
106
108
 
107
109
  props: {
108
110
  team: {
@@ -121,7 +123,7 @@ export default {
121
123
  store() {
122
124
  this.loading = true;
123
125
 
124
- axios.post(this.route('administration.teams.store'), this.team)
126
+ this.http.post(this.route('administration.teams.store'), this.team)
125
127
  .then(({ data }) => {
126
128
  this.loading = false;
127
129
  this.toastr.success(data.message);
@@ -129,7 +131,7 @@ export default {
129
131
  this.team.id = data.team.id;
130
132
  this.team.edit = false;
131
133
  this.$emit('create', this.team);
132
- }).catch((error) => {
134
+ }).catch(error => {
133
135
  if (error.response.status === 422) {
134
136
  this.toastr.warning(this.i18n('Choose another name'));
135
137
  return;
@@ -140,7 +142,7 @@ export default {
140
142
  destroy() {
141
143
  this.loading = true;
142
144
 
143
- axios.delete(this.route('administration.teams.destroy', this.team.id))
145
+ this.http.delete(this.route('administration.teams.destroy', this.team.id))
144
146
  .then(({ data }) => {
145
147
  this.loading = false;
146
148
  this.toastr.success(data.message);