JS corrections in ChillPersonBundle required by ESLint

This commit is contained in:
2024-11-12 15:38:46 +01:00
parent dd854ea339
commit 22ecb11227
15 changed files with 32 additions and 41 deletions

View File

@@ -30,7 +30,7 @@
</div> -->
</template>
<script>
import { mapGetters, mapState } from 'vuex'
import { mapState } from 'vuex'
import Banner from './components/Banner.vue';
import StickyNav from './components/StickyNav.vue';
import OriginDemand from './components/OriginDemand.vue';

View File

@@ -131,9 +131,6 @@ export default {
}
},
methods: {
onContentChange() {
let lastRecordedContent = this.formData.content;
},
removeComment() {
this.$store.dispatch('removePinnedComment', {id: this.pinnedComment.id})
.catch(({name, violations}) => {

View File

@@ -5,10 +5,8 @@ import { getAccompanyingCourse,
getReferrersSuggested,
getUsers,
} from '../api';
import { patchPerson } from "ChillPersonAssets/vuejs/_api/OnTheFly";
import { patchThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
import { datetimeToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/chill/js/date';
import { datetimeToISO, ISOToDate } from 'ChillMainAssets/chill/js/date';
const debug = process.env.NODE_ENV !== 'production';
@@ -22,7 +20,7 @@ let getScopesPromise = (root) => {
let accompanyingCoursePromise = getAccompanyingCourse(id);
let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCoursePromise])
.then(([scopes, accompanyingCourse]) => new Promise((resolve, reject) => {
.then(([scopes, accompanyingCourse]) => new Promise((resolve) => {
const store = createStore({
strict: debug,
@@ -235,7 +233,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
}
},
removePinnedComment(state, value) {
removePinnedComment(state) {
state.accompanyingCourse.pinnedComment = null;
},
setPinCommentAbortController(state, value) {
@@ -641,8 +639,6 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
let checkedScopesIds = scopes.map(scope => scope.id);
let removedScopesIds = currentServerScopesIds.filter(id => !checkedScopesIds.includes(id));
let addedScopesIds = checkedScopesIds.filter(id => !currentServerScopesIds.includes(id));
let lengthAfterOperation = currentServerScopesIds.length + addedScopesIds.length
- removedScopesIds.length;
return dispatch('updateScopes', {
addedScopesIds, removedScopesIds