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
@ -369,7 +369,7 @@ const store = createStore({
|
||||
// console.log('works', works);
|
||||
commit("setAccompanyingPeriodWorks", works);
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch works:', error);
|
||||
console.error("Failed to fetch works:", error);
|
||||
}
|
||||
},
|
||||
getWhoAmI({ commit }) {
|
||||
|
@ -18,7 +18,6 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* 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\HttpFoundation\Response;
|
||||
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
|
||||
|
||||
|
@ -21,7 +21,6 @@ use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
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
|
||||
|
||||
|
@ -98,7 +98,7 @@ class CancelStaleWorkflowHandlerTest extends TestCase
|
||||
|
||||
$em = $this->prophesize(EntityManagerInterface::class);
|
||||
$em->flush()->shouldBeCalled();
|
||||
$em->remove($workflow)->shouldBeCalled();
|
||||
$em->remove($workflow)->shouldNotBeCalled();
|
||||
|
||||
$handler = $this->buildHandler($workflow, $em->reveal(), $clock);
|
||||
|
||||
|
@ -27,7 +27,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
throw "accompanying period id not found";
|
||||
}
|
||||
|
||||
const accompanyingPeriodId = Number.parseInt(accompanyingPeriodIdAsString);
|
||||
const accompanyingPeriodId = Number.parseInt(
|
||||
accompanyingPeriodIdAsString,
|
||||
);
|
||||
|
||||
const app = createApp({
|
||||
template:
|
||||
|
@ -279,7 +279,7 @@ export default {
|
||||
(results) =>
|
||||
([this.results.options, this.results.value] =
|
||||
this.removeElementInData("results", results)),
|
||||
).catch;
|
||||
);
|
||||
},
|
||||
|
||||
// selectResult(value) {
|
||||
|
@ -294,10 +294,13 @@ export default {
|
||||
refreshNetwork() {
|
||||
//console.log('--- refresh network')
|
||||
window.network.setData(this.visgraph_data);
|
||||
|
||||
return 1;
|
||||
},
|
||||
|
||||
legendLayers() {
|
||||
//console.log('--- refresh legend and rebuild checked Layers')
|
||||
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
||||
this.checkedLayers = [];
|
||||
let layersDisplayed = [
|
||||
...this.nodes.filter((n) => n.id.startsWith("household")),
|
||||
@ -309,6 +312,7 @@ export default {
|
||||
return [...this.households, ...this.courses];
|
||||
},
|
||||
|
||||
// eslint-disable-next-line vue/no-dupe-keys
|
||||
checkedLayers() {
|
||||
// required to refresh data checkedLayers
|
||||
//console.log('--- checkedLayers')
|
||||
@ -386,6 +390,7 @@ export default {
|
||||
},
|
||||
forceUpdateComponent() {
|
||||
//console.log('!! forceUpdateComponent !!')
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
this.refreshNetwork;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
@ -164,7 +164,8 @@ const store = createStore({
|
||||
return;
|
||||
}
|
||||
let age = getAge(person);
|
||||
age = age === "" ? "" : " - " + age;
|
||||
let separator = person.gender === null ? "" : " - ";
|
||||
age = age === "" ? "" : separator + age;
|
||||
|
||||
let debug = "";
|
||||
/// Debug mode: uncomment to display person_id on visgraph
|
||||
@ -173,7 +174,7 @@ const store = createStore({
|
||||
person.group = person.type;
|
||||
person._id = 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;
|
||||
// folded is used for missing persons
|
||||
if (options.folded) {
|
||||
|
@ -14,14 +14,22 @@
|
||||
<ul class="small_in_title columns mt-1">
|
||||
<li>
|
||||
<span class="item-key">
|
||||
{{ trans(ACCOMPANYING_COURSE_WORK_START_DATE) }} :
|
||||
{{
|
||||
trans(
|
||||
ACCOMPANYING_COURSE_WORK_START_DATE,
|
||||
)
|
||||
}}
|
||||
:
|
||||
</span>
|
||||
<b>{{ formatDate(acpw.startDate) }}</b>
|
||||
</li>
|
||||
|
||||
<li v-if="acpw.endDate">
|
||||
<span class="item-key">
|
||||
{{ trans(ACCOMPANYING_COURSE_WORK_END_DATE) }} :
|
||||
{{
|
||||
trans(ACCOMPANYING_COURSE_WORK_END_DATE)
|
||||
}}
|
||||
:
|
||||
</span>
|
||||
<b>{{ formatDate(acpw.endDate) }}</b>
|
||||
</li>
|
||||
@ -49,9 +57,9 @@ const formatDate = (dateObject: DateTime) => {
|
||||
if (dateObject) {
|
||||
const parsedDate = ISOToDate(dateObject.datetime);
|
||||
if (parsedDate) {
|
||||
return new Intl.DateTimeFormat("default", { dateStyle: "short" }).format(
|
||||
parsedDate,
|
||||
);
|
||||
return new Intl.DateTimeFormat("default", {
|
||||
dateStyle: "short",
|
||||
}).format(parsedDate);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
@ -4,9 +4,11 @@
|
||||
<div class="col-md-6 col-sm-10" v-if="selectedAcpw">
|
||||
<ul class="list-suggest remove-items">
|
||||
<li>
|
||||
<span @click="selectedAcpw = null" class="chill-denomination">{{
|
||||
selectedAcpw?.socialAction?.title.fr
|
||||
}}</span>
|
||||
<span
|
||||
@click="selectedAcpw = null"
|
||||
class="chill-denomination"
|
||||
>{{ selectedAcpw?.socialAction?.title.fr }}</span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -27,7 +29,13 @@
|
||||
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
||||
>
|
||||
<template #header>
|
||||
<h3>{{ trans(ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK) }}</h3>
|
||||
<h3>
|
||||
{{
|
||||
trans(
|
||||
ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK,
|
||||
)
|
||||
}}
|
||||
</h3>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
@ -38,7 +46,11 @@
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-save" @click="confirmSelection">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-save"
|
||||
@click="confirmSelection"
|
||||
>
|
||||
{{ trans(CONFIRM) }}
|
||||
</button>
|
||||
</template>
|
||||
@ -52,7 +64,11 @@ import {onMounted, ref} from "vue";
|
||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||
import AccompanyingPeriodWorkList from "./AccompanyingPeriodWorkList.vue";
|
||||
import { AccompanyingPeriodWork } from "../../../types";
|
||||
import {ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK, CONFIRM, trans,} from "translator";
|
||||
import {
|
||||
ACPW_DUPLICATE_SELECT_ACCOMPANYING_PERIOD_WORK,
|
||||
CONFIRM,
|
||||
trans,
|
||||
} from "translator";
|
||||
import { fetchResults } from "ChillMainAssets/lib/api/apiMethods";
|
||||
|
||||
interface AccompanyingPeriodWorkSelectorModalProps {
|
||||
|
@ -377,7 +377,7 @@ export default {
|
||||
"/api/1.0/person/household/members/move.json",
|
||||
member,
|
||||
)
|
||||
.then((_response) => {
|
||||
.then(() => {
|
||||
makeFetch(
|
||||
"POST",
|
||||
`/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 {
|
||||
StoredObject,
|
||||
} from "../../../../../../ChillDocStoreBundle/Resources/public/types";
|
||||
import { is_object_ready } from "ChillDocStoreAssets/vuejs/StoredObjectButton/helpers";
|
||||
import { StoredObject } from "ChillDocStoreAssets/types";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
stored_object: string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async function reload_if_needed(
|
||||
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);
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", async function (e) {
|
||||
if (undefined === (window as any).stored_object) {
|
||||
window.addEventListener("DOMContentLoaded", async function () {
|
||||
if (undefined === window.stored_object) {
|
||||
console.error("window.stored_object is undefined");
|
||||
throw Error("window.stored_object is undefined");
|
||||
}
|
||||
|
||||
const stored_object = JSON.parse(
|
||||
(window as any).stored_object,
|
||||
) as StoredObject;
|
||||
const stored_object = JSON.parse(window.stored_object) as StoredObject;
|
||||
reload_if_needed(stored_object, 0);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user