mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'master' into 285-cancel-calendar
This commit is contained in:
commit
8941016038
6
.changes/v3.10.0.md
Normal file
6
.changes/v3.10.0.md
Normal file
@ -0,0 +1,6 @@
|
||||
## v3.10.0 - 2025-03-17
|
||||
### Feature
|
||||
* ([#363](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/363)) Display social actions grouped per social issue within activity form
|
||||
### Fixed
|
||||
* ([#362](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/362)) Fix Dependency Injection, which prevented to save the CalendarRange
|
||||
* ([#368](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/368)) fix search query for user groups
|
3
.changes/v3.10.1.md
Normal file
3
.changes/v3.10.1.md
Normal file
@ -0,0 +1,3 @@
|
||||
## v3.10.1 - 2025-03-17
|
||||
### DX
|
||||
* Remove yarn dependency to symfony/ux-translator, to ease the build process
|
3
.changes/v3.10.2.md
Normal file
3
.changes/v3.10.2.md
Normal file
@ -0,0 +1,3 @@
|
||||
## v3.10.2 - 2025-03-17
|
||||
### Fixed
|
||||
* Replace a ts-expect-error with a ts-ignore
|
3
.changes/v3.10.3.md
Normal file
3
.changes/v3.10.3.md
Normal file
@ -0,0 +1,3 @@
|
||||
## v3.10.3 - 2025-03-18
|
||||
### DX
|
||||
* Eslint fixes
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,6 +13,7 @@ docker/rabbitmq/data
|
||||
# in this development bundle, we want to ignore directories related to a real app
|
||||
assets/*
|
||||
!assets/translator.ts
|
||||
!assets/ux-translator
|
||||
migrations/*
|
||||
templates/*
|
||||
translations/*
|
||||
|
19
CHANGELOG.md
19
CHANGELOG.md
@ -6,6 +6,25 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v3.10.3 - 2025-03-18
|
||||
### DX
|
||||
* Eslint fixes
|
||||
|
||||
## v3.10.2 - 2025-03-17
|
||||
### Fixed
|
||||
* Replace a ts-expect-error with a ts-ignore
|
||||
|
||||
## v3.10.1 - 2025-03-17
|
||||
### DX
|
||||
* Remove yarn dependency to symfony/ux-translator, to ease the build process
|
||||
|
||||
## v3.10.0 - 2025-03-17
|
||||
### Feature
|
||||
* ([#363](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/363)) Display social actions grouped per social issue within activity form
|
||||
### Fixed
|
||||
* ([#362](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/362)) Fix Dependency Injection, which prevented to save the CalendarRange
|
||||
* ([#368](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/368)) fix search query for user groups
|
||||
|
||||
## v3.9.2 - 2025-02-27
|
||||
### Fixed
|
||||
* Use fetchResults method to fetch all social issues instead of only the first page
|
||||
|
@ -1,9 +1,7 @@
|
||||
// @ts-ignore Cannot find module (when used within an app)
|
||||
import { trans, getLocale, setLocale, setLocaleFallbacks } from "@symfony/ux-translator";
|
||||
import { trans, setLocale, setLocaleFallbacks } from "./ux-translator";
|
||||
|
||||
setLocaleFallbacks({"en": "fr", "nl": "fr", "fr": "en"});
|
||||
setLocale('fr');
|
||||
|
||||
export { trans };
|
||||
// @ts-ignore Cannot find module (when used within an app)
|
||||
export * from '../var/translations';
|
||||
|
3
assets/ux-translator/README.md
Normal file
3
assets/ux-translator/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
This directory import the symfony ux-translator files directly into chill-bundles.
|
||||
|
||||
This remove the yarn dependencies from the real package, which breaks our installation.
|
1
assets/ux-translator/dist/formatters/formatter.d.ts
vendored
Normal file
1
assets/ux-translator/dist/formatters/formatter.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function format(id: string, parameters: Record<string, string | number>, locale: string): string;
|
1
assets/ux-translator/dist/formatters/intl-formatter.d.ts
vendored
Normal file
1
assets/ux-translator/dist/formatters/intl-formatter.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function formatIntl(id: string, parameters: Record<string, string | number>, locale: string): string;
|
27
assets/ux-translator/dist/translator.d.ts
vendored
Normal file
27
assets/ux-translator/dist/translator.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
export type DomainType = string;
|
||||
export type LocaleType = string;
|
||||
export type TranslationsType = Record<DomainType, {
|
||||
parameters: ParametersType;
|
||||
}>;
|
||||
export type NoParametersType = Record<string, never>;
|
||||
export type ParametersType = Record<string, string | number | Date> | NoParametersType;
|
||||
export type RemoveIntlIcuSuffix<T> = T extends `${infer U}+intl-icu` ? U : T;
|
||||
export type DomainsOf<M> = M extends Message<infer Translations, LocaleType> ? keyof Translations : never;
|
||||
export type LocaleOf<M> = M extends Message<TranslationsType, infer Locale> ? Locale : never;
|
||||
export type ParametersOf<M, D extends DomainType> = M extends Message<infer Translations, LocaleType> ? Translations[D] extends {
|
||||
parameters: infer Parameters;
|
||||
} ? Parameters : never : never;
|
||||
export interface Message<Translations extends TranslationsType, Locale extends LocaleType> {
|
||||
id: string;
|
||||
translations: {
|
||||
[domain in DomainType]: {
|
||||
[locale in Locale]: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
export declare function setLocale(locale: LocaleType | null): void;
|
||||
export declare function getLocale(): LocaleType;
|
||||
export declare function throwWhenNotFound(enabled: boolean): void;
|
||||
export declare function setLocaleFallbacks(localeFallbacks: Record<LocaleType, LocaleType>): void;
|
||||
export declare function getLocaleFallbacks(): Record<LocaleType, LocaleType>;
|
||||
export declare function trans<M extends Message<TranslationsType, LocaleType>, D extends DomainsOf<M>, P extends ParametersOf<M, D>>(...args: P extends NoParametersType ? [message: M, parameters?: P, domain?: RemoveIntlIcuSuffix<D>, locale?: LocaleOf<M>] : [message: M, parameters: P, domain?: RemoveIntlIcuSuffix<D>, locale?: LocaleOf<M>]): string;
|
1
assets/ux-translator/dist/translator_controller.d.ts
vendored
Normal file
1
assets/ux-translator/dist/translator_controller.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './translator';
|
283
assets/ux-translator/dist/translator_controller.js
vendored
Normal file
283
assets/ux-translator/dist/translator_controller.js
vendored
Normal file
@ -0,0 +1,283 @@
|
||||
import { IntlMessageFormat } from 'intl-messageformat';
|
||||
|
||||
function strtr(string, replacePairs) {
|
||||
const regex = Object.entries(replacePairs).map(([from]) => {
|
||||
return from.replace(/([-[\]{}()*+?.\\^$|#,])/g, '\\$1');
|
||||
});
|
||||
if (regex.length === 0) {
|
||||
return string;
|
||||
}
|
||||
return string.replace(new RegExp(regex.join('|'), 'g'), (matched) => replacePairs[matched].toString());
|
||||
}
|
||||
|
||||
function format(id, parameters, locale) {
|
||||
if (null === id || '' === id) {
|
||||
return '';
|
||||
}
|
||||
if (typeof parameters['%count%'] === 'undefined' || Number.isNaN(parameters['%count%'])) {
|
||||
return strtr(id, parameters);
|
||||
}
|
||||
const number = Number(parameters['%count%']);
|
||||
let parts = [];
|
||||
if (/^\|+$/.test(id)) {
|
||||
parts = id.split('|');
|
||||
}
|
||||
else {
|
||||
parts = id.match(/(?:\|\||[^|])+/g) || [];
|
||||
}
|
||||
const intervalRegex = /^(?<interval>({\s*(-?\d+(\.\d+)?[\s*,\s*\-?\d+(.\d+)?]*)\s*})|(?<left_delimiter>[[\]])\s*(?<left>-Inf|-?\d+(\.\d+)?)\s*,\s*(?<right>\+?Inf|-?\d+(\.\d+)?)\s*(?<right_delimiter>[[\]]))\s*(?<message>.*?)$/s;
|
||||
const standardRules = [];
|
||||
for (let part of parts) {
|
||||
part = part.trim().replace(/\|\|/g, '|');
|
||||
const matches = part.match(intervalRegex);
|
||||
if (matches) {
|
||||
const matchGroups = matches.groups || {};
|
||||
if (matches[2]) {
|
||||
for (const n of matches[3].split(',')) {
|
||||
if (number === Number(n)) {
|
||||
return strtr(matchGroups.message, parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
const leftNumber = '-Inf' === matchGroups.left ? Number.NEGATIVE_INFINITY : Number(matchGroups.left);
|
||||
const rightNumber = ['Inf', '+Inf'].includes(matchGroups.right)
|
||||
? Number.POSITIVE_INFINITY
|
||||
: Number(matchGroups.right);
|
||||
if (('[' === matchGroups.left_delimiter ? number >= leftNumber : number > leftNumber) &&
|
||||
(']' === matchGroups.right_delimiter ? number <= rightNumber : number < rightNumber)) {
|
||||
return strtr(matchGroups.message, parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
const ruleMatch = part.match(/^\w+:\s*(.*?)$/);
|
||||
standardRules.push(ruleMatch ? ruleMatch[1] : part);
|
||||
}
|
||||
}
|
||||
const position = getPluralizationRule(number, locale);
|
||||
if (typeof standardRules[position] === 'undefined') {
|
||||
if (1 === parts.length && typeof standardRules[0] !== 'undefined') {
|
||||
return strtr(standardRules[0], parameters);
|
||||
}
|
||||
throw new Error(`Unable to choose a translation for "${id}" with locale "${locale}" for value "${number}". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %count% apples").`);
|
||||
}
|
||||
return strtr(standardRules[position], parameters);
|
||||
}
|
||||
function getPluralizationRule(number, locale) {
|
||||
number = Math.abs(number);
|
||||
let _locale = locale;
|
||||
if (locale === 'pt_BR' || locale === 'en_US_POSIX') {
|
||||
return 0;
|
||||
}
|
||||
_locale = _locale.length > 3 ? _locale.substring(0, _locale.indexOf('_')) : _locale;
|
||||
switch (_locale) {
|
||||
case 'af':
|
||||
case 'bn':
|
||||
case 'bg':
|
||||
case 'ca':
|
||||
case 'da':
|
||||
case 'de':
|
||||
case 'el':
|
||||
case 'en':
|
||||
case 'en_US_POSIX':
|
||||
case 'eo':
|
||||
case 'es':
|
||||
case 'et':
|
||||
case 'eu':
|
||||
case 'fa':
|
||||
case 'fi':
|
||||
case 'fo':
|
||||
case 'fur':
|
||||
case 'fy':
|
||||
case 'gl':
|
||||
case 'gu':
|
||||
case 'ha':
|
||||
case 'he':
|
||||
case 'hu':
|
||||
case 'is':
|
||||
case 'it':
|
||||
case 'ku':
|
||||
case 'lb':
|
||||
case 'ml':
|
||||
case 'mn':
|
||||
case 'mr':
|
||||
case 'nah':
|
||||
case 'nb':
|
||||
case 'ne':
|
||||
case 'nl':
|
||||
case 'nn':
|
||||
case 'no':
|
||||
case 'oc':
|
||||
case 'om':
|
||||
case 'or':
|
||||
case 'pa':
|
||||
case 'pap':
|
||||
case 'ps':
|
||||
case 'pt':
|
||||
case 'so':
|
||||
case 'sq':
|
||||
case 'sv':
|
||||
case 'sw':
|
||||
case 'ta':
|
||||
case 'te':
|
||||
case 'tk':
|
||||
case 'ur':
|
||||
case 'zu':
|
||||
return 1 === number ? 0 : 1;
|
||||
case 'am':
|
||||
case 'bh':
|
||||
case 'fil':
|
||||
case 'fr':
|
||||
case 'gun':
|
||||
case 'hi':
|
||||
case 'hy':
|
||||
case 'ln':
|
||||
case 'mg':
|
||||
case 'nso':
|
||||
case 'pt_BR':
|
||||
case 'ti':
|
||||
case 'wa':
|
||||
return number < 2 ? 0 : 1;
|
||||
case 'be':
|
||||
case 'bs':
|
||||
case 'hr':
|
||||
case 'ru':
|
||||
case 'sh':
|
||||
case 'sr':
|
||||
case 'uk':
|
||||
return 1 === number % 10 && 11 !== number % 100
|
||||
? 0
|
||||
: number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)
|
||||
? 1
|
||||
: 2;
|
||||
case 'cs':
|
||||
case 'sk':
|
||||
return 1 === number ? 0 : number >= 2 && number <= 4 ? 1 : 2;
|
||||
case 'ga':
|
||||
return 1 === number ? 0 : 2 === number ? 1 : 2;
|
||||
case 'lt':
|
||||
return 1 === number % 10 && 11 !== number % 100
|
||||
? 0
|
||||
: number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20)
|
||||
? 1
|
||||
: 2;
|
||||
case 'sl':
|
||||
return 1 === number % 100 ? 0 : 2 === number % 100 ? 1 : 3 === number % 100 || 4 === number % 100 ? 2 : 3;
|
||||
case 'mk':
|
||||
return 1 === number % 10 ? 0 : 1;
|
||||
case 'mt':
|
||||
return 1 === number
|
||||
? 0
|
||||
: 0 === number || (number % 100 > 1 && number % 100 < 11)
|
||||
? 1
|
||||
: number % 100 > 10 && number % 100 < 20
|
||||
? 2
|
||||
: 3;
|
||||
case 'lv':
|
||||
return 0 === number ? 0 : 1 === number % 10 && 11 !== number % 100 ? 1 : 2;
|
||||
case 'pl':
|
||||
return 1 === number
|
||||
? 0
|
||||
: number % 10 >= 2 && number % 10 <= 4 && (number % 100 < 12 || number % 100 > 14)
|
||||
? 1
|
||||
: 2;
|
||||
case 'cy':
|
||||
return 1 === number ? 0 : 2 === number ? 1 : 8 === number || 11 === number ? 2 : 3;
|
||||
case 'ro':
|
||||
return 1 === number ? 0 : 0 === number || (number % 100 > 0 && number % 100 < 20) ? 1 : 2;
|
||||
case 'ar':
|
||||
return 0 === number
|
||||
? 0
|
||||
: 1 === number
|
||||
? 1
|
||||
: 2 === number
|
||||
? 2
|
||||
: number % 100 >= 3 && number % 100 <= 10
|
||||
? 3
|
||||
: number % 100 >= 11 && number % 100 <= 99
|
||||
? 4
|
||||
: 5;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function formatIntl(id, parameters, locale) {
|
||||
if (id === '') {
|
||||
return '';
|
||||
}
|
||||
const intlMessage = new IntlMessageFormat(id, [locale.replace('_', '-')], undefined, { ignoreTag: true });
|
||||
parameters = { ...parameters };
|
||||
Object.entries(parameters).forEach(([key, value]) => {
|
||||
if (key.includes('%') || key.includes('{')) {
|
||||
delete parameters[key];
|
||||
parameters[key.replace(/[%{} ]/g, '').trim()] = value;
|
||||
}
|
||||
});
|
||||
return intlMessage.format(parameters);
|
||||
}
|
||||
|
||||
let _locale = null;
|
||||
let _localeFallbacks = {};
|
||||
let _throwWhenNotFound = false;
|
||||
function setLocale(locale) {
|
||||
_locale = locale;
|
||||
}
|
||||
function getLocale() {
|
||||
return (_locale ||
|
||||
document.documentElement.getAttribute('data-symfony-ux-translator-locale') ||
|
||||
(document.documentElement.lang ? document.documentElement.lang.replace('-', '_') : null) ||
|
||||
'en');
|
||||
}
|
||||
function throwWhenNotFound(enabled) {
|
||||
_throwWhenNotFound = enabled;
|
||||
}
|
||||
function setLocaleFallbacks(localeFallbacks) {
|
||||
_localeFallbacks = localeFallbacks;
|
||||
}
|
||||
function getLocaleFallbacks() {
|
||||
return _localeFallbacks;
|
||||
}
|
||||
function trans(message, parameters = {}, domain = 'messages', locale = null) {
|
||||
if (typeof domain === 'undefined') {
|
||||
domain = 'messages';
|
||||
}
|
||||
if (typeof locale === 'undefined' || null === locale) {
|
||||
locale = getLocale();
|
||||
}
|
||||
if (typeof message.translations === 'undefined') {
|
||||
return message.id;
|
||||
}
|
||||
const localesFallbacks = getLocaleFallbacks();
|
||||
const translationsIntl = message.translations[`${domain}+intl-icu`];
|
||||
if (typeof translationsIntl !== 'undefined') {
|
||||
while (typeof translationsIntl[locale] === 'undefined') {
|
||||
locale = localesFallbacks[locale];
|
||||
if (!locale) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (locale) {
|
||||
return formatIntl(translationsIntl[locale], parameters, locale);
|
||||
}
|
||||
}
|
||||
const translations = message.translations[domain];
|
||||
if (typeof translations !== 'undefined') {
|
||||
while (typeof translations[locale] === 'undefined') {
|
||||
locale = localesFallbacks[locale];
|
||||
if (!locale) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (locale) {
|
||||
return format(translations[locale], parameters, locale);
|
||||
}
|
||||
}
|
||||
if (_throwWhenNotFound) {
|
||||
throw new Error(`No translation message found with id "${message.id}".`);
|
||||
}
|
||||
return message.id;
|
||||
}
|
||||
|
||||
export { getLocale, getLocaleFallbacks, setLocale, setLocaleFallbacks, throwWhenNotFound, trans };
|
1
assets/ux-translator/dist/utils.d.ts
vendored
Normal file
1
assets/ux-translator/dist/utils.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function strtr(string: string, replacePairs: Record<string, string | number>): string;
|
34
assets/ux-translator/package.json
Normal file
34
assets/ux-translator/package.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@symfony/ux-translator",
|
||||
"description": "Symfony Translator for JavaScript",
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"main": "dist/translator_controller.js",
|
||||
"types": "dist/translator_controller.d.ts",
|
||||
"scripts": {
|
||||
"build": "node ../../../bin/build_package.js .",
|
||||
"watch": "node ../../../bin/build_package.js . --watch",
|
||||
"test": "../../../bin/test_package.sh .",
|
||||
"check": "biome check",
|
||||
"ci": "biome ci"
|
||||
},
|
||||
"symfony": {
|
||||
"importmap": {
|
||||
"intl-messageformat": "^10.5.11",
|
||||
"@symfony/ux-translator": "path:%PACKAGE%/dist/translator_controller.js",
|
||||
"@app/translations": "path:var/translations/index.js",
|
||||
"@app/translations/configuration": "path:var/translations/configuration.js"
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
"intl-messageformat": "^10.5.11"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"intl-messageformat": {
|
||||
"optional": false
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"intl-messageformat": "^10.5.11"
|
||||
}
|
||||
}
|
@ -34,6 +34,7 @@ export default ts.config(
|
||||
// override/add rules settings here, such as:
|
||||
"vue/multi-word-component-names": "off",
|
||||
"@typescript-eslint/no-require-imports": "off",
|
||||
"@typescript-eslint/ban-ts-comment": "off"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
@ -58,6 +58,7 @@
|
||||
"bootstrap-icons": "^1.11.3",
|
||||
"dropzone": "^5.7.6",
|
||||
"es6-promise": "^4.2.8",
|
||||
"intl-messageformat": "^10.5.11",
|
||||
"leaflet": "^1.7.1",
|
||||
"marked": "^12.0.2",
|
||||
"masonry-layout": "^4.2.2",
|
||||
|
@ -68,14 +68,23 @@
|
||||
socialActionsSelected.length)
|
||||
"
|
||||
>
|
||||
<div
|
||||
id="actionsList"
|
||||
v-for="group in socialActionsList"
|
||||
:key="group.issue"
|
||||
>
|
||||
<span class="badge bg-chill-l-gray text-dark">{{
|
||||
group.issue
|
||||
}}</span>
|
||||
<check-social-action
|
||||
v-for="action in socialActionsList"
|
||||
v-for="action in group.actions"
|
||||
:key="action.id"
|
||||
:action="action"
|
||||
:selection="socialActionsSelected"
|
||||
@updateSelected="updateActionsSelected"
|
||||
>
|
||||
</check-social-action>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<span
|
||||
@ -249,7 +258,23 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "ChillMainAssets/module/bootstrap/shared";
|
||||
@import "ChillPersonAssets/chill/scss/mixins";
|
||||
@import "ChillMainAssets/chill/scss/chill_variables";
|
||||
|
||||
span.multiselect__single {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#actionsList {
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
margin: 0.5rem;
|
||||
background-color: whitesmoke;
|
||||
}
|
||||
|
||||
span.badge {
|
||||
margin-bottom: 0.5rem;
|
||||
@include badge_social($social-issue-color);
|
||||
}
|
||||
</style>
|
||||
|
@ -10,7 +10,9 @@
|
||||
:value="action"
|
||||
/>
|
||||
<label class="form-check-label" :for="action.id">
|
||||
<span class="badge bg-light text-dark">{{ action.text }}</span>
|
||||
<span class="badge bg-light text-dark" :title="action.text">{{
|
||||
action.text
|
||||
}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</span>
|
||||
@ -43,5 +45,9 @@ span.badge {
|
||||
font-size: 95%;
|
||||
margin-bottom: 5px;
|
||||
margin-right: 1em;
|
||||
max-width: 100%; /* Adjust as needed */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
@ -124,9 +124,19 @@ const store = createStore({
|
||||
);
|
||||
},
|
||||
socialActionsListSorted(state) {
|
||||
return [...state.socialActionsList].sort(
|
||||
(a, b) => a.ordering - b.ordering,
|
||||
);
|
||||
return [...state.socialActionsList]
|
||||
.sort((a, b) => a.ordering - b.ordering)
|
||||
.reduce((acc, action) => {
|
||||
const issueText = action.issue?.text || "Uncategorized";
|
||||
// Find if the group for the issue already exists
|
||||
let group = acc.find((item) => item.issue === issueText);
|
||||
if (!group) {
|
||||
group = { issue: issueText, actions: [] };
|
||||
acc.push(group);
|
||||
}
|
||||
group.actions.push(action);
|
||||
return acc;
|
||||
}, []);
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
|
@ -96,13 +96,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<FullCalendar :options="calendarOptions" ref="calendarRef">
|
||||
<template v-slot:eventContent="arg: EventApi">
|
||||
<template v-slot:eventContent="{ arg }: { arg: { event: EventApi } }">
|
||||
<span :class="eventClasses(arg.event)">
|
||||
<b v-if="arg.event.extendedProps.is === 'remote'">{{
|
||||
arg.event.title
|
||||
}}</b>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'range'"
|
||||
>{{ arg.timeText }} -
|
||||
>{{ arg.event.startStr }} -
|
||||
{{ arg.event.extendedProps.locationName }}</b
|
||||
>
|
||||
<b v-else-if="arg.event.extendedProps.is === 'local'">{{
|
||||
|
@ -2,26 +2,26 @@
|
||||
<teleport to="body">
|
||||
<modal v-if="modalOpen" @close="modalOpen = false">
|
||||
<template v-slot:header>
|
||||
<h2>{{ $t("signature_confirmation") }}</h2>
|
||||
<h2>{{ trans(SIGNATURES_SIGNATURE_CONFIRMATION) }}</h2>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<div class="signature-modal-body text-center" v-if="loading">
|
||||
<p>{{ $t("electronic_signature_in_progress") }}</p>
|
||||
<p>{{ trans(SIGNATURES_ELECTRONIC_SIGNATURE_IN_PROGRESS) }}</p>
|
||||
<div class="loading">
|
||||
<i
|
||||
class="fa fa-circle-o-notch fa-spin fa-3x"
|
||||
:title="$t('loading')"
|
||||
:title="trans(SIGNATURES_LOADING)"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="signature-modal-body text-center" v-else>
|
||||
<p>{{ $t("you_are_going_to_sign") }}</p>
|
||||
<p>{{ $t("are_you_sure") }}</p>
|
||||
<p>{{ trans(SIGNATURES_YOU_ARE_GOING_TO_SIGN) }}</p>
|
||||
<p>{{ trans(SIGNATURES_ARE_YOU_SURE) }}</p>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-action" @click.prevent="confirmSign">
|
||||
{{ $t("yes") }}
|
||||
{{ trans(SIGNATURES_YES) }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
@ -82,7 +82,7 @@
|
||||
@change="toggleMultiPage"
|
||||
/>
|
||||
<label class="form-check-label" for="checkboxMulti">
|
||||
{{ $t("all_pages") }}
|
||||
{{ trans(SIGNATURES_ALL_PAGES) }}
|
||||
</label>
|
||||
</template>
|
||||
</div>
|
||||
@ -91,24 +91,19 @@
|
||||
class="col-5 p-0 text-center turnSignature"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
"
|
||||
:disabled="isFirstSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
{{ $t("last_zone") }}
|
||||
{{ trans(SIGNATURES_LAST_ZONE) }}
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
{{ $t("next_zone") }}
|
||||
{{ trans(SIGNATURES_NEXT_ZONE) }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||
@ -117,9 +112,9 @@
|
||||
:hidden="!userSignatureZone"
|
||||
@click="undoSign"
|
||||
v-if="signature.zones.length > 1"
|
||||
:title="$t('choose_another_signature')"
|
||||
:title="trans(SIGNATURES_CHOOSE_ANOTHER_SIGNATURE)"
|
||||
>
|
||||
{{ $t("another_zone") }}
|
||||
{{ trans(SIGNATURES_ANOTHER_ZONE) }}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-misc btn-sm"
|
||||
@ -127,7 +122,7 @@
|
||||
@click="undoSign"
|
||||
v-else
|
||||
>
|
||||
{{ $t("cancel") }}
|
||||
{{ trans(SIGNATURES_CANCEL) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="userSignatureZone === null"
|
||||
@ -139,7 +134,7 @@
|
||||
active: canvasEvent === 'add',
|
||||
}"
|
||||
@click="toggleAddZone()"
|
||||
:title="$t('add_sign_zone')"
|
||||
:title="trans(SIGNATURES_ADD_SIGN_ZONE)"
|
||||
>
|
||||
<template v-if="canvasEvent === 'add'">
|
||||
<div
|
||||
@ -191,7 +186,7 @@
|
||||
@change="toggleMultiPage"
|
||||
/>
|
||||
<label class="form-check-label" for="checkboxMulti">
|
||||
{{ $t("see_all_pages") }}
|
||||
{{ trans(SIGNATURES_SEE_ALL_PAGES) }}
|
||||
</label>
|
||||
</template>
|
||||
</div>
|
||||
@ -200,49 +195,48 @@
|
||||
class="col-4 d-xl-none text-center turnSignature p-0"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
"
|
||||
:disabled="!hasSignatureZoneSelected"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
{{ $t("last_zone") }}
|
||||
{{ trans(SIGNATURES_LAST_ZONE) }}
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
{{ $t("next_zone") }}
|
||||
{{ trans(SIGNATURES_NEXT_ZONE) }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="signature.zones.length === 1 && signedState !== 'signed'"
|
||||
class="col-4 d-none d-xl-flex p-0 text-center turnSignature">
|
||||
<button
|
||||
class="btn btn-light btn-sm"
|
||||
@click="goToSignatureZoneUnique"
|
||||
>
|
||||
{{ trans(SIGNATURES_GO_TO_SIGNATURE_UNIQUE) }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-if="signature.zones.length > 0 && signedState !== 'signed'"
|
||||
v-if="signature.zones.length > 1 && signedState !== 'signed'"
|
||||
class="col-4 d-none d-xl-flex p-0 text-center turnSignature"
|
||||
>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone === null ||
|
||||
userSignatureZone?.index < 1
|
||||
"
|
||||
:disabled="isFirstSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(-1)"
|
||||
>
|
||||
{{ $t("last_sign_zone") }}
|
||||
{{ trans(SIGNATURES_LAST_SIGN_ZONE) }}
|
||||
</button>
|
||||
<span>|</span>
|
||||
<button
|
||||
:disabled="
|
||||
userSignatureZone?.index >= signature.zones.length - 1
|
||||
"
|
||||
:disabled="isLastSignatureZone"
|
||||
class="btn btn-light btn-sm"
|
||||
@click="turnSignature(1)"
|
||||
>
|
||||
{{ $t("next_sign_zone") }}
|
||||
{{ trans(SIGNATURES_NEXT_SIGN_ZONE) }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||
@ -252,7 +246,7 @@
|
||||
@click="undoSign"
|
||||
v-if="signature.zones.length > 1"
|
||||
>
|
||||
{{ $t("choose_another_signature") }}
|
||||
{{ trans(SIGNATURES_CHOOSE_ANOTHER_SIGNATURE) }}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-misc btn-sm"
|
||||
@ -260,7 +254,7 @@
|
||||
@click="undoSign"
|
||||
v-else
|
||||
>
|
||||
{{ $t("cancel") }}
|
||||
{{ trans(SIGNATURES_CANCEL) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="userSignatureZone === null"
|
||||
@ -272,13 +266,13 @@
|
||||
active: canvasEvent === 'add',
|
||||
}"
|
||||
@click="toggleAddZone()"
|
||||
:title="$t('add_sign_zone')"
|
||||
:title="trans(SIGNATURES_ADD_SIGN_ZONE)"
|
||||
>
|
||||
<template v-if="canvasEvent !== 'add'">
|
||||
{{ $t("add_zone") }}
|
||||
{{ trans(SIGNATURES_ADD_ZONE) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ $t("click_on_document") }}
|
||||
{{ trans(SIGNATURES_CLICK_ON_DOCUMENT) }}
|
||||
<div
|
||||
class="spinner-border spinner-border-sm"
|
||||
role="status"
|
||||
@ -312,10 +306,10 @@
|
||||
v-if="signedState !== 'signed'"
|
||||
:href="getReturnPath()"
|
||||
>
|
||||
{{ $t("cancel") }}
|
||||
{{ trans(SIGNATURES_CANCEL) }}
|
||||
</a>
|
||||
<a class="btn btn-misc" v-else :href="getReturnPath()">
|
||||
{{ $t("return") }}
|
||||
{{ trans(SIGNATURES_RETURN) }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col text-end" v-if="signedState !== 'signed'">
|
||||
@ -324,7 +318,7 @@
|
||||
:disabled="!userSignatureZone"
|
||||
@click="sign"
|
||||
>
|
||||
{{ $t("sign") }}
|
||||
{{ trans(SIGNATURES_SIGN) }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4" v-else></div>
|
||||
@ -333,7 +327,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, Ref, reactive } from "vue";
|
||||
import { ref, Ref, computed } from "vue";
|
||||
import { useToast } from "vue-toast-notification";
|
||||
import "vue-toast-notification/dist/theme-sugar.css";
|
||||
import {
|
||||
@ -344,25 +338,48 @@ import {
|
||||
SignedState,
|
||||
ZoomLevel,
|
||||
} from "../../types";
|
||||
import { makeFetch } from "../../../../../ChillMainBundle/Resources/public/lib/api/apiMethods";
|
||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||
import * as pdfjsLib from "pdfjs-dist";
|
||||
import {
|
||||
PDFDocumentProxy,
|
||||
PDFPageProxy,
|
||||
} from "pdfjs-dist/types/src/display/api";
|
||||
|
||||
// @ts-ignore
|
||||
import {
|
||||
SIGNATURES_YES,
|
||||
SIGNATURES_ARE_YOU_SURE,
|
||||
SIGNATURES_YOU_ARE_GOING_TO_SIGN,
|
||||
SIGNATURES_SIGNATURE_CONFIRMATION,
|
||||
SIGNATURES_SIGN,
|
||||
SIGNATURES_CHOOSE_ANOTHER_SIGNATURE,
|
||||
SIGNATURES_CANCEL,
|
||||
SIGNATURES_LAST_SIGN_ZONE,
|
||||
SIGNATURES_NEXT_SIGN_ZONE,
|
||||
SIGNATURES_ADD_SIGN_ZONE,
|
||||
SIGNATURES_CLICK_ON_DOCUMENT,
|
||||
SIGNATURES_LAST_ZONE,
|
||||
SIGNATURES_NEXT_ZONE,
|
||||
SIGNATURES_ADD_ZONE,
|
||||
SIGNATURES_ANOTHER_ZONE,
|
||||
SIGNATURES_ELECTRONIC_SIGNATURE_IN_PROGRESS,
|
||||
SIGNATURES_LOADING,
|
||||
SIGNATURES_RETURN,
|
||||
SIGNATURES_SEE_ALL_PAGES,
|
||||
SIGNATURES_ALL_PAGES,
|
||||
SIGNATURES_GO_TO_SIGNATURE_UNIQUE,
|
||||
trans
|
||||
} from "translator";
|
||||
|
||||
|
||||
// @ts-ignore incredible but the console.log is needed
|
||||
import * as PdfWorker from "pdfjs-dist/build/pdf.worker.mjs";
|
||||
console.log(PdfWorker); // incredible but this is needed
|
||||
console.log(PdfWorker);
|
||||
|
||||
// import { PdfWorker } from 'pdfjs-dist/build/pdf.worker.mjs'
|
||||
// pdfjsLib.GlobalWorkerOptions.workerSrc = PdfWorker;
|
||||
|
||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||
import {
|
||||
download_and_decrypt_doc,
|
||||
download_doc_as_pdf,
|
||||
} from "../StoredObjectButton/helpers";
|
||||
import { download_doc_as_pdf } from "../StoredObjectButton/helpers";
|
||||
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = "pdfjs-dist/build/pdf.worker.mjs";
|
||||
|
||||
@ -433,6 +450,22 @@ const $toast = useToast();
|
||||
|
||||
const signature = window.signature;
|
||||
|
||||
const isFirstSignatureZone = () => {
|
||||
console.log(userSignatureZone.value?.index)
|
||||
return userSignatureZone.value?.index ? userSignatureZone.value.index < 1 : false;
|
||||
}
|
||||
const isLastSignatureZone = () =>
|
||||
userSignatureZone.value?.index
|
||||
? userSignatureZone.value.index >= signature.zones.length - 1
|
||||
: false;
|
||||
|
||||
/**
|
||||
* Return true if the user has selected a user zone (existing on the doc or created by the user)
|
||||
*/
|
||||
const hasSignatureZoneSelected = computed<boolean>(
|
||||
() => userSignatureZone.value !== null,
|
||||
);
|
||||
|
||||
const setZoomLevel = async (zoomLevel: string) => {
|
||||
zoom.value = Number.parseFloat(zoomLevel);
|
||||
await resetPages();
|
||||
@ -604,6 +637,15 @@ const turnPage = async (upOrDown: number) => {
|
||||
}
|
||||
};
|
||||
|
||||
const goToSignatureZoneUnique = () => {
|
||||
let signatureZone = signature.zones[0];
|
||||
|
||||
page.value = signatureZone.PDFPage.index + 1;
|
||||
const canvas = getCanvas(signatureZone.PDFPage.index + 1);
|
||||
selectZone(signatureZone, canvas);
|
||||
canvas.scrollIntoView();
|
||||
}
|
||||
|
||||
const turnSignature = async (upOrDown: number) => {
|
||||
let zoneIndex = userSignatureZone.value?.index ?? -1;
|
||||
if (zoneIndex < -1) {
|
||||
@ -754,7 +796,7 @@ const confirmSign = () => {
|
||||
zone: userSignatureZone.value,
|
||||
};
|
||||
makeFetch("POST", url, body)
|
||||
.then((r) => {
|
||||
.then(() => {
|
||||
checkForReady();
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -776,9 +818,7 @@ const undoSign = async () => {
|
||||
};
|
||||
|
||||
const toggleAddZone = () => {
|
||||
canvasEvent.value === "select"
|
||||
? (canvasEvent.value = "add")
|
||||
: (canvasEvent.value = "select");
|
||||
canvasEvent.value = canvasEvent.value === "select" ? "add" : "select";
|
||||
};
|
||||
|
||||
const addZoneEvent = async (e: PointerEvent, canvas: HTMLCanvasElement) => {
|
||||
|
@ -28,6 +28,10 @@ const open = () => {
|
||||
state.opened = true;
|
||||
};
|
||||
|
||||
const onRestoreVersion = (payload: {
|
||||
newVersion: StoredObjectVersionWithPointInTime;
|
||||
}) => emit("restoreVersion", payload);
|
||||
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
<template>
|
||||
@ -42,9 +46,7 @@ defineExpose({ open });
|
||||
:versions="props.versions"
|
||||
:can-edit="canEdit"
|
||||
:stored-object="storedObject"
|
||||
@restore-version="
|
||||
(payload) => emit('restoreVersion', payload)
|
||||
"
|
||||
@restore-version="onRestoreVersion"
|
||||
></history-button-list>
|
||||
</template>
|
||||
</modal>
|
||||
|
@ -99,3 +99,30 @@ CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE: Modifier un document
|
||||
entity_display_title:
|
||||
Document (n°%doc%): "Document (n°%doc%)"
|
||||
Doc for evaluation (n°%eval%): Document de l'évaluation n°%eval%
|
||||
|
||||
|
||||
# SIGNATURES
|
||||
|
||||
signatures:
|
||||
yes: Oui
|
||||
are_you_sure: Êtes-vous sûr·e?
|
||||
you_are_going_to_sign: Vous allez signer le document
|
||||
signature_confirmation: Confirmation de la signature
|
||||
sign: Signer
|
||||
choose_another_signature: Choisir une autre zone
|
||||
cancel: Annuler
|
||||
last_sign_zone: Zone de signature précédente
|
||||
next_sign_zone: Zone de signature suivante
|
||||
add_sign_zone: Ajouter une zone de signature
|
||||
click_on_document: Cliquer sur le document
|
||||
last_zone: Zone précédente
|
||||
next_zone: Zone suivante
|
||||
add_zone: Ajouter une zone
|
||||
another_zone: Autre zone
|
||||
electronic_signature_in_progress: Signature électronique en cours...
|
||||
loading: Chargement...
|
||||
remove_sign_zone: Enlever la zone
|
||||
return: Retour
|
||||
see_all_pages: Voir toutes les pages
|
||||
all_pages: Toutes les pages
|
||||
go_to_signature_unique: Aller vers zone de signature
|
||||
|
@ -63,7 +63,6 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
parent::getSubscribedServices(),
|
||||
[
|
||||
'chill_main.paginator_factory' => PaginatorFactory::class,
|
||||
ManagerRegistry::class => ManagerRegistry::class,
|
||||
'translator' => TranslatorInterface::class,
|
||||
AuthorizationHelper::class => AuthorizationHelper::class,
|
||||
EventDispatcherInterface::class => EventDispatcherInterface::class,
|
||||
@ -213,7 +212,7 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
|
||||
protected function getManagerRegistry(): ManagerRegistry
|
||||
{
|
||||
return $this->container->get(ManagerRegistry::class);
|
||||
return $this->container->get('doctrine');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -226,7 +225,7 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
|
||||
protected function getValidator(): ValidatorInterface
|
||||
{
|
||||
return $this->get('validator');
|
||||
return $this->container->get('validator');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,8 +75,8 @@ final class UserGroupRepository implements UserGroupRepositoryInterface, LocaleA
|
||||
->setWhereClauses('
|
||||
ug.active AND (
|
||||
SIMILARITY(LOWER(UNACCENT(?)), ug.label->>?) > 0.15
|
||||
OR ug.label->>? LIKE \'%\' || LOWER(UNACCENT(?)) || \'%\')
|
||||
', [$pattern, $lang, $pattern, $lang]);
|
||||
OR LOWER(UNACCENT(ug.label->>?)) LIKE \'%\' || LOWER(UNACCENT(?)) || \'%\')
|
||||
', [$pattern, $lang, $lang, $pattern]);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
@ -12,10 +12,6 @@ function loadDynamicPicker(element) {
|
||||
let apps = element.querySelectorAll('[data-module="pick-dynamic"]');
|
||||
|
||||
apps.forEach(function (el) {
|
||||
let suggested;
|
||||
let as_id;
|
||||
let submit_on_adding_new_entity;
|
||||
let label;
|
||||
const isMultiple = parseInt(el.dataset.multiple) === 1,
|
||||
uniqId = el.dataset.uniqid,
|
||||
input = element.querySelector(
|
||||
@ -26,11 +22,11 @@ function loadDynamicPicker(element) {
|
||||
? JSON.parse(input.value)
|
||||
: input.value === "[]" || input.value === ""
|
||||
? null
|
||||
: [JSON.parse(input.value)];
|
||||
suggested = JSON.parse(el.dataset.suggested);
|
||||
as_id = parseInt(el.dataset.asId) === 1;
|
||||
: [JSON.parse(input.value)],
|
||||
suggested = JSON.parse(el.dataset.suggested),
|
||||
as_id = parseInt(el.dataset.asId) === 1,
|
||||
submit_on_adding_new_entity =
|
||||
parseInt(el.dataset.submitOnAddingNewEntity) === 1;
|
||||
parseInt(el.dataset.submitOnAddingNewEntity) === 1,
|
||||
label = el.dataset.label;
|
||||
|
||||
if (!isMultiple) {
|
||||
|
@ -45,6 +45,10 @@ const onPickGenericDoc = ({
|
||||
}) => {
|
||||
emit("pickGenericDoc", { genericDoc });
|
||||
};
|
||||
|
||||
const onRemoveAttachment = (payload: { attachment: WorkflowAttachment }) => {
|
||||
emit("removeAttachment", payload);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -56,7 +60,7 @@ const onPickGenericDoc = ({
|
||||
></pick-generic-doc-modal>
|
||||
<attachment-list
|
||||
:attachments="props.attachments"
|
||||
@removeAttachment="(payload) => emit('removeAttachment', payload)"
|
||||
@removeAttachment="onRemoveAttachment"
|
||||
></attachment-list>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@ -72,6 +72,14 @@ const placeTrans = (str: string): string => {
|
||||
}
|
||||
};
|
||||
|
||||
const onPickDocument = (payload: {
|
||||
genericDoc: GenericDocForAccompanyingPeriod;
|
||||
}) => emit("pickGenericDoc", payload);
|
||||
|
||||
const onRemoveGenericDoc = (payload: {
|
||||
genericDoc: GenericDocForAccompanyingPeriod;
|
||||
}) => emit("removeGenericDoc", payload);
|
||||
|
||||
const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
||||
if (false === loaded.value) {
|
||||
return [];
|
||||
@ -245,10 +253,8 @@ const filteredDocuments = computed<GenericDocForAccompanyingPeriod[]>(() => {
|
||||
:accompanying-period-id="accompanyingPeriodId"
|
||||
:genericDoc="g"
|
||||
:is-picked="isPicked(g)"
|
||||
@pickGenericDoc="(payload) => emit('pickGenericDoc', payload)"
|
||||
@removeGenericDoc="
|
||||
(payload) => emit('removeGenericDoc', payload)
|
||||
"
|
||||
@pickGenericDoc="onPickDocument"
|
||||
@removeGenericDoc="onRemoveGenericDoc"
|
||||
></pick-generic-doc-item>
|
||||
</div>
|
||||
<div v-else class="text-center chill-no-data-statement">
|
||||
|
@ -68,8 +68,8 @@ class AddressReferenceBEFromBestAddress
|
||||
$csv->setDelimiter(',');
|
||||
$csv->setHeaderOffset(0);
|
||||
|
||||
$stmt = Statement::create()
|
||||
->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
|
||||
foreach ($stmt as $record) {
|
||||
$this->baseImporter->importAddress(
|
||||
|
@ -55,8 +55,8 @@ class AddressReferenceFromBAN
|
||||
|
||||
$csv = Reader::createFromStream($csvDecompressed);
|
||||
$csv->setDelimiter(';')->setHeaderOffset(0);
|
||||
$stmt = Statement::create()
|
||||
->process($csv, [
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv, [
|
||||
'id',
|
||||
'id_fantoir',
|
||||
'numero',
|
||||
|
@ -43,8 +43,8 @@ class AddressReferenceFromBano
|
||||
|
||||
$csv = Reader::createFromStream($file);
|
||||
$csv->setDelimiter(',');
|
||||
$stmt = Statement::create()
|
||||
->process($csv, [
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv, [
|
||||
'refId',
|
||||
'streetNumber',
|
||||
'street',
|
||||
|
@ -54,7 +54,8 @@ class AddressReferenceLU
|
||||
|
||||
private function process_address(Reader $csv, ?string $sendAddressReportToEmail = null): void
|
||||
{
|
||||
$stmt = Statement::create()->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
foreach ($stmt as $record) {
|
||||
$this->addressBaseImporter->importAddress(
|
||||
$record['id_geoportail'],
|
||||
@ -74,7 +75,8 @@ class AddressReferenceLU
|
||||
|
||||
private function process_postal_code(Reader $csv): void
|
||||
{
|
||||
$stmt = Statement::create()->process($csv);
|
||||
$stmt = new Statement();
|
||||
$stmt = $stmt->process($csv);
|
||||
$arr_postal_codes = [];
|
||||
foreach ($stmt as $record) {
|
||||
if (false === \array_key_exists($record['code_postal'], $arr_postal_codes)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user