mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-12 03:46:16 +00:00
Merge branch 'eslint-fix-issues-2025-07' into 'master'
Fix Eslint issues See merge request Chill-Projet/chill-bundles!853
This commit is contained in:
commit
c4cc0baa8e
@ -2,7 +2,7 @@ import "es6-promise/auto";
|
|||||||
import { createStore } from "vuex";
|
import { createStore } from "vuex";
|
||||||
import { postLocation } from "./api";
|
import { postLocation } from "./api";
|
||||||
import prepareLocations from "./store.locations.js";
|
import prepareLocations from "./store.locations.js";
|
||||||
import {fetchResults, makeFetch} from "ChillMainAssets/lib/api/apiMethods";
|
import { fetchResults, makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
|
|
||||||
const debug = process.env.NODE_ENV !== "production";
|
const debug = process.env.NODE_ENV !== "production";
|
||||||
//console.log('window.activity', window.activity);
|
//console.log('window.activity', window.activity);
|
||||||
@ -369,7 +369,7 @@ const store = createStore({
|
|||||||
// console.log('works', works);
|
// console.log('works', works);
|
||||||
commit("setAccompanyingPeriodWorks", works);
|
commit("setAccompanyingPeriodWorks", works);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to fetch works:', error);
|
console.error("Failed to fetch works:", error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getWhoAmI({ commit }) {
|
getWhoAmI({ commit }) {
|
||||||
|
@ -18,7 +18,6 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
|
|||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
use function count;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command to get the report with curl:
|
* Command to get the report with curl:
|
||||||
|
@ -17,7 +17,6 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
|||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
use function count;
|
|
||||||
|
|
||||||
// command to get the report with curl : curl --user "center a_social:password" "http://localhost:8000/fr/exports/generate/count_person?export[filters][person_gender_filter][enabled]=&export[filters][person_nationality_filter][enabled]=&export[filters][person_nationality_filter][form][nationalities]=&export[aggregators][person_nationality_aggregator][order]=1&export[aggregators][person_nationality_aggregator][form][group_by_level]=country&export[submit]=&export[_token]=RHpjHl389GrK-bd6iY5NsEqrD5UKOTHH40QKE9J1edU" --globoff
|
// command to get the report with curl : curl --user "center a_social:password" "http://localhost:8000/fr/exports/generate/count_person?export[filters][person_gender_filter][enabled]=&export[filters][person_nationality_filter][enabled]=&export[filters][person_nationality_filter][form][nationalities]=&export[aggregators][person_nationality_aggregator][order]=1&export[aggregators][person_nationality_aggregator][form][group_by_level]=country&export[submit]=&export[_token]=RHpjHl389GrK-bd6iY5NsEqrD5UKOTHH40QKE9J1edU" --globoff
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
|||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
use function count;
|
|
||||||
|
|
||||||
// command to get the report with curl : curl --user "center a_social:password" "http://localhost:8000/fr/exports/generate/count_person?export[filters][person_gender_filter][enabled]=&export[filters][person_nationality_filter][enabled]=&export[filters][person_nationality_filter][form][nationalities]=&export[aggregators][person_nationality_aggregator][order]=1&export[aggregators][person_nationality_aggregator][form][group_by_level]=country&export[submit]=&export[_token]=RHpjHl389GrK-bd6iY5NsEqrD5UKOTHH40QKE9J1edU" --globoff
|
// command to get the report with curl : curl --user "center a_social:password" "http://localhost:8000/fr/exports/generate/count_person?export[filters][person_gender_filter][enabled]=&export[filters][person_nationality_filter][enabled]=&export[filters][person_nationality_filter][form][nationalities]=&export[aggregators][person_nationality_aggregator][order]=1&export[aggregators][person_nationality_aggregator][form][group_by_level]=country&export[submit]=&export[_token]=RHpjHl389GrK-bd6iY5NsEqrD5UKOTHH40QKE9J1edU" --globoff
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class CancelStaleWorkflowHandlerTest extends TestCase
|
|||||||
|
|
||||||
$em = $this->prophesize(EntityManagerInterface::class);
|
$em = $this->prophesize(EntityManagerInterface::class);
|
||||||
$em->flush()->shouldBeCalled();
|
$em->flush()->shouldBeCalled();
|
||||||
$em->remove($workflow)->shouldBeCalled();
|
$em->remove($workflow)->shouldNotBeCalled();
|
||||||
|
|
||||||
$handler = $this->buildHandler($workflow, $em->reveal(), $clock);
|
$handler = $this->buildHandler($workflow, $em->reveal(), $clock);
|
||||||
|
|
||||||
|
@ -27,7 +27,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
throw "accompanying period id not found";
|
throw "accompanying period id not found";
|
||||||
}
|
}
|
||||||
|
|
||||||
const accompanyingPeriodId = Number.parseInt(accompanyingPeriodIdAsString);
|
const accompanyingPeriodId = Number.parseInt(
|
||||||
|
accompanyingPeriodIdAsString,
|
||||||
|
);
|
||||||
|
|
||||||
const app = createApp({
|
const app = createApp({
|
||||||
template:
|
template:
|
||||||
|
@ -279,7 +279,7 @@ export default {
|
|||||||
(results) =>
|
(results) =>
|
||||||
([this.results.options, this.results.value] =
|
([this.results.options, this.results.value] =
|
||||||
this.removeElementInData("results", results)),
|
this.removeElementInData("results", results)),
|
||||||
).catch;
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
// selectResult(value) {
|
// selectResult(value) {
|
||||||
|
@ -294,10 +294,13 @@ export default {
|
|||||||
refreshNetwork() {
|
refreshNetwork() {
|
||||||
//console.log('--- refresh network')
|
//console.log('--- refresh network')
|
||||||
window.network.setData(this.visgraph_data);
|
window.network.setData(this.visgraph_data);
|
||||||
|
|
||||||
|
return 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
legendLayers() {
|
legendLayers() {
|
||||||
//console.log('--- refresh legend and rebuild checked Layers')
|
//console.log('--- refresh legend and rebuild checked Layers')
|
||||||
|
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||||
this.checkedLayers = [];
|
this.checkedLayers = [];
|
||||||
let layersDisplayed = [
|
let layersDisplayed = [
|
||||||
...this.nodes.filter((n) => n.id.startsWith("household")),
|
...this.nodes.filter((n) => n.id.startsWith("household")),
|
||||||
@ -309,6 +312,7 @@ export default {
|
|||||||
return [...this.households, ...this.courses];
|
return [...this.households, ...this.courses];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
checkedLayers() {
|
checkedLayers() {
|
||||||
// required to refresh data checkedLayers
|
// required to refresh data checkedLayers
|
||||||
//console.log('--- checkedLayers')
|
//console.log('--- checkedLayers')
|
||||||
@ -386,6 +390,7 @@ export default {
|
|||||||
},
|
},
|
||||||
forceUpdateComponent() {
|
forceUpdateComponent() {
|
||||||
//console.log('!! forceUpdateComponent !!')
|
//console.log('!! forceUpdateComponent !!')
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
this.refreshNetwork;
|
this.refreshNetwork;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
|
@ -164,7 +164,8 @@ const store = createStore({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let age = getAge(person);
|
let age = getAge(person);
|
||||||
age = age === "" ? "" : " - " + age;
|
let separator = person.gender === null ? "" : " - ";
|
||||||
|
age = age === "" ? "" : separator + age;
|
||||||
|
|
||||||
let debug = "";
|
let debug = "";
|
||||||
/// Debug mode: uncomment to display person_id on visgraph
|
/// Debug mode: uncomment to display person_id on visgraph
|
||||||
@ -173,7 +174,7 @@ const store = createStore({
|
|||||||
person.group = person.type;
|
person.group = person.type;
|
||||||
person._id = person.id;
|
person._id = person.id;
|
||||||
person.id = `person_${person.id}`;
|
person.id = `person_${person.id}`;
|
||||||
person.label = `*${person.text}${person.deathdate ? " (‡)" : ""}*\n_${person.gender.label}${age}_${debug}`;
|
person.label = `*${person.text}${person.deathdate ? " (‡)" : ""}*\n_${person.gender === null ? "" : person.gender?.label}${age}_${debug}`;
|
||||||
person.folded = false;
|
person.folded = false;
|
||||||
// folded is used for missing persons
|
// folded is used for missing persons
|
||||||
if (options.folded) {
|
if (options.folded) {
|
||||||
|
@ -14,14 +14,22 @@
|
|||||||
<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>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<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>
|
||||||
</li>
|
</li>
|
||||||
@ -49,9 +57,9 @@ const formatDate = (dateObject: DateTime) => {
|
|||||||
if (dateObject) {
|
if (dateObject) {
|
||||||
const parsedDate = ISOToDate(dateObject.datetime);
|
const parsedDate = ISOToDate(dateObject.datetime);
|
||||||
if (parsedDate) {
|
if (parsedDate) {
|
||||||
return new Intl.DateTimeFormat("default", { dateStyle: "short" }).format(
|
return new Intl.DateTimeFormat("default", {
|
||||||
parsedDate,
|
dateStyle: "short",
|
||||||
);
|
}).format(parsedDate);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,11 @@
|
|||||||
<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 @click="selectedAcpw = null" class="chill-denomination">{{
|
<span
|
||||||
selectedAcpw?.socialAction?.title.fr
|
@click="selectedAcpw = null"
|
||||||
}}</span>
|
class="chill-denomination"
|
||||||
|
>{{ selectedAcpw?.socialAction?.title.fr }}</span
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -27,7 +29,13 @@
|
|||||||
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<h3>{{ trans(ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK) }}</h3>
|
<h3>
|
||||||
|
{{
|
||||||
|
trans(
|
||||||
|
ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK,
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</h3>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #body>
|
<template #body>
|
||||||
@ -38,7 +46,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<button type="button" class="btn btn-save" @click="confirmSelection">
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-save"
|
||||||
|
@click="confirmSelection"
|
||||||
|
>
|
||||||
{{ trans(CONFIRM) }}
|
{{ trans(CONFIRM) }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
@ -48,12 +60,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {onMounted, ref} from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||||
import AccompanyingPeriodWorkList from "./AccompanyingPeriodWorkList.vue";
|
import AccompanyingPeriodWorkList from "./AccompanyingPeriodWorkList.vue";
|
||||||
import {AccompanyingPeriodWork} from "../../../types";
|
import { AccompanyingPeriodWork } from "../../../types";
|
||||||
import {ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK, CONFIRM, trans,} from "translator";
|
import {
|
||||||
import {fetchResults} from "ChillMainAssets/lib/api/apiMethods";
|
ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK,
|
||||||
|
CONFIRM,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
import { fetchResults } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
|
|
||||||
interface AccompanyingPeriodWorkSelectorModalProps {
|
interface AccompanyingPeriodWorkSelectorModalProps {
|
||||||
accompanyingPeriodId: number;
|
accompanyingPeriodId: number;
|
||||||
@ -83,7 +99,7 @@ const getAccompanyingPeriodWorks = async (periodId: number) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
/* makeFetch<number, AccompanyingPeriodWork[]>("GET", url)
|
/* makeFetch<number, AccompanyingPeriodWork[]>("GET", url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
accompanyingPeriodWorks.value = response;
|
accompanyingPeriodWorks.value = response;
|
||||||
})
|
})
|
||||||
|
@ -377,7 +377,7 @@ export default {
|
|||||||
"/api/1.0/person/household/members/move.json",
|
"/api/1.0/person/household/members/move.json",
|
||||||
member,
|
member,
|
||||||
)
|
)
|
||||||
.then((_response) => {
|
.then(() => {
|
||||||
makeFetch(
|
makeFetch(
|
||||||
"POST",
|
"POST",
|
||||||
`/api/1.0/person/household/${responseHousehold.id}/address.json`,
|
`/api/1.0/person/household/${responseHousehold.id}/address.json`,
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { is_object_ready } from "../../../../../../ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers";
|
import { is_object_ready } from "ChillDocStoreAssets/vuejs/StoredObjectButton/helpers";
|
||||||
import {
|
import { StoredObject } from "ChillDocStoreAssets/types";
|
||||||
StoredObject,
|
|
||||||
} from "../../../../../../ChillDocStoreBundle/Resources/public/types";
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
stored_object: string | undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function reload_if_needed(
|
async function reload_if_needed(
|
||||||
stored_object: StoredObject,
|
stored_object: StoredObject,
|
||||||
@ -25,14 +29,12 @@ function wait_before_reload(stored_object: StoredObject, i: number): void {
|
|||||||
setTimeout(reload_if_needed, timeout, stored_object, i);
|
setTimeout(reload_if_needed, timeout, stored_object, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", async function (e) {
|
window.addEventListener("DOMContentLoaded", async function () {
|
||||||
if (undefined === (window as any).stored_object) {
|
if (undefined === window.stored_object) {
|
||||||
console.error("window.stored_object is undefined");
|
console.error("window.stored_object is undefined");
|
||||||
throw Error("window.stored_object is undefined");
|
throw Error("window.stored_object is undefined");
|
||||||
}
|
}
|
||||||
|
|
||||||
const stored_object = JSON.parse(
|
const stored_object = JSON.parse(window.stored_object) as StoredObject;
|
||||||
(window as any).stored_object,
|
|
||||||
) as StoredObject;
|
|
||||||
reload_if_needed(stored_object, 0);
|
reload_if_needed(stored_object, 0);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user