diff --git a/docs/source/development/user-interface/js-functions/show_hide.js b/docs/source/development/user-interface/js-functions/show_hide.js
index 5e6b66eb8..ee752ae28 100644
--- a/docs/source/development/user-interface/js-functions/show_hide.js
+++ b/docs/source/development/user-interface/js-functions/show_hide.js
@@ -1,16 +1,16 @@
import { ShowHide } from 'ShowHide/show_hide.js';
-var
+var
div_accompagnement = document.getElementById("form_accompagnement"),
div_accompagnement_comment = document.getElementById("form_accompagnement_comment"),
div_caf_id = document.getElementById("cafId"),
- div_caf_inscription_date = document.getElementById("cafInscriptionDate"),
+ div_caf_inscription_date = document.getElementById("cafInscriptionDate")
;
// let show/hide the div_accompagnement_comment if the input with value `'autre'` is checked
new ShowHide({
"froms": [div_accompagnement],
- "test": function(froms, event) {
+ "test": function(froms, event) {
for (let el of froms.values()) {
for (let input of el.querySelectorAll('input').values()) {
if (input.value === 'autre') {
@@ -18,13 +18,13 @@ new ShowHide({
}
}
}
-
+
return false;
},
"container": [div_accompagnement_comment]
});
-// let show the date input only if the the id is filled
+// let show the date input only if the the id is filled
new ShowHide({
froms: [ div_caf_id ],
test: function(froms, event) {
diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue
index a3bcea765..b276672ab 100644
--- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue
+++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/SocialIssuesAcc.vue
@@ -54,14 +54,15 @@
-
+
+
+
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts
index e9b24a1f0..7bdb3b408 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store/utils.ts
@@ -17,16 +17,16 @@ export interface UserData {
}
export const addIdToValue = (string: string, id: number): string => {
- let array = string ? string.split(',') : [];
+ const array = string ? string.split(',') : [];
array.push(id.toString());
- let str = array.join();
+ const str = array.join();
return str;
};
export const removeIdFromValue = (string: string, id: number) => {
let array = string.split(',');
array = array.filter(el => el !== id.toString());
- let str = array.join();
+ const str = array.join();
return str;
};
@@ -34,7 +34,7 @@ export const removeIdFromValue = (string: string, id: number) => {
* Assign missing keys for the ConcernedGroups component
*/
export const mapEntity = (entity: EventInput): EventInput => {
- let calendar = { ...entity};
+ const calendar = { ...entity};
Object.assign(calendar, {thirdParties: entity.professionals});
if (entity.startDate !== null ) {
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue
index 279650ffd..82c8cf86a 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/Components/EditLocation.vue
@@ -40,11 +40,9 @@ import {
VNodeProps
} from 'vue'
-const Teleport = teleport_ as {
- new (): {
+const Teleport = teleport_ as new () => {
$props: VNodeProps & TeleportProps
}
-}
const store = useStore(key);
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarLocals.ts b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarLocals.ts
index 893c0413c..c5422c97e 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarLocals.ts
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarLocals.ts
@@ -16,7 +16,7 @@ export interface CalendarLocalsState {
type Context = ActionContext;
-export default > {
+export default {
namespaced: true,
state: (): CalendarLocalsState => ({
locals: [],
@@ -26,7 +26,7 @@ export default > {
}),
getters: {
isLocalsLoaded: (state: CalendarLocalsState) => ({start, end}: {start: Date, end: Date}): boolean => {
- for (let range of state.localsLoaded) {
+ for (const range of state.localsLoaded) {
if (start.getTime() === range.start && end.getTime() === range.end) {
return true;
}
@@ -92,4 +92,4 @@ export default > {
});
}
}
-};
+} as Module;
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts
index 02f14e247..00bf1e86d 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRanges.ts
@@ -22,7 +22,7 @@ export interface CalendarRangesState {
type Context = ActionContext;
-export default >{
+export default {
namespaced: true,
state: (): CalendarRangesState => ({
ranges: [],
@@ -32,7 +32,7 @@ export default >{
}),
getters: {
isRangeLoaded: (state: CalendarRangesState) => ({start, end}: { start: Date, end: Date }): boolean => {
- for (let range of state.rangesLoaded) {
+ for (const range of state.rangesLoaded) {
if (start.getTime() === range.start && end.getTime() === range.end) {
return true;
}
@@ -42,9 +42,9 @@ export default >{
},
getRangesOnDate: (state: CalendarRangesState) => (date: Date): EventInputCalendarRange[] => {
const founds = [];
- const dateStr = dateToISO(date);
+ const dateStr = dateToISO(date) as string;
- for (let range of state.ranges) {
+ for (const range of state.ranges) {
if (isEventInputCalendarRange(range)
&& range.start.startsWith(dateStr)
) {
@@ -56,11 +56,11 @@ export default >{
},
getRangesOnWeek: (state: CalendarRangesState) => (mondayDate: Date): EventInputCalendarRange[] => {
const founds = [];
- for (let d of Array.from(Array(7).keys())) {
+ for (const d of Array.from(Array(7).keys())) {
const dateOfWeek = new Date(mondayDate);
dateOfWeek.setDate(mondayDate.getDate() + d);
- const dateStr = dateToISO(dateOfWeek);
- for (let range of state.ranges) {
+ const dateStr = dateToISO(dateOfWeek) as string;
+ for (const range of state.ranges) {
if (isEventInputCalendarRange(range)
&& range.start.startsWith(dateStr)
) {
@@ -253,12 +253,12 @@ export default >{
const rangesToCopy: EventInputCalendarRange[] = ctx.getters['getRangesOnDate'](from);
const promises = [];
- for (let r of rangesToCopy) {
- let start = new Date(ISOToDatetime(r.start));
+ for (const r of rangesToCopy) {
+ const start = new Date((ISOToDatetime(r.start) as Date));
start.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
- let end = new Date(ISOToDatetime(r.end));
+ const end = new Date((ISOToDatetime(r.end) as Date));
end.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
- let location = ctx.rootGetters['locations/getLocationById'](r.locationId);
+ const location = ctx.rootGetters['locations/getLocationById'](r.locationId);
promises.push(ctx.dispatch('createRange', {start, end, location}));
}
@@ -270,12 +270,12 @@ export default >{
const rangesToCopy: EventInputCalendarRange[] = ctx.getters['getRangesOnWeek'](fromMonday);
const promises = [];
const diffTime = toMonday.getTime() - fromMonday.getTime();
- for (let r of rangesToCopy) {
- let start = new Date(ISOToDatetime(r.start));
- let end = new Date(ISOToDatetime(r.end));
+ for (const r of rangesToCopy) {
+ const start = new Date((ISOToDatetime(r.start) as Date));
+ const end = new Date((ISOToDatetime(r.end) as Date));
start.setTime(start.getTime() + diffTime);
end.setTime(end.getTime() + diffTime);
- let location = ctx.rootGetters['locations/getLocationById'](r.locationId);
+ const location = ctx.rootGetters['locations/getLocationById'](r.locationId);
promises.push(ctx.dispatch('createRange', {start, end, location}));
}
@@ -283,4 +283,4 @@ export default >{
return Promise.all(promises).then(_ => Promise.resolve(null));
}
}
-};
+} as Module;
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRemotes.ts b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRemotes.ts
index a92e1f9b3..3fe1e2a34 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRemotes.ts
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/calendarRemotes.ts
@@ -16,7 +16,7 @@ export interface CalendarRemotesState {
type Context = ActionContext;
-export default > {
+export default {
namespaced: true,
state: (): CalendarRemotesState => ({
remotes: [],
@@ -26,7 +26,7 @@ export default > {
}),
getters: {
isRemotesLoaded: (state: CalendarRemotesState) => ({start, end}: {start: Date, end: Date}): boolean => {
- for (let range of state.remotesLoaded) {
+ for (const range of state.remotesLoaded) {
if (start.getTime() === range.start && end.getTime() === range.end) {
return true;
}
@@ -92,4 +92,4 @@ export default > {
});
}
}
-};
+} as Module;
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/location.ts b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/location.ts
index 7fbfe7fce..93251e354 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/location.ts
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/MyCalendarRange/store/modules/location.ts
@@ -10,7 +10,7 @@ export interface LocationState {
currentLocation: Location | null;
}
-export default >{
+export default {
namespaced: true,
state: (): LocationState => {
return {
@@ -58,5 +58,5 @@ export default >{
})
}
}
-}
+} as Module
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts
index b7df11323..ee731606f 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/index.ts
@@ -68,10 +68,10 @@ window.addEventListener('DOMContentLoaded', () => {
upload_inputs.forEach((input: HTMLDivElement): void => {
// test for a parent to check if this is a collection entry
let collectionEntry: null|HTMLLIElement = null;
- let parent = input.parentElement;
+ const parent = input.parentElement;
console.log('parent', parent);
if (null !== parent) {
- let grandParent = parent.parentElement;
+ const grandParent = parent.parentElement;
console.log('grandParent', grandParent);
if (null !== grandParent) {
if (grandParent.tagName.toLowerCase() === 'li' && grandParent.classList.contains('entry')) {
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/types.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/types.ts
index 25d956312..15644caf7 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/types.ts
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/types.ts
@@ -43,9 +43,7 @@ export interface StoredObjectStatusChange {
/**
* Function executed by the WopiEditButton component.
*/
-export type WopiEditButtonExecutableBeforeLeaveFunction = {
- (): Promise
-}
+export type WopiEditButtonExecutableBeforeLeaveFunction = () => Promise
/**
* Object containing information for performering a POST request to a swift object store
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue
index b4c53eacd..5f234d099 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DocumentActionButtonsGroup.vue
@@ -73,9 +73,7 @@ interface DocumentActionButtonsGroupConfig {
davLinkExpiration?: number,
}
-const emit = defineEmits<{
- (e: 'onStoredObjectStatusChange', newStatus: StoredObjectStatusChange): void
-}>();
+const emit = defineEmits<(e: 'onStoredObjectStatusChange', newStatus: StoredObjectStatusChange) => void>();
const props = withDefaults(defineProps(), {
small: false,
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue
index 4eb9e09b1..67064ea34 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/DropFileWidget/DropFile.vue
@@ -10,9 +10,7 @@ interface DropFileConfig {
const props = defineProps();
-const emit = defineEmits<{
- (e: 'addDocument', stored_object: StoredObjectCreated): void,
-}>();
+const emit = defineEmits<(e: 'addDocument', stored_object: StoredObjectCreated) => void,>();
const is_dragging: Ref = ref(false);
const uploading: Ref = ref(false);
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue
index b9e090f67..1a6150999 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/ConvertButton.vue
@@ -14,7 +14,7 @@ import {StoredObject, StoredObjectCreated} from "../../types";
interface ConvertButtonConfig {
storedObject: StoredObject,
- classes: { [key: string]: boolean},
+ classes: Record,
filename?: string,
};
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue
index ef0d0d376..b692dc77f 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DesktopEditButton.vue
@@ -5,7 +5,7 @@ import {computed, reactive} from "vue";
export interface DesktopEditButtonConfig {
editLink: null,
- classes: { [k: string]: boolean },
+ classes: Record,
expirationLink: number|Date,
}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue
index 0f1c78377..8022395e0 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue
@@ -17,7 +17,7 @@ import {StoredObject, StoredObjectCreated} from "../../types";
interface DownloadButtonConfig {
storedObject: StoredObject|StoredObjectCreated,
- classes: { [k: string]: boolean },
+ classes: Record,
filename?: string,
}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue
index e0c14a919..51beb9711 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/WopiEditButton.vue
@@ -13,7 +13,7 @@ import {StoredObject, StoredObjectCreated, WopiEditButtonExecutableBeforeLeaveFu
interface WopiEditButtonConfig {
storedObject: StoredObject,
returnPath?: string,
- classes: {[k: string] : boolean},
+ classes: Record,
executeBeforeLeave?: WopiEditButtonExecutableBeforeLeaveFunction,
}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/helper.ts b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/helper.ts
index 6d07e769d..0755dac57 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/helper.ts
+++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/helper.ts
@@ -11,8 +11,8 @@ const keyDefinition = {
};
const createFilename = (): string => {
- var text = "";
- var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+ let text = "";
+ const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (let i = 0; i < 7; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts b/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts
index 9198f835e..3fd5da388 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/js/date.ts
@@ -37,7 +37,7 @@ export const ISOToDate = (str: string|null): Date|null => {
return null;
}
- let
+ const
[year, month, day] = str.split('-').map(p => parseInt(p));
return new Date(year, month-1, day, 0, 0, 0, 0);
@@ -52,7 +52,7 @@ export const ISOToDatetime = (str: string|null): Date|null => {
return null;
}
- let
+ const
[cal, times] = str.split('T'),
[year, month, date] = cal.split('-').map(s => parseInt(s)),
[time, timezone] = times.split(times.charAt(8)),
@@ -91,7 +91,7 @@ export const datetimeToISO = (date: Date): string => {
Math.abs(date.getTimezoneOffset() % 60).toString().padStart(2, '0'),
].join('');
- let x = cal + 'T' + time + offset;
+ const x = cal + 'T' + time + offset;
return x;
};
diff --git a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts
index 24f518ca3..2f4f80ad1 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts
+++ b/src/Bundle/ChillMainBundle/Resources/public/lib/api/apiMethods.ts
@@ -1,11 +1,9 @@
import {Scope} from '../../types';
-export type body = {[key: string]: boolean|string|number|null};
-export type fetchOption = {[key: string]: boolean|string|number|null};
+export type body = Record;
+export type fetchOption = Record;
-export interface Params {
- [key: string]: number|string
-}
+export type Params = Record;
export interface PaginationResponse {
pagination: {
@@ -16,9 +14,7 @@ export interface PaginationResponse {
count: number;
}
-export interface FetchParams {
- [K: string]: string|number|null;
-};
+export type FetchParams = Record;;
export interface TransportExceptionInterface {
name: string;
@@ -118,15 +114,15 @@ export const makeFetch = (
* Fetch results with certain parameters
*/
function _fetchAction(page: number, uri: string, params?: FetchParams): Promise> {
- const item_per_page: number = 50;
+ const item_per_page = 50;
- let searchParams = new URLSearchParams();
+ const searchParams = new URLSearchParams();
searchParams.append('item_per_page', item_per_page.toString());
searchParams.append('page', page.toString());
if (params !== undefined) {
Object.keys(params).forEach(key => {
- let v = params[key];
+ const v = params[key];
if (typeof v === 'string') {
searchParams.append(key, v);
} else if (typeof v === 'number') {
@@ -137,7 +133,7 @@ function _fetchAction(page: number, uri: string, params?: FetchParams): Promi
});
}
- let url = uri + '?' + searchParams.toString();
+ const url = uri + '?' + searchParams.toString();
return fetch(url, {
method: 'GET',
@@ -177,7 +173,7 @@ function _fetchAction(page: number, uri: string, params?: FetchParams): Promi
export const fetchResults = async (uri: string, params?: FetchParams): Promise => {
let promises: Promise[] = [],
page = 1;
- let firstData: PaginationResponse = await _fetchAction(page, uri, params) as PaginationResponse;
+ const firstData: PaginationResponse = await _fetchAction(page, uri, params) as PaginationResponse;
promises.push(Promise.resolve(firstData.results));
diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts b/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts
index 875e99fad..0362cf4c2 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts
+++ b/src/Bundle/ChillMainBundle/Resources/public/module/collection/index.ts
@@ -41,7 +41,7 @@ export class CollectionEventPayload {
}
export const handleAdd = (button: any): void => {
- let
+ const
form_name = button.dataset.collectionAddTarget,
prototype = button.dataset.formPrototype,
collection: HTMLUListElement | null = document.querySelector('ul[data-collection-name="' + form_name + '"]');
@@ -50,7 +50,7 @@ export const handleAdd = (button: any): void => {
return;
}
- let
+ const
empty_explain: HTMLLIElement | null = collection.querySelector('li[data-collection-empty-explain]'),
entry = document.createElement('li'),
counter = collection.querySelectorAll('li.entry').length, // Updated counter logic
@@ -85,7 +85,7 @@ const initializeRemove = (collection: HTMLUListElement, entry: HTMLLIElement): v
export const buildRemoveButton = (collection: HTMLUListElement, entry: HTMLLIElement): HTMLButtonElement|null => {
- let
+ const
button = document.createElement('button'),
isPersisted = entry.dataset.collectionIsPersisted || '',
content = collection.dataset.collectionButtonRemoveLabel || '',
@@ -108,19 +108,19 @@ export const buildRemoveButton = (collection: HTMLUListElement, entry: HTMLLIEle
}
window.addEventListener('load', () => {
- let
+ const
addButtons: NodeListOf = document.querySelectorAll("button[data-collection-add-target]"),
collections: NodeListOf = document.querySelectorAll("ul[data-collection-regular]");
for (let i = 0; i < addButtons.length; i++) {
- let addButton = addButtons[i];
+ const addButton = addButtons[i];
addButton.addEventListener('click', (e: Event) => {
e.preventDefault();
handleAdd(e.target);
});
}
for (let i = 0; i < collections.length; i++) {
- let entries: NodeListOf = collections[i].querySelectorAll(':scope > li');
+ const entries: NodeListOf = collections[i].querySelectorAll(':scope > li');
for (let j = 0; j < entries.length; j++) {
if (entries[j].dataset.collectionEmptyExplain === "1") {
continue;
diff --git a/src/Bundle/ChillMainBundle/Resources/public/types.ts b/src/Bundle/ChillMainBundle/Resources/public/types.ts
index 2e33b8248..778e6afbc 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/types.ts
+++ b/src/Bundle/ChillMainBundle/Resources/public/types.ts
@@ -47,7 +47,7 @@ export interface UserAssociatedInterface {
id: number;
};
-export type TranslatableString = {
+export interface TranslatableString {
fr?: string;
nl?: string;
}
@@ -59,7 +59,7 @@ export interface Postcode {
center: Point;
}
-export type Point = {
+export interface Point {
type: "Point";
coordinates: [lat: number, lon: number];
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue
index 9a1550d7d..e56df8236 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsButton.vue
@@ -32,9 +32,7 @@ const data: AddressModalData = reactive({
const props = defineProps();
-const emit = defineEmits<{
- (e: 'update-address', value: Address): void
-}>();
+const emit = defineEmits<(e: 'update-address', value: Address) => void>();
const address_modal = ref | null>(null);
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue
index 3f6495b0a..5c67e783c 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressDetailsContent.vue
@@ -18,9 +18,7 @@ interface AddressModalContentProps {
const props = defineProps();
-const emit = defineEmits<{
- (e: 'update-address', value: Address): void
-}>();
+const emit = defineEmits<(e: 'update-address', value: Address) => void>();
const onUpdateAddress = (address: Address): void => {
emit('update-address', address);
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue
index 6b341d861..da46325e8 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/AddressModal.vue
@@ -27,9 +27,7 @@ interface AddressModalState {
const props = defineProps();
-const emit = defineEmits<{
- (e: 'update-address', value: Address): void
-}>();
+const emit = defineEmits<(e: 'update-address', value: Address) => void>();
const state: AddressModalState = reactive({show_modal: false});
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue
index cbeb9e9e9..367f465f8 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/AddressDetails/Parts/AddressDetailsRefMatching.vue
@@ -53,9 +53,7 @@ export interface AddressDetailsRefMatchingProps {
const props = defineProps();
-const emit = defineEmits<{
- (e: 'update-address', value: Address): void
-}>();
+const emit = defineEmits<(e: 'update-address', value: Address) => void>();
const applyUpdate = async () => {
const new_address = await syncAddressWithReference(props.address);
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue
index d129f9a92..2dceb6ad4 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue
@@ -98,7 +98,6 @@
import ToggleFlags from './Banner/ToggleFlags';
import SocialIssue from './Banner/SocialIssue.vue';
import PersonsAssociated from './Banner/PersonsAssociated.vue';
-import UserRenderBoxBadge from 'ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge.vue';
export default {
name: 'Banner',
@@ -106,7 +105,6 @@ export default {
ToggleFlags,
SocialIssue,
PersonsAssociated,
- UserRenderBoxBadge,
},
computed: {
accompanyingCourse() {
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue
index 7a31ba97e..488b0d34d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources/ResourceItem.vue
@@ -106,7 +106,6 @@