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 ],
|
'froms': [k ],
|
||||||
'event_name': 'input',
|
'event_name': 'input',
|
||||||
'debug': true,
|
'debug': true,
|
||||||
'test': function(froms, event) {
|
'test': function(froms) {
|
||||||
for (let f of froms.values()) {
|
for (let f of froms.values()) {
|
||||||
console.log(f);
|
console.log(f);
|
||||||
for (let input of f.querySelectorAll('input').values()) {
|
for (let input of f.querySelectorAll('input').values()) {
|
||||||
|
@ -70,7 +70,7 @@ export default {
|
|||||||
value = "occasional";
|
value = "occasional";
|
||||||
}
|
}
|
||||||
this.$store.dispatch('toggleIntensity', value)
|
this.$store.dispatch('toggleIntensity', value)
|
||||||
.catch(({name, violations}) => {
|
.catch(({name}) => {
|
||||||
if (name === 'ValidationException' || name === 'AccessException') {
|
if (name === 'ValidationException' || name === 'AccessException') {
|
||||||
this.$toast.open({message: this.$t('Only the referrer can toggle the intensity of an accompanying course')})
|
this.$toast.open({message: this.$t('Only the referrer can toggle the intensity of an accompanying course')})
|
||||||
} else {
|
} else {
|
||||||
@ -90,7 +90,7 @@ export default {
|
|||||||
},
|
},
|
||||||
toggleConfidential() {
|
toggleConfidential() {
|
||||||
this.$store.dispatch('toggleConfidential')
|
this.$store.dispatch('toggleConfidential')
|
||||||
.catch(({name, violations}) => {
|
.catch(({name}) => {
|
||||||
console.log(name);
|
console.log(name);
|
||||||
if (name === 'ValidationException' || name === 'AccessException') {
|
if (name === 'ValidationException' || name === 'AccessException') {
|
||||||
this.$toast.open({message: this.$t('Only the referrer can toggle the confidentiality of an accompanying course')})
|
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 !
|
// TODO resizeObserver not supports IE !
|
||||||
// Listen when elements change size, then recalculate heightSum and initItemsMap
|
// Listen when elements change size, then recalculate heightSum and initItemsMap
|
||||||
const resizeObserver = new ResizeObserver(entries => {
|
const resizeObserver = new ResizeObserver(() => {
|
||||||
this.refreshPos();
|
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`;
|
const url = `/api/1.0/person/accompanying-course/${id}/comment.json`;
|
||||||
|
|
||||||
return makeFetch('DELETE', url, body)
|
return makeFetch('DELETE', url, body)
|
||||||
.then((response) => {
|
.then(() => {
|
||||||
commit('removePinnedComment');
|
commit('removePinnedComment');
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.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`;
|
const url = `/api/1.0/person/accompanying-course/${id}/requestor.json`;
|
||||||
|
|
||||||
return makeFetch('DELETE', url, body)
|
return makeFetch('DELETE', url, body)
|
||||||
.then((response) => {
|
.then(() => {
|
||||||
commit('removeRequestor');
|
commit('removeRequestor');
|
||||||
dispatch('requestorIsAnonymous', false);
|
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`;
|
const url = `/api/1.0/person/accompanying-course/${id}/resource.json`;
|
||||||
|
|
||||||
return makeFetch('DELETE', url, body)
|
return makeFetch('DELETE', url, body)
|
||||||
.then((response) => {
|
.then(() => {
|
||||||
commit('removeResource', payload)
|
commit('removeResource', payload)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@ -736,7 +736,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
updateSocialIssues({ state, commit, dispatch }, { payload, body, method }) {
|
updateSocialIssues({ state, commit, dispatch }, { payload, body, method }) {
|
||||||
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`;
|
||||||
return makeFetch(method, url, body)
|
return makeFetch(method, url, body)
|
||||||
.then((response) => {
|
.then(() => {
|
||||||
commit('updateSocialIssues', payload);
|
commit('updateSocialIssues', payload);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@ -7,6 +7,8 @@ import ToastPlugin from "vue-toast-notification";
|
|||||||
|
|
||||||
const i18n = _createI18n(personMessages);
|
const i18n = _createI18n(personMessages);
|
||||||
|
|
||||||
|
/*eslint no-unused-vars: "error"*/
|
||||||
|
/* exported app */
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template: `<app></app>`,
|
template: `<app></app>`,
|
||||||
})
|
})
|
||||||
|
@ -8,6 +8,7 @@ import ToastPlugin from "vue-toast-notification";
|
|||||||
|
|
||||||
const i18n = _createI18n(personMessages);
|
const i18n = _createI18n(personMessages);
|
||||||
|
|
||||||
|
/* exported app */
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template: `<app></app>`,
|
template: `<app></app>`,
|
||||||
})
|
})
|
||||||
|
@ -4,7 +4,6 @@ import { fetchResults, makeFetch } from 'ChillMainAssets/lib/api/apiMethods.ts';
|
|||||||
import { fetchTemplates } from 'ChillDocGeneratorAssets/api/pickTemplate.js';
|
import { fetchTemplates } from 'ChillDocGeneratorAssets/api/pickTemplate.js';
|
||||||
|
|
||||||
const debug = process.env.NODE_ENV !== 'production';
|
const debug = process.env.NODE_ENV !== 'production';
|
||||||
const evalFQDN = encodeURIComponent("Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation");
|
|
||||||
|
|
||||||
const store = createStore({
|
const store = createStore({
|
||||||
strict: debug,
|
strict: debug,
|
||||||
@ -502,8 +501,7 @@ const store = createStore({
|
|||||||
let
|
let
|
||||||
payload = getters.buildPayload,
|
payload = getters.buildPayload,
|
||||||
params = new URLSearchParams({'entity_version': state.version}),
|
params = new URLSearchParams({'entity_version': state.version}),
|
||||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`,
|
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`
|
||||||
errors = []
|
|
||||||
;
|
;
|
||||||
|
|
||||||
commit('setIsPosting', true);
|
commit('setIsPosting', true);
|
||||||
|
@ -264,9 +264,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
unselectGoal(value) {
|
unselectGoal(value) {
|
||||||
getResultByGoal(value.id).then(results => {
|
getResultByGoal(value.id)
|
||||||
[ this.results.options, this.results.value ] = this.removeElementInData('results', results);
|
.then(
|
||||||
}).catch;
|
results => [ this.results.options, this.results.value ] = this.removeElementInData('results', results)
|
||||||
|
).catch;
|
||||||
},
|
},
|
||||||
|
|
||||||
// selectResult(value) {
|
// 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 form = document.getElementById('export_filters_social_work_type_filter_form');
|
||||||
const after = form.appendChild(document.createElement('div'));
|
const after = form.appendChild(document.createElement('div'));
|
||||||
|
|
||||||
|
/* exported app */
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template: `<app></app>`,
|
template: `<app></app>`,
|
||||||
})
|
})
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MemberDetails from './MemberDetails.vue';
|
|
||||||
import {mapGetters, mapState} from "vuex";
|
import {mapGetters, mapState} from "vuex";
|
||||||
import CurrentHousehold from "./CurrentHousehold";
|
import CurrentHousehold from "./CurrentHousehold";
|
||||||
import PersonComment from './PersonComment';
|
import PersonComment from './PersonComment';
|
||||||
|
@ -9,6 +9,7 @@ import App from './App.vue';
|
|||||||
|
|
||||||
const i18n = _createI18n(appMessages);
|
const i18n = _createI18n(appMessages);
|
||||||
|
|
||||||
|
/* exported app */
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template: `<app></app>`,
|
template: `<app></app>`,
|
||||||
})
|
})
|
||||||
|
@ -1,17 +1,5 @@
|
|||||||
import { splitId } from './vis-network';
|
import { splitId } from './vis-network';
|
||||||
import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods.ts';
|
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
|
* @function postFetch
|
||||||
* @param url
|
* @param url
|
||||||
|
@ -16,6 +16,7 @@ persons.forEach(person => {
|
|||||||
store.commit('markInWhitelist', person)
|
store.commit('markInWhitelist', person)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* exported app */
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template: `<app :household_id="this.household_id"></app>`,
|
template: `<app :household_id="this.household_id"></app>`,
|
||||||
data() {
|
data() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user