eslint corrections in personbundle

This commit is contained in:
2024-11-14 16:45:50 +01:00
parent c971e34675
commit 2d6d2a1f58
13 changed files with 19 additions and 27 deletions

View File

@@ -70,7 +70,7 @@ export default {
value = "occasional";
}
this.$store.dispatch('toggleIntensity', value)
.catch(({name, violations}) => {
.catch(({name}) => {
if (name === 'ValidationException' || name === 'AccessException') {
this.$toast.open({message: this.$t('Only the referrer can toggle the intensity of an accompanying course')})
} else {
@@ -90,7 +90,7 @@ export default {
},
toggleConfidential() {
this.$store.dispatch('toggleConfidential')
.catch(({name, violations}) => {
.catch(({name}) => {
console.log(name);
if (name === 'ValidationException' || name === 'AccessException') {
this.$toast.open({message: this.$t('Only the referrer can toggle the confidentiality of an accompanying course')})

View File

@@ -70,7 +70,7 @@ export default {
// TODO resizeObserver not supports IE !
// Listen when elements change size, then recalculate heightSum and initItemsMap
const resizeObserver = new ResizeObserver(entries => {
const resizeObserver = new ResizeObserver(() => {
this.refreshPos();
});

View File

@@ -378,7 +378,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
const url = `/api/1.0/person/accompanying-course/${id}/comment.json`;
return makeFetch('DELETE', url, body)
.then((response) => {
.then(() => {
commit('removePinnedComment');
})
.catch((error) => {
@@ -459,7 +459,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
const url = `/api/1.0/person/accompanying-course/${id}/requestor.json`;
return makeFetch('DELETE', url, body)
.then((response) => {
.then(() => {
commit('removeRequestor');
dispatch('requestorIsAnonymous', false);
})
@@ -503,7 +503,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
const url = `/api/1.0/person/accompanying-course/${id}/resource.json`;
return makeFetch('DELETE', url, body)
.then((response) => {
.then(() => {
commit('removeResource', payload)
})
.catch((error) => {
@@ -736,7 +736,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
updateSocialIssues({ state, commit, dispatch }, { payload, body, method }) {
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
return makeFetch(method, url, body)
.then((response) => {
.then(() => {
commit('updateSocialIssues', payload);
})
.then(() => {