eslint fixes

This commit is contained in:
2025-07-09 17:46:36 +02:00
parent 0204bdd38d
commit dcdfba5ccd
208 changed files with 20402 additions and 21424 deletions

View File

@@ -10,10 +10,7 @@
/> />
</div> </div>
<div <div
v-if=" v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0"
getContext === 'accompanyingCourse' &&
suggestedEntities.length > 0
"
> >
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
<li <li

View File

@@ -39,17 +39,11 @@
<option selected disabled value=""> <option selected disabled value="">
{{ trans(ACTIVITY_CHOOSE_LOCATION_TYPE) }} {{ trans(ACTIVITY_CHOOSE_LOCATION_TYPE) }}
</option> </option>
<option <option v-for="t in locationTypes" :value="t" :key="t.id">
v-for="t in locationTypes"
:value="t"
:key="t.id"
>
{{ localizeString(t.title) }} {{ localizeString(t.title) }}
</option> </option>
</select> </select>
<label>{{ <label>{{ trans(ACTIVITY_LOCATION_FIELDS_TYPE) }}</label>
trans(ACTIVITY_LOCATION_FIELDS_TYPE)
}}</label>
</div> </div>
<div class="form-floating mb-3"> <div class="form-floating mb-3">
@@ -108,10 +102,7 @@
</form> </form>
</template> </template>
<template #footer> <template #footer>
<button <button class="btn btn-save" @click.prevent="saveNewLocation">
class="btn btn-save"
@click.prevent="saveNewLocation"
>
{{ trans(SAVE) }} {{ trans(SAVE) }}
</button> </button>
</template> </template>
@@ -244,8 +235,7 @@ export default {
}, },
hasPhonenumber1() { hasPhonenumber1() {
return ( return (
this.selected.phonenumber1 !== null && this.selected.phonenumber1 !== null && this.selected.phonenumber1 !== ""
this.selected.phonenumber1 !== ""
); );
}, },
showAddAddress() { showAddAddress() {

View File

@@ -49,9 +49,7 @@
</div> </div>
<div class="col-8"> <div class="col-8">
<div v-if="actionIsLoading === true"> <div v-if="actionIsLoading === true">
<i <i class="chill-green fa fa-circle-o-notch fa-spin fa-lg"></i>
class="chill-green fa fa-circle-o-notch fa-spin fa-lg"
></i>
</div> </div>
<span <span
@@ -64,8 +62,7 @@
<template <template
v-else-if=" v-else-if="
socialActionsList.length > 0 && socialActionsList.length > 0 &&
(socialIssuesSelected.length || (socialIssuesSelected.length || socialActionsSelected.length)
socialActionsSelected.length)
" "
> >
<div <div
@@ -88,9 +85,7 @@
</template> </template>
<span <span
v-else-if=" v-else-if="actionAreLoaded && socialActionsList.length === 0"
actionAreLoaded && socialActionsList.length === 0
"
class="inline-choice chill-no-data-statement mt-3" class="inline-choice chill-no-data-statement mt-3"
> >
{{ trans(ACTIVITY_SOCIAL_ACTION_LIST_EMPTY) }} {{ trans(ACTIVITY_SOCIAL_ACTION_LIST_EMPTY) }}
@@ -169,8 +164,7 @@ export default {
/* Add in list the issues already associated (if not yet listed) */ /* Add in list the issues already associated (if not yet listed) */
this.socialIssuesSelected.forEach((issue) => { this.socialIssuesSelected.forEach((issue) => {
if ( if (
this.socialIssuesList.filter((i) => i.id === issue.id) this.socialIssuesList.filter((i) => i.id === issue.id).length !== 1
.length !== 1
) { ) {
this.$store.commit("addIssueInList", issue); this.$store.commit("addIssueInList", issue);
} }

View File

@@ -10,9 +10,7 @@
:value="issue" :value="issue"
/> />
<label class="form-check-label" :for="issue.id"> <label class="form-check-label" :for="issue.id">
<span class="badge bg-chill-l-gray text-dark">{{ <span class="badge bg-chill-l-gray text-dark">{{ issue.text }}</span>
issue.text
}}</span>
</label> </label>
</div> </div>
</span> </span>

View File

@@ -68,9 +68,7 @@ export type EventInputCalendarRange = EventInput & {
export function isEventInputCalendarRange( export function isEventInputCalendarRange(
toBeDetermined: EventInputCalendarRange | EventInput, toBeDetermined: EventInputCalendarRange | EventInput,
): toBeDetermined is EventInputCalendarRange { ): toBeDetermined is EventInputCalendarRange {
return ( return typeof toBeDetermined.is === "string" && toBeDetermined.is === "range";
typeof toBeDetermined.is === "string" && toBeDetermined.is === "range"
);
} }
export {}; export {};

View File

@@ -61,22 +61,14 @@
<label class="input-group-text" for="slotDuration" <label class="input-group-text" for="slotDuration"
>Durée des créneaux</label >Durée des créneaux</label
> >
<select <select v-model="slotDuration" id="slotDuration" class="form-select">
v-model="slotDuration"
id="slotDuration"
class="form-select"
>
<option value="00:05:00">5 minutes</option> <option value="00:05:00">5 minutes</option>
<option value="00:10:00">10 minutes</option> <option value="00:10:00">10 minutes</option>
<option value="00:15:00">15 minutes</option> <option value="00:15:00">15 minutes</option>
<option value="00:30:00">30 minutes</option> <option value="00:30:00">30 minutes</option>
</select> </select>
<label class="input-group-text" for="slotMinTime">De</label> <label class="input-group-text" for="slotMinTime">De</label>
<select <select v-model="slotMinTime" id="slotMinTime" class="form-select">
v-model="slotMinTime"
id="slotMinTime"
class="form-select"
>
<option value="00:00:00">0h</option> <option value="00:00:00">0h</option>
<option value="01:00:00">1h</option> <option value="01:00:00">1h</option>
<option value="02:00:00">2h</option> <option value="02:00:00">2h</option>
@@ -92,11 +84,7 @@
<option value="12:00:00">12h</option> <option value="12:00:00">12h</option>
</select> </select>
<label class="input-group-text" for="slotMaxTime">À</label> <label class="input-group-text" for="slotMaxTime">À</label>
<select <select v-model="slotMaxTime" id="slotMaxTime" class="form-select">
v-model="slotMaxTime"
id="slotMaxTime"
class="form-select"
>
<option value="12:00:00">12h</option> <option value="12:00:00">12h</option>
<option value="13:00:00">13h</option> <option value="13:00:00">13h</option>
<option value="14:00:00">14h</option> <option value="14:00:00">14h</option>
@@ -124,9 +112,7 @@
v-model="hideWeekends" v-model="hideWeekends"
/> />
</span> </span>
<label <label for="showHideWE" class="form-check-label input-group-text"
for="showHideWE"
class="form-check-label input-group-text"
>Week-ends</label >Week-ends</label
> >
</div> </div>
@@ -142,9 +128,7 @@
<b v-else-if="arg.event.extendedProps.is === 'range'" <b v-else-if="arg.event.extendedProps.is === 'range'"
>{{ arg.timeText }} >{{ arg.timeText }}
{{ arg.event.extendedProps.locationName }} {{ arg.event.extendedProps.locationName }}
<small>{{ <small>{{ arg.event.extendedProps.userLabel }}</small></b
arg.event.extendedProps.userLabel
}}</small></b
> >
<b v-else-if="arg.event.extendedProps.is === 'current'" <b v-else-if="arg.event.extendedProps.is === 'current'"
>{{ arg.timeText }} {{ $t("current_selected") }} >{{ arg.timeText }} {{ $t("current_selected") }}
@@ -152,9 +136,7 @@
<b v-else-if="arg.event.extendedProps.is === 'local'">{{ <b v-else-if="arg.event.extendedProps.is === 'local'">{{
arg.event.title arg.event.title
}}</b> }}</b>
<b v-else <b v-else>{{ arg.timeText }} {{ $t("current_selected") }} </b>
>{{ arg.timeText }} {{ $t("current_selected") }}
</b>
</span> </span>
</template> </template>
</FullCalendar> </FullCalendar>
@@ -268,9 +250,7 @@ export default {
this.$store.state.activity.endDate !== null) this.$store.state.activity.endDate !== null)
) { ) {
if ( if (
!window.confirm( !window.confirm(this.$t("change_main_user_will_reset_event_data"))
this.$t("change_main_user_will_reset_event_data"),
)
) { ) {
return; return;
} }
@@ -278,13 +258,9 @@ export default {
// add the previous user, if any, in the previous user list (in use for suggestion) // add the previous user, if any, in the previous user list (in use for suggestion)
if (null !== this.$store.getters.getMainUser) { if (null !== this.$store.getters.getMainUser) {
const suggestedUids = new Set( const suggestedUids = new Set(this.$data.previousUser.map((u) => u.id));
this.$data.previousUser.map((u) => u.id),
);
if (!suggestedUids.has(this.$store.getters.getMainUser.id)) { if (!suggestedUids.has(this.$store.getters.getMainUser.id)) {
this.$data.previousUser.push( this.$data.previousUser.push(this.$store.getters.getMainUser);
this.$store.getters.getMainUser,
);
} }
} }
@@ -314,8 +290,7 @@ export default {
// show an alert if changing mainUser // show an alert if changing mainUser
if ( if (
(this.$store.getters.getMainUser !== null && (this.$store.getters.getMainUser !== null &&
this.$store.state.me.id !== this.$store.state.me.id !== this.$store.getters.getMainUser.id) ||
this.$store.getters.getMainUser.id) ||
this.$store.getters.getMainUser === null this.$store.getters.getMainUser === null
) { ) {
if (!window.confirm(this.$t("will_change_main_user_for_me"))) { if (!window.confirm(this.$t("will_change_main_user_for_me"))) {
@@ -359,9 +334,7 @@ export default {
this.$store.getters.getMainUser.id this.$store.getters.getMainUser.id
) { ) {
if ( if (
!window.confirm( !window.confirm(this.$t("this_calendar_range_will_change_main_user"))
this.$t("this_calendar_range_will_change_main_user"),
)
) { ) {
return; return;
} }

View File

@@ -4,18 +4,9 @@
{{ user.text }} {{ user.text }}
<template v-if="invite !== null"> <template v-if="invite !== null">
<i v-if="invite.status === 'accepted'" class="fa fa-check" /> <i v-if="invite.status === 'accepted'" class="fa fa-check" />
<i <i v-else-if="invite.status === 'declined'" class="fa fa-times" />
v-else-if="invite.status === 'declined'" <i v-else-if="invite.status === 'pending'" class="fa fa-question-o" />
class="fa fa-times" <i v-else-if="invite.status === 'tentative'" class="fa fa-question" />
/>
<i
v-else-if="invite.status === 'pending'"
class="fa fa-question-o"
/>
<i
v-else-if="invite.status === 'tentative'"
class="fa fa-question"
/>
<span v-else="">{{ invite.status }}</span> <span v-else="">{{ invite.status }}</span>
</template> </template>
</span> </span>
@@ -69,8 +60,7 @@ export default {
computed: { computed: {
style() { style() {
return { return {
backgroundColor: this.$store.getters.getUserData(this.user) backgroundColor: this.$store.getters.getUserData(this.user).mainColor,
.mainColor,
}; };
}, },
rangeShow: { rangeShow: {
@@ -81,9 +71,7 @@ export default {
}); });
}, },
get() { get() {
return this.$store.getters.isRangeShownOnCalendarForUser( return this.$store.getters.isRangeShownOnCalendarForUser(this.user);
this.user,
);
}, },
}, },
remoteShow: { remoteShow: {
@@ -94,9 +82,7 @@ export default {
}); });
}, },
get() { get() {
return this.$store.getters.isRemoteShownOnCalendarForUser( return this.$store.getters.isRemoteShownOnCalendarForUser(this.user);
this.user,
);
}, },
}, },
}, },

View File

@@ -22,33 +22,25 @@
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1"> <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
<li v-if="status !== Statuses.ACCEPTED"> <li v-if="status !== Statuses.ACCEPTED">
<a <a class="dropdown-item" @click="changeStatus(Statuses.ACCEPTED)"
class="dropdown-item" ><i class="fa fa-check" aria-hidden="true"></i> {{ $t("Accept") }}</a
@click="changeStatus(Statuses.ACCEPTED)"
><i class="fa fa-check" aria-hidden="true"></i>
{{ $t("Accept") }}</a
> >
</li> </li>
<li v-if="status !== Statuses.DECLINED"> <li v-if="status !== Statuses.DECLINED">
<a <a class="dropdown-item" @click="changeStatus(Statuses.DECLINED)"
class="dropdown-item" ><i class="fa fa-times" aria-hidden="true"></i> {{ $t("Decline") }}</a
@click="changeStatus(Statuses.DECLINED)"
><i class="fa fa-times" aria-hidden="true"></i>
{{ $t("Decline") }}</a
> >
</li> </li>
<li v-if="status !== Statuses.TENTATIVELY_ACCEPTED"> <li v-if="status !== Statuses.TENTATIVELY_ACCEPTED">
<a <a
class="dropdown-item" class="dropdown-item"
@click="changeStatus(Statuses.TENTATIVELY_ACCEPTED)" @click="changeStatus(Statuses.TENTATIVELY_ACCEPTED)"
><i class="fa fa-question"></i> ><i class="fa fa-question"></i> {{ $t("Tentatively_accept") }}</a
{{ $t("Tentatively_accept") }}</a
> >
</li> </li>
<li v-if="status !== Statuses.PENDING"> <li v-if="status !== Statuses.PENDING">
<a class="dropdown-item" @click="changeStatus(Statuses.PENDING)" <a class="dropdown-item" @click="changeStatus(Statuses.PENDING)"
><i class="fa fa-hourglass-o"></i> ><i class="fa fa-hourglass-o"></i> {{ $t("Set_pending") }}</a
{{ $t("Set_pending") }}</a
> >
</li> </li>
</ul> </ul>
@@ -91,9 +83,7 @@ export default defineComponent({
}, },
}, },
emits: { emits: {
statusChanged( statusChanged(payload: "accepted" | "declined" | "pending" | "tentative") {
payload: "accepted" | "declined" | "pending" | "tentative",
) {
return true; return true;
}, },
}, },

View File

@@ -23,22 +23,14 @@
<label class="input-group-text" for="slotDuration" <label class="input-group-text" for="slotDuration"
>Durée des créneaux</label >Durée des créneaux</label
> >
<select <select v-model="slotDuration" id="slotDuration" class="form-select">
v-model="slotDuration"
id="slotDuration"
class="form-select"
>
<option value="00:05:00">5 minutes</option> <option value="00:05:00">5 minutes</option>
<option value="00:10:00">10 minutes</option> <option value="00:10:00">10 minutes</option>
<option value="00:15:00">15 minutes</option> <option value="00:15:00">15 minutes</option>
<option value="00:30:00">30 minutes</option> <option value="00:30:00">30 minutes</option>
</select> </select>
<label class="input-group-text" for="slotMinTime">De</label> <label class="input-group-text" for="slotMinTime">De</label>
<select <select v-model="slotMinTime" id="slotMinTime" class="form-select">
v-model="slotMinTime"
id="slotMinTime"
class="form-select"
>
<option value="00:00:00">0h</option> <option value="00:00:00">0h</option>
<option value="01:00:00">1h</option> <option value="01:00:00">1h</option>
<option value="02:00:00">2h</option> <option value="02:00:00">2h</option>
@@ -54,11 +46,7 @@
<option value="12:00:00">12h</option> <option value="12:00:00">12h</option>
</select> </select>
<label class="input-group-text" for="slotMaxTime">À</label> <label class="input-group-text" for="slotMaxTime">À</label>
<select <select v-model="slotMaxTime" id="slotMaxTime" class="form-select">
v-model="slotMaxTime"
id="slotMaxTime"
class="form-select"
>
<option value="12:00:00">12h</option> <option value="12:00:00">12h</option>
<option value="13:00:00">13h</option> <option value="13:00:00">13h</option>
<option value="14:00:00">14h</option> <option value="14:00:00">14h</option>
@@ -86,9 +74,7 @@
v-model="showWeekends" v-model="showWeekends"
/> />
</span> </span>
<label <label for="showHideWE" class="form-check-label input-group-text"
for="showHideWE"
class="form-check-label input-group-text"
>Week-ends</label >Week-ends</label
> >
</div> </div>
@@ -98,16 +84,12 @@
<FullCalendar :options="calendarOptions" ref="calendarRef"> <FullCalendar :options="calendarOptions" ref="calendarRef">
<template v-slot:eventContent="{ event }: { event: EventApi }"> <template v-slot:eventContent="{ event }: { event: EventApi }">
<span :class="eventClasses"> <span :class="eventClasses">
<b v-if="event.extendedProps.is === 'remote'">{{ <b v-if="event.extendedProps.is === 'remote'">{{ event.title }}</b>
event.title
}}</b>
<b v-else-if="event.extendedProps.is === 'range'" <b v-else-if="event.extendedProps.is === 'range'"
>{{ formatDate(event.startStr) }} - >{{ formatDate(event.startStr) }} -
{{ event.extendedProps.locationName }}</b {{ event.extendedProps.locationName }}</b
> >
<b v-else-if="event.extendedProps.is === 'local'">{{ <b v-else-if="event.extendedProps.is === 'local'">{{ event.title }}</b>
event.title
}}</b>
<b v-else>no 'is'</b> <b v-else>no 'is'</b>
<a <a
v-if="event.extendedProps.is === 'range'" v-if="event.extendedProps.is === 'range'"
@@ -126,11 +108,7 @@
<h6 class="chill-red">{{ $t("copy_range_from_to") }}</h6> <h6 class="chill-red">{{ $t("copy_range_from_to") }}</h6>
</div> </div>
<div class="col-xs-12 col-sm-9 col-md-2"> <div class="col-xs-12 col-sm-9 col-md-2">
<select <select v-model="dayOrWeek" id="dayOrWeek" class="form-select">
v-model="dayOrWeek"
id="dayOrWeek"
class="form-select"
>
<option value="day">{{ $t("from_day_to_day") }}</option> <option value="day">{{ $t("from_day_to_day") }}</option>
<option value="week"> <option value="week">
{{ $t("from_week_to_week") }} {{ $t("from_week_to_week") }}
@@ -139,27 +117,16 @@
</div> </div>
<template v-if="dayOrWeek === 'day'"> <template v-if="dayOrWeek === 'day'">
<div class="col-xs-12 col-sm-3 col-md-3"> <div class="col-xs-12 col-sm-3 col-md-3">
<input <input class="form-control" type="date" v-model="copyFrom" />
class="form-control"
type="date"
v-model="copyFrom"
/>
</div> </div>
<div class="col-xs-12 col-sm-1 col-md-1 copy-chevron"> <div class="col-xs-12 col-sm-1 col-md-1 copy-chevron">
<i class="fa fa-angle-double-right"></i> <i class="fa fa-angle-double-right"></i>
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-3"> <div class="col-xs-12 col-sm-3 col-md-3">
<input <input class="form-control" type="date" v-model="copyTo" />
class="form-control"
type="date"
v-model="copyTo"
/>
</div> </div>
<div class="col-xs-12 col-sm-5 col-md-1"> <div class="col-xs-12 col-sm-5 col-md-1">
<button <button class="btn btn-action float-end" @click="copyDay">
class="btn btn-action float-end"
@click="copyDay"
>
{{ $t("copy_range") }} {{ $t("copy_range") }}
</button> </button>
</div> </div>
@@ -171,11 +138,7 @@
id="copyFromWeek" id="copyFromWeek"
class="form-select" class="form-select"
> >
<option <option v-for="w in lastWeeks" :value="w.value" :key="w.value">
v-for="w in lastWeeks"
:value="w.value"
:key="w.value"
>
{{ w.text }} {{ w.text }}
</option> </option>
</select> </select>
@@ -184,25 +147,14 @@
<i class="fa fa-angle-double-right"></i> <i class="fa fa-angle-double-right"></i>
</div> </div>
<div class="col-xs-12 col-sm-3 col-md-3"> <div class="col-xs-12 col-sm-3 col-md-3">
<select <select v-model="copyToWeek" id="copyToWeek" class="form-select">
v-model="copyToWeek" <option v-for="w in nextWeeks" :value="w.value" :key="w.value">
id="copyToWeek"
class="form-select"
>
<option
v-for="w in nextWeeks"
:value="w.value"
:key="w.value"
>
{{ w.text }} {{ w.text }}
</option> </option>
</select> </select>
</div> </div>
<div class="col-xs-12 col-sm-5 col-md-1"> <div class="col-xs-12 col-sm-5 col-md-1">
<button <button class="btn btn-action float-end" @click="copyWeek">
class="btn btn-action float-end"
@click="copyWeek"
>
{{ $t("copy_range") }} {{ $t("copy_range") }}
</button> </button>
</div> </div>

View File

@@ -41,9 +41,7 @@ const futureStore = function (): Promise<Store<State>> {
}); });
store.commit("me/setWhoAmi", user, { root: true }); store.commit("me/setWhoAmi", user, { root: true });
store store.dispatch("locations/getLocations", null, { root: true }).then((_) => {
.dispatch("locations/getLocations", null, { root: true })
.then((_) => {
return store.dispatch("locations/getCurrentLocation", null, { return store.dispatch("locations/getCurrentLocation", null, {
root: true, root: true,
}); });

View File

@@ -29,10 +29,7 @@ export default {
(state: CalendarLocalsState) => (state: CalendarLocalsState) =>
({ start, end }: { start: Date; end: Date }): boolean => { ({ start, end }: { start: Date; end: Date }): boolean => {
for (const range of state.localsLoaded) { for (const range of state.localsLoaded) {
if ( if (start.getTime() === range.start && end.getTime() === range.end) {
start.getTime() === range.start &&
end.getTime() === range.end
) {
return true; return true;
} }
} }
@@ -54,10 +51,7 @@ export default {
}); });
state.key = state.key + toAdd.length; state.key = state.key + toAdd.length;
}, },
addLoaded( addLoaded(state: CalendarLocalsState, payload: { start: Date; end: Date }) {
state: CalendarLocalsState,
payload: { start: Date; end: Date },
) {
state.localsLoaded.push({ state.localsLoaded.push({
start: payload.start.getTime(), start: payload.start.getTime(),
end: payload.end.getTime(), end: payload.end.getTime(),
@@ -85,11 +79,7 @@ export default {
end: end, end: end,
}); });
return fetchCalendarLocalForUser( return fetchCalendarLocalForUser(ctx.rootGetters["me/getMe"], start, end)
ctx.rootGetters["me/getMe"],
start,
end,
)
.then((remotes: CalendarLight[]) => { .then((remotes: CalendarLight[]) => {
// to be add when reactivity problem will be solve ? // to be add when reactivity problem will be solve ?
//ctx.commit('addRemotes', remotes); //ctx.commit('addRemotes', remotes);

View File

@@ -40,10 +40,7 @@ export default {
(state: CalendarRangesState) => (state: CalendarRangesState) =>
({ start, end }: { start: Date; end: Date }): boolean => { ({ start, end }: { start: Date; end: Date }): boolean => {
for (const range of state.rangesLoaded) { for (const range of state.rangesLoaded) {
if ( if (start.getTime() === range.start && end.getTime() === range.end) {
start.getTime() === range.start &&
end.getTime() === range.end
) {
return true; return true;
} }
} }
@@ -110,9 +107,7 @@ export default {
state: CalendarRangesState, state: CalendarRangesState,
externalEvents: (EventInput & { id: string })[], externalEvents: (EventInput & { id: string })[],
) { ) {
const toAdd = externalEvents.filter( const toAdd = externalEvents.filter((r) => !state.rangesIndex.has(r.id));
(r) => !state.rangesIndex.has(r.id),
);
toAdd.forEach((r) => { toAdd.forEach((r) => {
state.rangesIndex.add(r.id); state.rangesIndex.add(r.id);
@@ -120,10 +115,7 @@ export default {
}); });
state.key = state.key + toAdd.length; state.key = state.key + toAdd.length;
}, },
addLoaded( addLoaded(state: CalendarRangesState, payload: { start: Date; end: Date }) {
state: CalendarRangesState,
payload: { start: Date; end: Date },
) {
state.rangesLoaded.push({ state.rangesLoaded.push({
start: payload.start.getTime(), start: payload.start.getTime(),
end: payload.end.getTime(), end: payload.end.getTime(),
@@ -142,17 +134,12 @@ export default {
}, },
removeRange(state: CalendarRangesState, calendarRangeId: number) { removeRange(state: CalendarRangesState, calendarRangeId: number) {
const found = state.ranges.find( const found = state.ranges.find(
(r) => (r) => r.calendarRangeId === calendarRangeId && r.is === "range",
r.calendarRangeId === calendarRangeId && r.is === "range",
); );
if (found !== undefined) { if (found !== undefined) {
state.ranges = state.ranges.filter( state.ranges = state.ranges.filter(
(r) => (r) => !(r.calendarRangeId === calendarRangeId && r.is === "range"),
!(
r.calendarRangeId === calendarRangeId &&
r.is === "range"
),
); );
if (typeof found.id === "string") { if (typeof found.id === "string") {
@@ -211,11 +198,7 @@ export default {
}, },
createRange( createRange(
ctx: Context, ctx: Context,
{ { start, end, location }: { start: Date; end: Date; location: Location },
start,
end,
location,
}: { start: Date; end: Date; location: Location },
): Promise<null> { ): Promise<null> {
const url = `/api/1.0/calendar/calendar-range.json?`; const url = `/api/1.0/calendar/calendar-range.json?`;
@@ -240,11 +223,7 @@ export default {
}, },
} as CalendarRangeCreate; } as CalendarRangeCreate;
return makeFetch<CalendarRangeCreate, CalendarRange>( return makeFetch<CalendarRangeCreate, CalendarRange>("POST", url, body)
"POST",
url,
body,
)
.then((newRange) => { .then((newRange) => {
ctx.commit("addRange", newRange); ctx.commit("addRange", newRange);
@@ -281,11 +260,7 @@ export default {
}, },
} as CalendarRangeEdit; } as CalendarRangeEdit;
return makeFetch<CalendarRangeEdit, CalendarRange>( return makeFetch<CalendarRangeEdit, CalendarRange>("PATCH", url, body)
"PATCH",
url,
body,
)
.then((range) => { .then((range) => {
ctx.commit("updateRange", range); ctx.commit("updateRange", range);
return Promise.resolve(null); return Promise.resolve(null);
@@ -310,11 +285,7 @@ export default {
}, },
} as CalendarRangeEdit; } as CalendarRangeEdit;
return makeFetch<CalendarRangeEdit, CalendarRange>( return makeFetch<CalendarRangeEdit, CalendarRange>("PATCH", url, body)
"PATCH",
url,
body,
)
.then((range) => { .then((range) => {
ctx.commit("updateRange", range); ctx.commit("updateRange", range);
return Promise.resolve(null); return Promise.resolve(null);
@@ -334,20 +305,14 @@ export default {
for (const r of rangesToCopy) { for (const r of rangesToCopy) {
const start = new Date(ISOToDatetime(r.start) as Date); const start = new Date(ISOToDatetime(r.start) as Date);
start.setFullYear( start.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
to.getFullYear(),
to.getMonth(),
to.getDate(),
);
const end = new Date(ISOToDatetime(r.end) as Date); const end = new Date(ISOToDatetime(r.end) as Date);
end.setFullYear(to.getFullYear(), to.getMonth(), to.getDate()); end.setFullYear(to.getFullYear(), to.getMonth(), to.getDate());
const location = ctx.rootGetters["locations/getLocationById"]( const location = ctx.rootGetters["locations/getLocationById"](
r.locationId, r.locationId,
); );
promises.push( promises.push(ctx.dispatch("createRange", { start, end, location }));
ctx.dispatch("createRange", { start, end, location }),
);
} }
return Promise.all(promises).then(() => Promise.resolve(null)); return Promise.all(promises).then(() => Promise.resolve(null));
@@ -369,9 +334,7 @@ export default {
r.locationId, r.locationId,
); );
promises.push( promises.push(ctx.dispatch("createRange", { start, end, location }));
ctx.dispatch("createRange", { start, end, location }),
);
} }
return Promise.all(promises).then(() => Promise.resolve(null)); return Promise.all(promises).then(() => Promise.resolve(null));

View File

@@ -29,10 +29,7 @@ export default {
(state: CalendarRemotesState) => (state: CalendarRemotesState) =>
({ start, end }: { start: Date; end: Date }): boolean => { ({ start, end }: { start: Date; end: Date }): boolean => {
for (const range of state.remotesLoaded) { for (const range of state.remotesLoaded) {
if ( if (start.getTime() === range.start && end.getTime() === range.end) {
start.getTime() === range.start &&
end.getTime() === range.end
) {
return true; return true;
} }
} }
@@ -85,11 +82,7 @@ export default {
end: end, end: end,
}); });
return fetchCalendarRemoteForUser( return fetchCalendarRemoteForUser(ctx.rootGetters["me/getMe"], start, end)
ctx.rootGetters["me/getMe"],
start,
end,
)
.then((remotes: CalendarRemote[]) => { .then((remotes: CalendarRemote[]) => {
// to be add when reactivity problem will be solve ? // to be add when reactivity problem will be solve ?
//ctx.commit('addRemotes', remotes); //ctx.commit('addRemotes', remotes);

View File

@@ -112,11 +112,8 @@ export default {
results.forEach((i) => { results.forEach((i) => {
if (!users.some((j) => i.user.id === j.id)) { if (!users.some((j) => i.user.id === j.id)) {
let ratio = Math.floor( let ratio = Math.floor(users.length / COLORS.length);
users.length / COLORS.length, let colorIndex = users.length - ratio * COLORS.length;
);
let colorIndex =
users.length - ratio * COLORS.length;
users.push({ users.push({
id: i.user.id, id: i.user.id,
username: i.user.username, username: i.user.username,
@@ -153,45 +150,29 @@ export default {
(me) => (me) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.users.logged = me; this.users.logged = me;
let currentUser = users.find( let currentUser = users.find((u) => u.id === me.id);
(u) => u.id === me.id,
);
this.value = currentUser; this.value = currentUser;
fetchCalendar(currentUser.id).then( fetchCalendar(currentUser.id).then(
(calendar) => (calendar) =>
new Promise( new Promise((resolve, reject) => {
(resolve, reject) => { let results = calendar.results;
let results = let events = results.map((i) => ({
calendar.results; start: i.startDate.datetime,
let events = end: i.endDate.datetime,
results.map( }));
(i) => ({ let calendarEventsCurrentUser = {
start: i
.startDate
.datetime,
end: i
.endDate
.datetime,
}),
);
let calendarEventsCurrentUser =
{
events: events, events: events,
color: "darkblue", color: "darkblue",
id: 1000, id: 1000,
editable: false, editable: false,
}; };
this.calendarEvents.user = this.calendarEvents.user = calendarEventsCurrentUser;
calendarEventsCurrentUser;
this.selectUsers( this.selectUsers(currentUser);
currentUser,
);
resolve(); resolve();
}, }),
),
); );
resolve(); resolve();
@@ -209,9 +190,7 @@ export default {
return `${value.username}`; return `${value.username}`;
}, },
coloriseSelectedValues() { coloriseSelectedValues() {
let tags = document.querySelectorAll( let tags = document.querySelectorAll("div.multiselect__tags-wrap")[0];
"div.multiselect__tags-wrap",
)[0];
if (tags.hasChildNodes()) { if (tags.hasChildNodes()) {
let children = tags.childNodes; let children = tags.childNodes;
@@ -232,8 +211,8 @@ export default {
}, },
selectEvents() { selectEvents() {
let selectedUsersId = this.users.selected.map((a) => a.id); let selectedUsersId = this.users.selected.map((a) => a.id);
this.calendarEvents.selected = this.calendarEvents.loaded.filter( this.calendarEvents.selected = this.calendarEvents.loaded.filter((a) =>
(a) => selectedUsersId.includes(a.id), selectedUsersId.includes(a.id),
); );
}, },
selectUsers(value) { selectUsers(value) {
@@ -243,9 +222,7 @@ export default {
this.updateEventsSource(); this.updateEventsSource();
}, },
unSelectUsers(value) { unSelectUsers(value) {
this.users.selected = this.users.selected.filter( this.users.selected = this.users.selected.filter((a) => a.id != value.id);
(a) => a.id != value.id,
);
this.selectEvents(); this.selectEvents();
this.updateEventsSource(); this.updateEventsSource();
}, },

View File

@@ -20,10 +20,7 @@
</option> </option>
<template v-for="t in templates" :key="t.id"> <template v-for="t in templates" :key="t.id">
<option :value="t.id"> <option :value="t.id">
{{ {{ localizeString(t.name) || "Aucun nom défini" }}
localizeString(t.name) ||
"Aucun nom défini"
}}
</option> </option>
</template> </template>
</select> </select>
@@ -31,9 +28,7 @@
v-if="canGenerate" v-if="canGenerate"
class="btn btn-update btn-sm change-icon" class="btn btn-update btn-sm change-icon"
:href="buildUrlGenerate" :href="buildUrlGenerate"
@click.prevent=" @click.prevent="clickGenerate($event, buildUrlGenerate)"
clickGenerate($event, buildUrlGenerate)
"
><i class="fa fa-fw fa-cog" ><i class="fa fa-fw fa-cog"
/></a> /></a>
<a <a

View File

@@ -13,8 +13,9 @@ const startApp = (
const inputTitle = collectionEntry?.querySelector("input[type='text']"); const inputTitle = collectionEntry?.querySelector("input[type='text']");
const input_stored_object: HTMLInputElement | null = const input_stored_object: HTMLInputElement | null = divElement.querySelector(
divElement.querySelector("input[data-stored-object]"); "input[data-stored-object]",
);
if (null === input_stored_object) { if (null === input_stored_object) {
throw new Error("input to stored object not found"); throw new Error("input to stored object not found");
} }
@@ -53,9 +54,7 @@ const startApp = (
console.log("version added", stored_object_version); console.log("version added", stored_object_version);
this.$data.existingDoc = stored_object; this.$data.existingDoc = stored_object;
this.$data.existingDoc.currentVersion = stored_object_version; this.$data.existingDoc.currentVersion = stored_object_version;
input_stored_object.value = JSON.stringify( input_stored_object.value = JSON.stringify(this.$data.existingDoc);
this.$data.existingDoc,
);
if (this.$data.inputTitle) { if (this.$data.inputTitle) {
if (!this.$data.inputTitle?.value) { if (!this.$data.inputTitle?.value) {
this.$data.inputTitle.value = file_name; this.$data.inputTitle.value = file_name;

View File

@@ -49,9 +49,7 @@
<li v-if="isHistoryViewable"> <li v-if="isHistoryViewable">
<history-button <history-button
:stored-object="props.storedObject" :stored-object="props.storedObject"
:can-edit=" :can-edit="canEdit && props.storedObject._permissions.canEdit"
canEdit && props.storedObject._permissions.canEdit
"
></history-button> ></history-button>
</li> </li>
</ul> </ul>
@@ -129,9 +127,7 @@ const props = withDefaults(defineProps<DocumentActionButtonsGroupConfig>(), {
canDownload: true, canDownload: true,
canConvertPdf: true, canConvertPdf: true,
returnPath: returnPath:
window.location.pathname + window.location.pathname + window.location.search + window.location.hash,
window.location.search +
window.location.hash,
}); });
/** /**

View File

@@ -29,9 +29,7 @@
</modal> </modal>
</teleport> </teleport>
<div class="col-12 m-auto sticky-top"> <div class="col-12 m-auto sticky-top">
<div <div class="row justify-content-center border-bottom pdf-tools d-md-none">
class="row justify-content-center border-bottom pdf-tools d-md-none"
>
<div class="col-5 text-center turn-page"> <div class="col-5 text-center turn-page">
<select <select
class="form-select form-select-sm" class="form-select form-select-sm"
@@ -92,10 +90,7 @@
v-if="signature.zones.length === 1 && signedState !== 'signed'" v-if="signature.zones.length === 1 && signedState !== 'signed'"
class="col-5 p-0 text-center turnSignature" class="col-5 p-0 text-center turnSignature"
> >
<button <button class="btn btn-light btn-sm" @click="goToSignatureZoneUnique">
class="btn btn-light btn-sm"
@click="goToSignatureZoneUnique"
>
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }} {{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
</button> </button>
</div> </div>
@@ -150,10 +145,7 @@
:title="trans(SIGNATURES_ADD_SIGN_ZONE)" :title="trans(SIGNATURES_ADD_SIGN_ZONE)"
> >
<template v-if="canvasEvent === 'add'"> <template v-if="canvasEvent === 'add'">
<div <div class="spinner-border spinner-border-sm" role="status">
class="spinner-border spinner-border-sm"
role="status"
>
<span class="visually-hidden">Loading...</span> <span class="visually-hidden">Loading...</span>
</div> </div>
</template> </template>
@@ -207,10 +199,7 @@
v-if="signature.zones.length === 1 && signedState !== 'signed'" v-if="signature.zones.length === 1 && signedState !== 'signed'"
class="col-4 d-xl-none text-center turnSignature p-0" class="col-4 d-xl-none text-center turnSignature p-0"
> >
<button <button class="btn btn-light btn-sm" @click="goToSignatureZoneUnique">
class="btn btn-light btn-sm"
@click="goToSignatureZoneUnique"
>
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }} {{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
</button> </button>
</div> </div>
@@ -238,10 +227,7 @@
v-if="signature.zones.length === 1 && signedState !== 'signed'" v-if="signature.zones.length === 1 && signedState !== 'signed'"
class="col-4 d-none d-xl-flex p-0 text-center turnSignature" class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
> >
<button <button class="btn btn-light btn-sm" @click="goToSignatureZoneUnique">
class="btn btn-light btn-sm"
@click="goToSignatureZoneUnique"
>
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }} {{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
</button> </button>
</div> </div>
@@ -299,10 +285,7 @@
</template> </template>
<template v-else> <template v-else>
{{ trans(SIGNATURES_CLICK_ON_DOCUMENT) }} {{ trans(SIGNATURES_CLICK_ON_DOCUMENT) }}
<div <div class="spinner-border spinner-border-sm" role="status">
class="spinner-border spinner-border-sm"
role="status"
>
<span class="visually-hidden">Loading...</span> <span class="visually-hidden">Loading...</span>
</div> </div>
</template> </template>
@@ -562,14 +545,8 @@ const addCanvasEvents = () => {
); );
}); });
} else { } else {
const canvas = document.querySelectorAll( const canvas = document.querySelectorAll("canvas")[0] as HTMLCanvasElement;
"canvas", canvas.addEventListener("pointerup", (e) => canvasClick(e, canvas), false);
)[0] as HTMLCanvasElement;
canvas.addEventListener(
"pointerup",
(e) => canvasClick(e, canvas),
false,
);
} }
}; };
@@ -605,11 +582,7 @@ const hitSignature = (
scaleYToCanvas(zone.y, canvas.height, zone.PDFPage.height) < scaleYToCanvas(zone.y, canvas.height, zone.PDFPage.height) <
xy[1] && xy[1] &&
xy[1] < xy[1] <
scaleYToCanvas( scaleYToCanvas(zone.height - zone.y, canvas.height, zone.PDFPage.height) +
zone.height - zone.y,
canvas.height,
zone.PDFPage.height,
) +
zone.PDFPage.height * zoom.value; zone.PDFPage.height * zoom.value;
const selectZone = async (z: SignatureZone, canvas: HTMLCanvasElement) => { const selectZone = async (z: SignatureZone, canvas: HTMLCanvasElement) => {
@@ -625,8 +598,7 @@ const selectZoneEvent = (e: PointerEvent, canvas: HTMLCanvasElement) =>
signature.zones signature.zones
.filter( .filter(
(z) => (z) =>
(z.PDFPage.index + 1 === getCanvasId(canvas) && (z.PDFPage.index + 1 === getCanvasId(canvas) && multiPage.value) ||
multiPage.value) ||
(z.PDFPage.index + 1 === page.value && !multiPage.value), (z.PDFPage.index + 1 === page.value && !multiPage.value),
) )
.map((z) => { .map((z) => {

View File

@@ -153,12 +153,10 @@ const handleFile = async (file: File): Promise<void> => {
</p> </p>
<!-- todo i18n --> <!-- todo i18n -->
<p v-if="has_existing_doc"> <p v-if="has_existing_doc">
Déposez un document ou cliquez ici pour remplacer le document Déposez un document ou cliquez ici pour remplacer le document existant
existant
</p> </p>
<p v-else> <p v-else>
Déposez un document ou cliquez ici pour ouvrir le navigateur de Déposez un document ou cliquez ici pour ouvrir le navigateur de fichier
fichier
</p> </p>
</div> </div>
<div v-else class="waiting"> <div v-else class="waiting">

View File

@@ -35,9 +35,7 @@ async function download_and_open(event: Event): Promise<void> {
if (null === state.content) { if (null === state.content) {
event.preventDefault(); event.preventDefault();
const raw = await download_doc( const raw = await download_doc(build_convert_link(props.storedObject.uuid));
build_convert_link(props.storedObject.uuid),
);
state.content = window.URL.createObjectURL(raw); state.content = window.URL.createObjectURL(raw);
button.href = window.URL.createObjectURL(raw); button.href = window.URL.createObjectURL(raw);

View File

@@ -42,9 +42,7 @@ const editionUntilFormatted = computed<string>(() => {
<modal v-if="state.modalOpened" @close="state.modalOpened = false"> <modal v-if="state.modalOpened" @close="state.modalOpened = false">
<template v-slot:body> <template v-slot:body>
<div class="desktop-edit"> <div class="desktop-edit">
<p class="center"> <p class="center">Veuillez enregistrer vos modifications avant le</p>
Veuillez enregistrer vos modifications avant le
</p>
<p> <p>
<strong>{{ editionUntilFormatted }}</strong> <strong>{{ editionUntilFormatted }}</strong>
</p> </p>
@@ -57,23 +55,21 @@ const editionUntilFormatted = computed<string>(() => {
<p> <p>
<small <small
>Le document peut être édité uniquement en utilisant >Le document peut être édité uniquement en utilisant Libre
Libre Office.</small Office.</small
> >
</p> </p>
<p> <p>
<small <small
>En cas d'échec lors de l'enregistrement, sauver le >En cas d'échec lors de l'enregistrement, sauver le document sur
document sur le poste de travail avant de le déposer le poste de travail avant de le déposer à nouveau ici.</small
à nouveau ici.</small
> >
</p> </p>
<p> <p>
<small <small
>Vous pouvez naviguez sur d'autres pages pendant >Vous pouvez naviguez sur d'autres pages pendant l'édition.</small
l'édition.</small
> >
</p> </p>
</div> </div>

View File

@@ -95,10 +95,7 @@ async function download_and_open(): Promise<void> {
let raw; let raw;
try { try {
raw = await download_and_decrypt_doc( raw = await download_and_decrypt_doc(props.storedObject, props.atVersion);
props.storedObject,
props.atVersion,
);
} catch (e) { } catch (e) {
console.error("error while downloading and decrypting document"); console.error("error while downloading and decrypting document");
console.error(e); console.error(e);

View File

@@ -49,8 +49,7 @@ const isRestored = computed<boolean>(
); );
const isDuplicated = computed<boolean>( const isDuplicated = computed<boolean>(
() => () => props.version.version === 0 && null !== props.version["from-restored"],
props.version.version === 0 && null !== props.version["from-restored"],
); );
const classes = computed<{ const classes = computed<{
@@ -70,16 +69,9 @@ const classes = computed<{
<div :class="classes"> <div :class="classes">
<div <div
class="col-12 tags" class="col-12 tags"
v-if=" v-if="isCurrent || isKeptBeforeConversion || isRestored || isDuplicated"
isCurrent ||
isKeptBeforeConversion ||
isRestored ||
isDuplicated
"
>
<span class="badge bg-success" v-if="isCurrent"
>Version actuelle</span
> >
<span class="badge bg-success" v-if="isCurrent">Version actuelle</span>
<span class="badge bg-info" v-if="isKeptBeforeConversion" <span class="badge bg-info" v-if="isKeptBeforeConversion"
>Conservée avant conversion dans un autre format</span >Conservée avant conversion dans un autre format</span
> >
@@ -96,21 +88,17 @@ const classes = computed<{
<span <span
><strong>&nbsp;#{{ version.version + 1 }}&nbsp;</strong></span ><strong>&nbsp;#{{ version.version + 1 }}&nbsp;</strong></span
> >
<template <template v-if="version.createdBy !== null && version.createdAt !== null"
v-if="version.createdBy !== null && version.createdAt !== null"
><strong v-if="version.version == 0">créé par</strong ><strong v-if="version.version == 0">créé par</strong
><strong v-else>modifié par</strong> ><strong v-else>modifié par</strong>
<span class="badge-user" <span class="badge-user"
><UserRenderBoxBadge ><UserRenderBoxBadge :user="version.createdBy"></UserRenderBoxBadge
:user="version.createdBy"
></UserRenderBoxBadge
></span> ></span>
<strong>à</strong> <strong>à</strong>
{{ {{
$d(ISOToDatetime(version.createdAt.datetime8601), "long") $d(ISOToDatetime(version.createdAt.datetime8601), "long")
}}</template }}</template
><template ><template v-if="version.createdBy === null && version.createdAt !== null"
v-if="version.createdBy === null && version.createdAt !== null"
><strong v-if="version.version == 0">Créé le</strong ><strong v-if="version.version == 0">Créé le</strong
><strong v-else>modifié le</strong> ><strong v-else>modifié le</strong>
{{ {{

View File

@@ -2,9 +2,7 @@
<a <a
:class="Object.assign(props.classes, { btn: true })" :class="Object.assign(props.classes, { btn: true })"
@click="beforeLeave($event)" @click="beforeLeave($event)"
:href=" :href="build_wopi_editor_link(props.storedObject.uuid, props.returnPath)"
build_wopi_editor_link(props.storedObject.uuid, props.returnPath)
"
> >
<i class="fa fa-paragraph"></i> <i class="fa fa-paragraph"></i>
Editer en ligne Editer en ligne

View File

@@ -145,9 +145,7 @@ async function download_info_link(
function build_wopi_editor_link(uuid: string, returnPath?: string) { function build_wopi_editor_link(uuid: string, returnPath?: string) {
if (returnPath === undefined) { if (returnPath === undefined) {
returnPath = returnPath =
window.location.pathname + window.location.pathname + window.location.search + window.location.hash;
window.location.search +
window.location.hash;
} }
return ( return (
@@ -186,10 +184,7 @@ async function download_and_decrypt_doc(
) { ) {
downloadInfo = storedObject._links.downloadLink; downloadInfo = storedObject._links.downloadLink;
} else { } else {
downloadInfo = await download_info_link( downloadInfo = await download_info_link(storedObject, atVersionToDownload);
storedObject,
atVersionToDownload,
);
} }
const rawResponse = await window.fetch(downloadInfo.url); const rawResponse = await window.fetch(downloadInfo.url);
@@ -244,10 +239,7 @@ async function download_doc_as_pdf(storedObject: StoredObject): Promise<Blob> {
} }
if (storedObject.currentVersion?.type === "application/pdf") { if (storedObject.currentVersion?.type === "application/pdf") {
return download_and_decrypt_doc( return download_and_decrypt_doc(storedObject, storedObject.currentVersion);
storedObject,
storedObject.currentVersion,
);
} }
const convertLink = build_convert_link(storedObject.uuid); const convertLink = build_convert_link(storedObject.uuid);

View File

@@ -56,9 +56,7 @@ export const ISOToDatetime = (str: string | null): Date | null => {
[time, timezone] = times.split(times.charAt(8)), [time, timezone] = times.split(times.charAt(8)),
[hours, minutes, seconds] = time.split(":").map((s) => parseInt(s)); [hours, minutes, seconds] = time.split(":").map((s) => parseInt(s));
if ("0000" === timezone) { if ("0000" === timezone) {
return new Date( return new Date(Date.UTC(year, month - 1, date, hours, minutes, seconds));
Date.UTC(year, month - 1, date, hours, minutes, seconds),
);
} }
return new Date(year, month - 1, date, hours, minutes, seconds); return new Date(year, month - 1, date, hours, minutes, seconds);
@@ -154,9 +152,7 @@ export const intervalISOToDays = (str: string | null): number | null => {
vstring = ""; vstring = "";
break; break;
default: default:
throw Error( throw Error("this character should not appears: " + str.charAt(i));
"this character should not appears: " + str.charAt(i),
);
} }
} }

View File

@@ -144,10 +144,7 @@
</template> </template>
<template #action> <template #action>
<li v-if="!this.context.edit && this.useDatePane"> <li v-if="!this.context.edit && this.useDatePane">
<button <button class="btn btn-update change-icon" @click="closeEditPane">
class="btn btn-update change-icon"
@click="closeEditPane"
>
{{ $t("nav.next") }} {{ $t("nav.next") }}
<i class="fa fa-fw fa-arrow-right" /> <i class="fa fa-fw fa-arrow-right" />
</button> </button>
@@ -370,8 +367,7 @@ export default {
getTextTitle() { getTextTitle() {
if ( if (
typeof this.options.title !== "undefined" && typeof this.options.title !== "undefined" &&
(this.options.title.edit !== null || (this.options.title.edit !== null || this.options.title.create !== null)
this.options.title.create !== null)
) { ) {
return this.context.edit return this.context.edit
? this.options.title.edit ? this.options.title.edit
@@ -489,10 +485,7 @@ export default {
if (!this.context.edit) { if (!this.context.edit) {
this.context.edit = true; this.context.edit = true;
this.context.addressId = params.addressId; this.context.addressId = params.addressId;
console.log( console.log("context is now edit, with address", params.addressId);
"context is now edit, with address",
params.addressId,
);
} }
} }
}, },
@@ -619,9 +612,7 @@ export default {
? this.entity.address.confidential ? this.entity.address.confidential
: false; : false;
this.entity.selected.isNoAddress = this.entity.selected.isNoAddress =
this.context.edit && this.entity.address.text === "" this.context.edit && this.entity.address.text === "" ? true : false;
? true
: false;
this.entity.selected.country = this.context.edit this.entity.selected.country = this.context.edit
? this.entity.address.country ? this.entity.address.country
@@ -716,8 +707,7 @@ export default {
// add the address reference, if any // add the address reference, if any
if (this.entity.selected.address.addressReference !== undefined) { if (this.entity.selected.address.addressReference !== undefined) {
newAddress = Object.assign(newAddress, { newAddress = Object.assign(newAddress, {
addressReference: addressReference: this.entity.selected.address.addressReference,
this.entity.selected.address.addressReference,
}); });
} else { } else {
newAddress = Object.assign(newAddress, { newAddress = Object.assign(newAddress, {
@@ -737,10 +727,7 @@ export default {
}); });
} }
if (this.validTo && null !== this.entity.selected.valid.to) { if (this.validTo && null !== this.entity.selected.valid.to) {
console.log( console.log("add validTo in fetch body", this.entity.selected.valid.to);
"add validTo in fetch body",
this.entity.selected.valid.to,
);
newAddress = Object.assign(newAddress, { newAddress = Object.assign(newAddress, {
validTo: { validTo: {
datetime: `${this.entity.selected.valid.to.toISOString().split("T")[0]}T00:00:00+0100`, datetime: `${this.entity.selected.valid.to.toISOString().split("T")[0]}T00:00:00+0100`,
@@ -752,10 +739,7 @@ export default {
newPostcode = Object.assign(newPostcode, { newPostcode = Object.assign(newPostcode, {
country: { id: this.entity.selected.country.id }, country: { id: this.entity.selected.country.id },
}); //TODO why not assign postcodeBody here = Object.assign(postcodeBody, {'origin': 3}); ? }); //TODO why not assign postcodeBody here = Object.assign(postcodeBody, {'origin': 3}); ?
console.log( console.log("writeNew postcode is true! newPostcode: ", newPostcode);
"writeNew postcode is true! newPostcode: ",
newPostcode,
);
newAddress = Object.assign(newAddress, { newAddress = Object.assign(newAddress, {
newPostcode: newPostcode, newPostcode: newPostcode,
}); });

View File

@@ -72,10 +72,7 @@ export default {
this.entity.addressMap.zoom, this.entity.addressMap.zoom,
); );
} else { } else {
this.map.setView( this.map.setView(lonLatForLeaflet(this.addressPoint.coordinates), 15);
lonLatForLeaflet(this.addressPoint.coordinates),
15,
);
} }
this.map.scrollWheelZoom.disable(); this.map.scrollWheelZoom.disable();
@@ -105,9 +102,7 @@ export default {
}, },
update() { update() {
if (this.marker && this.entity.addressMap.center) { if (this.marker && this.entity.addressMap.center) {
this.marker.setLatLng( this.marker.setLatLng(lonLatForLeaflet(this.entity.addressMap.center));
lonLatForLeaflet(this.entity.addressMap.center),
);
this.map.panTo(lonLatForLeaflet(this.entity.addressMap.center)); this.map.panTo(lonLatForLeaflet(this.entity.addressMap.center));
} }
}, },

View File

@@ -76,9 +76,7 @@ export default {
props: ["entity", "context", "updateMapCenter", "flag", "checkErrors"], props: ["entity", "context", "updateMapCenter", "flag", "checkErrors"],
data() { data() {
return { return {
value: this.context.edit value: this.context.edit ? this.entity.address.addressReference : null,
? this.entity.address.addressReference
: null,
isLoading: false, isLoading: false,
}; };
}, },
@@ -151,8 +149,7 @@ export default {
.then( .then(
(addresses) => (addresses) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.entity.loaded.addresses = this.entity.loaded.addresses = addresses.results;
addresses.results;
this.isLoading = false; this.isLoading = false;
resolve(); resolve();
}), }),
@@ -169,8 +166,7 @@ export default {
.then( .then(
(addresses) => (addresses) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.entity.loaded.addresses = this.entity.loaded.addresses = addresses.results;
addresses.results;
this.isLoading = false; this.isLoading = false;
resolve(); resolve();
}), }),

View File

@@ -136,9 +136,7 @@ export default {
}, },
methods: { methods: {
transName(value) { transName(value) {
return value.code && value.name return value.code && value.name ? `${value.name} (${value.code})` : "";
? `${value.name} (${value.code})`
: "";
}, },
selectCity(value) { selectCity(value) {
console.log(value); console.log(value);
@@ -146,8 +144,7 @@ export default {
this.entity.selected.postcode.name = value.name; this.entity.selected.postcode.name = value.name;
this.entity.selected.postcode.code = value.code; this.entity.selected.postcode.code = value.code;
if (value.center) { if (value.center) {
this.entity.selected.postcode.coordinates = this.entity.selected.postcode.coordinates = value.center.coordinates;
value.center.coordinates;
} }
this.entity.selected.writeNew.postcode = false; this.entity.selected.writeNew.postcode = false;
this.$emit("getReferenceAddresses", value); this.$emit("getReferenceAddresses", value);
@@ -168,8 +165,7 @@ export default {
.then( .then(
(cities) => (cities) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.entity.loaded.cities = this.entity.loaded.cities = cities.results.filter(
cities.results.filter(
(c) => c.origin !== 3, (c) => c.origin !== 3,
); // filter out user-defined cities ); // filter out user-defined cities
this.isLoading = false; this.isLoading = false;
@@ -188,8 +184,7 @@ export default {
.then( .then(
(cities) => (cities) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
this.entity.loaded.cities = this.entity.loaded.cities = cities.results.filter(
cities.results.filter(
(c) => c.origin !== 3, (c) => c.origin !== 3,
); // filter out user-defined cities ); // filter out user-defined cities
this.isLoading = false; this.isLoading = false;

View File

@@ -42,12 +42,8 @@ export default {
sortedCountries() { sortedCountries() {
const countries = this.entity.loaded.countries; const countries = this.entity.loaded.countries;
let sortedCountries = []; let sortedCountries = [];
sortedCountries.push( sortedCountries.push(...countries.filter((c) => c.countryCode === "FR"));
...countries.filter((c) => c.countryCode === "FR"), sortedCountries.push(...countries.filter((c) => c.countryCode === "BE"));
);
sortedCountries.push(
...countries.filter((c) => c.countryCode === "BE"),
);
sortedCountries.push( sortedCountries.push(
...countries ...countries
.filter((c) => c.countryCode !== "FR") .filter((c) => c.countryCode !== "FR")

View File

@@ -1,9 +1,6 @@
<template> <template>
<div v-if="insideModal === false" class="loading"> <div v-if="insideModal === false" class="loading">
<i <i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw" />
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t("loading") }}</span> <span class="sr-only">{{ $t("loading") }}</span>
</div> </div>
@@ -142,8 +139,7 @@ export default {
address["street"] = this.entity.selected.address.street address["street"] = this.entity.selected.address.street
? this.entity.selected.address.street ? this.entity.selected.address.street
: null; : null;
address["streetNumber"] = this.entity.selected.address address["streetNumber"] = this.entity.selected.address.streetNumber
.streetNumber
? this.entity.selected.address.streetNumber ? this.entity.selected.address.streetNumber
: null; : null;
address["floor"] = this.entity.selected.address.floor address["floor"] = this.entity.selected.address.floor
@@ -158,12 +154,10 @@ export default {
address["flat"] = this.entity.selected.address.flat address["flat"] = this.entity.selected.address.flat
? this.entity.selected.address.flat ? this.entity.selected.address.flat
: null; : null;
address["buildingName"] = this.entity.selected.address address["buildingName"] = this.entity.selected.address.buildingName
.buildingName
? this.entity.selected.address.buildingName ? this.entity.selected.address.buildingName
: null; : null;
address["distribution"] = this.entity.selected.address address["distribution"] = this.entity.selected.address.distribution
.distribution
? this.entity.selected.address.distribution ? this.entity.selected.address.distribution
: null; : null;
address["extra"] = this.entity.selected.address.extra address["extra"] = this.entity.selected.address.extra

View File

@@ -2,10 +2,7 @@
<div class="address-form"> <div class="address-form">
<!-- Not display in modal --> <!-- Not display in modal -->
<div v-if="insideModal === false" class="loading"> <div v-if="insideModal === false" class="loading">
<i <i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw" />
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">Loading...</span> <span class="sr-only">Loading...</span>
</div> </div>

View File

@@ -1,10 +1,7 @@
<template> <template>
<div v-if="!onlyButton" class="mt-4 flex-grow-1"> <div v-if="!onlyButton" class="mt-4 flex-grow-1">
<div class="loading"> <div class="loading">
<i <i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw" />
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t("loading") }}</span> <span class="sr-only">{{ $t("loading") }}</span>
</div> </div>
@@ -45,9 +42,7 @@
name="button" name="button"
:title="$t(getTextButton)" :title="$t(getTextButton)"
> >
<span v-if="displayTextButton">{{ <span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
$t(getTextButton)
}}</span>
</button> </button>
</template> </template>
</action-buttons> </action-buttons>
@@ -60,9 +55,7 @@
:use-date-pane="useDatePane" :use-date-pane="useDatePane"
/> />
<div <div v-if="this.context.target.name === 'household' || this.context.edit">
v-if="this.context.target.name === 'household' || this.context.edit"
>
<action-buttons :options="this.options" :defaultz="this.defaultz"> <action-buttons :options="this.options" :defaultz="this.defaultz">
<template #action> <template #action>
<button <button
@@ -73,9 +66,7 @@
name="button" name="button"
:title="$t(getTextButton)" :title="$t(getTextButton)"
> >
<span v-if="displayTextButton">{{ <span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
$t(getTextButton)
}}</span>
</button> </button>
</template> </template>
</action-buttons> </action-buttons>
@@ -97,9 +88,7 @@
name="button" name="button"
:title="$t(getTextButton)" :title="$t(getTextButton)"
> >
<span v-if="displayTextButton">{{ <span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
$t(getTextButton)
}}</span>
</button> </button>
</template> </template>
</action-buttons> </action-buttons>
@@ -165,9 +154,7 @@ export default {
: this.defaultz.button.text.create; : this.defaultz.button.text.create;
}, },
getSuccessText() { getSuccessText() {
return this.context.edit return this.context.edit ? "address_edit_success" : "address_new_success";
? "address_edit_success"
: "address_new_success";
}, },
onlyButton() { onlyButton() {
return typeof this.options.onlyButton !== "undefined" return typeof this.options.onlyButton !== "undefined"

View File

@@ -1,9 +1,6 @@
<template> <template>
<div v-if="insideModal === false" class="loading"> <div v-if="insideModal === false" class="loading">
<i <i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw" />
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t("loading") }}</span> <span class="sr-only">{{ $t("loading") }}</span>
</div> </div>

View File

@@ -86,10 +86,7 @@ onMounted(() => {
<template> <template>
<div id="waiting-screen"> <div id="waiting-screen">
<div <div v-if="isPending && isFetching" class="alert alert-danger text-center">
v-if="isPending && isFetching"
class="alert alert-danger text-center"
>
<div> <div>
<p> <p>
{{ trans(EXPORT_GENERATION_EXPORT_GENERATION_IS_PENDING) }} {{ trans(EXPORT_GENERATION_EXPORT_GENERATION_IS_PENDING) }}

View File

@@ -67,9 +67,7 @@
@click="selectTab('MyWorkflows')" @click="selectTab('MyWorkflows')"
> >
{{ $t("my_workflows.tab") }} {{ $t("my_workflows.tab") }}
<tab-counter <tab-counter :count="state.workflows.count + state.workflowsCc.count" />
:count="state.workflows.count + state.workflowsCc.count"
/>
</a> </a>
</li> </li>
<li class="nav-item loading ms-auto py-2" v-if="loading"> <li class="nav-item loading ms-auto py-2" v-if="loading">

View File

@@ -25,11 +25,9 @@
</template> </template>
<template #body> <template #body>
<p class="news-date"> <p class="news-date">
<time <time class="createdBy" datetime="{{item.startDate.datetime}}">{{
class="createdBy" $d(newsItemStartDate(), "text")
datetime="{{item.startDate.datetime}}" }}</time>
>{{ $d(newsItemStartDate(), "text") }}</time
>
</p> </p>
<div v-html="convertMarkdownToHtml(item.content)"></div> <div v-html="convertMarkdownToHtml(item.content)"></div>
</template> </template>
@@ -93,10 +91,7 @@ const truncateContent = (content: string): string => {
// Truncate if amount of lines are too many // Truncate if amount of lines are too many
if (lines.length > props.maxLines && content.length < props.maxLength) { if (lines.length > props.maxLines && content.length < props.maxLength) {
const truncatedContent = lines const truncatedContent = lines.slice(0, props.maxLines).join("\n").trim();
.slice(0, props.maxLines)
.join("\n")
.trim();
return truncatedContent + "..."; return truncatedContent + "...";
} }
@@ -125,8 +120,7 @@ const truncateContent = (content: string): string => {
if (linkStartIndex !== -1) { if (linkStartIndex !== -1) {
const linkEndIndex = content.indexOf(")", linkStartIndex); const linkEndIndex = content.indexOf(")", linkStartIndex);
const url = content.slice(linkStartIndex + 1, linkEndIndex); const url = content.slice(linkStartIndex + 1, linkEndIndex);
truncatedContent = truncatedContent = truncatedContent.slice(0, linkStartIndex) + `(${url})`;
truncatedContent.slice(0, linkStartIndex) + `(${url})`;
} }
truncatedContent += "..."; truncatedContent += "...";

View File

@@ -20,10 +20,7 @@
<th scope="col" /> <th scope="col" />
</template> </template>
<template #tbody> <template #tbody>
<tr <tr v-for="(c, i) in accompanyingCourses.results" :key="`course-${i}`">
v-for="(c, i) in accompanyingCourses.results"
:key="`course-${i}`"
>
<td>{{ $d(c.openingDate.datetime, "short") }}</td> <td>{{ $d(c.openingDate.datetime, "short") }}</td>
<td> <td>
<span <span
@@ -37,11 +34,7 @@
</span> </span>
</td> </td>
<td> <td>
<span <span v-for="p in c.participations" class="me-1" :key="p.person.id">
v-for="p in c.participations"
class="me-1"
:key="p.person.id"
>
<on-the-fly <on-the-fly
:type="p.person.type" :type="p.person.type"
:id="p.person.id" :id="p.person.id"
@@ -52,16 +45,12 @@
</span> </span>
</td> </td>
<td> <td>
<span <span v-if="c.emergency" class="badge rounded-pill bg-danger me-1">{{
v-if="c.emergency" $t("emergency")
class="badge rounded-pill bg-danger me-1" }}</span>
>{{ $t("emergency") }}</span <span v-if="c.confidential" class="badge rounded-pill bg-danger">{{
> $t("confidential")
<span }}</span>
v-if="c.confidential"
class="badge rounded-pill bg-danger"
>{{ $t("confidential") }}</span
>
</td> </td>
<td> <td>
<a class="btn btn-sm btn-show" :href="getUrl(c)"> <a class="btn btn-sm btn-show" :href="getUrl(c)">

View File

@@ -27,9 +27,7 @@
:plural="counter.accompanyingCourses" :plural="counter.accompanyingCourses"
> >
<template #n> <template #n>
<span>{{ <span>{{ counter.accompanyingCourses }}</span>
counter.accompanyingCourses
}}</span>
</template> </template>
</i18n-t> </i18n-t>
</li> </li>

View File

@@ -20,10 +20,7 @@
<th scope="col" /> <th scope="col" />
</template> </template>
<template #tbody> <template #tbody>
<tr <tr v-for="(e, i) in evaluations.results" :key="`evaluation-${i}`">
v-for="(e, i) in evaluations.results"
:key="`evaluation-${i}`"
>
<td>{{ $d(e.maxDate.datetime, "short") }}</td> <td>{{ $d(e.maxDate.datetime, "short") }}</td>
<td> <td>
{{ localizeString(e.evaluation.title) }} {{ localizeString(e.evaluation.title) }}
@@ -31,10 +28,7 @@
<td> <td>
<span class="chill-entity entity-social-issue"> <span class="chill-entity entity-social-issue">
<span class="badge bg-chill-l-gray text-dark"> <span class="badge bg-chill-l-gray text-dark">
{{ {{ e.accompanyingPeriodWork.socialAction.issue.text }}
e.accompanyingPeriodWork.socialAction.issue
.text
}}
</span> </span>
</span> </span>
<h4 class="badge-title"> <h4 class="badge-title">
@@ -58,11 +52,7 @@
</span> </span>
</td> </td>
<td> <td>
<div <div class="btn-group-vertical" role="group" aria-label="Actions">
class="btn-group-vertical"
role="group"
aria-label="Actions"
>
<a class="btn btn-sm btn-show" :href="getUrl(e)"> <a class="btn btn-sm btn-show" :href="getUrl(e)">
{{ {{
$t("show_entity", { $t("show_entity", {
@@ -72,12 +62,7 @@
</a> </a>
<a <a
class="btn btn-sm btn-show" class="btn btn-sm btn-show"
:href=" :href="getUrl(e.accompanyingPeriodWork.accompanyingPeriod)"
getUrl(
e.accompanyingPeriodWork
.accompanyingPeriod,
)
"
> >
{{ {{
$t("show_entity", { $t("show_entity", {

View File

@@ -25,9 +25,7 @@
</td> </td>
<td v-else /> <td v-else />
<td> <td>
<span class="outdated">{{ <span class="outdated">{{ $d(t.endDate.datetime, "short") }}</span>
$d(t.endDate.datetime, "short")
}}</span>
</td> </td>
<td>{{ t.title }}</td> <td>{{ t.title }}</td>
<td> <td>
@@ -59,10 +57,7 @@
<th scope="col" /> <th scope="col" />
</template> </template>
<template #tbody> <template #tbody>
<tr <tr v-for="(t, i) in tasks.warning.results" :key="`task-warning-${i}`">
v-for="(t, i) in tasks.warning.results"
:key="`task-warning-${i}`"
>
<td> <td>
<span class="outdated">{{ <span class="outdated">{{
$d(t.warningDate.datetime, "short") $d(t.warningDate.datetime, "short")

View File

@@ -23,9 +23,7 @@
<td> <td>
<div class="workflow"> <div class="workflow">
<div class="breadcrumb"> <div class="breadcrumb">
<i <i class="fa fa-circle me-1 text-chill-yellow mx-2" />
class="fa fa-circle me-1 text-chill-yellow mx-2"
/>
<span class="mx-2">{{ getStep(w) }}</span> <span class="mx-2">{{ getStep(w) }}</span>
</div> </div>
<span <span

View File

@@ -37,11 +37,7 @@
</h4> </h4>
</td> </td>
<td> <td>
<span <span v-for="person in w.persons" class="me-1" :key="person.id">
v-for="person in w.persons"
class="me-1"
:key="person.id"
>
<on-the-fly <on-the-fly
:type="person.type" :type="person.type"
:id="person.id" :id="person.id"
@@ -52,11 +48,7 @@
</span> </span>
</td> </td>
<td> <td>
<div <div class="btn-group-vertical" role="group" aria-label="Actions">
class="btn-group-vertical"
role="group"
aria-label="Actions"
>
<a class="btn btn-sm btn-update" :href="getUrl(w)"> <a class="btn btn-sm btn-update" :href="getUrl(w)">
{{ {{
$t("show_entity", { $t("show_entity", {

View File

@@ -77,8 +77,7 @@ const castThirdparty = ref(null);
onMounted(() => { onMounted(() => {
type.value = type.value =
props.allowedTypes.length === 1 && props.allowedTypes.length === 1 && props.allowedTypes.includes("thirdparty")
props.allowedTypes.includes("thirdparty")
? "thirdparty" ? "thirdparty"
: "person"; : "person";
}); });

View File

@@ -61,9 +61,7 @@ export default {
}, },
methods: { methods: {
transName(value) { transName(value) {
return value.code && value.name return value.code && value.name ? `${value.name} (${value.code})` : "";
? `${value.name} (${value.code})`
: "";
}, },
selectCity(city) { selectCity(city) {
this.$emit("selectCity", city); this.$emit("selectCity", city);
@@ -86,9 +84,7 @@ export default {
searchCities(query, this.country, controller) searchCities(query, this.country, controller)
.then((newCities) => { .then((newCities) => {
this.cities = this.cities.filter( this.cities = this.cities.filter((city) => city.id === this.picked);
(city) => city.id === this.picked,
);
newCities.forEach((item) => { newCities.forEach((item) => {
this.cities.push(item); this.cities.push(item);
}); });

View File

@@ -10,9 +10,7 @@ const props = defineProps<SavedExportButtonsConfig>();
</script> </script>
<template> <template>
<generate-button <generate-button :saved-export-uuid="props.savedExportUuid"></generate-button>
:saved-export-uuid="props.savedExportUuid"
></generate-button>
</template> </template>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@@ -125,9 +125,7 @@ const onObjectNewStatusCallback = async function (): Promise<void> {
const onClickGenerate = async (): Promise<void> => { const onClickGenerate = async (): Promise<void> => {
emits("generate"); emits("generate");
exportGeneration.value = await generateFromSavedExport( exportGeneration.value = await generateFromSavedExport(props.savedExportUuid);
props.savedExportUuid,
);
onObjectNewStatusCallback(); onObjectNewStatusCallback();

View File

@@ -110,9 +110,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
return false; return false;
} }
return needles.every((n: string) => return needles.every((n: string) => title.toLowerCase().includes(n));
title.toLowerCase().includes(n),
);
}) })
.filter((genericDoc: GenericDocForAccompanyingPeriod) => { .filter((genericDoc: GenericDocForAccompanyingPeriod) => {
if (placesFilter.value.length === 0) { if (placesFilter.value.length === 0) {
@@ -153,8 +151,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
aria-controls="filterOrderCollapse" aria-controls="filterOrderCollapse"
> >
<strong <strong
><i class="fa fa-fw fa-filter"></i>Filtrer la ><i class="fa fa-fw fa-filter"></i>Filtrer la liste</strong
liste</strong
> >
</button> </button>
</h2> </h2>
@@ -179,10 +176,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
placeholder="Chercher dans la liste" placeholder="Chercher dans la liste"
class="form-control" class="form-control"
/> />
<button <button type="submit" class="btn btn-misc">
type="submit"
class="btn btn-misc"
>
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</button> </button>
</div> </div>
@@ -190,9 +184,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
</div> </div>
<div class="row my-2"> <div class="row my-2">
<legend <legend class="col-form-label col-sm-4 required">
class="col-form-label col-sm-4 required"
>
Date du document Date du document
</legend> </legend>
<div class="col-sm-8 pt-1"> <div class="col-sm-8 pt-1">
@@ -218,15 +210,9 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
</div> </div>
<div class="row my-2"> <div class="row my-2">
<div class="col-sm-4 col-form-label"> <div class="col-sm-4 col-form-label">Filtrer par</div>
Filtrer par
</div>
<div class="col-sm-8 pt-2"> <div class="col-sm-8 pt-2">
<div <div class="form-check" v-for="p in availablePlaces" :key="p">
class="form-check"
v-for="p in availablePlaces"
:key="p"
>
<input <input
type="checkbox" type="checkbox"
v-model="placesFilter" v-model="placesFilter"
@@ -234,9 +220,7 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
class="form-check-input" class="form-check-input"
:value="p" :value="p"
/> />
<label class="form-check-label">{{ <label class="form-check-label">{{ placeTrans(p) }}</label>
placeTrans(p)
}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -81,16 +81,8 @@ const clickOnAddButton = () => {
rgba(25, 135, 84, 1) 0px, rgba(25, 135, 84, 1) 0px,
rgba(25, 135, 84, 0) 9px rgba(25, 135, 84, 0) 9px
), ),
linear-gradient( linear-gradient(0deg, rgba(25, 135, 84, 1) 0px, rgba(25, 135, 84, 0) 9px),
0deg, linear-gradient(90deg, rgba(25, 135, 84, 1) 0px, rgba(25, 135, 84, 0) 9px);
rgba(25, 135, 84, 1) 0px,
rgba(25, 135, 84, 0) 9px
),
linear-gradient(
90deg,
rgba(25, 135, 84, 1) 0px,
rgba(25, 135, 84, 0) 9px
);
} }
} }
</style> </style>

View File

@@ -97,8 +97,8 @@ defineExpose({ openModal, closeModal });
@click="onConfirm" @click="onConfirm"
> >
<template v-if="numberOfPicked > 1"> <template v-if="numberOfPicked > 1">
<i class="fa fa-plus"></i> Ajouter <i class="fa fa-plus"></i> Ajouter {{ numberOfPicked }} pièces
{{ numberOfPicked }} pièces jointes jointes
</template> </template>
<template v-else> <template v-else>
<i class="fa fa-plus"></i> Ajouter une pièce jointe <i class="fa fa-plus"></i> Ajouter une pièce jointe

View File

@@ -81,17 +81,12 @@ window.addEventListener("DOMContentLoaded", () => {
"this document is already attached to the workflow", "this document is already attached to the workflow",
genericDoc, genericDoc,
); );
this.$toast.error( this.$toast.error("Ce document est déjà attaché au workflow");
"Ce document est déjà attaché au workflow",
);
return; return;
} }
try { try {
const attachment = await create_attachment( const attachment = await create_attachment(workflowId, genericDoc);
workflowId,
genericDoc,
);
this.$data.attachments.push(attachment); this.$data.attachments.push(attachment);
} catch (error) { } catch (error) {
console.error(error); console.error(error);

View File

@@ -1,7 +1,6 @@
<template> <template>
<div v-if="props.address.isNoAddress" class="alert alert-info"> <div v-if="props.address.isNoAddress" class="alert alert-info">
Cette adresse est incomplète. La position géographique est Cette adresse est incomplète. La position géographique est approximative.
approximative.
</div> </div>
<div <div
v-if="props.address.point !== null" v-if="props.address.point !== null"
@@ -10,9 +9,7 @@
></div> ></div>
<p> <p>
Voir sur Voir sur
<a :href="makeUrlGoogleMap(props.address)" target="_blank" <a :href="makeUrlGoogleMap(props.address)" target="_blank">Google Maps</a>
>Google Maps</a
>
<a :href="makeUrlOsm(props.address)" target="_blank">OSM</a> <a :href="makeUrlOsm(props.address)" target="_blank">OSM</a>
</p> </p>
</template> </template>

View File

@@ -12,8 +12,7 @@
}" }"
> >
<p v-if="props.address.refStatus === 'to_review'"> <p v-if="props.address.refStatus === 'to_review'">
<i class="fa fa-warning"></i> L'adresse de référence a été <i class="fa fa-warning"></i> L'adresse de référence a été modifiée.
modifiée.
</p> </p>
<p v-if="props.address.refStatus === 'reviewed'"> <p v-if="props.address.refStatus === 'reviewed'">
L'adresse est conservée, mais diffère de l'adresse de référence. L'adresse est conservée, mais diffère de l'adresse de référence.
@@ -21,8 +20,7 @@
<template <template
v-if=" v-if="
props.address.addressReference.street !== props.address.addressReference.street !== props.address.street ||
props.address.street ||
props.address.addressReference.streetNumber !== props.address.addressReference.streetNumber !==
props.address.streetNumber props.address.streetNumber
" "
@@ -30,22 +28,18 @@
<template v-if="props.address.country.code === 'BE'"> <template v-if="props.address.country.code === 'BE'">
<div class="difference"> <div class="difference">
<span class="old" <span class="old"
>{{ props.address.street }} >{{ props.address.street }} {{ props.address.streetNumber }}</span
{{ props.address.streetNumber }}</span
> >
<span class="new" <span class="new"
>{{ props.address.addressReference.street }} >{{ props.address.addressReference.street }}
{{ {{ props.address.addressReference.streetNumber }}</span
props.address.addressReference.streetNumber
}}</span
> >
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="difference"> <div class="difference">
<span class="old" <span class="old"
>{{ props.address.streetNumber }} >{{ props.address.streetNumber }} {{ props.address.street }}</span
{{ props.address.street }}</span
> >
<span class="new" <span class="new"
>{{ props.address.addressReference.streetNumber }} >{{ props.address.addressReference.streetNumber }}
@@ -88,12 +82,8 @@
{{ props.address.point.coordinates[1] }}</span {{ props.address.point.coordinates[1] }}</span
> >
<span class="new" <span class="new"
>{{ >{{ props.address.addressReference.point.coordinates[0] }}
props.address.addressReference.point.coordinates[0] {{ props.address.addressReference.point.coordinates[1] }}</span
}}
{{
props.address.addressReference.point.coordinates[1]
}}</span
> >
</div> </div>
</template> </template>
@@ -105,18 +95,12 @@
</button> </button>
</li> </li>
<li v-if="props.address.refStatus === 'to_review'"> <li v-if="props.address.refStatus === 'to_review'">
<button <button class="btn btn-sm btn-primary" @click="keepCurrentAddress">
class="btn btn-sm btn-primary"
@click="keepCurrentAddress"
>
Conserver Conserver
</button> </button>
</li> </li>
<li v-if="props.address.refStatus === 'reviewed'"> <li v-if="props.address.refStatus === 'reviewed'">
<button <button class="btn btn-sm btn-primary" @click="backToReview">
class="btn btn-sm btn-primary"
@click="backToReview"
>
Ré-examiner Ré-examiner
</button> </button>
</li> </li>

View File

@@ -32,10 +32,7 @@
</template> </template>
</span> </span>
<span <span v-if="props.entity.type === 'user'" class="badge rounded-pill bg-user">
v-if="props.entity.type === 'user'"
class="badge rounded-pill bg-user"
>
{{ trans(ACCEPTED_USERS) }} {{ trans(ACCEPTED_USERS) }}
</span> </span>

View File

@@ -49,10 +49,7 @@ onMounted(function () {
const storage = window.localStorage; const storage = window.localStorage;
const savedKind = storage.getItem(EDITOR_MODE_KEY); const savedKind = storage.getItem(EDITOR_MODE_KEY);
if ( if (null !== kind.value && (savedKind === "simple" || savedKind === "rich")) {
null !== kind.value &&
(savedKind === "simple" || savedKind === "rich")
) {
kind.value = savedKind; kind.value = savedKind;
} }
@@ -76,10 +73,7 @@ onUnmounted(function () {
/> />
</div> </div>
<div v-else> <div v-else>
<textarea <textarea v-model="value" class="form-control simple-editor"></textarea>
v-model="value"
class="form-control simple-editor"
></textarea>
</div> </div>
<button :class="toggleButtonClass" type="button" @click="toggleEditor"> <button :class="toggleButtonClass" type="button" @click="toggleEditor">

View File

@@ -5,10 +5,7 @@
<confidential :position-btn-far="true"> <confidential :position-btn-far="true">
<template #confidential-content> <template #confidential-content>
<div v-if="isMultiline === true"> <div v-if="isMultiline === true">
<p <p v-for="(l, i) in address.lines" :key="`line-${i}`">
v-for="(l, i) in address.lines"
:key="`line-${i}`"
>
{{ l }} {{ l }}
</p> </p>
<p v-if="showButtonDetails"> <p v-if="showButtonDetails">
@@ -22,10 +19,7 @@
<p v-if="'' !== address.text" class="street"> <p v-if="'' !== address.text" class="street">
{{ address.text }} {{ address.text }}
</p> </p>
<p <p v-if="null !== address.postcode" class="postcode">
v-if="null !== address.postcode"
class="postcode"
>
{{ address.postcode.code }} {{ address.postcode.code }}
{{ address.postcode.name }} {{ address.postcode.name }}
</p> </p>

View File

@@ -33,16 +33,11 @@
class="fa fa-circle me-1 text-chill-yellow" class="fa fa-circle me-1 text-chill-yellow"
> >
</i> </i>
<i <i v-if="step.isFreezed" class="fa fa-snowflake-o fa-sm me-1">
v-if="step.isFreezed"
class="fa fa-snowflake-o fa-sm me-1"
>
</i> </i>
{{ step.currentStep.text }} {{ step.currentStep.text }}
</span> </span>
<span v-if="j !== Object.keys(w.steps).length - 1"> <span v-if="j !== Object.keys(w.steps).length - 1"> </span>
</span>
</template> </template>
</div> </div>
<span <span

View File

@@ -31,12 +31,8 @@
:relatedEntityClass="props.relatedEntityClass" :relatedEntityClass="props.relatedEntityClass"
:relatedEntityId="props.relatedEntityId" :relatedEntityId="props.relatedEntityId"
:workflowsAvailables="props.workflowsAvailables" :workflowsAvailables="props.workflowsAvailables"
:preventDefaultMoveToGenerate=" :preventDefaultMoveToGenerate="props.preventDefaultMoveToGenerate"
props.preventDefaultMoveToGenerate :goToGenerateWorkflowPayload="props.goToGenerateWorkflowPayload"
"
:goToGenerateWorkflowPayload="
props.goToGenerateWorkflowPayload
"
:countExistingWorkflows="countWorkflows" :countExistingWorkflows="countWorkflows"
:embedded-within-list-modal="true" :embedded-within-list-modal="true"
@go-to-generate-workflow="goToGenerateWorkflow" @go-to-generate-workflow="goToGenerateWorkflow"

View File

@@ -42,21 +42,14 @@
data-bs-toggle="dropdown" data-bs-toggle="dropdown"
aria-expanded="false" aria-expanded="false"
> >
<span class="visually-hidden" <span class="visually-hidden">Liste des workflows disponibles</span>
>Liste des workflows disponibles</span
>
</button> </button>
<ul <ul class="dropdown-menu" aria-labelledby="createWorkflowButton">
class="dropdown-menu"
aria-labelledby="createWorkflowButton"
>
<li v-for="w in props.workflowsAvailables" :key="w.name"> <li v-for="w in props.workflowsAvailables" :key="w.name">
<button <button
class="dropdown-item" class="dropdown-item"
type="button" type="button"
@click.prevent=" @click.prevent="goToGenerateWorkflow($event, w.name)"
goToGenerateWorkflow($event, w.name)
"
> >
{{ w.text }} {{ w.text }}
</button> </button>

View File

@@ -23,10 +23,7 @@
<slot name="body"></slot> <slot name="body"></slot>
</div> </div>
<div class="modal-footer" v-if="!hideFooter"> <div class="modal-footer" v-if="!hideFooter">
<button <button class="btn btn-cancel" @click="emits('close')">
class="btn btn-cancel"
@click="emits('close')"
>
{{ trans(MODAL_ACTION_CLOSE) }} {{ trans(MODAL_ACTION_CLOSE) }}
</button> </button>
<slot name="footer"></slot> <slot name="footer"></slot>

View File

@@ -78,8 +78,7 @@ export const multiSelectMessages = {
tag_placeholder: "Créer un nouvel élément", tag_placeholder: "Créer un nouvel élément",
select_label: '"Entrée" ou cliquez pour sélectionner', select_label: '"Entrée" ou cliquez pour sélectionner',
deselect_label: '"Entrée" ou cliquez pour désélectionner', deselect_label: '"Entrée" ou cliquez pour désélectionner',
select_group_label: select_group_label: 'Appuyer sur "Entrée" pour sélectionner ce groupe',
'Appuyer sur "Entrée" pour sélectionner ce groupe',
deselect_group_label: deselect_group_label:
'Appuyer sur "Entrée" pour désélectionner ce groupe', 'Appuyer sur "Entrée" pour désélectionner ce groupe',
selected_label: "Sélectionné", selected_label: "Sélectionné",

View File

@@ -27,9 +27,7 @@ document.addEventListener("DOMContentLoaded", () => {
throw "accompanying period id not found"; throw "accompanying period id not found";
} }
const accompanyingPeriodId = Number.parseInt( const accompanyingPeriodId = Number.parseInt(accompanyingPeriodIdAsString);
accompanyingPeriodIdAsString,
);
const app = createApp({ const app = createApp({
template: template:

View File

@@ -26,10 +26,7 @@
/> />
</div> </div>
<div <div v-if="!isAdminLocationValid" class="alert alert-warning to-confirm">
v-if="!isAdminLocationValid"
class="alert alert-warning to-confirm"
>
{{ $t("admin_location.not_valid") }} {{ $t("admin_location.not_valid") }}
</div> </div>
</div> </div>
@@ -69,9 +66,7 @@ export default {
locationCategories: response.filter( locationCategories: response.filter(
(o) => o.locationType.id === id, (o) => o.locationType.id === id,
)[0].locationType.title.fr, )[0].locationType.title.fr,
locations: response.filter( locations: response.filter((o) => o.locationType.id === id),
(o) => o.locationType.id === id,
),
}); });
} }
this.options = results; this.options = results;
@@ -81,10 +76,7 @@ export default {
this.$store this.$store
.dispatch("updateAdminLocation", value) .dispatch("updateAdminLocation", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -29,9 +29,7 @@
</span> </span>
</span> </span>
<span <span
v-else-if=" v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'"
accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'
"
class="d-md-block mb-md-3" class="d-md-block mb-md-3"
> >
<span class="badge bg-chill-yellow text-primary"> <span class="badge bg-chill-yellow text-primary">
@@ -39,9 +37,7 @@
</span> </span>
</span> </span>
<span <span
v-else-if=" v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'"
accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'
"
class="d-md-block mb-md-3" class="d-md-block mb-md-3"
> >
<span class="badge bg-chill-pink"> <span class="badge bg-chill-pink">
@@ -52,25 +48,15 @@
<span class="d-md-block ms-3 ms-md-0"> <span class="d-md-block ms-3 ms-md-0">
<i <i
>{{ $t("course.open_at") >{{ $t("course.open_at")
}}{{ }}{{ $d(accompanyingCourse.openingDate.datetime, "text") }}</i
$d(accompanyingCourse.openingDate.datetime, "text")
}}</i
> >
</span> </span>
<span <span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
v-if="accompanyingCourse.user" <span class="item-key">{{ $t("course.referrer") }}:</span>&nbsp;
class="d-md-block ms-3 ms-md-0"
>
<span class="item-key">{{ $t("course.referrer") }}:</span
>&nbsp;
<b>{{ accompanyingCourse.user.text }}</b> <b>{{ accompanyingCourse.user.text }}</b>
<template v-if="accompanyingCourse.user.isAbsent"> <template v-if="accompanyingCourse.user.isAbsent">
&nbsp; &nbsp;
<span <span class="badge bg-danger rounded-pill" title="Absent">A</span>
class="badge bg-danger rounded-pill"
title="Absent"
>A</span
>
</template> </template>
</span> </span>
</span> </span>
@@ -82,19 +68,12 @@
<span class="d-md-block"> <span class="d-md-block">
<span class="d-md-block ms-3 ms-md-0"> <span class="d-md-block ms-3 ms-md-0">
<i <i
>{{ >{{ $d(accompanyingCourse.openingDate.datetime, "text") }}
$d(accompanyingCourse.openingDate.datetime, "text")
}}
- -
{{ {{ $d(accompanyingCourse.closingDate.datetime, "text") }}</i
$d(accompanyingCourse.closingDate.datetime, "text")
}}</i
> >
</span> </span>
<span <span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
v-if="accompanyingCourse.user"
class="d-md-block ms-3 ms-md-0"
>
<span class="item-key">{{ $t("course.referrer") }}:</span> <span class="item-key">{{ $t("course.referrer") }}:</span>
<b>{{ accompanyingCourse.user.text }}</b> <b>{{ accompanyingCourse.user.text }}</b>
</span> </span>
@@ -102,9 +81,7 @@
</span> </span>
</teleport> </teleport>
<teleport <teleport to="#header-accompanying_course-name #persons-associated-shortlist">
to="#header-accompanying_course-name #persons-associated-shortlist"
>
<persons-associated <persons-associated
:accompanyingCourse="accompanyingCourse" :accompanyingCourse="accompanyingCourse"
:shortlist="true" :shortlist="true"
@@ -119,9 +96,7 @@
/> />
</teleport> </teleport>
<teleport <teleport to="#header-accompanying_course-details #banner-persons-associated">
to="#header-accompanying_course-details #banner-persons-associated"
>
<persons-associated <persons-associated
:accompanying-course="accompanyingCourse" :accompanying-course="accompanyingCourse"
:shortlist="false" :shortlist="false"

View File

@@ -97,9 +97,7 @@ export default {
if (!households.has(person.current_household_id || -1)) { if (!households.has(person.current_household_id || -1)) {
households.set(person.current_household_id || -1, []); households.set(person.current_household_id || -1, []);
} }
households households.get(person.current_household_id || -1).push(person);
.get(person.current_household_id || -1)
.push(person);
}); });
return households; return households;

View File

@@ -2,9 +2,7 @@
<div class="text-md-end"> <div class="text-md-end">
<span class="d-block d-sm-inline-block mb-md-2"> <span class="d-block d-sm-inline-block mb-md-2">
<a @click="toggleIntensity" class="flag-toggle"> <a @click="toggleIntensity" class="flag-toggle">
<span :class="{ on: !isRegular }">{{ <span :class="{ on: !isRegular }">{{ $t("course.occasional") }}</span>
$t("course.occasional")
}}</span>
<i <i
class="fa" class="fa"
:class="{ :class="{
@@ -12,9 +10,7 @@
'fa-toggle-on fa-flip-horizontal': !isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular,
}" }"
/> />
<span :class="{ on: isRegular }">{{ <span :class="{ on: isRegular }">{{ $t("course.regular") }}</span>
$t("course.regular")
}}</span>
</a> </a>
</span> </span>
@@ -80,10 +76,7 @@ export default {
value = "occasional"; value = "occasional";
} }
this.$store.dispatch("toggleIntensity", value).catch(({ name }) => { this.$store.dispatch("toggleIntensity", value).catch(({ name }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
this.$toast.open({ this.$toast.open({
message: this.$t( message: this.$t(
"Only the referrer can toggle the intensity of an accompanying course", "Only the referrer can toggle the intensity of an accompanying course",
@@ -98,10 +91,7 @@ export default {
this.$store this.$store
.dispatch("toggleEmergency", !this.isEmergency) .dispatch("toggleEmergency", !this.isEmergency)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -113,10 +103,7 @@ export default {
toggleConfidential() { toggleConfidential() {
this.$store.dispatch("toggleConfidential").catch(({ name }) => { this.$store.dispatch("toggleConfidential").catch(({ name }) => {
console.log(name); console.log(name);
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
this.$toast.open({ this.$toast.open({
message: this.$t( message: this.$t(
"Only the referrer can toggle the confidentiality of an accompanying course", "Only the referrer can toggle the confidentiality of an accompanying course",

View File

@@ -21,9 +21,7 @@
</h2> </h2>
</template> </template>
<template #body> <template #body>
<address-render-box <address-render-box :address="person.current_household_address" />
:address="person.current_household_address"
/>
<p>{{ $t("courselocation.sure_description") }}</p> <p>{{ $t("courselocation.sure_description") }}</p>
</template> </template>
<template #footer> <template #footer>
@@ -72,10 +70,7 @@ export default {
this.$store this.$store
.dispatch("updateLocation", payload) .dispatch("updateLocation", payload)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -107,10 +107,7 @@ export default {
} }
}); });
} else { } else {
if ( if (this.$store.state.accompanyingCourse.pinnedComment !== null) {
this.$store.state.accompanyingCourse
.pinnedComment !== null
) {
this.$store this.$store
.dispatch("removePinnedComment", { .dispatch("removePinnedComment", {
id: this.pinnedComment.id, id: this.pinnedComment.id,
@@ -153,10 +150,7 @@ export default {
this.$store this.$store
.dispatch("removePinnedComment", { id: this.pinnedComment.id }) .dispatch("removePinnedComment", { id: this.pinnedComment.id })
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -34,17 +34,10 @@
</div> </div>
<div v-else> <div v-else>
<p <p v-html="$t('confirm.text_active', [$t('course.step.active')])" />
v-html="
$t('confirm.text_active', [$t('course.step.active')])
"
/>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button <button class="btn btn-save" @click="modal.showModal = true">
class="btn btn-save"
@click="modal.showModal = true"
>
{{ $t("confirm.ok") }} {{ $t("confirm.ok") }}
</button> </button>
</li> </li>
@@ -205,10 +198,7 @@ export default {
this.$store this.$store
.dispatch("confirmAccompanyingCourse") .dispatch("confirmAccompanyingCourse")
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -221,10 +211,7 @@ export default {
this.$store this.$store
.dispatch("updateReferrer", this.usersSuggestedFilteredByJob[0]) .dispatch("updateReferrer", this.usersSuggestedFilteredByJob[0])
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -23,10 +23,7 @@
<div class="item-bloc"> <div class="item-bloc">
<address-render-box :address="accompanyingCourse.location" /> <address-render-box :address="accompanyingCourse.location" />
<div <div v-if="isPersonLocation" class="alert alert-secondary separator">
v-if="isPersonLocation"
class="alert alert-secondary separator"
>
<label class="col-form-label"> <label class="col-form-label">
{{ {{
$t("courselocation.person_locator", [ $t("courselocation.person_locator", [
@@ -36,16 +33,9 @@
</label> </label>
</div> </div>
<div <div v-if="isTemporaryAddress" class="alert alert-warning separator">
v-if="isTemporaryAddress"
class="alert alert-warning separator"
>
<p> <p>
{{ {{ $t("courselocation.temporary_address_must_be_changed") }}
$t(
"courselocation.temporary_address_must_be_changed",
)
}}
<i class="fa fa-fw fa-map-marker" /> <i class="fa fa-fw fa-map-marker" />
</p> </p>
</div> </div>
@@ -134,9 +124,7 @@ export default {
key() { key() {
return this.context.edit return this.context.edit
? "address_" + this.context.addressId ? "address_" + this.context.addressId
: this.accompanyingCourse.type + : this.accompanyingCourse.type + "_" + this.accompanyingCourse.id;
"_" +
this.accompanyingCourse.id;
}, },
isTemporaryAddress() { isTemporaryAddress() {
return this.accompanyingCourse.locationStatus === "address"; return this.accompanyingCourse.locationStatus === "address";
@@ -198,8 +186,7 @@ export default {
}; };
if (this.accompanyingCourse.location) { if (this.accompanyingCourse.location) {
context["edit"] = true; context["edit"] = true;
context["addressId"] = context["addressId"] = this.accompanyingCourse.location.address_id;
this.accompanyingCourse.location.address_id;
} }
this.$store.commit("setAddressContext", context); this.$store.commit("setAddressContext", context);
}, },
@@ -212,10 +199,7 @@ export default {
this.$store this.$store
.dispatch("updateLocation", payload) .dispatch("updateLocation", payload)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -69,10 +69,7 @@ export default {
this.$store this.$store
.dispatch("updateOrigin", value) .dispatch("updateOrigin", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -27,11 +27,7 @@
</button> </button>
</div> </div>
<p class="mb-3"> <p class="mb-3">
{{ {{ $t("persons_associated.person_without_household_warning") }}
$t(
"persons_associated.person_without_household_warning",
)
}}
</p> </p>
<div <div
class="form-check" class="form-check"
@@ -50,16 +46,8 @@
<person-text :person="p.person" /> <person-text :person="p.person" />
</label> </label>
</div> </div>
<input <input type="hidden" name="expand_suggestions" value="true" />
type="hidden" <input type="hidden" name="returnPath" :value="getReturnPath" />
name="expand_suggestions"
value="true"
/>
<input
type="hidden"
name="returnPath"
:value="getReturnPath"
/>
<input <input
type="hidden" type="hidden"
name="accompanying_period_id" name="accompanying_period_id"
@@ -109,10 +97,7 @@
</ul> </ul>
</div> </div>
<div <div v-if="!isParticipationValid" class="alert alert-warning to-confirm">
v-if="!isParticipationValid"
class="alert alert-warning to-confirm"
>
{{ $t("persons_associated.participation_not_valid") }} {{ $t("persons_associated.participation_not_valid") }}
</div> </div>
</div> </div>
@@ -150,9 +135,7 @@ export default {
suggestedPersons: (state) => suggestedPersons: (state) =>
[ [
state.accompanyingCourse.requestor, state.accompanyingCourse.requestor,
...state.accompanyingCourse.resources.map( ...state.accompanyingCourse.resources.map((r) => r.resource),
(r) => r.resource,
),
] ]
.filter((e) => e !== null) .filter((e) => e !== null)
.filter((e) => e.type === "person") .filter((e) => e.type === "person")
@@ -188,9 +171,7 @@ export default {
}, },
getReturnPath() { getReturnPath() {
return ( return (
window.location.pathname + window.location.pathname + window.location.search + window.location.hash
window.location.search +
window.location.hash
); );
}, },
}, },
@@ -199,10 +180,7 @@ export default {
this.$store this.$store
.dispatch("removeParticipation", item) .dispatch("removeParticipation", item)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -215,10 +193,7 @@ export default {
this.$store this.$store
.dispatch("closeParticipation", item) .dispatch("closeParticipation", item)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -232,10 +207,7 @@ export default {
this.$store this.$store
.dispatch("addParticipation", item) .dispatch("addParticipation", item)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -254,10 +226,7 @@ export default {
type: "person", type: "person",
}) })
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -32,8 +32,7 @@
:href="getCurrentHouseholdUrl" :href="getCurrentHouseholdUrl"
:title=" :title="
$t('persons_associated.show_household_number', { $t('persons_associated.show_household_number', {
id: participation.person id: participation.person.current_household_id,
.current_household_id,
}) })
" "
> >

View File

@@ -27,10 +27,7 @@
</template> </template>
<template #footer> <template #footer>
<button <button class="btn btn-save" @click.prevent="this.confirmReferrer">
class="btn btn-save"
@click.prevent="this.confirmReferrer"
>
{{ $t("confirm.ok_referrer") }} {{ $t("confirm.ok_referrer") }}
</button> </button>
</template> </template>
@@ -149,8 +146,7 @@ export default {
if ( if (
this.$store.state.accompanyingCourse.user !== null && this.$store.state.accompanyingCourse.user !== null &&
users.find( users.find(
(u) => (u) => this.$store.state.accompanyingCourse.user.id === u.id,
this.$store.state.accompanyingCourse.user.id === u.id,
) === undefined ) === undefined
) { ) {
users.push(this.$store.state.accompanyingCourse.user); users.push(this.$store.state.accompanyingCourse.user);
@@ -165,10 +161,7 @@ export default {
this.$store this.$store
.dispatch("updateJob", value) .dispatch("updateJob", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -214,10 +207,7 @@ export default {
this.$store this.$store
.dispatch("updateReferrer", this.value) .dispatch("updateReferrer", this.value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -232,10 +222,7 @@ export default {
this.$store this.$store
.dispatch("updateReferrer", null) .dispatch("updateReferrer", null)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -2,21 +2,12 @@
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-50" />{{ $t("requestor.title") }}</h2> <h2><a id="section-50" />{{ $t("requestor.title") }}</h2>
<div <div v-if="accompanyingCourse.requestor && isAnonymous" class="flex-table">
v-if="accompanyingCourse.requestor && isAnonymous"
class="flex-table"
>
<label> <label>
<input <input type="checkbox" v-model="requestorIsAnonymous" class="me-2" />
type="checkbox"
v-model="requestorIsAnonymous"
class="me-2"
/>
{{ $t("requestor.is_anonymous") }} {{ $t("requestor.is_anonymous") }}
</label> </label>
<confidential <confidential v-if="accompanyingCourse.requestor.type === 'thirdparty'">
v-if="accompanyingCourse.requestor.type === 'thirdparty'"
>
<template #confidential-content> <template #confidential-content>
<third-party-render-box <third-party-render-box
:thirdparty="accompanyingCourse.requestor" :thirdparty="accompanyingCourse.requestor"
@@ -34,18 +25,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<on-the-fly <on-the-fly
:type=" :type="accompanyingCourse.requestor.type"
accompanyingCourse.requestor.type
"
:id="accompanyingCourse.requestor.id" :id="accompanyingCourse.requestor.id"
action="show" action="show"
/> />
</li> </li>
<li> <li>
<on-the-fly <on-the-fly
:type=" :type="accompanyingCourse.requestor.type"
accompanyingCourse.requestor.type
"
:id="accompanyingCourse.requestor.id" :id="accompanyingCourse.requestor.id"
action="edit" action="edit"
@save-form-on-the-fly="saveFormOnTheFly" @save-form-on-the-fly="saveFormOnTheFly"
@@ -58,9 +45,7 @@
</template> </template>
</confidential> </confidential>
<confidential <confidential v-else-if="accompanyingCourse.requestor.type === 'person'">
v-else-if="accompanyingCourse.requestor.type === 'person'"
>
<template #confidential-content> <template #confidential-content>
<person-render-box <person-render-box
render="bloc" render="bloc"
@@ -81,18 +66,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<on-the-fly <on-the-fly
:type=" :type="accompanyingCourse.requestor.type"
accompanyingCourse.requestor.type
"
:id="accompanyingCourse.requestor.id" :id="accompanyingCourse.requestor.id"
action="show" action="show"
/> />
</li> </li>
<li> <li>
<on-the-fly <on-the-fly
:type=" :type="accompanyingCourse.requestor.type"
accompanyingCourse.requestor.type
"
:id="accompanyingCourse.requestor.id" :id="accompanyingCourse.requestor.id"
action="edit" action="edit"
@save-form-on-the-fly="saveFormOnTheFly" @save-form-on-the-fly="saveFormOnTheFly"
@@ -123,11 +104,7 @@
class="flex-table" class="flex-table"
> >
<label> <label>
<input <input type="checkbox" v-model="requestorIsAnonymous" class="me-2" />
type="checkbox"
v-model="requestorIsAnonymous"
class="me-2"
/>
{{ $t("requestor.is_anonymous") }} {{ $t("requestor.is_anonymous") }}
</label> </label>
@@ -224,8 +201,7 @@
<div <div
v-if=" v-if="
accompanyingCourse.requestor === null && accompanyingCourse.requestor === null && suggestedEntities.length > 0
suggestedEntities.length > 0
" "
> >
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
@@ -301,9 +277,7 @@ export default {
...state.accompanyingCourse.participations ...state.accompanyingCourse.participations
.filter((p) => p.endDate === null) .filter((p) => p.endDate === null)
.map((p) => p.person), .map((p) => p.person),
...state.accompanyingCourse.resources.map( ...state.accompanyingCourse.resources.map((r) => r.resource),
(r) => r.resource,
),
] ]
.filter((e) => e !== null) .filter((e) => e !== null)
// filter for same entity appearing twice // filter for same entity appearing twice
@@ -338,13 +312,8 @@ export default {
methods: { methods: {
removeRequestor() { removeRequestor() {
//console.log('@@ CLICK remove requestor: item'); //console.log('@@ CLICK remove requestor: item');
this.$store this.$store.dispatch("removeRequestor").catch(({ name, violations }) => {
.dispatch("removeRequestor") if (name === "ValidationException" || name === "AccessException") {
.catch(({ name, violations }) => {
if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -358,10 +327,7 @@ export default {
this.$store this.$store
.dispatch("addRequestor", selected.shift()) .dispatch("addRequestor", selected.shift())
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -452,10 +418,7 @@ export default {
this.$store this.$store
.dispatch("addRequestor", { result: e, type: e.type }) .dispatch("addRequestor", { result: e, type: e.type })
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -121,10 +121,7 @@ export default {
this.$store this.$store
.dispatch("removeResource", item) .dispatch("removeResource", item)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -139,10 +136,7 @@ export default {
this.$store this.$store
.dispatch("addResource", item) .dispatch("addResource", item)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -158,10 +152,7 @@ export default {
this.$store this.$store
.dispatch("addResource", { result: e, type: e.type }) .dispatch("addResource", { result: e, type: e.type })
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -14,9 +14,7 @@
> >
<template #header> <template #header>
<h3 class="modal-title"> <h3 class="modal-title">
{{ {{ $t("write_comment_about", { r: resource.resource.text }) }}
$t("write_comment_about", { r: resource.resource.text })
}}
</h3> </h3>
</template> </template>
<template #body> <template #body>

View File

@@ -36,13 +36,8 @@ export default {
return this.$store.state.accompanyingCourse.scopes; return this.$store.state.accompanyingCourse.scopes;
}, },
set: function (v) { set: function (v) {
this.$store this.$store.dispatch("setScopes", v).catch(({ name, violations }) => {
.dispatch("setScopes", v) if (name === "ValidationException" || name === "AccessException") {
.catch(({ name, violations }) => {
if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -61,10 +61,7 @@ export default {
this.$store this.$store
.dispatch("updateSocialIssues", this.transformValue(value)) .dispatch("updateSocialIssues", this.transformValue(value))
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -76,9 +73,7 @@ export default {
transformValue(updated) { transformValue(updated) {
let stored = this.value; let stored = this.value;
let added = updated.filter((x) => stored.indexOf(x) === -1).shift(); let added = updated.filter((x) => stored.indexOf(x) === -1).shift();
let removed = stored let removed = stored.filter((x) => updated.indexOf(x) === -1).shift();
.filter((x) => updated.indexOf(x) === -1)
.shift();
let method = typeof removed === "undefined" ? "POST" : "DELETE"; let method = typeof removed === "undefined" ? "POST" : "DELETE";
let changed = typeof removed === "undefined" ? added : removed; let changed = typeof removed === "undefined" ? added : removed;
let body = { type: "social_issue", id: changed.id }; let body = { type: "social_issue", id: changed.id };

View File

@@ -33,11 +33,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
startDate: (state) => startDate: (state) =>
dateToISO( dateToISO(ISOToDatetime(state.accompanyingCourse.openingDate.datetime)),
ISOToDatetime(
state.accompanyingCourse.openingDate.datetime,
),
),
}), }),
startDateInput: { startDateInput: {
get() { get() {
@@ -49,12 +45,7 @@ export default {
setTimeout(() => { setTimeout(() => {
console.log("timeout finished"); console.log("timeout finished");
if (this.lastRecordedDate === value) { if (this.lastRecordedDate === value) {
console.log( console.log("last recorded", this.lastRecordedDate, "value", value);
"last recorded",
this.lastRecordedDate,
"value",
value,
);
this.$store this.$store
.dispatch("updateStartDate", value) .dispatch("updateStartDate", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {

View File

@@ -6,12 +6,7 @@
<i class="fa fa-fw fa-square" /> <i class="fa fa-fw fa-square" />
<span>{{ $t("nav.top") }}</span> <span>{{ $t("nav.top") }}</span>
</a> </a>
<item <item v-for="item of items" :key="item.key" :item="item" :step="step" />
v-for="item of items"
:key="item.key"
:item="item"
:step="step"
/>
</nav> </nav>
</div> </div>
</teleport> </teleport>
@@ -28,9 +23,7 @@ export default {
data() { data() {
return { return {
header: document.querySelector("header nav.navbar"), header: document.querySelector("header nav.navbar"),
bannerName: document.querySelector( bannerName: document.querySelector("#header-accompanying_course-name"),
"#header-accompanying_course-name",
),
bannerDetails: document.querySelector( bannerDetails: document.querySelector(
"#header-accompanying_course-details", "#header-accompanying_course-details",
), ),
@@ -139,16 +132,11 @@ export default {
this.items.forEach((item, i) => { this.items.forEach((item, i) => {
let next = this.items[i + 1] ? this.items[i + 1].pos : "100000"; let next = this.items[i + 1] ? this.items[i + 1].pos : "100000";
item.active = item.active =
(window.scrollY >= item.pos) & (window.scrollY < next) (window.scrollY >= item.pos) & (window.scrollY < next) ? true : false;
? true
: false;
}, this); }, this);
// last item never switch active because scroll reach bottom of page // last item never switch active because scroll reach bottom of page
if ( if (document.body.scrollHeight == window.scrollY + window.innerHeight) {
document.body.scrollHeight ==
window.scrollY + window.innerHeight
) {
this.items[this.items.length - 1].active = true; this.items[this.items.length - 1].active = true;
this.items[this.items.length - 2].active = false; this.items[this.items.length - 2].active = false;
} else { } else {

View File

@@ -3,11 +3,7 @@
<i class="fa fa-fw fa-square" /> <i class="fa fa-fw fa-square" />
<span>{{ item.key }}</span> <span>{{ item.key }}</span>
</a> </a>
<a <a v-else-if="step === 'DRAFT'" :href="item.id" :class="{ active: isActive }">
v-else-if="step === 'DRAFT'"
:href="item.id"
:class="{ active: isActive }"
>
<i class="fa fa-fw fa-square" /> <i class="fa fa-fw fa-square" />
<span>{{ item.key }}</span> <span>{{ item.key }}</span>
</a> </a>

View File

@@ -27,67 +27,61 @@
</template> </template>
<template #body> <template #body>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus
Phasellus luctus facilisis suscipit. Cras pulvinar, luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar
purus sagittis pulvinar porta, enim ex posuere lacus, in porta, enim ex posuere lacus, in pulvinar lectus magna in odio.
pulvinar lectus magna in odio. Nullam iaculis congue Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut
lorem ac suscipit. Proin ut rutrum augue. Ut vehicula vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
viverra. Morbi dictum placerat suscipit. viverra. Morbi dictum placerat suscipit.
</p> </p>
<p> <p>
Quisque non erat tincidunt, lacinia justo ut, pulvinar Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id
nisl. Nunc id enim ut sem pretium interdum consectetur enim ut sem pretium interdum consectetur eu quam. Vestibulum ante
eu quam. Vestibulum ante ipsum primis in faucibus orci ipsum primis in faucibus orci luctus et ultrices posuere cubilia
luctus et ultrices posuere cubilia curae; Etiam posuere curae; Etiam posuere erat eget augue finibus luctus. Maecenas
erat eget augue finibus luctus. Maecenas auctor, tortor auctor, tortor non luctus ultrices, neque neque porttitor ex, nec
non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem
lacinia lorem ligula et elit. Sed tempor nulla vitae sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium.
lorem sollicitudin dictum. Vestibulum nec arcu eget elit Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit
pulvinar pretium. Phasellus facilisis metus sed diam dignissim.
luctus, feugiat scelerisque velit dignissim.
</p> </p>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus
Phasellus luctus facilisis suscipit. Cras pulvinar, luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar
purus sagittis pulvinar porta, enim ex posuere lacus, in porta, enim ex posuere lacus, in pulvinar lectus magna in odio.
pulvinar lectus magna in odio. Nullam iaculis congue Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut
lorem ac suscipit. Proin ut rutrum augue. Ut vehicula vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
viverra. Morbi dictum placerat suscipit. viverra. Morbi dictum placerat suscipit.
</p> </p>
<p> <p>
Quisque non erat tincidunt, lacinia justo ut, pulvinar Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id
nisl. Nunc id enim ut sem pretium interdum consectetur enim ut sem pretium interdum consectetur eu quam. Vestibulum ante
eu quam. Vestibulum ante ipsum primis in faucibus orci ipsum primis in faucibus orci luctus et ultrices posuere cubilia
luctus et ultrices posuere cubilia curae; Etiam posuere curae; Etiam posuere erat eget augue finibus luctus. Maecenas
erat eget augue finibus luctus. Maecenas auctor, tortor auctor, tortor non luctus ultrices, neque neque porttitor ex, nec
non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem
lacinia lorem ligula et elit. Sed tempor nulla vitae sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium.
lorem sollicitudin dictum. Vestibulum nec arcu eget elit Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit
pulvinar pretium. Phasellus facilisis metus sed diam dignissim.
luctus, feugiat scelerisque velit dignissim.
</p> </p>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus
Phasellus luctus facilisis suscipit. Cras pulvinar, luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar
purus sagittis pulvinar porta, enim ex posuere lacus, in porta, enim ex posuere lacus, in pulvinar lectus magna in odio.
pulvinar lectus magna in odio. Nullam iaculis congue Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut
lorem ac suscipit. Proin ut rutrum augue. Ut vehicula vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
risus nec hendrerit ullamcorper. Ut volutpat eu mi eget
viverra. Morbi dictum placerat suscipit. viverra. Morbi dictum placerat suscipit.
</p> </p>
<p> <p>
Quisque non erat tincidunt, lacinia justo ut, pulvinar Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id
nisl. Nunc id enim ut sem pretium interdum consectetur enim ut sem pretium interdum consectetur eu quam. Vestibulum ante
eu quam. Vestibulum ante ipsum primis in faucibus orci ipsum primis in faucibus orci luctus et ultrices posuere cubilia
luctus et ultrices posuere cubilia curae; Etiam posuere curae; Etiam posuere erat eget augue finibus luctus. Maecenas
erat eget augue finibus luctus. Maecenas auctor, tortor auctor, tortor non luctus ultrices, neque neque porttitor ex, nec
non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem
lacinia lorem ligula et elit. Sed tempor nulla vitae sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium.
lorem sollicitudin dictum. Vestibulum nec arcu eget elit Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit
pulvinar pretium. Phasellus facilisis metus sed diam dignissim.
luctus, feugiat scelerisque velit dignissim.
</p> </p>
</template> </template>
<template #footer> <template #footer>
@@ -117,10 +111,7 @@
<p>modal 2</p> <p>modal 2</p>
</template> </template>
<template #footer> <template #footer>
<button <button class="btn btn-create" @click="modal2.showModal = false">
class="btn btn-create"
@click="modal2.showModal = false"
>
{{ $t("action.save") }} {{ $t("action.save") }}
</button> </button>
</template> </template>

View File

@@ -10,9 +10,7 @@
:value="si.id" :value="si.id"
name="socialIssue" name="socialIssue"
v-model="socialIssuePicked" v-model="socialIssuePicked"
/><span class="badge bg-chill-l-gray text-dark">{{ /><span class="badge bg-chill-l-gray text-dark">{{ si.text }}</span>
si.text
}}</span>
</div> </div>
<div class="my-3"> <div class="my-3">
<div class="col-11"> <div class="col-11">
@@ -69,10 +67,7 @@
class="form-check-input" class="form-check-input"
:id="'person_check' + p.id" :id="'person_check' + p.id"
/> />
<label <label class="form-check-label" :for="'person_check' + p.id">
class="form-check-label"
:for="'person_check' + p.id"
>
<person-text :person="p" /> <person-text :person="p" />
</label> </label>
</div> </div>
@@ -85,15 +80,9 @@
</div> --> </div> -->
<div class="row"> <div class="row">
<div v-if="hasSocialActionPicked" id="start_date" class="mb-3 row"> <div v-if="hasSocialActionPicked" id="start_date" class="mb-3 row">
<label class="col-form-label col-sm-4">{{ <label class="col-form-label col-sm-4">{{ $t("startDate") }}</label>
$t("startDate")
}}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input <input class="form-control" type="date" v-model="startDate" />
class="form-control"
type="date"
v-model="startDate"
/>
</div> </div>
</div> </div>
@@ -101,9 +90,7 @@
<p><label>{{ $t('endDate') }}</label> <input type="date" v-model="endDate" /></p> <p><label>{{ $t('endDate') }}</label> <input type="date" v-model="endDate" /></p>
</div> --> </div> -->
<div v-if="hasSocialActionPicked" id="end_date" class="mb-3 row"> <div v-if="hasSocialActionPicked" id="end_date" class="mb-3 row">
<label class="col-form-label col-sm-4">{{ <label class="col-form-label col-sm-4">{{ $t("endDate") }}</label>
$t("endDate")
}}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="date" v-model="endDate" /> <input class="form-control" type="date" v-model="endDate" />
</div> </div>
@@ -135,11 +122,7 @@
> >
{{ $t("action.save") }} {{ $t("action.save") }}
</button> </button>
<button <button class="btn btn-save" v-show="isPostingWork" disabled>
class="btn btn-save"
v-show="isPostingWork"
disabled
>
{{ $t("action.save") }} {{ $t("action.save") }}
</button> </button>
</li> </li>
@@ -166,8 +149,7 @@ const i18n = {
pick_social_issue_linked_with_action: pick_social_issue_linked_with_action:
"Indiquez la problématique sociale liée à l'action d'accompagnement", "Indiquez la problématique sociale liée à l'action d'accompagnement",
persons_involved: "Usagers concernés", persons_involved: "Usagers concernés",
choose_other_social_issue: choose_other_social_issue: "Veuillez choisir un autre problématique",
"Veuillez choisir un autre problématique",
}, },
}, },
}; };
@@ -181,10 +163,7 @@ export default {
methods: { methods: {
submit() { submit() {
this.$store.dispatch("submit").catch(({ name, violations }) => { this.$store.dispatch("submit").catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -68,23 +68,15 @@
<!-- results which **are** attached to an objective --> <!-- results which **are** attached to an objective -->
<div v-for="g in goalsPicked" :key="g.goal.id"> <div v-for="g in goalsPicked" :key="g.goal.id">
<div class="item-title" @click="removeGoal(g)"> <div class="item-title" @click="removeGoal(g)">
<span class="removable">{{ <span class="removable">{{ localizeString(g.goal.title) }}</span>
localizeString(g.goal.title)
}}</span>
</div> </div>
<div> <div>
<add-result :goal="g.goal" destination="goal"></add-result> <add-result :goal="g.goal" destination="goal"></add-result>
</div> </div>
</div> </div>
<div class="accordion" id="expandedSuggestions"> <div class="accordion" id="expandedSuggestions">
<div <div v-if="availableForCheckGoal.length > 0" class="accordion-item">
v-if="availableForCheckGoal.length > 0" <h2 class="accordion-header" id="heading_expanded_suggestions">
class="accordion-item"
>
<h2
class="accordion-header"
id="heading_expanded_suggestions"
>
<button <button
v-if="isExpanded" v-if="isExpanded"
class="accordion-button" class="accordion-button"
@@ -125,10 +117,7 @@
</ul> </ul>
</template> </template>
</div> </div>
<p <p v-if="goalsPicked.length === 0" class="chill-no-data-statement">
v-if="goalsPicked.length === 0"
class="chill-no-data-statement"
>
Aucun objectif associé Aucun objectif associé
</p> </p>
</div> </div>
@@ -173,10 +162,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<ul <ul class="record_actions" v-if="evaluationsForAction.length > 0">
class="record_actions"
v-if="evaluationsForAction.length > 0"
>
<li> <li>
<button <button
:title="$t('add_an_evaluation')" :title="$t('add_an_evaluation')"
@@ -208,10 +194,7 @@
class="me-2 form-check-input" class="me-2 form-check-input"
:id="'person_check' + p.id" :id="'person_check' + p.id"
/> />
<label <label :for="'person_check' + p.id" class="form-check-label">
:for="'person_check' + p.id"
class="form-check-label"
>
<person-text :person="p"></person-text> <person-text :person="p"></person-text>
</label> </label>
</div> </div>
@@ -229,10 +212,7 @@
class="me-2 form-check-input" class="me-2 form-check-input"
:id="'person_check' + p.id" :id="'person_check' + p.id"
/> />
<label <label :for="'person_check' + p.id" class="form-check-label">
:for="'person_check' + p.id"
class="form-check-label"
>
<person-text :person="p"></person-text> <person-text :person="p"></person-text>
</label> </label>
</div> </div>
@@ -295,9 +275,7 @@
<add-persons <add-persons
ref="handlingThirdPartyPicker" ref="handlingThirdPartyPicker"
v-bind:key="handlingThirdPartyPicker.key" v-bind:key="handlingThirdPartyPicker.key"
v-bind:buttonTitle=" v-bind:buttonTitle="$t('precise_handling_thirdparty')"
$t('precise_handling_thirdparty')
"
v-bind:modalTitle="$t('choose_a_thirdparty')" v-bind:modalTitle="$t('choose_a_thirdparty')"
v-bind:options="handlingThirdPartyPicker.options" v-bind:options="handlingThirdPartyPicker.options"
@addNewPersons="setHandlingThirdParty" @addNewPersons="setHandlingThirdParty"
@@ -443,23 +421,16 @@
> >
&nbsp; &nbsp;
</button> </button>
<ul <ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
class="dropdown-menu"
aria-labelledby="btnGroupNotifyButtons"
>
<li> <li>
<a <a class="dropdown-item" @click="goToGenerateNotification(true)">{{
class="dropdown-item" $t("notification_notify_referrer")
@click="goToGenerateNotification(true)" }}</a>
>{{ $t("notification_notify_referrer") }}</a
>
</li> </li>
<li> <li>
<a <a class="dropdown-item" @click="goToGenerateNotification(false)">{{
class="dropdown-item" $t("notification_notify_any")
@click="goToGenerateNotification(false)" }}</a>
>{{ $t("notification_notify_any") }}</a
>
</li> </li>
</ul> </ul>
</template> </template>
@@ -508,8 +479,7 @@ const i18n = {
available_goals_text: available_goals_text:
"Motifs, objectifs et dispositifs disponibles pour ajout :", "Motifs, objectifs et dispositifs disponibles pour ajout :",
results_title: "Orientations - résultats", results_title: "Orientations - résultats",
results_without_objective: results_without_objective: "Résultats - orientations sans objectifs",
"Résultats - orientations sans objectifs",
add_objectif: "Ajouter un motif - objectif - dispositif", add_objectif: "Ajouter un motif - objectif - dispositif",
add_an_objective: "Ajouter un objectif", add_an_objective: "Ajouter un objectif",
Evaluations: "Évaluations", Evaluations: "Évaluations",
@@ -710,10 +680,7 @@ export default {
this.showAddEvaluation = !this.showAddEvaluation; this.showAddEvaluation = !this.showAddEvaluation;
}, },
setHandlingThirdParty({ selected, modal }) { setHandlingThirdParty({ selected, modal }) {
this.$store.commit( this.$store.commit("setHandlingThirdParty", selected.shift().result);
"setHandlingThirdParty",
selected.shift().result,
);
this.$refs.handlingThirdPartyPicker.resetSearch(); this.$refs.handlingThirdPartyPicker.resetSearch();
modal.showModal = false; modal.showModal = false;
}, },
@@ -825,9 +792,7 @@ export default {
}); });
}, },
scrollToElement(docAnchorId) { scrollToElement(docAnchorId) {
const documentEl = document.getElementById( const documentEl = document.getElementById(`document_${docAnchorId}`);
`document_${docAnchorId}`,
);
if (documentEl) { if (documentEl) {
documentEl.scrollIntoView({ behavior: "smooth" }); documentEl.scrollIntoView({ behavior: "smooth" });
} }

View File

@@ -55,10 +55,7 @@
<p>{{ $t("delete.sure_description") }}</p> <p>{{ $t("delete.sure_description") }}</p>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
<button <button class="btn btn-danger" @click="removeEvaluation(evaluation)">
class="btn btn-danger"
@click="removeEvaluation(evaluation)"
>
{{ $t("delete.ok") }} {{ $t("delete.ok") }}
</button> </button>
</template> </template>

View File

@@ -94,9 +94,7 @@ export default {
return this.$store.getters.resultsForGoal(this.goal).length > 0; return this.$store.getters.resultsForGoal(this.goal).length > 0;
} }
throw Error( throw Error(`this.destination is not implemented: ${this.destination}`);
`this.destination is not implemented: ${this.destination}`,
);
}, },
pickedResults() { pickedResults() {
if (this.destination === "action") { if (this.destination === "action") {
@@ -105,15 +103,11 @@ export default {
return this.$store.getters.resultsPickedForGoal(this.goal); return this.$store.getters.resultsPickedForGoal(this.goal);
} }
throw Error( throw Error(`this.destination is not implemented: ${this.destination}`);
`this.destination is not implemented: ${this.destination}`,
);
}, },
availableForCheckResults() { availableForCheckResults() {
if (this.destination === "action") { if (this.destination === "action") {
let pickedIds = this.$store.state.resultsPicked.map( let pickedIds = this.$store.state.resultsPicked.map((r) => r.id);
(r) => r.id,
);
return this.$store.state.resultsForAction.filter( return this.$store.state.resultsForAction.filter(
(r) => !pickedIds.includes(r.id), (r) => !pickedIds.includes(r.id),
@@ -128,9 +122,7 @@ export default {
.filter((r) => !pickedIds.includes(r.id)); .filter((r) => !pickedIds.includes(r.id));
} }
throw Error( throw Error(`this.destination is not implemented: ${this.destination}`);
`this.destination is not implemented: ${this.destination}`,
);
}, },
}, },
methods: { methods: {
@@ -149,9 +141,7 @@ export default {
}); });
return; return;
} }
throw Error( throw Error(`this.destination is not implemented: ${this.destination}`);
`this.destination is not implemented: ${this.destination}`,
);
}, },
removeResult(r) { removeResult(r) {
if (this.destination === "action") { if (this.destination === "action") {
@@ -164,9 +154,7 @@ export default {
}); });
return; return;
} }
throw Error( throw Error(`this.destination is not implemented: ${this.destination}`);
`this.destination is not implemented: ${this.destination}`,
);
}, },
}, },
}; };

View File

@@ -107,9 +107,7 @@
v-for="(d, i) in evaluation.documents" v-for="(d, i) in evaluation.documents"
:key="d.id" :key="d.id"
:class="[ :class="[
parseInt(this.docAnchorId) === d.id parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing',
? 'bg-blink'
: 'nothing',
]" ]"
> >
<div :id="`document_${d.id}`" class="item-row"> <div :id="`document_${d.id}`" class="item-row">
@@ -134,12 +132,7 @@
<p v-if="d.createdBy" class="createdBy"> <p v-if="d.createdBy" class="createdBy">
Créé par {{ d.createdBy.text }}<br /> Créé par {{ d.createdBy.text }}<br />
Le Le
{{ {{ $d(ISOToDatetime(d.createdAt.datetime), "long") }}
$d(
ISOToDatetime(d.createdAt.datetime),
"long",
)
}}
</p> </p>
</div> </div>
</div> </div>
@@ -157,9 +150,7 @@
:allowCreate="true" :allowCreate="true"
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument" relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument"
:relatedEntityId="d.id" :relatedEntityId="d.id"
:workflowsAvailables=" :workflowsAvailables="d.workflows_availables"
d.workflows_availables
"
:preventDefaultMoveToGenerate="true" :preventDefaultMoveToGenerate="true"
:goToGenerateWorkflowPayload="{ :goToGenerateWorkflowPayload="{
doc: d, doc: d,
@@ -173,12 +164,7 @@
<button <button
v-if="AmIRefferer" v-if="AmIRefferer"
class="btn btn-notify" class="btn btn-notify"
@click=" @click="goToGenerateDocumentNotification(d, false)"
goToGenerateDocumentNotification(
d,
false,
)
"
></button> ></button>
<template v-else> <template v-else>
<button <button
@@ -198,33 +184,15 @@
<li> <li>
<a <a
class="dropdown-item" class="dropdown-item"
@click=" @click="goToGenerateDocumentNotification(d, true)"
goToGenerateDocumentNotification( >{{ $t("notification_notify_referrer") }}</a
d,
true,
)
"
>{{
$t(
"notification_notify_referrer",
)
}}</a
> >
</li> </li>
<li> <li>
<a <a
class="dropdown-item" class="dropdown-item"
@click=" @click="goToGenerateDocumentNotification(d, false)"
goToGenerateDocumentNotification( >{{ $t("notification_notify_any") }}</a
d,
false,
)
"
>{{
$t(
"notification_notify_any",
)
}}</a
> >
</li> </li>
</ul> </ul>
@@ -235,27 +203,15 @@
:stored-object="d.storedObject" :stored-object="d.storedObject"
:filename="d.title" :filename="d.title"
:can-edit="true" :can-edit="true"
:execute-before-leave=" :execute-before-leave="submitBeforeLeaveToEditor"
submitBeforeLeaveToEditor :davLink="d.storedObject._links?.dav_link.href"
"
:davLink="
d.storedObject._links?.dav_link
.href
"
:davLinkExpiration=" :davLinkExpiration="
d.storedObject._links?.dav_link d.storedObject._links?.dav_link.expiration
.expiration
"
@on-stored-object-status-change="
onStatusDocumentChanged
" "
@on-stored-object-status-change="onStatusDocumentChanged"
></document-action-buttons-group> ></document-action-buttons-group>
</li> </li>
<li <li v-if="d.storedObject._permissions.canEdit">
v-if="
d.storedObject._permissions.canEdit
"
>
<drop-file-modal <drop-file-modal
:existing-doc="d.storedObject" :existing-doc="d.storedObject"
:allow-remove="false" :allow-remove="false"
@@ -270,11 +226,7 @@
></drop-file-modal> ></drop-file-modal>
</li> </li>
<li v-if="d.workflows.length === 0"> <li v-if="d.workflows.length === 0">
<a <a class="btn btn-delete" @click="removeDocument(d)"> </a>
class="btn btn-delete"
@click="removeDocument(d)"
>
</a>
</li> </li>
<li v-if="Number.isInteger(d.id)"> <li v-if="Number.isInteger(d.id)">
<button <button
@@ -307,9 +259,7 @@
</template> </template>
</pick-template> </pick-template>
<div> <div>
<label class="col-form-label">{{ <label class="col-form-label">{{ $t("document_upload") }}</label>
$t("document_upload")
}}</label>
<ul class="record_actions document-upload"> <ul class="record_actions document-upload">
<li> <li>
<drop-file-modal <drop-file-modal

View File

@@ -255,12 +255,16 @@ export default {
unselectAction(value) { unselectAction(value) {
getGoalByAction(value.id).then((goals) => { getGoalByAction(value.id).then((goals) => {
[this.results.options, this.results.value] = [this.results.options, this.results.value] = this.removeElementInData(
this.removeElementInData("goals", goals); "goals",
goals,
);
}); });
getResultByAction(value.id).then((results) => { getResultByAction(value.id).then((results) => {
[this.results.options, this.results.value] = [this.results.options, this.results.value] = this.removeElementInData(
this.removeElementInData("results", results); "results",
results,
);
}); });
}, },
@@ -300,9 +304,7 @@ export default {
let excludeParent = this.actions.options.filter( let excludeParent = this.actions.options.filter(
(o) => o.parent !== null, (o) => o.parent !== null,
); );
let children = excludeParent.filter( let children = excludeParent.filter((o) => o.parent.id === value.id);
(o) => o.parent.id === value.id,
);
//console.log("get childrens", children.map(e => e.id)); //console.log("get childrens", children.map(e => e.id));
return children; return children;
} }

View File

@@ -5,9 +5,7 @@
<div v-if="noPerson"> <div v-if="noPerson">
<div class="alert alert-info"> <div class="alert alert-info">
{{ {{ $t("household_members_editor.concerned.add_at_least_onePerson") }}
$t("household_members_editor.concerned.add_at_least_onePerson")
}}
</div> </div>
</div> </div>
<div v-else> <div v-else>
@@ -18,11 +16,7 @@
</p> </p>
<ul class="list-suggest remove-items inline"> <ul class="list-suggest remove-items inline">
<li <li v-for="c in concerned" :key="c.person.id" @click="removeConcerned(c)">
v-for="c in concerned"
:key="c.person.id"
@click="removeConcerned(c)"
>
<span><person-text :person="c.person" /></span> <span><person-text :person="c.person" /></span>
</li> </li>
</ul> </ul>
@@ -32,11 +26,7 @@
v-if="concernedPersonsWithHouseholds.length > 0" v-if="concernedPersonsWithHouseholds.length > 0"
> >
<p> <p>
{{ {{ $t("household_members_editor.concerned.persons_with_household") }}
$t(
"household_members_editor.concerned.persons_with_household",
)
}}
</p> </p>
<ul v-for="c in concernedPersonsWithHouseholds" :key="c.person.id"> <ul v-for="c in concernedPersonsWithHouseholds" :key="c.person.id">
<li> <li>
@@ -48,11 +38,7 @@
}} }}
<a <a
target="_blank" target="_blank"
:href=" :href="this.makeHouseholdLink(c.person.current_household_id)"
this.makeHouseholdLink(
c.person.current_household_id,
)
"
>{{ c.person.current_household_id }}</a >{{ c.person.current_household_id }}</a
>. >.
</li> </li>
@@ -108,8 +94,7 @@ export default {
return this.$store.state.concerned.filter( return this.$store.state.concerned.filter(
(c) => (c) =>
c.person.current_household_id !== null && c.person.current_household_id !== null &&
c.person.current_household_id !== c.person.current_household_id !== this.$store.state.household.id,
this.$store.state.household.id,
); );
} else { } else {
return []; return [];

View File

@@ -15,9 +15,7 @@
<i class="fa fa-ban fa-stack-2x text-danger" /> <i class="fa fa-ban fa-stack-2x text-danger" />
</span> </span>
{{ {{
$t( $t("household_members_editor.household.leave_without_household")
"household_members_editor.household.leave_without_household",
)
}} }}
</div> </div>
</div> </div>

View File

@@ -131,10 +131,7 @@ export default {
return this.$store.state.numberOfDependentsWithDisabilities; return this.$store.state.numberOfDependentsWithDisabilities;
}, },
set(value) { set(value) {
this.$store.commit( this.$store.commit("setNumberOfDependentsWithDisabilities", value);
"setNumberOfDependentsWithDisabilities",
value,
);
}, },
}, },
startDate: { startDate: {

View File

@@ -16,9 +16,7 @@
</h4> </h4>
<p> <p>
{{ {{
$t( $t("household_members_editor.household.household_suggested_explanation")
"household_members_editor.household.household_suggested_explanation",
)
}} }}
</p> </p>
<div class="accordion" id="householdSuggestions"> <div class="accordion" id="householdSuggestions">
@@ -47,11 +45,7 @@
aria-expanded="true" aria-expanded="true"
@click="toggleHouseholdSuggestion" @click="toggleHouseholdSuggestion"
> >
{{ {{ $t("household_members_editor.hide_household_suggestion") }}
$t(
"household_members_editor.hide_household_suggestion",
)
}}
</button> </button>
<!-- disabled bootstrap behaviour: data-bs-target="#collapse_household_suggestions" aria-controls="collapse_household_suggestions" --> <!-- disabled bootstrap behaviour: data-bs-target="#collapse_household_suggestions" aria-controls="collapse_household_suggestions" -->
</h2> </h2>
@@ -68,22 +62,14 @@
class="item-bloc" class="item-bloc"
:key="`householdSuggestions-${i}`" :key="`householdSuggestions-${i}`"
> >
<household-render-box <household-render-box :household="s.household" />
:household="s.household"
/>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button <button
class="btn btn-sm btn-choose" class="btn btn-sm btn-choose"
@click=" @click="selectHousehold(s.household)"
selectHousehold(s.household)
"
> >
{{ {{ $t("household_members_editor.select_household") }}
$t(
"household_members_editor.select_household",
)
}}
</button> </button>
</li> </li>
</ul> </ul>
@@ -212,14 +198,12 @@ export default {
}, },
isHouseholdNewDesactivated() { isHouseholdNewDesactivated() {
return ( return (
this.$store.state.mode !== null && this.$store.state.mode !== null && !this.$store.getters.isHouseholdNew
!this.$store.getters.isHouseholdNew
); );
}, },
isHouseholdLeaveDesactivated() { isHouseholdLeaveDesactivated() {
return ( return (
this.$store.state.mode !== null && this.$store.state.mode !== null && this.$store.state.mode !== "leave"
this.$store.state.mode !== "leave"
); );
}, },
}, },

View File

@@ -17,11 +17,7 @@
</li> </li>
<li v-if="hasHouseholdAddress"> <li v-if="hasHouseholdAddress">
<button class="btn btn-remove" @click="removeHouseholdAddress"> <button class="btn btn-remove" @click="removeHouseholdAddress">
{{ {{ $t("household_members_editor.household_address.remove_address") }}
$t(
"household_members_editor.household_address.remove_address",
)
}}
</button> </button>
</li> </li>
</ul> </ul>
@@ -55,7 +51,8 @@ export default {
}, },
}, },
title: { title: {
create: "household_members_editor.household_address.create_new_address", create:
"household_members_editor.household_address.create_new_address",
edit: "household_members_editor.household_address.update_address_title", edit: "household_members_editor.household_address.update_address_title",
}, },
}, },

View File

@@ -24,9 +24,7 @@
<ul class="list-content fa-ul"> <ul class="list-content fa-ul">
<li> <li>
<i class="fa fa-li fa-map-marker" /> <i class="fa fa-li fa-map-marker" />
<span class="chill-no-data-statement" <span class="chill-no-data-statement">Sans adresse</span>
>Sans adresse</span
>
</li> </li>
</ul> </ul>
</div> </div>

View File

@@ -68,45 +68,28 @@
<form> <form>
<div class="row"> <div class="row">
<div class="col-12 text-center"> <div class="col-12 text-center">
{{ $t("visgraph.between") }}<br />{{ {{ $t("visgraph.between") }}<br />{{ $t("visgraph.and") }}
$t("visgraph.and")
}}
</div> </div>
<div class="col"> <div class="col">
<small>{{ <small>{{ getPersonAge(modal.data.from) }}</small>
getPersonAge(modal.data.from)
}}</small>
<h4>{{ getPerson(modal.data.from).text }}</h4> <h4>{{ getPerson(modal.data.from).text }}</h4>
<p <p class="text-start" v-if="relation && relation.title">
class="text-start"
v-if="relation && relation.title"
>
<span v-if="reverse"> <span v-if="reverse">
{{ {{
$t( $t("visgraph.relation_from_to_like", [
"visgraph.relation_from_to_like", getPerson(modal.data.from).text,
[ getPerson(modal.data.to).text,
getPerson(modal.data.from)
.text,
getPerson(modal.data.to)
.text,
relation.reverseTitle.fr.toLowerCase(), relation.reverseTitle.fr.toLowerCase(),
], ])
)
}} }}
</span> </span>
<span v-else> <span v-else>
{{ {{
$t( $t("visgraph.relation_from_to_like", [
"visgraph.relation_from_to_like", getPerson(modal.data.from).text,
[ getPerson(modal.data.to).text,
getPerson(modal.data.from)
.text,
getPerson(modal.data.to)
.text,
relation.title.fr.toLowerCase(), relation.title.fr.toLowerCase(),
], ])
)
}} }}
</span> </span>
</p> </p>
@@ -114,36 +97,23 @@
<div class="col text-end"> <div class="col text-end">
<small>{{ getPersonAge(modal.data.to) }}</small> <small>{{ getPersonAge(modal.data.to) }}</small>
<h4>{{ getPerson(modal.data.to).text }}</h4> <h4>{{ getPerson(modal.data.to).text }}</h4>
<p <p class="text-end" v-if="relation && relation.title">
class="text-end"
v-if="relation && relation.title"
>
<span v-if="reverse"> <span v-if="reverse">
{{ {{
$t( $t("visgraph.relation_from_to_like", [
"visgraph.relation_from_to_like", getPerson(modal.data.to).text,
[ getPerson(modal.data.from).text,
getPerson(modal.data.to)
.text,
getPerson(modal.data.from)
.text,
relation.title.fr.toLowerCase(), relation.title.fr.toLowerCase(),
], ])
)
}} }}
</span> </span>
<span v-else> <span v-else>
{{ {{
$t( $t("visgraph.relation_from_to_like", [
"visgraph.relation_from_to_like", getPerson(modal.data.to).text,
[ getPerson(modal.data.from).text,
getPerson(modal.data.to)
.text,
getPerson(modal.data.from)
.text,
relation.reverseTitle.fr.toLowerCase(), relation.reverseTitle.fr.toLowerCase(),
], ])
)
}} }}
</span> </span>
</p> </p>
@@ -352,9 +322,7 @@ export default {
this.getRelationsList(); this.getRelationsList();
console.log(this.persons); console.log(this.persons);
this.canvas = document this.canvas = document.getElementById("visgraph").querySelector("canvas");
.getElementById("visgraph")
.querySelector("canvas");
this.link = document.getElementById("exportCanvasBtn"); this.link = document.getElementById("exportCanvasBtn");
}, },
methods: { methods: {
@@ -364,10 +332,7 @@ export default {
this.$store this.$store
.dispatch("addMorePerson", item.result) .dispatch("addMorePerson", item.result)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if ( if (name === "ValidationException" || name === "AccessException") {
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -411,10 +376,7 @@ export default {
if (person.folded === true) { if (person.folded === true) {
//console.log(' @@> expand mode event') //console.log(' @@> expand mode event')
this.$store.commit("unfoldPerson", person); this.$store.commit("unfoldPerson", person);
this.$store.dispatch( this.$store.dispatch("fetchInfoForPerson", person);
"fetchInfoForPerson",
person,
);
} }
} else { } else {
//console.log(' @@> create link mode event') //console.log(' @@> create link mode event')
@@ -423,14 +385,9 @@ export default {
break; break;
case "household": case "household":
let household = this.nodes.filter( let household = this.nodes.filter((n) => n.id === node)[0];
(n) => n.id === node,
)[0];
//console.log('@@@@@@ event on selected Node', household.id) //console.log('@@@@@@ event on selected Node', household.id)
this.$store.dispatch( this.$store.dispatch("unfoldPersonsByHousehold", household);
"unfoldPersonsByHousehold",
household,
);
break; break;
case "accompanying_period": case "accompanying_period":
@@ -603,10 +560,7 @@ export default {
(relationship) => (relationship) =>
new Promise((resolve) => { new Promise((resolve) => {
//console.log('post relationship response', relationship) //console.log('post relationship response', relationship)
this.$store.dispatch( this.$store.dispatch("addLinkFromRelationship", relationship);
"addLinkFromRelationship",
relationship,
);
this.modal.showModal = false; this.modal.showModal = false;
this.resetForm(); this.resetForm();
this.forceUpdateComponent(); this.forceUpdateComponent();
@@ -632,10 +586,7 @@ export default {
(relationship) => (relationship) =>
new Promise((resolve) => { new Promise((resolve) => {
//console.log('patch relationship response', relationship) //console.log('patch relationship response', relationship)
this.$store.commit( this.$store.commit("updateLink", relationship);
"updateLink",
relationship,
);
this.modal.showModal = false; this.modal.showModal = false;
this.resetForm(); this.resetForm();
this.forceUpdateComponent(); this.forceUpdateComponent();

View File

@@ -14,11 +14,7 @@
<ul class="small_in_title columns mt-1"> <ul class="small_in_title columns mt-1">
<li> <li>
<span class="item-key"> <span class="item-key">
{{ {{ trans(ACCOMPANYING_COURSE_WORK_START_DATE) }}
trans(
ACCOMPANYING_COURSE_WORK_START_DATE,
)
}}
: :
</span> </span>
<b>{{ formatDate(acpw.startDate) }}</b> <b>{{ formatDate(acpw.startDate) }}</b>
@@ -26,9 +22,7 @@
<li v-if="acpw.endDate"> <li v-if="acpw.endDate">
<span class="item-key"> <span class="item-key">
{{ {{ trans(ACCOMPANYING_COURSE_WORK_END_DATE) }}
trans(ACCOMPANYING_COURSE_WORK_END_DATE)
}}
: :
</span> </span>
<b>{{ formatDate(acpw.endDate) }}</b> <b>{{ formatDate(acpw.endDate) }}</b>

View File

@@ -4,11 +4,9 @@
<div class="col-md-6 col-sm-10" v-if="selectedAcpw"> <div class="col-md-6 col-sm-10" v-if="selectedAcpw">
<ul class="list-suggest remove-items"> <ul class="list-suggest remove-items">
<li> <li>
<span <span @click="selectedAcpw = null" class="chill-denomination">{{
@click="selectedAcpw = null" selectedAcpw?.socialAction?.title.fr
class="chill-denomination" }}</span>
>{{ selectedAcpw?.socialAction?.title.fr }}</span
>
</li> </li>
</ul> </ul>
</div> </div>
@@ -30,11 +28,7 @@
> >
<template #header> <template #header>
<h3> <h3>
{{ {{ trans(ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK) }}
trans(
ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK,
)
}}
</h3> </h3>
</template> </template>
@@ -46,11 +40,7 @@
</template> </template>
<template #footer> <template #footer>
<button <button type="button" class="btn btn-save" @click="confirmSelection">
type="button"
class="btn btn-save"
@click="confirmSelection"
>
{{ trans(CONFIRM) }} {{ trans(CONFIRM) }}
</button> </button>
</template> </template>

View File

@@ -2,8 +2,7 @@ const personMessages = {
fr: { fr: {
add_persons: { add_persons: {
title: "Ajouter des usagers", title: "Ajouter des usagers",
suggested_counter: suggested_counter: "Pas de résultats | 1 résultat | {count} résultats",
"Pas de résultats | 1 résultat | {count} résultats",
selected_counter: " 1 sélectionné | {count} sélectionnés", selected_counter: " 1 sélectionné | {count} sélectionnés",
search_some_persons: "Rechercher des personnes..", search_some_persons: "Rechercher des personnes..",
}, },

Some files were not shown because too many files have changed in this diff Show More