Merge remote-tracking branch 'origin/master' into ticket-app-master

This commit is contained in:
2025-06-20 12:53:20 +02:00
49 changed files with 7986 additions and 7490 deletions

View File

@@ -0,0 +1,7 @@
kind: Fixed
body: |
Allow null and cast as string to setContent method for NewsItem
time: 2025-06-19T17:01:42.125730402+02:00
custom:
Issue: "392"
SchemaChange: No schema change

View File

@@ -46,7 +46,7 @@ stages:
build: build:
stage: Composer install stage: Composer install
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 image: chill/base-image:8.3-edge
before_script: before_script:
- composer config -g cache-dir "$(pwd)/.cache" - composer config -g cache-dir "$(pwd)/.cache"
script: script:
@@ -61,7 +61,7 @@ build:
code_style: code_style:
stage: Tests stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 image: chill/base-image:8.3-edge
script: script:
- php-cs-fixer fix --dry-run -v --show-progress=none - php-cs-fixer fix --dry-run -v --show-progress=none
cache: cache:
@@ -74,7 +74,7 @@ code_style:
phpstan_tests: phpstan_tests:
stage: Tests stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 image: chill/base-image:8.3-edge
variables: variables:
COMPOSER_MEMORY_LIMIT: 3G COMPOSER_MEMORY_LIMIT: 3G
before_script: before_script:
@@ -91,7 +91,7 @@ phpstan_tests:
rector_tests: rector_tests:
stage: Tests stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 image: chill/base-image:8.3-edge
before_script: before_script:
- bin/console cache:clear --env=dev - bin/console cache:clear --env=dev
script: script:
@@ -132,7 +132,7 @@ lint:
unit_tests: unit_tests:
stage: Tests stage: Tests
image: gitea.champs-libres.be/chill-project/chill-skeleton-basic/base-image:php82 image: chill/base-image:8.3-edge
variables: variables:
COMPOSER_MEMORY_LIMIT: 3G COMPOSER_MEMORY_LIMIT: 3G
before_script: before_script:

View File

@@ -70,9 +70,9 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
return $this->content; return $this->content;
} }
public function setContent(string $content): void public function setContent(?string $content): void
{ {
$this->content = $content; $this->content = (string) $content;
} }
public function getStartDate(): ?\DateTimeImmutable public function getStartDate(): ?\DateTimeImmutable

View File

@@ -2,10 +2,10 @@
<span class="chill-entity entity-user"> <span class="chill-entity entity-user">
{{ user.label }} {{ user.label }}
<span class="user-job" v-if="user.user_job !== null" <span class="user-job" v-if="user.user_job !== null"
>({{ localizeString(user.user_job.label) }})</span > ({{ localizeString(user.user_job.label) }})</span
> >
<span class="main-scope" v-if="user.main_scope !== null" <span class="main-scope" v-if="user.main_scope !== null"
>({{ localizeString(user.main_scope.name) }})</span > ({{ localizeString(user.main_scope.name) }})</span
> >
<span <span
v-if="user.isAbsent" v-if="user.isAbsent"
@@ -22,8 +22,8 @@ import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizat
export default { export default {
name: "UserRenderBoxBadge", name: "UserRenderBoxBadge",
methods: { methods: {
localizeString() { localizeString(label) {
return localizeString; return localizeString(label);
}, },
}, },
props: ["user"], props: ["user"],

View File

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

View File

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

View File

@@ -28,7 +28,11 @@
<a v-if="pk !== -1" :href="householdLink(pk)"> <a v-if="pk !== -1" :href="householdLink(pk)">
<i <i
class="fa fa-home fa-fw text-light" class="fa fa-home fa-fw text-light"
:title="$t('persons_associated.show_household_number', { id: pk })" :title="
$t('persons_associated.show_household_number', {
id: pk,
})
"
></i> ></i>
</a> </a>
<span v-for="person in persons" class="me-1" :key="person.id"> <span v-for="person in persons" class="me-1" :key="person.id">
@@ -93,7 +97,9 @@ 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.get(person.current_household_id || -1).push(person); households
.get(person.current_household_id || -1)
.push(person);
}); });
return households; return households;

View File

@@ -2,7 +2,9 @@
<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 }">{{ $t("course.occasional") }}</span> <span :class="{ on: !isRegular }">{{
$t("course.occasional")
}}</span>
<i <i
class="fa" class="fa"
:class="{ :class="{
@@ -10,14 +12,19 @@
'fa-toggle-on fa-flip-horizontal': !isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular,
}" }"
/> />
<span :class="{ on: isRegular }">{{ $t("course.regular") }}</span> <span :class="{ on: isRegular }">{{
$t("course.regular")
}}</span>
</a> </a>
</span> </span>
<span class="d-block d-sm-inline-block ms-sm-3 ms-md-0"> <span class="d-block d-sm-inline-block ms-sm-3 ms-md-0">
<button <button
class="badge rounded-pill me-1" class="badge rounded-pill me-1"
:class="{ 'bg-danger': isEmergency, 'bg-secondary': !isEmergency }" :class="{
'bg-danger': isEmergency,
'bg-secondary': !isEmergency,
}"
@click="toggleEmergency" @click="toggleEmergency"
> >
{{ $t("course.emergency") }} {{ $t("course.emergency") }}
@@ -73,7 +80,10 @@ export default {
value = "occasional"; value = "occasional";
} }
this.$store.dispatch("toggleIntensity", value).catch(({ name }) => { this.$store.dispatch("toggleIntensity", value).catch(({ name }) => {
if (name === "ValidationException" || name === "AccessException") { if (
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",
@@ -88,7 +98,10 @@ export default {
this.$store this.$store
.dispatch("toggleEmergency", !this.isEmergency) .dispatch("toggleEmergency", !this.isEmergency)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -100,7 +113,10 @@ export default {
toggleConfidential() { toggleConfidential() {
this.$store.dispatch("toggleConfidential").catch(({ name }) => { this.$store.dispatch("toggleConfidential").catch(({ name }) => {
console.log(name); console.log(name);
if (name === "ValidationException" || name === "AccessException") { if (
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,7 +21,9 @@
</h2> </h2>
</template> </template>
<template #body> <template #body>
<address-render-box :address="person.current_household_address" /> <address-render-box
:address="person.current_household_address"
/>
<p>{{ $t("courselocation.sure_description") }}</p> <p>{{ $t("courselocation.sure_description") }}</p>
</template> </template>
<template #footer> <template #footer>
@@ -70,7 +72,10 @@ export default {
this.$store this.$store
.dispatch("updateLocation", payload) .dispatch("updateLocation", payload)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

@@ -96,14 +96,21 @@ export default {
name === "AccessException" name === "AccessException"
) { ) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({
message: violation,
}),
); );
} else { } else {
this.$toast.open({ message: "An error occurred" }); this.$toast.open({
message: "An error occurred",
});
} }
}); });
} else { } else {
if (this.$store.state.accompanyingCourse.pinnedComment !== null) { if (
this.$store.state.accompanyingCourse
.pinnedComment !== null
) {
this.$store this.$store
.dispatch("removePinnedComment", { .dispatch("removePinnedComment", {
id: this.pinnedComment.id, id: this.pinnedComment.id,
@@ -118,10 +125,14 @@ export default {
name === "AccessException" name === "AccessException"
) { ) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({
message: violation,
}),
); );
} else { } else {
this.$toast.open({ message: "An error occurred" }); this.$toast.open({
message: "An error occurred",
});
} }
}); });
} }
@@ -142,7 +153,10 @@ 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 (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,14 +18,19 @@
<div class="modal-body"> <div class="modal-body">
<p <p
v-html=" v-html="
$t('confirm.sure_referrer', { referrer: this.value.text }) $t('confirm.sure_referrer', {
referrer: this.value.text,
})
" "
/> />
</div> </div>
</template> </template>
<template #footer> <template #footer>
<button class="btn btn-save" @click.prevent="this.confirmReferrer"> <button
class="btn btn-save"
@click.prevent="this.confirmReferrer"
>
{{ $t("confirm.ok_referrer") }} {{ $t("confirm.ok_referrer") }}
</button> </button>
</template> </template>
@@ -144,7 +149,8 @@ export default {
if ( if (
this.$store.state.accompanyingCourse.user !== null && this.$store.state.accompanyingCourse.user !== null &&
users.find( users.find(
(u) => this.$store.state.accompanyingCourse.user.id === u.id, (u) =>
this.$store.state.accompanyingCourse.user.id === u.id,
) === undefined ) === undefined
) { ) {
users.push(this.$store.state.accompanyingCourse.user); users.push(this.$store.state.accompanyingCourse.user);
@@ -159,7 +165,10 @@ export default {
this.$store this.$store
.dispatch("updateJob", value) .dispatch("updateJob", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -205,7 +214,10 @@ export default {
this.$store this.$store
.dispatch("updateReferrer", this.value) .dispatch("updateReferrer", this.value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -220,7 +232,10 @@ export default {
this.$store this.$store
.dispatch("updateReferrer", null) .dispatch("updateReferrer", null)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );

View File

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

View File

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

View File

@@ -14,7 +14,9 @@
> >
<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,8 +36,13 @@ export default {
return this.$store.state.accompanyingCourse.scopes; return this.$store.state.accompanyingCourse.scopes;
}, },
set: function (v) { set: function (v) {
this.$store.dispatch("setScopes", v).catch(({ name, violations }) => { this.$store
if (name === "ValidationException" || name === "AccessException") { .dispatch("setScopes", v)
.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,7 +61,10 @@ export default {
this.$store this.$store
.dispatch("updateSocialIssues", this.transformValue(value)) .dispatch("updateSocialIssues", this.transformValue(value))
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -73,7 +76,9 @@ 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.filter((x) => updated.indexOf(x) === -1).shift(); let removed = stored
.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,7 +33,11 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
startDate: (state) => startDate: (state) =>
dateToISO(ISOToDatetime(state.accompanyingCourse.openingDate.datetime)), dateToISO(
ISOToDatetime(
state.accompanyingCourse.openingDate.datetime,
),
),
}), }),
startDateInput: { startDateInput: {
get() { get() {
@@ -45,7 +49,12 @@ export default {
setTimeout(() => { setTimeout(() => {
console.log("timeout finished"); console.log("timeout finished");
if (this.lastRecordedDate === value) { if (this.lastRecordedDate === value) {
console.log("last recorded", this.lastRecordedDate, "value", value); console.log(
"last recorded",
this.lastRecordedDate,
"value",
value,
);
this.$store this.$store
.dispatch("updateStartDate", value) .dispatch("updateStartDate", value)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
@@ -54,10 +63,14 @@ export default {
name === "AccessException" name === "AccessException"
) { ) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({
message: violation,
}),
); );
} else { } else {
this.$toast.open({ message: "An error occurred" }); this.$toast.open({
message: "An error occurred",
});
} }
}); });
} }

View File

@@ -6,7 +6,12 @@
<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 v-for="item of items" :key="item.key" :item="item" :step="step" /> <item
v-for="item of items"
:key="item.key"
:item="item"
:step="step"
/>
</nav> </nav>
</div> </div>
</teleport> </teleport>
@@ -23,7 +28,9 @@ export default {
data() { data() {
return { return {
header: document.querySelector("header nav.navbar"), header: document.querySelector("header nav.navbar"),
bannerName: document.querySelector("#header-accompanying_course-name"), bannerName: document.querySelector(
"#header-accompanying_course-name",
),
bannerDetails: document.querySelector( bannerDetails: document.querySelector(
"#header-accompanying_course-details", "#header-accompanying_course-details",
), ),
@@ -132,11 +139,16 @@ 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) ? true : false; (window.scrollY >= item.pos) & (window.scrollY < next)
? 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 (document.body.scrollHeight == window.scrollY + window.innerHeight) { if (
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,7 +3,11 @@
<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 v-else-if="step === 'DRAFT'" :href="item.id" :class="{ active: isActive }"> <a
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,61 +27,67 @@
</template> </template>
<template #body> <template #body>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus Lorem ipsum dolor sit amet, consectetur adipiscing elit.
luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar Phasellus luctus facilisis suscipit. Cras pulvinar,
porta, enim ex posuere lacus, in pulvinar lectus magna in odio. purus sagittis pulvinar porta, enim ex posuere lacus, in
Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut pulvinar lectus magna in odio. Nullam iaculis congue
vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget lorem ac suscipit. Proin ut rutrum augue. Ut vehicula
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 nisl. Nunc id Quisque non erat tincidunt, lacinia justo ut, pulvinar
enim ut sem pretium interdum consectetur eu quam. Vestibulum ante nisl. Nunc id enim ut sem pretium interdum consectetur
ipsum primis in faucibus orci luctus et ultrices posuere cubilia eu quam. Vestibulum ante ipsum primis in faucibus orci
curae; Etiam posuere erat eget augue finibus luctus. Maecenas luctus et ultrices posuere cubilia curae; Etiam posuere
auctor, tortor non luctus ultrices, neque neque porttitor ex, nec erat eget augue finibus luctus. Maecenas auctor, tortor
lacinia lorem ligula et elit. Sed tempor nulla vitae lorem non luctus ultrices, neque neque porttitor ex, nec
sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. lacinia lorem ligula et elit. Sed tempor nulla vitae
Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit lorem sollicitudin dictum. Vestibulum nec arcu eget elit
dignissim. pulvinar pretium. Phasellus facilisis metus sed diam
luctus, feugiat scelerisque velit dignissim.
</p> </p>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus Lorem ipsum dolor sit amet, consectetur adipiscing elit.
luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar Phasellus luctus facilisis suscipit. Cras pulvinar,
porta, enim ex posuere lacus, in pulvinar lectus magna in odio. purus sagittis pulvinar porta, enim ex posuere lacus, in
Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut pulvinar lectus magna in odio. Nullam iaculis congue
vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget lorem ac suscipit. Proin ut rutrum augue. Ut vehicula
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 nisl. Nunc id Quisque non erat tincidunt, lacinia justo ut, pulvinar
enim ut sem pretium interdum consectetur eu quam. Vestibulum ante nisl. Nunc id enim ut sem pretium interdum consectetur
ipsum primis in faucibus orci luctus et ultrices posuere cubilia eu quam. Vestibulum ante ipsum primis in faucibus orci
curae; Etiam posuere erat eget augue finibus luctus. Maecenas luctus et ultrices posuere cubilia curae; Etiam posuere
auctor, tortor non luctus ultrices, neque neque porttitor ex, nec erat eget augue finibus luctus. Maecenas auctor, tortor
lacinia lorem ligula et elit. Sed tempor nulla vitae lorem non luctus ultrices, neque neque porttitor ex, nec
sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. lacinia lorem ligula et elit. Sed tempor nulla vitae
Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit lorem sollicitudin dictum. Vestibulum nec arcu eget elit
dignissim. pulvinar pretium. Phasellus facilisis metus sed diam
luctus, feugiat scelerisque velit dignissim.
</p> </p>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus Lorem ipsum dolor sit amet, consectetur adipiscing elit.
luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar Phasellus luctus facilisis suscipit. Cras pulvinar,
porta, enim ex posuere lacus, in pulvinar lectus magna in odio. purus sagittis pulvinar porta, enim ex posuere lacus, in
Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut pulvinar lectus magna in odio. Nullam iaculis congue
vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget lorem ac suscipit. Proin ut rutrum augue. Ut vehicula
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 nisl. Nunc id Quisque non erat tincidunt, lacinia justo ut, pulvinar
enim ut sem pretium interdum consectetur eu quam. Vestibulum ante nisl. Nunc id enim ut sem pretium interdum consectetur
ipsum primis in faucibus orci luctus et ultrices posuere cubilia eu quam. Vestibulum ante ipsum primis in faucibus orci
curae; Etiam posuere erat eget augue finibus luctus. Maecenas luctus et ultrices posuere cubilia curae; Etiam posuere
auctor, tortor non luctus ultrices, neque neque porttitor ex, nec erat eget augue finibus luctus. Maecenas auctor, tortor
lacinia lorem ligula et elit. Sed tempor nulla vitae lorem non luctus ultrices, neque neque porttitor ex, nec
sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. lacinia lorem ligula et elit. Sed tempor nulla vitae
Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit lorem sollicitudin dictum. Vestibulum nec arcu eget elit
dignissim. pulvinar pretium. Phasellus facilisis metus sed diam
luctus, feugiat scelerisque velit dignissim.
</p> </p>
</template> </template>
<template #footer> <template #footer>
@@ -111,7 +117,10 @@
<p>modal 2</p> <p>modal 2</p>
</template> </template>
<template #footer> <template #footer>
<button class="btn btn-create" @click="modal2.showModal = false"> <button
class="btn btn-create"
@click="modal2.showModal = false"
>
{{ $t("action.save") }} {{ $t("action.save") }}
</button> </button>
</template> </template>

View File

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

View File

@@ -68,15 +68,23 @@
<!-- 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">{{ localizeString(g.goal.title) }}</span> <span class="removable">{{
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 v-if="availableForCheckGoal.length > 0" class="accordion-item"> <div
<h2 class="accordion-header" id="heading_expanded_suggestions"> v-if="availableForCheckGoal.length > 0"
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"
@@ -117,7 +125,10 @@
</ul> </ul>
</template> </template>
</div> </div>
<p v-if="goalsPicked.length === 0" class="chill-no-data-statement"> <p
v-if="goalsPicked.length === 0"
class="chill-no-data-statement"
>
Aucun objectif associé Aucun objectif associé
</p> </p>
</div> </div>
@@ -133,7 +144,8 @@
<div aria="hidden" class="title"> <div aria="hidden" class="title">
<div> <div>
<h3> <h3>
{{ $t("Evaluations") }} - {{ $t("Forms") }} - {{ $t("Post") }} {{ $t("Evaluations") }} - {{ $t("Forms") }} -
{{ $t("Post") }}
</h3> </h3>
</div> </div>
</div> </div>
@@ -161,7 +173,10 @@
</li> </li>
</ul> </ul>
</div> </div>
<ul class="record_actions" v-if="evaluationsForAction.length > 0"> <ul
class="record_actions"
v-if="evaluationsForAction.length > 0"
>
<li> <li>
<button <button
:title="$t('add_an_evaluation')" :title="$t('add_an_evaluation')"
@@ -193,7 +208,10 @@
class="me-2 form-check-input" class="me-2 form-check-input"
:id="'person_check' + p.id" :id="'person_check' + p.id"
/> />
<label :for="'person_check' + p.id" class="form-check-label"> <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>
@@ -211,7 +229,10 @@
class="me-2 form-check-input" class="me-2 form-check-input"
:id="'person_check' + p.id" :id="'person_check' + p.id"
/> />
<label :for="'person_check' + p.id" class="form-check-label"> <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>
@@ -274,7 +295,9 @@
<add-persons <add-persons
ref="handlingThirdPartyPicker" ref="handlingThirdPartyPicker"
v-bind:key="handlingThirdPartyPicker.key" v-bind:key="handlingThirdPartyPicker.key"
v-bind:buttonTitle="$t('precise_handling_thirdparty')" v-bind:buttonTitle="
$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"
@@ -420,16 +443,23 @@
> >
&nbsp; &nbsp;
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons"> <ul
class="dropdown-menu"
aria-labelledby="btnGroupNotifyButtons"
>
<li> <li>
<a class="dropdown-item" @click="goToGenerateNotification(true)">{{ <a
$t("notification_notify_referrer") class="dropdown-item"
}}</a> @click="goToGenerateNotification(true)"
>{{ $t("notification_notify_referrer") }}</a
>
</li> </li>
<li> <li>
<a class="dropdown-item" @click="goToGenerateNotification(false)">{{ <a
$t("notification_notify_any") class="dropdown-item"
}}</a> @click="goToGenerateNotification(false)"
>{{ $t("notification_notify_any") }}</a
>
</li> </li>
</ul> </ul>
</template> </template>
@@ -478,7 +508,8 @@ 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: "Résultats - orientations sans objectifs", results_without_objective:
"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",
@@ -679,7 +710,10 @@ export default {
this.showAddEvaluation = !this.showAddEvaluation; this.showAddEvaluation = !this.showAddEvaluation;
}, },
setHandlingThirdParty({ selected, modal }) { setHandlingThirdParty({ selected, modal }) {
this.$store.commit("setHandlingThirdParty", selected.shift().result); this.$store.commit(
"setHandlingThirdParty",
selected.shift().result,
);
this.$refs.handlingThirdPartyPicker.resetSearch(); this.$refs.handlingThirdPartyPicker.resetSearch();
modal.showModal = false; modal.showModal = false;
}, },
@@ -782,14 +816,18 @@ export default {
this.$toast.open({ message: v }); this.$toast.open({ message: v });
} }
} else if (error.name === "ConflictHttpException") { } else if (error.name === "ConflictHttpException") {
this.$toast.open({ message: this.$t("conflict_on_save") }); this.$toast.open({
message: this.$t("conflict_on_save"),
});
} else { } else {
this.$toast.open({ message: "An error occurred" }); this.$toast.open({ message: "An error occurred" });
} }
}); });
}, },
scrollToElement(docAnchorId) { scrollToElement(docAnchorId) {
const documentEl = document.getElementById(`document_${docAnchorId}`); const documentEl = document.getElementById(
`document_${docAnchorId}`,
);
if (documentEl) { if (documentEl) {
documentEl.scrollIntoView({ behavior: "smooth" }); documentEl.scrollIntoView({ behavior: "smooth" });
} }

View File

@@ -55,7 +55,10 @@
<p>{{ $t("delete.sure_description") }}</p> <p>{{ $t("delete.sure_description") }}</p>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
<button class="btn btn-danger" @click="removeEvaluation(evaluation)"> <button
class="btn btn-danger"
@click="removeEvaluation(evaluation)"
>
{{ $t("delete.ok") }} {{ $t("delete.ok") }}
</button> </button>
</template> </template>
@@ -136,7 +139,9 @@ export default {
return; return;
}, },
toggleEditEvaluation() { toggleEditEvaluation() {
this.$store.commit("toggleEvaluationEdit", { key: this.evaluation.key }); this.$store.commit("toggleEvaluationEdit", {
key: this.evaluation.key,
});
}, },
submitForm() { submitForm() {
this.toggleEditEvaluation(); this.toggleEditEvaluation();

View File

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

View File

@@ -75,8 +75,13 @@
type="time" type="time"
v-model="timeSpent" v-model="timeSpent"
> >
<option disabled value="">{{ $t("select_time_spent") }}</option> <option disabled value="">
<option v-for="time in timeSpentChoices" :value="time.value"> {{ $t("select_time_spent") }}
</option>
<option
v-for="time in timeSpentChoices"
:value="time.value"
>
{{ time.text }} {{ time.text }}
</option> </option>
</select> </select>
@@ -101,7 +106,9 @@
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 ? 'bg-blink' : 'nothing', parseInt(this.docAnchorId) === d.id
? 'bg-blink'
: 'nothing',
]" ]"
> >
<div :id="`document_${d.id}`" class="item-row"> <div :id="`document_${d.id}`" class="item-row">
@@ -125,7 +132,13 @@
<div class="item-col item-meta"> <div class="item-col item-meta">
<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 {{ $d(ISOToDatetime(d.createdAt.datetime), "long") }} Le
{{
$d(
ISOToDatetime(d.createdAt.datetime),
"long",
)
}}
</p> </p>
</div> </div>
</div> </div>
@@ -143,9 +156,13 @@
:allowCreate="true" :allowCreate="true"
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument" relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument"
:relatedEntityId="d.id" :relatedEntityId="d.id"
:workflowsAvailables="d.workflows_availables" :workflowsAvailables="
d.workflows_availables
"
:preventDefaultMoveToGenerate="true" :preventDefaultMoveToGenerate="true"
:goToGenerateWorkflowPayload="{ doc: d }" :goToGenerateWorkflowPayload="{
doc: d,
}"
@go-to-generate-workflow=" @go-to-generate-workflow="
goToGenerateWorkflowEvaluationDocument goToGenerateWorkflowEvaluationDocument
" "
@@ -155,7 +172,12 @@
<button <button
v-if="AmIRefferer" v-if="AmIRefferer"
class="btn btn-notify" class="btn btn-notify"
@click="goToGenerateDocumentNotification(d, false)" @click="
goToGenerateDocumentNotification(
d,
false,
)
"
></button> ></button>
<template v-else> <template v-else>
<button <button
@@ -175,15 +197,33 @@
<li> <li>
<a <a
class="dropdown-item" class="dropdown-item"
@click="goToGenerateDocumentNotification(d, true)" @click="
>{{ $t("notification_notify_referrer") }}</a goToGenerateDocumentNotification(
d,
true,
)
"
>{{
$t(
"notification_notify_referrer",
)
}}</a
> >
</li> </li>
<li> <li>
<a <a
class="dropdown-item" class="dropdown-item"
@click="goToGenerateDocumentNotification(d, false)" @click="
>{{ $t("notification_notify_any") }}</a goToGenerateDocumentNotification(
d,
false,
)
"
>{{
$t(
"notification_notify_any",
)
}}</a
> >
</li> </li>
</ul> </ul>
@@ -194,15 +234,27 @@
:stored-object="d.storedObject" :stored-object="d.storedObject"
:filename="d.title" :filename="d.title"
:can-edit="true" :can-edit="true"
:execute-before-leave="submitBeforeLeaveToEditor" :execute-before-leave="
:davLink="d.storedObject._links?.dav_link.href" submitBeforeLeaveToEditor
:davLinkExpiration=" "
d.storedObject._links?.dav_link.expiration :davLink="
d.storedObject._links?.dav_link
.href
"
:davLinkExpiration="
d.storedObject._links?.dav_link
.expiration
"
@on-stored-object-status-change="
onStatusDocumentChanged
" "
@on-stored-object-status-change="onStatusDocumentChanged"
></document-action-buttons-group> ></document-action-buttons-group>
</li> </li>
<li v-if="d.storedObject._permissions.canEdit"> <li
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"
@@ -217,7 +269,11 @@
></drop-file-modal> ></drop-file-modal>
</li> </li>
<li v-if="d.workflows.length === 0"> <li v-if="d.workflows.length === 0">
<a class="btn btn-delete" @click="removeDocument(d)"> </a> <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
@@ -250,7 +306,9 @@
</template> </template>
</pick-template> </pick-template>
<div> <div>
<label class="col-form-label">{{ $t("document_upload") }}</label> <label class="col-form-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,16 +255,12 @@ export default {
unselectAction(value) { unselectAction(value) {
getGoalByAction(value.id).then((goals) => { getGoalByAction(value.id).then((goals) => {
[this.results.options, this.results.value] = this.removeElementInData( [this.results.options, this.results.value] =
"goals", this.removeElementInData("goals", goals);
goals,
);
}); });
getResultByAction(value.id).then((results) => { getResultByAction(value.id).then((results) => {
[this.results.options, this.results.value] = this.removeElementInData( [this.results.options, this.results.value] =
"results", this.removeElementInData("results", results);
results,
);
}); });
}, },
@@ -304,7 +300,9 @@ 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((o) => o.parent.id === value.id); let children = excludeParent.filter(
(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,7 +5,9 @@
<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>
@@ -16,7 +18,11 @@
</p> </p>
<ul class="list-suggest remove-items inline"> <ul class="list-suggest remove-items inline">
<li v-for="c in concerned" :key="c.person.id" @click="removeConcerned(c)"> <li
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>
@@ -26,7 +32,11 @@
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>
@@ -38,7 +48,11 @@
}} }}
<a <a
target="_blank" target="_blank"
:href="this.makeHouseholdLink(c.person.current_household_id)" :href="
this.makeHouseholdLink(
c.person.current_household_id,
)
"
>{{ c.person.current_household_id }}</a >{{ c.person.current_household_id }}</a
>. >.
</li> </li>
@@ -94,7 +108,8 @@ 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 !== this.$store.state.household.id, c.person.current_household_id !==
this.$store.state.household.id,
); );
} else { } else {
return []; return [];

View File

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

View File

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

View File

@@ -16,7 +16,9 @@
</h4> </h4>
<p> <p>
{{ {{
$t("household_members_editor.household.household_suggested_explanation") $t(
"household_members_editor.household.household_suggested_explanation",
)
}} }}
</p> </p>
<div class="accordion" id="householdSuggestions"> <div class="accordion" id="householdSuggestions">
@@ -45,7 +47,11 @@
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>
@@ -62,14 +68,22 @@
class="item-bloc" class="item-bloc"
:key="`householdSuggestions-${i}`" :key="`householdSuggestions-${i}`"
> >
<household-render-box :household="s.household" /> <household-render-box
: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="selectHousehold(s.household)" @click="
selectHousehold(s.household)
"
> >
{{ $t("household_members_editor.select_household") }} {{
$t(
"household_members_editor.select_household",
)
}}
</button> </button>
</li> </li>
</ul> </ul>
@@ -198,12 +212,14 @@ export default {
}, },
isHouseholdNewDesactivated() { isHouseholdNewDesactivated() {
return ( return (
this.$store.state.mode !== null && !this.$store.getters.isHouseholdNew this.$store.state.mode !== null &&
!this.$store.getters.isHouseholdNew
); );
}, },
isHouseholdLeaveDesactivated() { isHouseholdLeaveDesactivated() {
return ( return (
this.$store.state.mode !== null && this.$store.state.mode !== "leave" this.$store.state.mode !== null &&
this.$store.state.mode !== "leave"
); );
}, },
}, },

View File

@@ -17,7 +17,11 @@
</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>
@@ -51,8 +55,7 @@ export default {
}, },
}, },
title: { title: {
create: create: "household_members_editor.household_address.create_new_address",
"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

@@ -14,7 +14,9 @@
</div> </div>
<div v-if="conc.person.birthdate !== null"> <div v-if="conc.person.birthdate !== null">
{{ {{
$t("person.born", { gender: conc.person.gender.genderTranslation }) $t("person.born", {
gender: conc.person.gender.genderTranslation,
})
}} }}
</div> </div>
</div> </div>
@@ -22,7 +24,9 @@
<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">Sans adresse</span> <span class="chill-no-data-statement"
>Sans adresse</span
>
</li> </li>
</ul> </ul>
</div> </div>
@@ -36,7 +40,10 @@
<div v-if="conc.position.allowHolder" class="action"> <div v-if="conc.position.allowHolder" class="action">
<button <button
class="btn" class="btn"
:class="{ 'btn-primary': isHolder, 'btn-secondary': !isHolder }" :class="{
'btn-primary': isHolder,
'btn-secondary': !isHolder,
}"
@click="toggleHolder" @click="toggleHolder"
> >
{{ {{
@@ -122,7 +129,10 @@ export default {
console.log("set comment"); console.log("set comment");
console.log("comment", text); console.log("comment", text);
this.$store.dispatch("setComment", { conc: this.conc, comment: text }); this.$store.dispatch("setComment", {
conc: this.conc,
comment: text,
});
}, },
}, },
}, },

View File

@@ -44,7 +44,9 @@
</div> </div>
<div class="item-row"> <div class="item-row">
<div class="col-12"> <div class="col-12">
<h6>{{ $t("household_members_editor.positioning.comment") }}</h6> <h6>
{{ $t("household_members_editor.positioning.comment") }}
</h6>
<person-comment :conc="conc" /> <person-comment :conc="conc" />
</div> </div>
</div> </div>

View File

@@ -17,7 +17,8 @@
id="exportCanvasBtn" id="exportCanvasBtn"
@click="exportCanvasAsImage" @click="exportCanvasAsImage"
> >
<i class="fa fa-camera fa-fw" /> {{ $t("visgraph.screenshot") }} <i class="fa fa-camera fa-fw" />
{{ $t("visgraph.screenshot") }}
</a> </a>
</div> </div>
@@ -67,28 +68,45 @@
<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.and") }} {{ $t("visgraph.between") }}<br />{{
$t("visgraph.and")
}}
</div> </div>
<div class="col"> <div class="col">
<small>{{ getPersonAge(modal.data.from) }}</small> <small>{{
getPersonAge(modal.data.from)
}}</small>
<h4>{{ getPerson(modal.data.from).text }}</h4> <h4>{{ getPerson(modal.data.from).text }}</h4>
<p class="text-start" v-if="relation && relation.title"> <p
class="text-start"
v-if="relation && relation.title"
>
<span v-if="reverse"> <span v-if="reverse">
{{ {{
$t("visgraph.relation_from_to_like", [ $t(
getPerson(modal.data.from).text, "visgraph.relation_from_to_like",
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("visgraph.relation_from_to_like", [ $t(
getPerson(modal.data.from).text, "visgraph.relation_from_to_like",
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>
@@ -96,23 +114,36 @@
<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 class="text-end" v-if="relation && relation.title"> <p
class="text-end"
v-if="relation && relation.title"
>
<span v-if="reverse"> <span v-if="reverse">
{{ {{
$t("visgraph.relation_from_to_like", [ $t(
getPerson(modal.data.to).text, "visgraph.relation_from_to_like",
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("visgraph.relation_from_to_like", [ $t(
getPerson(modal.data.to).text, "visgraph.relation_from_to_like",
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>
@@ -317,7 +348,9 @@ export default {
this.getRelationsList(); this.getRelationsList();
console.log(this.persons); console.log(this.persons);
this.canvas = document.getElementById("visgraph").querySelector("canvas"); this.canvas = document
.getElementById("visgraph")
.querySelector("canvas");
this.link = document.getElementById("exportCanvasBtn"); this.link = document.getElementById("exportCanvasBtn");
}, },
methods: { methods: {
@@ -327,7 +360,10 @@ export default {
this.$store this.$store
.dispatch("addMorePerson", item.result) .dispatch("addMorePerson", item.result)
.catch(({ name, violations }) => { .catch(({ name, violations }) => {
if (name === "ValidationException" || name === "AccessException") { if (
name === "ValidationException" ||
name === "AccessException"
) {
violations.forEach((violation) => violations.forEach((violation) =>
this.$toast.open({ message: violation }), this.$toast.open({ message: violation }),
); );
@@ -370,7 +406,10 @@ 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("fetchInfoForPerson", person); this.$store.dispatch(
"fetchInfoForPerson",
person,
);
} }
} else { } else {
//console.log(' @@> create link mode event') //console.log(' @@> create link mode event')
@@ -379,9 +418,14 @@ export default {
break; break;
case "household": case "household":
let household = this.nodes.filter((n) => n.id === node)[0]; let household = this.nodes.filter(
(n) => n.id === node,
)[0];
//console.log('@@@@@@ event on selected Node', household.id) //console.log('@@@@@@ event on selected Node', household.id)
this.$store.dispatch("unfoldPersonsByHousehold", household); this.$store.dispatch(
"unfoldPersonsByHousehold",
household,
);
break; break;
case "accompanying_period": case "accompanying_period":
@@ -554,7 +598,10 @@ 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("addLinkFromRelationship", relationship); this.$store.dispatch(
"addLinkFromRelationship",
relationship,
);
this.modal.showModal = false; this.modal.showModal = false;
this.resetForm(); this.resetForm();
this.forceUpdateComponent(); this.forceUpdateComponent();
@@ -568,7 +615,9 @@ export default {
console.log(v); console.log(v);
} }
} else { } else {
this.$toast.open({ message: "An error occurred" }); this.$toast.open({
message: "An error occurred",
});
} }
}); });
@@ -578,7 +627,10 @@ 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("updateLink", relationship); this.$store.commit(
"updateLink",
relationship,
);
this.modal.showModal = false; this.modal.showModal = false;
this.resetForm(); this.resetForm();
this.forceUpdateComponent(); this.forceUpdateComponent();

View File

@@ -2,7 +2,8 @@ const personMessages = {
fr: { fr: {
add_persons: { add_persons: {
title: "Ajouter des usagers", title: "Ajouter des usagers",
suggested_counter: "Pas de résultats | 1 résultat | {count} résultats", suggested_counter:
"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..",
}, },