eslint corrections in mainbundle

This commit is contained in:
Julie Lenaerts 2024-11-14 16:46:07 +01:00
parent 2d6d2a1f58
commit 0454e5d758
14 changed files with 26 additions and 22 deletions

View File

@ -19,7 +19,7 @@ const addAddressInput = (inputs) => {
if (container === null) { if (container === null) {
throw Error("no container"); throw Error("no container");
} }
/* exported app */
const app = createApp({ const app = createApp({
template: `<app v-bind:addAddress="this.addAddress" @address-created="associateToInput"></app>`, template: `<app v-bind:addAddress="this.addAddress" @address-created="associateToInput"></app>`,
data() { data() {
@ -90,4 +90,4 @@ document.addEventListener('DOMContentLoaded', (_e) =>
window.addEventListener('collection-add-entry', (e) => window.addEventListener('collection-add-entry', (e) =>
addAddressInput(e.detail.entry.querySelectorAll('input[type="hidden"][data-input-address]')) addAddressInput(e.detail.entry.querySelectorAll('input[type="hidden"][data-input-address]'))
); );

View File

@ -114,8 +114,6 @@ import MyNotifications from './MyNotifications';
import MyWorkflows from './MyWorkflows.vue'; import MyWorkflows from './MyWorkflows.vue';
import TabCounter from './TabCounter'; import TabCounter from './TabCounter';
import { mapState } from "vuex"; import { mapState } from "vuex";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
export default { export default {
name: "App", name: "App",

View File

@ -12,7 +12,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import { fetchResults } from '../../../lib/api/apiMethods'; import { fetchResults } from '../../../lib/api/apiMethods';
import Modal from '../../_components/Modal.vue';
import { NewsItemType } from '../../../types'; import { NewsItemType } from '../../../types';
import NewsItem from './NewsItem.vue'; import NewsItem from './NewsItem.vue';

View File

@ -30,7 +30,7 @@
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue"; import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
import { marked } from 'marked'; import { marked } from 'marked';
import DOMPurify from 'dompurify'; import DOMPurify from 'dompurify';
import { DateTime, NewsItemType } from "../../../types"; import { NewsItemType } from "../../../types";
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { ref } from "vue"; import { ref } from "vue";
import {ISOToDatetime} from '../../../chill/js/date'; import {ISOToDatetime} from '../../../chill/js/date';

View File

@ -28,7 +28,8 @@
<td>{{ $d(c.openingDate.datetime, 'short') }}</td> <td>{{ $d(c.openingDate.datetime, 'short') }}</td>
<td> <td>
<span <span
v-for="i in c.socialIssues" v-for="(i, index) in c.socialIssues"
:key="index"
class="chill-entity entity-social-issue" class="chill-entity entity-social-issue"
> >
<span class="badge bg-chill-l-gray text-dark"> <span class="badge bg-chill-l-gray text-dark">
@ -112,4 +113,4 @@ export default {
span.badge.rounded-pill.bg-danger { span.badge.rounded-pill.bg-danger {
text-transform: uppercase; text-transform: uppercase;
} }
</style> </style>

View File

@ -89,7 +89,7 @@
</div> </div>
<template v-if="this.hasDashboardItems"> <template v-if="this.hasDashboardItems">
<template v-for="dashboardItem in this.dashboardItems"> <template v-for="(dashboardItem, index) in this.dashboardItems" :key="index">
<div <div
class="mbloc col-xs-12 col-sm-8 news" class="mbloc col-xs-12 col-sm-8 news"
v-if="dashboardItem.type === 'news'" v-if="dashboardItem.type === 'news'"

View File

@ -127,7 +127,6 @@ import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
import OnTheFlyCreate from './Create.vue'; import OnTheFlyCreate from './Create.vue';
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue'; import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue'; import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue';
import { postThirdparty } from "ChillThirdPartyAssets/vuejs/_api/OnTheFly";
export default { export default {
name: 'OnTheFly', name: 'OnTheFly',
@ -165,6 +164,8 @@ export default {
return 'btn-create'; return 'btn-create';
case 'addContact': case 'addContact':
return 'btn-tpchild'; return 'btn-tpchild';
default:
return '';
} }
}, },
titleAction() { titleAction() {
@ -177,6 +178,8 @@ export default {
return 'action.create'; return 'action.create';
case 'addContact': case 'addContact':
return 'action.addContact'; return 'action.addContact';
default:
return '';
} }
}, },
titleCreate() { titleCreate() {
@ -199,6 +202,8 @@ export default {
return this.titleCreate; return this.titleCreate;
case 'addContact': case 'addContact':
return 'onthefly.addContact.title'; return 'onthefly.addContact.title';
default:
return '';
} }
}, },
titleMessage() { titleMessage() {
@ -207,6 +212,8 @@ export default {
return 'action.redirect.' + this.type; return 'action.redirect.' + this.type;
case 'thirdparty': case 'thirdparty':
return 'action.redirect.' + this.type; return 'action.redirect.' + this.type;
default:
return '';
} }
}, },
buttonMessage() { buttonMessage() {

View File

@ -8,7 +8,7 @@ const i18n = _createI18n( ontheflyMessages );
let containers = document.querySelectorAll('.onthefly-container'); let containers = document.querySelectorAll('.onthefly-container');
containers.forEach((container) => { containers.forEach((container) => {
/*exported app */
const app = createApp({ const app = createApp({
template: `<app :onTheFly="this.onTheFly" ></app>`, template: `<app :onTheFly="this.onTheFly" ></app>`,
data() { data() {

View File

@ -27,8 +27,7 @@
<script lang="js"> <script lang="js">
import VueMultiselect from "vue-multiselect"; import VueMultiselect from "vue-multiselect";
import {reactive, defineProps, onMounted} from "vue"; import { searchCities} from "./api";
import {fetchCities, searchCities} from "./api";
export default { export default {
components: { components: {

View File

@ -1,4 +1,4 @@
import {makeFetch, fetchResults} from 'ChillMainAssets/lib/api/apiMethods'; import {makeFetch} from 'ChillMainAssets/lib/api/apiMethods';
/** /**
* Endpoint chill_api_single_postal_code__index * Endpoint chill_api_single_postal_code__index

View File

@ -12,7 +12,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {reactive, ref} from "vue"; import {reactive} from "vue";
import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue'; import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
import {Address} from "../../../types"; import {Address} from "../../../types";
import AddressDetailsContent from "./AddressDetailsContent.vue"; import AddressDetailsContent from "./AddressDetailsContent.vue";

View File

@ -1,8 +1,8 @@
<template> <template>
<template v-for="container in data.containers"> <template v-for="(container, index) in data.containers" :key="index">
<h4>{{ container.layer.name.fr }}</h4> <h4>{{ container.layer.name.fr }}</h4>
<ul> <ul>
<li v-for="unit in container.units">{{ unit.unitName }} ({{ unit.unitRefId }})</li> <li v-for="(unit, index) in container.units" :key="index">{{ unit.unitName }} ({{ unit.unitRefId }})</li>
</ul> </ul>
</template> </template>
</template> </template>

View File

@ -125,11 +125,11 @@ export default {
formatDate(datetime) { formatDate(datetime) {
return datetime.split('T')[0] +' '+ datetime.split('T')[1].substring(0,5) return datetime.split('T')[0] +' '+ datetime.split('T')[1].substring(0,5)
}, },
isUserSubscribedToStep(w) { isUserSubscribedToStep() {
// todo // todo
return false; return false;
}, },
isUserSubscribedToFinal(w) { isUserSubscribedToFinal() {
// todo // todo
return false; return false;
}, },

View File

@ -118,7 +118,7 @@ export default {
"POST", "POST",
`/api/1.0/main/notification/${this.notificationId}/mark/unread`, `/api/1.0/main/notification/${this.notificationId}/mark/unread`,
[] []
).then((response) => { ).then(() => {
this.$emit("markRead", {notificationId: this.notificationId}); this.$emit("markRead", {notificationId: this.notificationId});
}); });
}, },
@ -127,7 +127,7 @@ export default {
"POST", "POST",
`/api/1.0/main/notification/${this.notificationId}/mark/read`, `/api/1.0/main/notification/${this.notificationId}/mark/read`,
[] []
).then((response) => { ).then(() => {
this.$emit("markUnread", { this.$emit("markUnread", {
notificationId: this.notificationId, notificationId: this.notificationId,
}); });
@ -138,7 +138,7 @@ export default {
"POST", "POST",
`/api/1.0/main/notification/markallread`, `/api/1.0/main/notification/markallread`,
[] []
).then((response) => { ).then(() => {
this.$emit("markAllRead"); this.$emit("markAllRead");
}); });
}, },