mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
eslint corrections in personbundle
This commit is contained in:
parent
c971e34675
commit
2d6d2a1f58
@ -12,7 +12,7 @@ import { ShowHide } from 'ShowHide';
|
||||
'froms': [k ],
|
||||
'event_name': 'input',
|
||||
'debug': true,
|
||||
'test': function(froms, event) {
|
||||
'test': function(froms) {
|
||||
for (let f of froms.values()) {
|
||||
console.log(f);
|
||||
for (let input of f.querySelectorAll('input').values()) {
|
||||
|
@ -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')})
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
@ -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(() => {
|
||||
|
@ -7,6 +7,8 @@ import ToastPlugin from "vue-toast-notification";
|
||||
|
||||
const i18n = _createI18n(personMessages);
|
||||
|
||||
/*eslint no-unused-vars: "error"*/
|
||||
/* exported app */
|
||||
const app = createApp({
|
||||
template: `<app></app>`,
|
||||
})
|
||||
|
@ -8,6 +8,7 @@ import ToastPlugin from "vue-toast-notification";
|
||||
|
||||
const i18n = _createI18n(personMessages);
|
||||
|
||||
/* exported app */
|
||||
const app = createApp({
|
||||
template: `<app></app>`,
|
||||
})
|
||||
|
@ -4,7 +4,6 @@ import { fetchResults, makeFetch } from 'ChillMainAssets/lib/api/apiMethods.ts';
|
||||
import { fetchTemplates } from 'ChillDocGeneratorAssets/api/pickTemplate.js';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
const evalFQDN = encodeURIComponent("Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation");
|
||||
|
||||
const store = createStore({
|
||||
strict: debug,
|
||||
@ -502,8 +501,7 @@ const store = createStore({
|
||||
let
|
||||
payload = getters.buildPayload,
|
||||
params = new URLSearchParams({'entity_version': state.version}),
|
||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`,
|
||||
errors = []
|
||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`
|
||||
;
|
||||
|
||||
commit('setIsPosting', true);
|
||||
|
@ -264,9 +264,10 @@ export default {
|
||||
},
|
||||
|
||||
unselectGoal(value) {
|
||||
getResultByGoal(value.id).then(results => {
|
||||
[ this.results.options, this.results.value ] = this.removeElementInData('results', results);
|
||||
}).catch;
|
||||
getResultByGoal(value.id)
|
||||
.then(
|
||||
results => [ this.results.options, this.results.value ] = this.removeElementInData('results', results)
|
||||
).catch;
|
||||
},
|
||||
|
||||
// selectResult(value) {
|
||||
|
@ -7,6 +7,7 @@ if (null !== document.getElementById('export_filters_social_work_type_filter_ena
|
||||
const form = document.getElementById('export_filters_social_work_type_filter_form');
|
||||
const after = form.appendChild(document.createElement('div'));
|
||||
|
||||
/* exported app */
|
||||
const app = createApp({
|
||||
template: `<app></app>`,
|
||||
})
|
||||
|
@ -49,7 +49,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MemberDetails from './MemberDetails.vue';
|
||||
import {mapGetters, mapState} from "vuex";
|
||||
import CurrentHousehold from "./CurrentHousehold";
|
||||
import PersonComment from './PersonComment';
|
||||
|
@ -9,6 +9,7 @@ import App from './App.vue';
|
||||
|
||||
const i18n = _createI18n(appMessages);
|
||||
|
||||
/* exported app */
|
||||
const app = createApp({
|
||||
template: `<app></app>`,
|
||||
})
|
||||
|
@ -1,17 +1,5 @@
|
||||
import { splitId } from './vis-network';
|
||||
import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods.ts';
|
||||
|
||||
/**
|
||||
* @function getFetch
|
||||
* @param url
|
||||
* @returns {Promise<Response>}
|
||||
* @deprecated use makeFetch instead
|
||||
*/
|
||||
const getFetch = (url) => {
|
||||
console.error('deprecated method');
|
||||
return makeFetch('GET', url, null)
|
||||
}
|
||||
|
||||
/**
|
||||
* @function postFetch
|
||||
* @param url
|
||||
|
@ -16,6 +16,7 @@ persons.forEach(person => {
|
||||
store.commit('markInWhitelist', person)
|
||||
})
|
||||
|
||||
/* exported app */
|
||||
const app = createApp({
|
||||
template: `<app :household_id="this.household_id"></app>`,
|
||||
data() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user