Handle groups/profiles/users not found in admin

Closes #966

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-12-13 17:33:10 +01:00
parent eb9b9d8f69
commit a481413153
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
3 changed files with 37 additions and 0 deletions

View file

@ -286,6 +286,17 @@
</b-table> </b-table>
</section> </section>
</div> </div>
<empty-content v-else-if="!$apollo.loading" icon="account-multiple">
{{ $t("This group was not found") }}
<template #desc>
<b-button
type="is-text"
tag="router-link"
:to="{ name: RouteName.ADMIN_GROUPS }"
>{{ $t("Back to group list") }}</b-button
>
</template>
</empty-content>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator"; import { Component, Vue, Prop } from "vue-property-decorator";

View file

@ -258,6 +258,17 @@
</b-table> </b-table>
</section> </section>
</div> </div>
<empty-content v-else-if="!$apollo.loading" icon="account">
{{ $t("This profile was not found") }}
<template #desc>
<b-button
type="is-text"
tag="router-link"
:to="{ name: RouteName.PROFILES }"
>{{ $t("Back to profile list") }}</b-button
>
</template>
</empty-content>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator"; import { Component, Vue, Prop } from "vue-property-decorator";

View file

@ -69,6 +69,17 @@
> >
</div> </div>
</div> </div>
<empty-content v-else-if="!$apollo.loading" icon="account">
{{ $t("This user was not found") }}
<template #desc>
<b-button
type="is-text"
tag="router-link"
:to="{ name: RouteName.USERS }"
>{{ $t("Back to user list") }}</b-button
>
</template>
</empty-content>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator"; import { Component, Vue, Prop } from "vue-property-decorator";
@ -80,6 +91,7 @@ import { usernameWithDomain } from "../../types/actor/actor.model";
import RouteName from "../../router/name"; import RouteName from "../../router/name";
import { IUser } from "../../types/current-user.model"; import { IUser } from "../../types/current-user.model";
import { IPerson } from "../../types/actor"; import { IPerson } from "../../types/actor";
import EmptyContent from "../../components/Utils/EmptyContent.vue";
@Component({ @Component({
apollo: { apollo: {
@ -104,6 +116,9 @@ import { IPerson } from "../../types/actor";
title: user?.email, title: user?.email,
}; };
}, },
components: {
EmptyContent,
},
}) })
export default class AdminUserProfile extends Vue { export default class AdminUserProfile extends Vue {
@Prop({ required: true }) id!: string; @Prop({ required: true }) id!: string;