mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '333-working-with-translations' into 'master'
Setup alias for use in standalone chill-bundles project and replace relative paths Closes #333 See merge request Chill-Projet/chill-bundles!766
This commit is contained in:
commit
02f555efae
6
.changes/unreleased/DX-20250131-131801.yaml
Normal file
6
.changes/unreleased/DX-20250131-131801.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
kind: DX
|
||||||
|
body: Create an unique source of trust for translations
|
||||||
|
time: 2025-01-31T13:18:01.239211506+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "333"
|
||||||
|
SchemaChange: No schema change
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ docker/rabbitmq/data
|
|||||||
|
|
||||||
# in this development bundle, we want to ignore directories related to a real app
|
# in this development bundle, we want to ignore directories related to a real app
|
||||||
assets/*
|
assets/*
|
||||||
|
!assets/translator.ts
|
||||||
migrations/*
|
migrations/*
|
||||||
templates/*
|
templates/*
|
||||||
translations/*
|
translations/*
|
||||||
|
@ -113,7 +113,7 @@ lint:
|
|||||||
- export PATH="./node_modules/.bin:$PATH"
|
- export PATH="./node_modules/.bin:$PATH"
|
||||||
script:
|
script:
|
||||||
- yarn install --ignore-optional
|
- yarn install --ignore-optional
|
||||||
- npx eslint-baseline "**/*.{js,vue}"
|
- npx eslint-baseline "src/**/*.{js,ts,vue}"
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
9
assets/translator.ts
Normal file
9
assets/translator.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// @ts-ignore Cannot find module (when used within an app)
|
||||||
|
import { trans, getLocale, setLocale, setLocaleFallbacks } from "@symfony/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';
|
@ -75,6 +75,7 @@
|
|||||||
"symfony/templating": "^5.4",
|
"symfony/templating": "^5.4",
|
||||||
"symfony/translation": "^5.4",
|
"symfony/translation": "^5.4",
|
||||||
"symfony/twig-bundle": "^5.4",
|
"symfony/twig-bundle": "^5.4",
|
||||||
|
"symfony/ux-translator": "^2.22",
|
||||||
"symfony/validator": "^5.4",
|
"symfony/validator": "^5.4",
|
||||||
"symfony/webpack-encore-bundle": "^1.11",
|
"symfony/webpack-encore-bundle": "^1.11",
|
||||||
"symfony/workflow": "^5.4",
|
"symfony/workflow": "^5.4",
|
||||||
|
@ -36,4 +36,5 @@ return [
|
|||||||
Chill\BudgetBundle\ChillBudgetBundle::class => ['all' => true],
|
Chill\BudgetBundle\ChillBudgetBundle::class => ['all' => true],
|
||||||
Chill\WopiBundle\ChillWopiBundle::class => ['all' => true],
|
Chill\WopiBundle\ChillWopiBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||||
|
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
3
config/packages/ux_translator.yaml
Normal file
3
config/packages/ux_translator.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ux_translator:
|
||||||
|
# The directory where the JavaScript translations are dumped
|
||||||
|
dump_directory: '%kernel.project_dir%/var/translations'
|
@ -29,8 +29,7 @@ We strongly encourage you to initialize a git repository at this step, to track
|
|||||||
# add the flex endpoints required for custom recipes
|
# add the flex endpoints required for custom recipes
|
||||||
cat <<< "$(jq '.extra.symfony += {"endpoint": ["flex://defaults", "https://gitlab.com/api/v4/projects/57371968/repository/files/index.json/raw?ref=main"]}' composer.json)" > composer.json
|
cat <<< "$(jq '.extra.symfony += {"endpoint": ["flex://defaults", "https://gitlab.com/api/v4/projects/57371968/repository/files/index.json/raw?ref=main"]}' composer.json)" > composer.json
|
||||||
# install chill and some dependencies
|
# install chill and some dependencies
|
||||||
# TODO fix the suffix "alpha1" and replace by ^3.0.0 when version 3.0.0 will be released
|
symfony composer require chill-project/chill-bundles ^3.7.1 champs-libres/wopi-lib dev-master@dev champs-libres/wopi-bundle dev-master@dev symfony/amqp-messenger
|
||||||
symfony composer require chill-project/chill-bundles v3.0.0-RC3 champs-libres/wopi-lib dev-master@dev champs-libres/wopi-bundle dev-master@dev
|
|
||||||
|
|
||||||
We encourage you to accept the inclusion of the "Docker configuration from recipes": this is the documented way to run the database.
|
We encourage you to accept the inclusion of the "Docker configuration from recipes": this is the documented way to run the database.
|
||||||
You must also accept to configure recipes from the contrib repository, unless you want to configure the bundles manually).
|
You must also accept to configure recipes from the contrib repository, unless you want to configure the bundles manually).
|
||||||
@ -48,7 +47,7 @@ You must also accept to configure recipes from the contrib repository, unless yo
|
|||||||
|
|
||||||
If you encounter this error during assets compilation (:code:`yarn run encore production`) (repeated multiple times):
|
If you encounter this error during assets compilation (:code:`yarn run encore production`) (repeated multiple times):
|
||||||
|
|
||||||
.. code-block:: txt
|
.. code-block::
|
||||||
|
|
||||||
[tsl] ERROR in /tmp/chill/v1/public/bundles/chillcalendar/types.ts(2,65)
|
[tsl] ERROR in /tmp/chill/v1/public/bundles/chillcalendar/types.ts(2,65)
|
||||||
TS2307: Cannot find module '../../../ChillMainBundle/Resources/public/types' or its corresponding type declarations.
|
TS2307: Cannot find module '../../../ChillMainBundle/Resources/public/types' or its corresponding type declarations.
|
||||||
@ -74,14 +73,22 @@ or in the :code:`.env.local` file, which should not be committed to the git repo
|
|||||||
You do not need to set variables for the smtp server, redis server and relatorio server, as they are generated automatically
|
You do not need to set variables for the smtp server, redis server and relatorio server, as they are generated automatically
|
||||||
by the symfony server, from the docker compose services.
|
by the symfony server, from the docker compose services.
|
||||||
|
|
||||||
The only required variable is the :code:`ADMIN_PASSWORD`. You can generate a hashed and salted admin password using the command
|
The required variables are:
|
||||||
:code:`symfony console security:hash-password <your password> 'Symfony\Component\Security\Core\User\User'`. Then,
|
|
||||||
|
- the :code:`ADMIN_PASSWORD`;
|
||||||
|
- the :code:`OVHCLOUD_DSN` variable;
|
||||||
|
|
||||||
|
:code:`ADMIN_PASSWORD`
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can generate a hashed and salted admin password using the command
|
||||||
|
:code:`symfony console security:hash-password <your password> 'Symfony\Component\Security\Core\User\User'`.Then,
|
||||||
you can either:
|
you can either:
|
||||||
|
|
||||||
- add this password to the :code:`.env.local` file, you must escape the character :code:`$`: if the generated password
|
- add this password to the :code:`.env.local` file, you must escape the character :code:`$`: if the generated password
|
||||||
is :code:`$2y$13$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm`, your :code:`.env.local` file will be:
|
is :code:`$2y$13$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm`, your :code:`.env.local` file will be:
|
||||||
|
|
||||||
.. code-block:: env
|
.. code-block:: bash
|
||||||
|
|
||||||
ADMIN_PASSWORD=\$2y\$13\$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm
|
ADMIN_PASSWORD=\$2y\$13\$iyvJLuT4YEa6iWXyQV4/N.hNHpNG8kXlYDkkt5MkYy4FXcSwYAwmm
|
||||||
# note: if you copy-paste the line above, the password will be "admin".
|
# note: if you copy-paste the line above, the password will be "admin".
|
||||||
@ -89,12 +96,24 @@ you can either:
|
|||||||
- add the generated password to the secrets manager (**note**: you must add the generated hashed password to the secrets env,
|
- add the generated password to the secrets manager (**note**: you must add the generated hashed password to the secrets env,
|
||||||
not the password in clear text).
|
not the password in clear text).
|
||||||
|
|
||||||
- set up the jwt authentication bundle
|
:code:`OVHCLOUD_DSN` and sending SMS messages
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This is a temporary dependency, for ensuring compatibility for previous behaviour.
|
||||||
|
|
||||||
|
You can set it to :code:`null://null` if you do not plan to use sending SMS.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
OVHCLOUD_DSN=null://null
|
||||||
|
|
||||||
|
If you plan to do it, you can configure the notifier component `as described in the symfony documentation <https://symfony.com/doc/current/notifier.html#notifier-sms-channel>`_.
|
||||||
|
|
||||||
|
|
||||||
Some environment variables are available for the JWT authentication bundle in the :code:`.env` file.
|
Some environment variables are available for the JWT authentication bundle in the :code:`.env` file.
|
||||||
|
|
||||||
Prepare migrations and other tools
|
Prepare database, messenger queue, and other configuration
|
||||||
----------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
To continue the installation process, you will have to run migrations:
|
To continue the installation process, you will have to run migrations:
|
||||||
|
|
||||||
@ -114,14 +133,17 @@ To continue the installation process, you will have to run migrations:
|
|||||||
# generate jwt token, required for some api features (webdav access, ...)
|
# generate jwt token, required for some api features (webdav access, ...)
|
||||||
symfony console lexik:jwt:generate-keypair
|
symfony console lexik:jwt:generate-keypair
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
If you encounter an error while running :code:`symfony console messenger:setup-transports`, you can set up the messenger
|
If you encounter this error:
|
||||||
transport to redis, by adding this in the :code:`.env.local` or :code:`.env` file:
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
No transport supports the given Messenger DSN.
|
||||||
|
|
||||||
|
Please check that you installed the package `symfony/amqp-messenger`.
|
||||||
|
|
||||||
.. code-block:: env
|
|
||||||
|
|
||||||
MESSENGER_TRANSPORT_DSN=redis://${REDIS_HOST}:${REDIS_PORT}/messages
|
|
||||||
|
|
||||||
Start your web server locally
|
Start your web server locally
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
15
package.json
15
package.json
@ -6,15 +6,11 @@
|
|||||||
"@apidevtools/swagger-cli": "^4.0.4",
|
"@apidevtools/swagger-cli": "^4.0.4",
|
||||||
"@babel/core": "^7.20.5",
|
"@babel/core": "^7.20.5",
|
||||||
"@babel/preset-env": "^7.20.2",
|
"@babel/preset-env": "^7.20.2",
|
||||||
"@ckeditor/ckeditor5-build-classic": "^41.4.2",
|
"@ckeditor/ckeditor5-vue": "^7.3.0",
|
||||||
"@ckeditor/ckeditor5-dev-translations": "^40.2.0",
|
|
||||||
"@ckeditor/ckeditor5-dev-utils": "^40.2.0",
|
|
||||||
"@ckeditor/ckeditor5-dev-webpack-plugin": "^31.1.13",
|
|
||||||
"@ckeditor/ckeditor5-markdown-gfm": "^41.4.2",
|
|
||||||
"@ckeditor/ckeditor5-theme-lark": "^41.4.2",
|
|
||||||
"@ckeditor/ckeditor5-vue": "^5.1.0",
|
|
||||||
"@eslint/js": "^9.14.0",
|
"@eslint/js": "^9.14.0",
|
||||||
|
"@hotwired/stimulus": "^3.0.0",
|
||||||
"@luminateone/eslint-baseline": "^1.0.9",
|
"@luminateone/eslint-baseline": "^1.0.9",
|
||||||
|
"@symfony/stimulus-bridge": "^3.2.0",
|
||||||
"@symfony/webpack-encore": "^4.1.0",
|
"@symfony/webpack-encore": "^4.1.0",
|
||||||
"@tsconfig/node20": "^20.1.4",
|
"@tsconfig/node20": "^20.1.4",
|
||||||
"@types/dompurify": "^3.0.5",
|
"@types/dompurify": "^3.0.5",
|
||||||
@ -23,12 +19,14 @@
|
|||||||
"bindings": "^1.5.0",
|
"bindings": "^1.5.0",
|
||||||
"bootstrap": "5.2.3",
|
"bootstrap": "5.2.3",
|
||||||
"chokidar": "^3.5.1",
|
"chokidar": "^3.5.1",
|
||||||
|
"ckeditor5": "^44.1.0",
|
||||||
"dompurify": "^3.1.0",
|
"dompurify": "^3.1.0",
|
||||||
"eslint": "^9.14.0",
|
"eslint": "^9.14.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"eslint-plugin-vue": "^9.30.0",
|
"eslint-plugin-vue": "^9.30.0",
|
||||||
"fork-awesome": "^1.1.7",
|
"fork-awesome": "^1.1.7",
|
||||||
|
"intl-messageformat": "^10.5.11",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"node-sass": "^8.0.0",
|
"node-sass": "^8.0.0",
|
||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
@ -54,6 +52,7 @@
|
|||||||
"@fullcalendar/timegrid": "^6.1.4",
|
"@fullcalendar/timegrid": "^6.1.4",
|
||||||
"@fullcalendar/vue3": "^6.1.4",
|
"@fullcalendar/vue3": "^6.1.4",
|
||||||
"@popperjs/core": "^2.9.2",
|
"@popperjs/core": "^2.9.2",
|
||||||
|
"@tsconfig/node20": "^20.1.4",
|
||||||
"@types/dompurify": "^3.0.5",
|
"@types/dompurify": "^3.0.5",
|
||||||
"@types/leaflet": "^1.9.3",
|
"@types/leaflet": "^1.9.3",
|
||||||
"bootstrap-icons": "^1.11.3",
|
"bootstrap-icons": "^1.11.3",
|
||||||
@ -72,7 +71,7 @@
|
|||||||
"vuex": "^4.0.0"
|
"vuex": "^4.0.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"Firefox ESR"
|
"defaults and fully supports es6-module and not dead"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev-server": "encore dev-server",
|
"dev-server": "encore dev-server",
|
||||||
|
@ -30,13 +30,14 @@
|
|||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li class="add-persons">
|
<li class="add-persons">
|
||||||
<add-persons
|
<add-persons
|
||||||
button-title="activity.add_persons"
|
:buttonTitle="trans(ACTIVITY_ADD_PERSONS)"
|
||||||
modal-title="activity.add_persons"
|
:modalTitle="trans(ACTIVITY_ADD_PERSONS)"
|
||||||
:key="addPersons.key"
|
v-bind:key="addPersons.key"
|
||||||
:options="addPersonsOptions"
|
v-bind:options="addPersonsOptions"
|
||||||
@add-new-persons="addNewPersons"
|
@addNewPersons="addNewPersons"
|
||||||
ref="addPersons"
|
ref="addPersons"
|
||||||
/>
|
>
|
||||||
|
</add-persons>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</teleport>
|
</teleport>
|
||||||
@ -47,6 +48,14 @@ import { mapState, mapGetters } from "vuex";
|
|||||||
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue";
|
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue";
|
||||||
import PersonsBloc from "./ConcernedGroups/PersonsBloc.vue";
|
import PersonsBloc from "./ConcernedGroups/PersonsBloc.vue";
|
||||||
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
||||||
|
import {
|
||||||
|
ACTIVITY_BLOC_PERSONS,
|
||||||
|
ACTIVITY_BLOC_PERSONS_ASSOCIATED,
|
||||||
|
ACTIVITY_BLOC_THIRDPARTY,
|
||||||
|
ACTIVITY_BLOC_USERS,
|
||||||
|
ACTIVITY_ADD_PERSONS,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ConcernedGroups",
|
name: "ConcernedGroups",
|
||||||
@ -55,18 +64,24 @@ export default {
|
|||||||
PersonsBloc,
|
PersonsBloc,
|
||||||
PersonText,
|
PersonText,
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
trans,
|
||||||
|
ACTIVITY_ADD_PERSONS,
|
||||||
|
};
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
personsBlocs: [
|
personsBlocs: [
|
||||||
{
|
{
|
||||||
key: "persons",
|
key: "persons",
|
||||||
title: "activity.bloc_persons",
|
title: trans(ACTIVITY_BLOC_PERSONS),
|
||||||
persons: [],
|
persons: [],
|
||||||
included: false,
|
included: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "personsAssociated",
|
key: "personsAssociated",
|
||||||
title: "activity.bloc_persons_associated",
|
title: trans(ACTIVITY_BLOC_PERSONS_ASSOCIATED),
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity
|
included: window.activity
|
||||||
? window.activity.activityType.personsVisible !== 0
|
? window.activity.activityType.personsVisible !== 0
|
||||||
@ -82,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "thirdparty",
|
key: "thirdparty",
|
||||||
title: "activity.bloc_thirdparty",
|
title: trans(ACTIVITY_BLOC_THIRDPARTY),
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity
|
included: window.activity
|
||||||
? window.activity.activityType.thirdPartiesVisible !== 0
|
? window.activity.activityType.thirdPartiesVisible !== 0
|
||||||
@ -90,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "users",
|
key: "users",
|
||||||
title: "activity.bloc_users",
|
title: trans(ACTIVITY_BLOC_USERS),
|
||||||
persons: [],
|
persons: [],
|
||||||
included: window.activity
|
included: window.activity
|
||||||
? window.activity.activityType.usersVisible !== 0
|
? window.activity.activityType.usersVisible !== 0
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<teleport to="#location">
|
<teleport to="#location">
|
||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<label :class="locationClassList">
|
<label :class="locationClassList">
|
||||||
{{ $t("activity.location") }}
|
{{ trans(ACTIVITY_LOCATION) }}
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<VueMultiselect
|
<VueMultiselect
|
||||||
@ -13,17 +13,17 @@
|
|||||||
open-direction="top"
|
open-direction="top"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
:searchable="true"
|
:searchable="true"
|
||||||
:placeholder="$t('activity.choose_location')"
|
:placeholder="trans(ACTIVITY_CHOOSE_LOCATION)"
|
||||||
:custom-label="customLabel"
|
:custom-label="customLabel"
|
||||||
:select-label="$t('multiselect.select_label')"
|
:select-label="trans(MULTISELECT_SELECT_LABEL)"
|
||||||
:deselect-label="$t('multiselect.deselect_label')"
|
:deselect-label="trans(MULTISELECT_DESELECT_LABEL)"
|
||||||
:selected-label="$t('multiselect.selected_label')"
|
:selected-label="trans(MULTISELECT_SELECTED_LABEL)"
|
||||||
:options="availableLocations"
|
:options="availableLocations"
|
||||||
group-values="locations"
|
group-values="locations"
|
||||||
group-label="locationGroup"
|
group-label="locationGroup"
|
||||||
v-model="location"
|
v-model="location"
|
||||||
/>
|
/>
|
||||||
<new-location :available-locations="availableLocations" />
|
<new-location v-bind:available-locations="availableLocations" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</teleport>
|
</teleport>
|
||||||
@ -33,6 +33,14 @@
|
|||||||
import { mapState, mapGetters } from "vuex";
|
import { mapState, mapGetters } from "vuex";
|
||||||
import VueMultiselect from "vue-multiselect";
|
import VueMultiselect from "vue-multiselect";
|
||||||
import NewLocation from "./Location/NewLocation.vue";
|
import NewLocation from "./Location/NewLocation.vue";
|
||||||
|
import {
|
||||||
|
trans,
|
||||||
|
ACTIVITY_LOCATION,
|
||||||
|
ACTIVITY_CHOOSE_LOCATION,
|
||||||
|
MULTISELECT_SELECT_LABEL,
|
||||||
|
MULTISELECT_DESELECT_LABEL,
|
||||||
|
MULTISELECT_SELECTED_LABEL,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Location",
|
name: "Location",
|
||||||
@ -40,6 +48,16 @@ export default {
|
|||||||
NewLocation,
|
NewLocation,
|
||||||
VueMultiselect,
|
VueMultiselect,
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
trans,
|
||||||
|
ACTIVITY_LOCATION,
|
||||||
|
ACTIVITY_CHOOSE_LOCATION,
|
||||||
|
MULTISELECT_SELECT_LABEL,
|
||||||
|
MULTISELECT_DESELECT_LABEL,
|
||||||
|
MULTISELECT_SELECTED_LABEL,
|
||||||
|
};
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
locationClassList: `col-form-label col-sm-4 ${document.querySelector("input#chill_activitybundle_activity_location").getAttribute("required") ? "required" : ""}`,
|
locationClassList: `col-form-label col-sm-4 ${document.querySelector("input#chill_activitybundle_activity_location").getAttribute("required") ? "required" : ""}`,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-sm btn-create" @click="openModal">
|
<a class="btn btn-sm btn-create" @click="openModal">
|
||||||
{{ $t("activity.create_new_location") }}
|
{{ trans(ACTIVITY_CREATE_NEW_LOCATION) }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -11,12 +11,12 @@
|
|||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
<modal
|
<modal
|
||||||
v-if="modal.showModal"
|
v-if="modal.showModal"
|
||||||
:modal-dialog-class="modal.modalDialogClass"
|
:modalDialogClass="modal.modalDialogClass"
|
||||||
@close="modal.showModal = false"
|
@close="modal.showModal = false"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<h3 class="modal-title">
|
<h3 class="modal-title">
|
||||||
{{ $t("activity.create_new_location") }}
|
{{ trans(ACTIVITY_CREATE_NEW_LOCATION) }}
|
||||||
</h3>
|
</h3>
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
v-model="selectType"
|
v-model="selectType"
|
||||||
>
|
>
|
||||||
<option selected disabled value="">
|
<option selected disabled value="">
|
||||||
{{ $t("activity.choose_location_type") }}
|
{{ trans(ACTIVITY_CHOOSE_LOCATION_TYPE) }}
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
v-for="t in locationTypes"
|
v-for="t in locationTypes"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<label>{{
|
<label>{{
|
||||||
$t("activity.location_fields.type")
|
trans(ACTIVITY_LOCATION_FIELDS_TYPE)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -60,14 +60,14 @@
|
|||||||
placeholder
|
placeholder
|
||||||
/>
|
/>
|
||||||
<label for="name">{{
|
<label for="name">{{
|
||||||
$t("activity.location_fields.name")
|
trans(ACTIVITY_LOCATION_FIELDS_NAME)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<add-address
|
<add-address
|
||||||
:context="addAddress.context"
|
:context="addAddress.context"
|
||||||
:options="addAddress.options"
|
:options="addAddress.options"
|
||||||
:address-changed-callback="submitNewAddress"
|
:addressChangedCallback="submitNewAddress"
|
||||||
v-if="showAddAddress"
|
v-if="showAddAddress"
|
||||||
ref="addAddress"
|
ref="addAddress"
|
||||||
/>
|
/>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
placeholder
|
placeholder
|
||||||
/>
|
/>
|
||||||
<label for="phonenumber1">{{
|
<label for="phonenumber1">{{
|
||||||
$t("activity.location_fields.phonenumber1")
|
trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER1)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating mb-3" v-if="hasPhonenumber1">
|
<div class="form-floating mb-3" v-if="hasPhonenumber1">
|
||||||
@ -91,7 +91,7 @@
|
|||||||
placeholder
|
placeholder
|
||||||
/>
|
/>
|
||||||
<label for="phonenumber2">{{
|
<label for="phonenumber2">{{
|
||||||
$t("activity.location_fields.phonenumber2")
|
trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER2)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating mb-3" v-if="showContactData">
|
<div class="form-floating mb-3" v-if="showContactData">
|
||||||
@ -102,7 +102,7 @@
|
|||||||
placeholder
|
placeholder
|
||||||
/>
|
/>
|
||||||
<label for="email">{{
|
<label for="email">{{
|
||||||
$t("activity.location_fields.email")
|
trans(ACTIVITY_LOCATION_FIELDS_EMAIL)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
class="btn btn-save"
|
class="btn btn-save"
|
||||||
@click.prevent="saveNewLocation"
|
@click.prevent="saveNewLocation"
|
||||||
>
|
>
|
||||||
{{ $t("action.save") }}
|
{{ trans(SAVE) }}
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</modal>
|
||||||
@ -126,6 +126,17 @@ import AddAddress from "ChillMainAssets/vuejs/Address/components/AddAddress.vue"
|
|||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import { getLocationTypes } from "../../api";
|
import { getLocationTypes } from "../../api";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
|
import {
|
||||||
|
SAVE,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_EMAIL,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_PHONENUMBER1,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_PHONENUMBER2,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_NAME,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_TYPE,
|
||||||
|
ACTIVITY_CHOOSE_LOCATION_TYPE,
|
||||||
|
ACTIVITY_CREATE_NEW_LOCATION,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "NewLocation",
|
name: "NewLocation",
|
||||||
@ -133,6 +144,19 @@ export default {
|
|||||||
Modal,
|
Modal,
|
||||||
AddAddress,
|
AddAddress,
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
trans,
|
||||||
|
SAVE,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_EMAIL,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_PHONENUMBER1,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_PHONENUMBER2,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_NAME,
|
||||||
|
ACTIVITY_LOCATION_FIELDS_TYPE,
|
||||||
|
ACTIVITY_CHOOSE_LOCATION_TYPE,
|
||||||
|
ACTIVITY_CREATE_NEW_LOCATION,
|
||||||
|
};
|
||||||
|
},
|
||||||
props: ["availableLocations"],
|
props: ["availableLocations"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<label :class="socialIssuesClassList">{{
|
<label :class="socialIssuesClassList">{{
|
||||||
$t("activity.social_issues")
|
trans(ACTIVITY_SOCIAL_ISSUES)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
@ -12,8 +12,9 @@
|
|||||||
:key="issue.id"
|
:key="issue.id"
|
||||||
:issue="issue"
|
:issue="issue"
|
||||||
:selection="socialIssuesSelected"
|
:selection="socialIssuesSelected"
|
||||||
@update-selected="updateIssuesSelected"
|
@updateSelected="updateIssuesSelected"
|
||||||
/>
|
>
|
||||||
|
</check-social-issue>
|
||||||
|
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<VueMultiselect
|
<VueMultiselect
|
||||||
@ -31,10 +32,11 @@
|
|||||||
:allow-empty="true"
|
:allow-empty="true"
|
||||||
:show-labels="false"
|
:show-labels="false"
|
||||||
:loading="issueIsLoading"
|
:loading="issueIsLoading"
|
||||||
:placeholder="$t('activity.choose_other_social_issue')"
|
:placeholder="trans(ACTIVITY_CHOOSE_OTHER_SOCIAL_ISSUE)"
|
||||||
:options="socialIssuesOther"
|
:options="socialIssuesOther"
|
||||||
@select="addIssueInList"
|
@select="addIssueInList"
|
||||||
/>
|
>
|
||||||
|
</VueMultiselect>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -42,36 +44,38 @@
|
|||||||
<div class="mb-3 row">
|
<div class="mb-3 row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<label :class="socialActionsClassList">{{
|
<label :class="socialActionsClassList">{{
|
||||||
$t("activity.social_actions")
|
trans(ACTIVITY_SOCIAL_ACTIONS)
|
||||||
}}</label>
|
}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<div v-if="actionIsLoading === true">
|
<div v-if="actionIsLoading === true">
|
||||||
<i class="chill-green fa fa-circle-o-notch fa-spin fa-lg" />
|
<i
|
||||||
|
class="chill-green fa fa-circle-o-notch fa-spin fa-lg"
|
||||||
|
></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
v-else-if="socialIssuesSelected.length === 0"
|
v-else-if="socialIssuesSelected.length === 0"
|
||||||
class="inline-choice chill-no-data-statement mt-3"
|
class="inline-choice chill-no-data-statement mt-3"
|
||||||
>
|
>
|
||||||
{{ $t("activity.select_first_a_social_issue") }}
|
{{ trans(ACTIVITY_SELECT_FIRST_A_SOCIAL_ISSUE) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<template v-else-if="socialActionsList.length > 0">
|
<template
|
||||||
<div
|
v-else-if="
|
||||||
v-if="
|
socialActionsList.length > 0 &&
|
||||||
socialIssuesSelected.length ||
|
(socialIssuesSelected.length ||
|
||||||
socialActionsSelected.length
|
socialActionsSelected.length)
|
||||||
"
|
"
|
||||||
|
>
|
||||||
|
<check-social-action
|
||||||
|
v-for="action in socialActionsList"
|
||||||
|
:key="action.id"
|
||||||
|
:action="action"
|
||||||
|
:selection="socialActionsSelected"
|
||||||
|
@updateSelected="updateActionsSelected"
|
||||||
>
|
>
|
||||||
<check-social-action
|
</check-social-action>
|
||||||
v-for="action in socialActionsList"
|
|
||||||
:key="action.id"
|
|
||||||
:action="action"
|
|
||||||
:selection="socialActionsSelected"
|
|
||||||
@update-selected="updateActionsSelected"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
@ -80,7 +84,7 @@
|
|||||||
"
|
"
|
||||||
class="inline-choice chill-no-data-statement mt-3"
|
class="inline-choice chill-no-data-statement mt-3"
|
||||||
>
|
>
|
||||||
{{ $t("activity.social_action_list_empty") }}
|
{{ trans(ACTIVITY_SOCIAL_ACTION_LIST_EMPTY) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -92,6 +96,14 @@ import VueMultiselect from "vue-multiselect";
|
|||||||
import CheckSocialIssue from "./SocialIssuesAcc/CheckSocialIssue.vue";
|
import CheckSocialIssue from "./SocialIssuesAcc/CheckSocialIssue.vue";
|
||||||
import CheckSocialAction from "./SocialIssuesAcc/CheckSocialAction.vue";
|
import CheckSocialAction from "./SocialIssuesAcc/CheckSocialAction.vue";
|
||||||
import { getSocialIssues, getSocialActionByIssue } from "../api.js";
|
import { getSocialIssues, getSocialActionByIssue } from "../api.js";
|
||||||
|
import {
|
||||||
|
ACTIVITY_SOCIAL_ACTION_LIST_EMPTY,
|
||||||
|
ACTIVITY_SELECT_FIRST_A_SOCIAL_ISSUE,
|
||||||
|
ACTIVITY_SOCIAL_ACTIONS,
|
||||||
|
ACTIVITY_SOCIAL_ISSUES,
|
||||||
|
ACTIVITY_CHOOSE_OTHER_SOCIAL_ISSUE,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SocialIssuesAcc",
|
name: "SocialIssuesAcc",
|
||||||
@ -100,6 +112,16 @@ export default {
|
|||||||
CheckSocialAction,
|
CheckSocialAction,
|
||||||
VueMultiselect,
|
VueMultiselect,
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
trans,
|
||||||
|
ACTIVITY_SOCIAL_ACTION_LIST_EMPTY,
|
||||||
|
ACTIVITY_SELECT_FIRST_A_SOCIAL_ISSUE,
|
||||||
|
ACTIVITY_SOCIAL_ACTIONS,
|
||||||
|
ACTIVITY_SOCIAL_ISSUES,
|
||||||
|
ACTIVITY_CHOOSE_OTHER_SOCIAL_ISSUE,
|
||||||
|
};
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
issueIsLoading: false,
|
issueIsLoading: false,
|
||||||
@ -133,7 +155,7 @@ export default {
|
|||||||
this.actionAreLoaded = false;
|
this.actionAreLoaded = false;
|
||||||
getSocialIssues().then(
|
getSocialIssues().then(
|
||||||
(response) =>
|
(response) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
this.$store.commit("updateIssuesOther", response.results);
|
this.$store.commit("updateIssuesOther", response.results);
|
||||||
|
|
||||||
/* Add in list the issues already associated (if not yet listed)
|
/* Add in list the issues already associated (if not yet listed)
|
||||||
@ -208,7 +230,7 @@ export default {
|
|||||||
this.actionIsLoading = true;
|
this.actionIsLoading = true;
|
||||||
getSocialActionByIssue(item.id).then(
|
getSocialActionByIssue(item.id).then(
|
||||||
(actions) =>
|
(actions) =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve) => {
|
||||||
actions.results.forEach((action) => {
|
actions.results.forEach((action) => {
|
||||||
this.$store.commit("addActionInList", action);
|
this.$store.commit("addActionInList", action);
|
||||||
}, this);
|
}, this);
|
||||||
@ -235,7 +257,6 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
span.multiselect__single {
|
span.multiselect__single {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
@ -102,6 +102,32 @@ activity:
|
|||||||
Remove a document: Supprimer le document
|
Remove a document: Supprimer le document
|
||||||
comment: Commentaire
|
comment: Commentaire
|
||||||
deleted: Échange supprimé
|
deleted: Échange supprimé
|
||||||
|
|
||||||
|
errors: Le formulaire contient des erreurs
|
||||||
|
social_issues: Problématiques sociales
|
||||||
|
choose_other_social_issue: Ajouter une autre problématique sociale...
|
||||||
|
social_actions: Actions d'accompagnement
|
||||||
|
select_first_a_social_issue: Sélectionnez d'abord une problématique sociale
|
||||||
|
social_action_list_empty: Aucune action sociale disponible
|
||||||
|
add_persons: Ajouter des personnes concernées
|
||||||
|
bloc_persons: Usagers
|
||||||
|
bloc_persons_associated: Usagers du parcours
|
||||||
|
bloc_persons_not_associated: Tiers non-pro.
|
||||||
|
bloc_thirdparty: Tiers professionnels
|
||||||
|
bloc_users: T(M)S
|
||||||
|
location: Localisation
|
||||||
|
choose_location: Choisissez une localisation
|
||||||
|
choose_location_type: Choisissez un type de localisation
|
||||||
|
create_new_location: Créer une nouvelle localisation
|
||||||
|
location_fields:
|
||||||
|
name: Nom
|
||||||
|
type: Type
|
||||||
|
phonenumber1: Téléphone
|
||||||
|
phonenumber2: Autre téléphone
|
||||||
|
email: Adresse courriel
|
||||||
|
create_address: Créer une adresse
|
||||||
|
edit_address: Modifier l'adresse
|
||||||
|
|
||||||
No documents: Aucun document
|
No documents: Aucun document
|
||||||
|
|
||||||
# activity filter in list page
|
# activity filter in list page
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
#events
|
#events
|
||||||
Name: Nom
|
|
||||||
Label: Nom
|
|
||||||
Date: Date
|
|
||||||
Event type : Type d'événement
|
Event type : Type d'événement
|
||||||
See: Voir
|
|
||||||
Event: Événement
|
Event: Événement
|
||||||
Events: Événements
|
Events: Événements
|
||||||
'Event : %label%': Événement "%label%"
|
'Event : %label%': Événement "%label%"
|
||||||
@ -123,7 +119,6 @@ Role: Rôles
|
|||||||
Role creation: Nouveau rôle
|
Role creation: Nouveau rôle
|
||||||
Role edit: Modifier un rôle
|
Role edit: Modifier un rôle
|
||||||
|
|
||||||
'': ''
|
|
||||||
xlsx: xlsx
|
xlsx: xlsx
|
||||||
ods: ods
|
ods: ods
|
||||||
csv: csv
|
csv: csv
|
||||||
|
@ -1,30 +1,32 @@
|
|||||||
import ClassicEditorBase from "@ckeditor/ckeditor5-editor-classic/src/classiceditor";
|
import {
|
||||||
import EssentialsPlugin from "@ckeditor/ckeditor5-essentials/src/essentials";
|
Essentials,
|
||||||
import MarkdownPlugin from "@ckeditor/ckeditor5-markdown-gfm/src/markdown";
|
Bold,
|
||||||
import BoldPlugin from "@ckeditor/ckeditor5-basic-styles/src/bold";
|
Italic,
|
||||||
import ItalicPlugin from "@ckeditor/ckeditor5-basic-styles/src/italic";
|
Paragraph,
|
||||||
import BlockQuotePlugin from "@ckeditor/ckeditor5-block-quote/src/blockquote";
|
Markdown,
|
||||||
import HeadingPlugin from "@ckeditor/ckeditor5-heading/src/heading";
|
BlockQuote,
|
||||||
import LinkPlugin from "@ckeditor/ckeditor5-link/src/link";
|
Heading,
|
||||||
import ListPlugin from "@ckeditor/ckeditor5-list/src/list";
|
Link,
|
||||||
import ParagraphPlugin from "@ckeditor/ckeditor5-paragraph/src/paragraph";
|
List,
|
||||||
|
} from "ckeditor5";
|
||||||
|
import coreTranslations from "ckeditor5/translations/fr.js";
|
||||||
|
|
||||||
|
import "ckeditor5/ckeditor5.css";
|
||||||
|
|
||||||
import "./index.scss";
|
import "./index.scss";
|
||||||
|
|
||||||
export default class ClassicEditor extends ClassicEditorBase {}
|
export default {
|
||||||
|
plugins: [
|
||||||
ClassicEditor.builtinPlugins = [
|
Essentials,
|
||||||
EssentialsPlugin,
|
Markdown,
|
||||||
MarkdownPlugin,
|
Bold,
|
||||||
BoldPlugin,
|
Italic,
|
||||||
ItalicPlugin,
|
BlockQuote,
|
||||||
BlockQuotePlugin,
|
Heading,
|
||||||
HeadingPlugin,
|
Link,
|
||||||
LinkPlugin,
|
List,
|
||||||
ListPlugin,
|
Paragraph,
|
||||||
ParagraphPlugin,
|
],
|
||||||
];
|
|
||||||
|
|
||||||
ClassicEditor.defaultConfig = {
|
|
||||||
toolbar: {
|
toolbar: {
|
||||||
items: [
|
items: [
|
||||||
"heading",
|
"heading",
|
||||||
@ -39,5 +41,6 @@ ClassicEditor.defaultConfig = {
|
|||||||
"redo",
|
"redo",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
language: "fr",
|
translations: [coreTranslations],
|
||||||
|
licenseKey: "GPL",
|
||||||
};
|
};
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
import ClassicEditor from "./editor_config";
|
import config from "./editor_config";
|
||||||
|
import { ClassicEditor } from "ckeditor5";
|
||||||
|
|
||||||
const ckeditorFields: NodeListOf<HTMLTextAreaElement> =
|
const ckeditorFields: NodeListOf<HTMLTextAreaElement> =
|
||||||
document.querySelectorAll("textarea[ckeditor]");
|
document.querySelectorAll("textarea[ckeditor]");
|
||||||
ckeditorFields.forEach((field: HTMLTextAreaElement): void => {
|
ckeditorFields.forEach((field: HTMLTextAreaElement): void => {
|
||||||
ClassicEditor.create(field)
|
ClassicEditor.create(field, config).catch((error) => {
|
||||||
.then((editor) => {
|
console.error(error.stack);
|
||||||
//console.log( 'CkEditor was initialized', editor );
|
throw error;
|
||||||
})
|
});
|
||||||
.catch((error) => {
|
|
||||||
console.error(error.stack);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
//Fields.push.apply(Fields, document.querySelectorAll('.cf-fields textarea'));
|
//Fields.push.apply(Fields, document.querySelectorAll('.cf-fields textarea'));
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import NotificationReadToggle from "ChillMainAssets/vuejs/_components/Notification/NotificationReadToggle.vue";
|
import NotificationReadToggle from "ChillMainAssets/vuejs/_components/Notification/NotificationReadToggle.vue";
|
||||||
import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n";
|
import { _createI18n } from "ChillMainAssets/vuejs/_js/i18n";
|
||||||
import NotificationReadAllToggle from "ChillMainAssets/vuejs/_components/Notification/NotificationReadAllToggle.vue";
|
|
||||||
|
|
||||||
const i18n = _createI18n({});
|
const i18n = _createI18n({});
|
||||||
|
|
||||||
window.addEventListener("DOMContentLoaded", function (e) {
|
window.addEventListener("DOMContentLoaded", function () {
|
||||||
document
|
document
|
||||||
.querySelectorAll(".notification_toggle_read_status")
|
.querySelectorAll(".notification_toggle_read_status")
|
||||||
.forEach(function (el, i) {
|
.forEach(function (el, i) {
|
||||||
|
@ -70,7 +70,8 @@ const clickOnAddButton = () => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.item-bloc {
|
.item-bloc {
|
||||||
&.isPicked {
|
&.isPicked {
|
||||||
background: linear-gradient(
|
background:
|
||||||
|
linear-gradient(
|
||||||
180deg,
|
180deg,
|
||||||
rgba(25, 135, 84, 1) 0px,
|
rgba(25, 135, 84, 1) 0px,
|
||||||
rgba(25, 135, 84, 0) 9px
|
rgba(25, 135, 84, 0) 9px
|
||||||
|
@ -1,61 +1,65 @@
|
|||||||
<template>
|
<template>
|
||||||
<span v-if="entity.type === 'person'" class="badge rounded-pill bg-person">
|
<span
|
||||||
{{ $t("person") }}
|
v-if="props.entity.type === 'person'"
|
||||||
|
class="badge rounded-pill bg-person"
|
||||||
|
>
|
||||||
|
{{ trans(PERSON) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
v-if="entity.type === 'thirdparty'"
|
v-if="props.entity.type === 'thirdparty'"
|
||||||
class="badge rounded-pill bg-thirdparty"
|
class="badge rounded-pill bg-thirdparty"
|
||||||
>
|
>
|
||||||
<template v-if="options.displayLong !== true">
|
<template v-if="props.options.displayLong !== true">
|
||||||
{{ $t("thirdparty.thirdparty") }}
|
{{ trans(THIRDPARTY) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i class="fa fa-fw fa-user" v-if="entity.kind === 'child'" />
|
<i class="fa fa-fw fa-user" v-if="props.entity.kind === 'child'" />
|
||||||
<i
|
<i
|
||||||
class="fa fa-fw fa-hospital-o"
|
class="fa fa-fw fa-hospital-o"
|
||||||
v-else-if="entity.kind === 'company'"
|
v-else-if="props.entity.kind === 'company'"
|
||||||
/>
|
/>
|
||||||
<i class="fa fa-fw fa-user-md" v-else />
|
<i class="fa fa-fw fa-user-md" v-else />
|
||||||
|
|
||||||
<template v-if="options.displayLong === true">
|
<template v-if="props.options.displayLong === true">
|
||||||
<span v-if="entity.kind === 'child'">{{
|
<span v-if="props.entity.kind === 'child'">{{
|
||||||
$t("thirdparty.child")
|
trans(THIRDPARTY_CONTACT_OF)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="entity.kind === 'company'">{{
|
<span v-else-if="props.entity.kind === 'company'">{{
|
||||||
$t("thirdparty.company")
|
trans(THIRDPARTY_A_CONTACT)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else>{{ $t("thirdparty.contact") }}</span>
|
<span v-else>{{ $t("thirdparty.contact") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-if="entity.type === 'user'" class="badge rounded-pill bg-user">
|
<span
|
||||||
{{ $t("user") }}
|
v-if="props.entity.type === 'user'"
|
||||||
|
class="badge rounded-pill bg-user"
|
||||||
|
>
|
||||||
|
{{ trans(ACCEPTED_USERS) }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-if="entity.type === 'household'" class="badge rounded-pill bg-user">
|
<span
|
||||||
{{ $t("household") }}
|
v-if="props.entity.type === 'household'"
|
||||||
|
class="badge rounded-pill bg-user"
|
||||||
|
>
|
||||||
|
{{ trans(HOUSEHOLD) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
import {
|
||||||
name: "BadgeEntity",
|
trans,
|
||||||
props: ["options", "entity"],
|
HOUSEHOLD,
|
||||||
i18n: {
|
ACCEPTED_USERS,
|
||||||
messages: {
|
THIRDPARTY_A_CONTACT,
|
||||||
fr: {
|
THIRDPARTY_CONTACT_OF,
|
||||||
person: "Usager",
|
PERSON,
|
||||||
thirdparty: {
|
THIRDPARTY,
|
||||||
thirdparty: "Tiers",
|
} from "translator";
|
||||||
child: "Personne de contact",
|
|
||||||
company: "Personne morale",
|
const props = defineProps({
|
||||||
contact: "Personne physique",
|
options: Object,
|
||||||
},
|
entity: Object,
|
||||||
user: "TMS",
|
});
|
||||||
household: "Ménage",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -66,13 +66,13 @@
|
|||||||
<div v-if="useDatePane === true" class="address-more">
|
<div v-if="useDatePane === true" class="address-more">
|
||||||
<div v-if="address.validFrom">
|
<div v-if="address.validFrom">
|
||||||
<span class="validFrom">
|
<span class="validFrom">
|
||||||
<b>{{ $t("validFrom") }}</b
|
<b>{{ trans(ADDRESS_VALID_FROM) }}</b
|
||||||
>: {{ $d(address.validFrom.date) }}
|
>: {{ $d(address.validFrom.date) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="address.validTo">
|
<div v-if="address.validTo">
|
||||||
<span class="validTo">
|
<span class="validTo">
|
||||||
<b>{{ $t("validTo") }}</b
|
<b>{{ trans(ADDRESS_VALID_TO) }}</b
|
||||||
>: {{ $d(address.validTo.date) }}
|
>: {{ $d(address.validTo.date) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -83,6 +83,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Confidential from "ChillMainAssets/vuejs/_components/Confidential.vue";
|
import Confidential from "ChillMainAssets/vuejs/_components/Confidential.vue";
|
||||||
import AddressDetailsButton from "ChillMainAssets/vuejs/_components/AddressDetails/AddressDetailsButton.vue";
|
import AddressDetailsButton from "ChillMainAssets/vuejs/_components/AddressDetails/AddressDetailsButton.vue";
|
||||||
|
import { trans, ADDRESS_VALID_FROM, ADDRESS_VALID_TO } from "translator";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddressRenderBox",
|
name: "AddressRenderBox",
|
||||||
@ -107,6 +108,9 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
setup() {
|
||||||
|
return { trans, ADDRESS_VALID_FROM, ADDRESS_VALID_TO };
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
component() {
|
component() {
|
||||||
return this.isMultiline === true ? "div" : "span";
|
return this.isMultiline === true ? "div" : "span";
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
v-if="!subscriberFinal"
|
v-if="!subscriberFinal"
|
||||||
@click="subscribeTo('subscribe', 'final')"
|
@click="subscribeTo('subscribe', 'final')"
|
||||||
>
|
>
|
||||||
<i class="fa fa-check fa-fw" />
|
<i class="fa fa-check fa-fw"></i>
|
||||||
{{ $t("subscribe_final") }}
|
{{ trans(WORKFLOW_SUBSCRIBE_FINAL) }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-misc"
|
class="btn btn-misc"
|
||||||
@ -15,8 +15,8 @@
|
|||||||
v-if="subscriberFinal"
|
v-if="subscriberFinal"
|
||||||
@click="subscribeTo('unsubscribe', 'final')"
|
@click="subscribeTo('unsubscribe', 'final')"
|
||||||
>
|
>
|
||||||
<i class="fa fa-times fa-fw" />
|
<i class="fa fa-times fa-fw"></i>
|
||||||
{{ $t("unsubscribe_final") }}
|
{{ trans(WORKFLOW_UNSUBSCRIBE_FINAL) }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-misc"
|
class="btn btn-misc"
|
||||||
@ -24,8 +24,8 @@
|
|||||||
v-if="!subscriberStep"
|
v-if="!subscriberStep"
|
||||||
@click="subscribeTo('subscribe', 'step')"
|
@click="subscribeTo('subscribe', 'step')"
|
||||||
>
|
>
|
||||||
<i class="fa fa-check fa-fw" />
|
<i class="fa fa-check fa-fw"></i>
|
||||||
{{ $t("subscribe_all_steps") }}
|
{{ trans(WORKFLOW_SUBSCRIBE_ALL_STEPS) }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-misc"
|
class="btn btn-misc"
|
||||||
@ -33,94 +33,55 @@
|
|||||||
v-if="subscriberStep"
|
v-if="subscriberStep"
|
||||||
@click="subscribeTo('unsubscribe', 'step')"
|
@click="subscribeTo('unsubscribe', 'step')"
|
||||||
>
|
>
|
||||||
<i class="fa fa-times fa-fw" />
|
<i class="fa fa-times fa-fw"></i>
|
||||||
{{ $t("unsubscribe_all_steps") }}
|
{{ trans(WORKFLOW_UNSUBSCRIBE_ALL_STEPS) }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods.ts";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods.ts";
|
||||||
|
import { defineProps, defineEmits } from "vue";
|
||||||
|
import {
|
||||||
|
trans,
|
||||||
|
WORKFLOW_SUBSCRIBE_FINAL,
|
||||||
|
WORKFLOW_UNSUBSCRIBE_FINAL,
|
||||||
|
WORKFLOW_SUBSCRIBE_ALL_STEPS,
|
||||||
|
WORKFLOW_UNSUBSCRIBE_ALL_STEPS,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
// props
|
||||||
name: "EntityWorkflowVueSubscriber",
|
const props = defineProps({
|
||||||
i18n: {
|
entityWorkflowId: {
|
||||||
messages: {
|
type: Number,
|
||||||
fr: {
|
required: true,
|
||||||
subscribe_final: "Recevoir une notification à l'étape finale",
|
|
||||||
unsubscribe_final:
|
|
||||||
"Ne plus recevoir de notification à l'étape finale",
|
|
||||||
subscribe_all_steps:
|
|
||||||
"Recevoir une notification à chaque étape du suivi",
|
|
||||||
unsubscribe_all_steps:
|
|
||||||
"Ne plus recevoir de notification à chaque étape du suivi",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
props: {
|
subscriberStep: {
|
||||||
entityWorkflowId: {
|
type: Boolean,
|
||||||
type: Number,
|
required: true,
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
subscriberStep: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
subscriberFinal: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
emits: ["subscriptionUpdated"],
|
subscriberFinal: {
|
||||||
methods: {
|
type: Boolean,
|
||||||
subscribeTo(step, to) {
|
required: true,
|
||||||
let params = new URLSearchParams();
|
},
|
||||||
params.set("subscribe", to);
|
});
|
||||||
|
|
||||||
const url =
|
//methods
|
||||||
`/api/1.0/main/workflow/${this.entityWorkflowId}/${step}?` +
|
const subscribeTo = (step, to) => {
|
||||||
params.toString();
|
let params = new URLSearchParams();
|
||||||
|
params.set("subscribe", to);
|
||||||
|
|
||||||
makeFetch("POST", url).then((response) => {
|
const url =
|
||||||
this.$emit("subscriptionUpdated", response);
|
`/api/1.0/main/workflow/${props.entityWorkflowId}/${step}?` +
|
||||||
});
|
params.toString();
|
||||||
},
|
|
||||||
},
|
makeFetch("POST", url).then((response) => {
|
||||||
|
emit("subscriptionUpdated", response);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
* ALTERNATIVES
|
|
||||||
*
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="laststep">
|
|
||||||
<label class="form-check-label" for="laststep">{{ $t('subscribe_final') }}</label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="allsteps">
|
|
||||||
<label class="form-check-label" for="allsteps">{{ $t('subscribe_all_steps') }}</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="list-group my-3">
|
// emit
|
||||||
<label class="list-group-item">
|
const emit = defineEmits(["subscriptionUpdated"]);
|
||||||
<input class="form-check-input me-1" type="checkbox" value="">
|
|
||||||
{{ $t('subscribe_final') }}
|
|
||||||
</label>
|
|
||||||
<label class="list-group-item">
|
|
||||||
<input class="form-check-input me-1" type="checkbox" value="">
|
|
||||||
{{ $t('subscribe_all_steps') }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn-group-vertical my-3" role="group">
|
|
||||||
<button type="button" class="btn btn-outline-primary">
|
|
||||||
<i class="fa fa-check fa-fw"></i>
|
|
||||||
{{ $t('subscribe_final') }}
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-outline-primary">
|
|
||||||
<i class="fa fa-check fa-fw"></i>
|
|
||||||
{{ $t('subscribe_all_steps') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
*/
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex-table workflow" id="workflow-list">
|
<div class="flex-table workflow" id="workflow-list">
|
||||||
<div
|
<div
|
||||||
v-for="(w, i) in workflows"
|
v-for="(w, i) in props.workflows"
|
||||||
:key="`workflow-${i}`"
|
:key="`workflow-${i}`"
|
||||||
class="item-bloc"
|
class="item-bloc"
|
||||||
>
|
>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<span
|
<span
|
||||||
v-if="w.isOnHoldAtCurrentStep"
|
v-if="w.isOnHoldAtCurrentStep"
|
||||||
class="badge bg-success rounded-pill"
|
class="badge bg-success rounded-pill"
|
||||||
>{{ $t("on_hold") }}</span
|
>{{ trans(WORKFLOW_ON_HOLD) }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -56,11 +56,11 @@
|
|||||||
<div class="item-col flex-grow-1">
|
<div class="item-col flex-grow-1">
|
||||||
<p v-if="isUserSubscribedToStep(w)">
|
<p v-if="isUserSubscribedToStep(w)">
|
||||||
<i class="fa fa-check fa-fw"></i>
|
<i class="fa fa-check fa-fw"></i>
|
||||||
{{ $t("you_subscribed_to_all_steps") }}
|
{{ trans(WORKFLOW_YOU_SUBSCRIBED_TO_ALL_STEPS) }}
|
||||||
</p>
|
</p>
|
||||||
<p v-if="isUserSubscribedToFinal(w)">
|
<p v-if="isUserSubscribedToFinal(w)">
|
||||||
<i class="fa fa-check fa-fw"></i>
|
<i class="fa fa-check fa-fw"></i>
|
||||||
{{ $t("you_subscribed_to_final_step") }}
|
{{ trans(WORKFLOW_YOU_SUBSCRIBED_TO_FINAL_STEP) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<a
|
<a
|
||||||
:href="goToUrl(w)"
|
:href="goToUrl(w)"
|
||||||
class="btn btn-sm btn-show"
|
class="btn btn-sm btn-show"
|
||||||
:title="$t('action.show')"
|
:title="trans(SEE)"
|
||||||
></a>
|
></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -79,85 +79,65 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import Popover from "bootstrap/js/src/popover";
|
import Popover from "bootstrap/js/src/popover";
|
||||||
|
import { onMounted } from "vue";
|
||||||
|
import {
|
||||||
|
trans,
|
||||||
|
BY_USER,
|
||||||
|
SEE,
|
||||||
|
WORKFLOW_YOU_SUBSCRIBED_TO_ALL_STEPS,
|
||||||
|
WORKFLOW_YOU_SUBSCRIBED_TO_FINAL_STEP,
|
||||||
|
WORKFLOW_ON_HOLD,
|
||||||
|
WORKFLOW_AT,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
const i18n = {
|
// props
|
||||||
messages: {
|
const props = defineProps({
|
||||||
fr: {
|
workflows: {
|
||||||
you_subscribed_to_all_steps:
|
type: Array,
|
||||||
"Vous recevrez une notification à chaque étape",
|
required: true,
|
||||||
you_subscribed_to_final_step:
|
|
||||||
"Vous recevrez une notification à l'étape finale",
|
|
||||||
by: "Par",
|
|
||||||
at: "Le",
|
|
||||||
on_hold: "En attente",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// methods
|
||||||
|
const goToUrl = (w) => `/fr/main/workflow/${w.id}/show`;
|
||||||
|
const getPopTitle = (step) => {
|
||||||
|
if (step.transitionPrevious != null) {
|
||||||
|
//console.log(step.transitionPrevious.text);
|
||||||
|
let freezed = step.isFreezed
|
||||||
|
? `<i class="fa fa-snowflake-o fa-sm me-1"></i>`
|
||||||
|
: ``;
|
||||||
|
return `${freezed}${step.transitionPrevious.text}`;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
const getPopContent = (step) => {
|
||||||
|
if (step.transitionPrevious != null) {
|
||||||
|
if (step.transitionPreviousBy !== null) {
|
||||||
|
return `<ul class="small_in_title">
|
||||||
|
<li><span class="item-key">${trans(BY_USER)} : </span><b>${step.transitionPreviousBy.text}</b></li>
|
||||||
|
<li><span class="item-key">${trans(WORKFLOW_AT)} : </span><b>${formatDate(step.transitionPreviousAt.datetime)}</b></li>
|
||||||
|
</ul>`;
|
||||||
|
} else {
|
||||||
|
return `<ul class="small_in_title">
|
||||||
|
<li><span class="item-key">${trans(WORKFLOW_AT)} : </span><b>${formatDate(step.transitionPreviousAt.datetime)}</b></li>
|
||||||
|
</ul>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const formatDate = (datetime) =>
|
||||||
|
datetime.split("T")[0] + " " + datetime.split("T")[1].substring(0, 5);
|
||||||
|
const isUserSubscribedToStep = () => false;
|
||||||
|
const isUserSubscribedToFinal = () => false;
|
||||||
|
|
||||||
export default {
|
onMounted(() => {
|
||||||
name: "ListWorkflow",
|
const triggerList = [].slice.call(
|
||||||
i18n: i18n,
|
document.querySelectorAll('[data-bs-toggle="popover"]'),
|
||||||
props: {
|
);
|
||||||
workflows: {
|
triggerList.map(function (el) {
|
||||||
type: Array,
|
return new Popover(el, {
|
||||||
required: true,
|
html: true,
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goToUrl(w) {
|
|
||||||
return `/fr/main/workflow/${w.id}/show`;
|
|
||||||
},
|
|
||||||
getPopTitle(step) {
|
|
||||||
if (step.transitionPrevious != null) {
|
|
||||||
//console.log(step.transitionPrevious.text);
|
|
||||||
let freezed = step.isFreezed
|
|
||||||
? `<i class="fa fa-snowflake-o fa-sm me-1"></i>`
|
|
||||||
: ``;
|
|
||||||
return `${freezed}${step.transitionPrevious.text}`;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getPopContent(step) {
|
|
||||||
if (step.transitionPrevious != null) {
|
|
||||||
if (step.transitionPreviousBy !== null) {
|
|
||||||
return `<ul class="small_in_title">
|
|
||||||
<li><span class="item-key">${i18n.messages.fr.by} : </span><b>${step.transitionPreviousBy.text}</b></li>
|
|
||||||
<li><span class="item-key">${i18n.messages.fr.at} : </span><b>${this.formatDate(step.transitionPreviousAt.datetime)}</b></li>
|
|
||||||
</ul>`;
|
|
||||||
} else {
|
|
||||||
return `<ul class="small_in_title">
|
|
||||||
<li><span class="item-key">${i18n.messages.fr.at} : </span><b>${this.formatDate(step.transitionPreviousAt.datetime)}</b></li>
|
|
||||||
</ul>`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatDate(datetime) {
|
|
||||||
return (
|
|
||||||
datetime.split("T")[0] +
|
|
||||||
" " +
|
|
||||||
datetime.split("T")[1].substring(0, 5)
|
|
||||||
);
|
|
||||||
},
|
|
||||||
isUserSubscribedToStep(w) {
|
|
||||||
// todo
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
isUserSubscribedToFinal(w) {
|
|
||||||
// todo
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
const triggerList = [].slice.call(
|
|
||||||
document.querySelectorAll('[data-bs-toggle="popover"]'),
|
|
||||||
);
|
|
||||||
const popoverList = triggerList.map(function (el) {
|
|
||||||
//console.log('popover', el)
|
|
||||||
return new Popover(el, {
|
|
||||||
html: true,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<pick-workflow
|
<Pick-workflow
|
||||||
:relatedEntityClass="this.relatedEntityClass"
|
:relatedEntityClass="props.relatedEntityClass"
|
||||||
:relatedEntityId="this.relatedEntityId"
|
:relatedEntityId="props.relatedEntityId"
|
||||||
:workflowsAvailables="workflowsAvailables"
|
:workflowsAvailables="props.workflowsAvailables"
|
||||||
:preventDefaultMoveToGenerate="this.$props.preventDefaultMoveToGenerate"
|
:preventDefaultMoveToGenerate="props.preventDefaultMoveToGenerate"
|
||||||
:goToGenerateWorkflowPayload="this.goToGenerateWorkflowPayload"
|
:goToGenerateWorkflowPayload="props.goToGenerateWorkflowPayload"
|
||||||
:countExistingWorkflows="countWorkflows"
|
:countExistingWorkflows="countWorkflows"
|
||||||
|
:embedded-within-list-modal="false"
|
||||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||||
@click-open-list="openModal"
|
@click-open-list="openModal"
|
||||||
></pick-workflow>
|
></Pick-workflow>
|
||||||
|
|
||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
<modal
|
<Modal
|
||||||
v-if="modal.showModal"
|
v-if="modal.showModal"
|
||||||
:modalDialogClass="modal.modalDialogClass"
|
:modalDialogClass="modal.modalDialogClass"
|
||||||
@close="modal.showModal = false"
|
@close="modal.showModal = false"
|
||||||
>
|
>
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<h2 class="modal-title">{{ $t("workflow_list") }}</h2>
|
<h2 class="modal-title">{{ trans(WORKFLOW_LIST) }}</h2>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
@ -27,103 +28,80 @@
|
|||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<pick-workflow
|
<pick-workflow
|
||||||
v-if="allowCreate"
|
v-if="allowCreate"
|
||||||
:relatedEntityClass="this.relatedEntityClass"
|
:relatedEntityClass="props.relatedEntityClass"
|
||||||
:relatedEntityId="this.relatedEntityId"
|
:relatedEntityId="props.relatedEntityId"
|
||||||
:workflowsAvailables="workflowsAvailables"
|
:workflowsAvailables="props.workflowsAvailables"
|
||||||
:preventDefaultMoveToGenerate="
|
:preventDefaultMoveToGenerate="
|
||||||
this.$props.preventDefaultMoveToGenerate
|
props.preventDefaultMoveToGenerate
|
||||||
"
|
"
|
||||||
:goToGenerateWorkflowPayload="
|
:goToGenerateWorkflowPayload="
|
||||||
this.goToGenerateWorkflowPayload
|
props.goToGenerateWorkflowPayload
|
||||||
"
|
"
|
||||||
:countExistingWorkflows="countWorkflows"
|
:countExistingWorkflows="countWorkflows"
|
||||||
:embedded-within-list-modal="true"
|
:embedded-within-list-modal="true"
|
||||||
@go-to-generate-workflow="this.goToGenerateWorkflow"
|
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||||
></pick-workflow>
|
></pick-workflow>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</Modal>
|
||||||
</teleport>
|
</teleport>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
|
import { ref, computed, defineProps, defineEmits } from "vue";
|
||||||
import Modal from "ChillMainAssets/vuejs/_components/Modal";
|
import Modal from "ChillMainAssets/vuejs/_components/Modal";
|
||||||
import PickWorkflow from "ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue";
|
import PickWorkflow from "ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue";
|
||||||
import ListWorkflowVue from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflow.vue";
|
import ListWorkflowVue from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflow.vue";
|
||||||
|
import { trans, WORKFLOW_LIST } from "translator";
|
||||||
|
|
||||||
export default {
|
// Define props
|
||||||
name: "ListWorkflowModal",
|
const props = defineProps({
|
||||||
components: {
|
workflows: {
|
||||||
Modal,
|
type: Array,
|
||||||
PickWorkflow,
|
required: true,
|
||||||
ListWorkflowVue,
|
|
||||||
},
|
},
|
||||||
emits: ["goToGenerateWorkflow"],
|
allowCreate: {
|
||||||
props: {
|
type: Boolean,
|
||||||
workflows: {
|
required: true,
|
||||||
type: Array,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
allowCreate: {
|
|
||||||
type: Boolean,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
relatedEntityClass: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
relatedEntityId: {
|
|
||||||
type: Number,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
workflowsAvailables: {
|
|
||||||
type: Array,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
preventDefaultMoveToGenerate: {
|
|
||||||
type: Boolean,
|
|
||||||
required: false,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
goToGenerateWorkflowPayload: {
|
|
||||||
required: false,
|
|
||||||
default: {},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data() {
|
relatedEntityClass: {
|
||||||
return {
|
type: String,
|
||||||
modal: {
|
required: true,
|
||||||
showModal: false,
|
|
||||||
modalDialogClass: "modal-dialog-scrollable modal-xl",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {
|
relatedEntityId: {
|
||||||
countWorkflows() {
|
type: Number,
|
||||||
return this.workflows.length;
|
required: false,
|
||||||
},
|
|
||||||
hasWorkflow() {
|
|
||||||
return this.countWorkflows > 0;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
workflowsAvailables: {
|
||||||
openModal() {
|
type: Array,
|
||||||
this.modal.showModal = true;
|
required: true,
|
||||||
},
|
|
||||||
goToGenerateWorkflow(data) {
|
|
||||||
console.log("go to generate workflow intercepted", data);
|
|
||||||
this.$emit("goToGenerateWorkflow", data);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
i18n: {
|
preventDefaultMoveToGenerate: {
|
||||||
messages: {
|
type: Boolean,
|
||||||
fr: {
|
required: false,
|
||||||
workflow_list: "Liste des workflows associés",
|
default: false,
|
||||||
workflow: " workflow associé",
|
|
||||||
workflows: " workflows associés",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
goToGenerateWorkflowPayload: {
|
||||||
|
required: false,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Define emits
|
||||||
|
const emit = defineEmits(["goToGenerateWorkflow"]);
|
||||||
|
|
||||||
|
// Reactive data
|
||||||
|
const modal = ref({
|
||||||
|
showModal: false,
|
||||||
|
modalDialogClass: "modal-dialog-scrollable modal-xl",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Computed properties
|
||||||
|
const countWorkflows = computed(() => props.workflows.length);
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
const openModal = () => (modal.value.showModal = true);
|
||||||
|
|
||||||
|
const goToGenerateWorkflow = (data) => emit("goToGenerateWorkflow", data);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@ -8,28 +8,28 @@
|
|||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
>
|
>
|
||||||
<div class="modal-dialog" :class="modalDialogClass">
|
<div class="modal-dialog" :class="props.modalDialogClass || {}">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<slot name="header" />
|
<slot name="header"></slot>
|
||||||
<button class="close btn" @click="$emit('close')">
|
<button class="close btn" @click="emits('close')">
|
||||||
<i class="fa fa-times" aria-hidden="true" />
|
<i class="fa fa-times" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="body-head">
|
<div class="body-head">
|
||||||
<slot name="body-head" />
|
<slot name="body-head"></slot>
|
||||||
</div>
|
</div>
|
||||||
<slot name="body" />
|
<slot name="body"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" v-if="!hideFooter">
|
<div class="modal-footer" v-if="!hideFooter">
|
||||||
<button
|
<button
|
||||||
class="btn btn-cancel"
|
class="btn btn-cancel"
|
||||||
@click="$emit('close')"
|
@click="emits('close')"
|
||||||
>
|
>
|
||||||
{{ $t("action.close") }}
|
{{ trans(MODAL_ACTION_CLOSE) }}
|
||||||
</button>
|
</button>
|
||||||
<slot name="footer" />
|
<slot name="footer"></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -39,8 +39,7 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts" setup>
|
||||||
import { defineComponent } from "vue";
|
|
||||||
/*
|
/*
|
||||||
* This Modal component is a mix between Vue3 modal implementation
|
* This Modal component is a mix between Vue3 modal implementation
|
||||||
* [+] with 'v-if:showModal' directive:parameter, html scope is added/removed not just shown/hidden
|
* [+] with 'v-if:showModal' directive:parameter, html scope is added/removed not just shown/hidden
|
||||||
@ -50,22 +49,23 @@ import { defineComponent } from "vue";
|
|||||||
* [+] using bootstrap css classes, the modal have a responsive behaviour,
|
* [+] using bootstrap css classes, the modal have a responsive behaviour,
|
||||||
* [+] modal design can be configured using css classes (size, scroll)
|
* [+] modal design can be configured using css classes (size, scroll)
|
||||||
*/
|
*/
|
||||||
export default defineComponent({
|
import { trans, MODAL_ACTION_CLOSE } from "translator";
|
||||||
name: "Modal",
|
import { defineProps } from "vue";
|
||||||
props: {
|
|
||||||
modalDialogClass: {
|
export interface ModalProps {
|
||||||
type: Object,
|
modalDialogClass: object | null;
|
||||||
required: false,
|
hideFooter: boolean;
|
||||||
default: {},
|
}
|
||||||
},
|
|
||||||
hideFooter: {
|
// Define the props
|
||||||
type: Boolean,
|
const props = withDefaults(defineProps<ModalProps>(), {
|
||||||
required: false,
|
hideFooter: false,
|
||||||
default: false,
|
modalDialogClass: null,
|
||||||
},
|
|
||||||
},
|
|
||||||
emits: ["close"],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits<{
|
||||||
|
close: [];
|
||||||
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
:class="overrideClass"
|
:class="overrideClass"
|
||||||
type="button"
|
type="button"
|
||||||
:title="$t('markAsUnread')"
|
:title="trans(NOTIFICATION_MARK_AS_UNREAD)"
|
||||||
@click="markAsUnread"
|
@click="markAsUnread"
|
||||||
>
|
>
|
||||||
<i class="fa fa-sm fa-envelope-o" />
|
<i class="fa fa-sm fa-envelope-o"></i>
|
||||||
<span v-if="!buttonNoText" class="ps-2">
|
<span v-if="!props.buttonNoText" class="ps-2">
|
||||||
{{ $t("markAsUnread") }}
|
{{ trans(NOTIFICATION_MARK_AS_UNREAD) }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -23,12 +23,12 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
:class="overrideClass"
|
:class="overrideClass"
|
||||||
type="button"
|
type="button"
|
||||||
:title="$t('markAsRead')"
|
:title="trans(NOTIFICATION_MARK_AS_READ)"
|
||||||
@click="markAsRead"
|
@click="markAsRead"
|
||||||
>
|
>
|
||||||
<i class="fa fa-sm fa-envelope-open-o" />
|
<i class="fa fa-sm fa-envelope-open-o"></i>
|
||||||
<span v-if="!buttonNoText" class="ps-2">
|
<span v-if="!buttonNoText" class="ps-2">
|
||||||
{{ $t("markAsRead") }}
|
{{ trans(NOTIFICATION_MARK_AS_READ) }}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -37,9 +37,9 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="btn btn-outline-primary"
|
class="btn btn-outline-primary"
|
||||||
:href="showUrl"
|
:href="showUrl"
|
||||||
:title="$t('action.show')"
|
:title="trans(SEE)"
|
||||||
>
|
>
|
||||||
<i class="fa fa-sm fa-comment-o" />
|
<i class="fa fa-sm fa-comment-o"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- "Mark All Read" button -->
|
<!-- "Mark All Read" button -->
|
||||||
@ -51,7 +51,7 @@
|
|||||||
:title="$t('markAllRead')"
|
:title="$t('markAllRead')"
|
||||||
@click="markAllRead"
|
@click="markAllRead"
|
||||||
>
|
>
|
||||||
<i class="fa fa-sm fa-envelope-o" />
|
<i class="fa fa-sm fa-envelope-o"></i>
|
||||||
<span v-if="!buttonNoText" class="ps-2">
|
<span v-if="!buttonNoText" class="ps-2">
|
||||||
{{ $t("markAllRead") }}
|
{{ $t("markAllRead") }}
|
||||||
</span>
|
</span>
|
||||||
@ -59,89 +59,66 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
|
import { computed } from "vue";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods.ts";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods.ts";
|
||||||
|
import {
|
||||||
|
trans,
|
||||||
|
NOTIFICATION_MARK_AS_READ,
|
||||||
|
NOTIFICATION_MARK_AS_UNREAD,
|
||||||
|
SEE,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
export default {
|
// Props
|
||||||
name: "NotificationReadToggle",
|
const props = defineProps({
|
||||||
props: {
|
isRead: {
|
||||||
isRead: {
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
type: Boolean,
|
|
||||||
},
|
|
||||||
notificationId: {
|
|
||||||
required: true,
|
|
||||||
type: Number,
|
|
||||||
},
|
|
||||||
// Optional
|
|
||||||
buttonClass: {
|
|
||||||
required: false,
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
buttonNoText: {
|
|
||||||
required: false,
|
|
||||||
type: Boolean,
|
|
||||||
},
|
|
||||||
showUrl: {
|
|
||||||
required: false,
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
emits: ["markRead", "markUnread"],
|
notificationId: {
|
||||||
computed: {
|
type: Number,
|
||||||
/// [Option] override default button appearance (btn-misc)
|
required: true,
|
||||||
overrideClass() {
|
|
||||||
return this.buttonClass ? this.buttonClass : "btn-misc";
|
|
||||||
},
|
|
||||||
/// [Option] don't display text on button
|
|
||||||
buttonHideText() {
|
|
||||||
return this.buttonNoText;
|
|
||||||
},
|
|
||||||
/// [Option] showUrl is href for show page second button.
|
|
||||||
// When passed, the component return a button-group with 2 buttons.
|
|
||||||
isButtonGroup() {
|
|
||||||
return this.showUrl;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
buttonClass: {
|
||||||
markAsUnread() {
|
type: String,
|
||||||
makeFetch(
|
required: false,
|
||||||
"POST",
|
|
||||||
`/api/1.0/main/notification/${this.notificationId}/mark/unread`,
|
|
||||||
[],
|
|
||||||
).then(() => {
|
|
||||||
this.$emit("markRead", { notificationId: this.notificationId });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
markAsRead() {
|
|
||||||
makeFetch(
|
|
||||||
"POST",
|
|
||||||
`/api/1.0/main/notification/${this.notificationId}/mark/read`,
|
|
||||||
[],
|
|
||||||
).then(() => {
|
|
||||||
this.$emit("markUnread", {
|
|
||||||
notificationId: this.notificationId,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
markAllRead() {
|
|
||||||
makeFetch(
|
|
||||||
"POST",
|
|
||||||
`/api/1.0/main/notification/markallread`,
|
|
||||||
[],
|
|
||||||
).then(() => {
|
|
||||||
this.$emit("markAllRead");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
i18n: {
|
buttonNoText: {
|
||||||
messages: {
|
type: Boolean,
|
||||||
fr: {
|
required: false,
|
||||||
markAsUnread: "Marquer comme non-lu",
|
|
||||||
markAsRead: "Marquer comme lu",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
showUrl: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Emits
|
||||||
|
const emit = defineEmits(["markRead", "markUnread"]);
|
||||||
|
|
||||||
|
// Computed
|
||||||
|
const overrideClass = computed(() => props.buttonClass || "btn-misc");
|
||||||
|
const isButtonGroup = computed(() => props.showUrl);
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
const markAsUnread = () => {
|
||||||
|
makeFetch(
|
||||||
|
"POST",
|
||||||
|
`/api/1.0/main/notification/${props.notificationId}/mark/unread`,
|
||||||
|
[],
|
||||||
|
).then(() => {
|
||||||
|
emit("markRead", { notificationId: props.notificationId });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const markAsRead = () => {
|
||||||
|
makeFetch(
|
||||||
|
"POST",
|
||||||
|
`/api/1.0/main/notification/${props.notificationId}/mark/read`,
|
||||||
|
[],
|
||||||
|
).then(() => {
|
||||||
|
emit("markUnread", { notificationId: props.notificationId });
|
||||||
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
]"
|
]"
|
||||||
@click="openModal"
|
@click="openModal"
|
||||||
>
|
>
|
||||||
<i v-if="isChangeIcon" class="fa me-2" :class="options.changeIcon" />
|
<i v-if="isChangeIcon" class="fa me-2" :class="options.changeIcon"></i>
|
||||||
|
|
||||||
<span v-if="!noText">
|
<span v-if="!noText">
|
||||||
{{ $t("online_edit_document") }}
|
{{ trans(WOPI_ONLINE_EDIT_DOCUMENT) }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@ -19,8 +19,8 @@
|
|||||||
<div class="wopi-frame" v-if="isOpenDocument">
|
<div class="wopi-frame" v-if="isOpenDocument">
|
||||||
<modal
|
<modal
|
||||||
v-if="modal.showModal"
|
v-if="modal.showModal"
|
||||||
:modal-dialog-class="modal.modalDialogClass"
|
:modalDialogClass="modal.modalDialogClass"
|
||||||
:hide-footer="true"
|
:hideFooter="true"
|
||||||
@close="modal.showModal = false"
|
@close="modal.showModal = false"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
@ -28,203 +28,164 @@
|
|||||||
<span class="ms-auto me-3">
|
<span class="ms-auto me-3">
|
||||||
<span v-if="options.title">{{ options.title }}</span>
|
<span v-if="options.title">{{ options.title }}</span>
|
||||||
</span>
|
</span>
|
||||||
<!--
|
|
||||||
<a class="btn btn-outline-light">
|
|
||||||
<i class="fa fa-save fa-fw"></i>
|
|
||||||
{{ $t('save_and_quit') }}
|
|
||||||
</a>
|
|
||||||
-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #body>
|
<template #body>
|
||||||
<div v-if="loading" class="loading">
|
<div v-if="loading" class="loading">
|
||||||
<i
|
<i
|
||||||
class="fa fa-circle-o-notch fa-spin fa-3x"
|
class="fa fa-circle-o-notch fa-spin fa-3x"
|
||||||
:title="$t('loading')"
|
:title="trans(WOPI_LOADING)"
|
||||||
/>
|
></i>
|
||||||
</div>
|
</div>
|
||||||
<iframe :src="this.wopiUrl" @load="loaded" />
|
<iframe :src="this.wopiUrl" @load="loaded"></iframe>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<modal
|
<Modal
|
||||||
v-if="modal.showModal"
|
v-if="modal.showModal"
|
||||||
modal-dialog-class="modal-sm"
|
modalDialogClass="modal-sm"
|
||||||
@close="modal.showModal = false"
|
@close="modal.showModal = false"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template v-slot:header>
|
||||||
<h3>{{ $t("invalid_title") }}</h3>
|
<h3>{{ trans(WOPI_INVALID_TITLE) }}</h3>
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template v-slot:body>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
{{ $t("invalid_message") }}
|
{{ trans(WOPI_ONLINE_EDIT_DOCUMENT) }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</modal>
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</teleport>
|
</teleport>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
|
import { ref, computed } from "vue";
|
||||||
|
import {
|
||||||
|
trans,
|
||||||
|
WOPI_ONLINE_EDIT_DOCUMENT,
|
||||||
|
WOPI_INVALID_TITLE,
|
||||||
|
WOPI_LOADING,
|
||||||
|
} from "translator";
|
||||||
import Modal from "ChillMainAssets/vuejs/_components/Modal";
|
import Modal from "ChillMainAssets/vuejs/_components/Modal";
|
||||||
import logo from "ChillMainAssets/chill/img/logo-chill-sans-slogan_white.png";
|
import logo from "ChillMainAssets/chill/img/logo-chill-sans-slogan_white.png";
|
||||||
|
|
||||||
export default {
|
// Props
|
||||||
name: "OpenWopiLink",
|
const props = defineProps({
|
||||||
components: {
|
wopiUrl: {
|
||||||
Modal,
|
type: String,
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
props: {
|
type: {
|
||||||
wopiUrl: {
|
type: String,
|
||||||
type: String,
|
required: true,
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
type: Object,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
data() {
|
options: {
|
||||||
return {
|
type: Object,
|
||||||
modal: {
|
required: false,
|
||||||
showModal: false,
|
|
||||||
modalDialogClass: "modal-fullscreen", //modal-dialog-scrollable
|
|
||||||
},
|
|
||||||
logo: logo,
|
|
||||||
loading: false,
|
|
||||||
mime: [
|
|
||||||
// TODO temporary hardcoded. to be replaced by twig extension or a collabora server query
|
|
||||||
"application/clarisworks",
|
|
||||||
"application/coreldraw",
|
|
||||||
"application/macwriteii",
|
|
||||||
"application/msword",
|
|
||||||
"application/pdf",
|
|
||||||
"application/vnd.lotus-1-2-3",
|
|
||||||
"application/vnd.ms-excel",
|
|
||||||
"application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
|
||||||
"application/vnd.ms-excel.sheet.macroEnabled.12",
|
|
||||||
"application/vnd.ms-excel.template.macroEnabled.12",
|
|
||||||
"application/vnd.ms-powerpoint",
|
|
||||||
"application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
|
||||||
"application/vnd.ms-powerpoint.template.macroEnabled.12",
|
|
||||||
"application/vnd.ms-visio.drawing",
|
|
||||||
"application/vnd.ms-word.document.macroEnabled.12",
|
|
||||||
"application/vnd.ms-word.template.macroEnabled.12",
|
|
||||||
"application/vnd.ms-works",
|
|
||||||
"application/vnd.oasis.opendocument.chart",
|
|
||||||
"application/vnd.oasis.opendocument.formula",
|
|
||||||
"application/vnd.oasis.opendocument.graphics",
|
|
||||||
"application/vnd.oasis.opendocument.graphics-flat-xml",
|
|
||||||
"application/vnd.oasis.opendocument.graphics-template",
|
|
||||||
"application/vnd.oasis.opendocument.presentation",
|
|
||||||
"application/vnd.oasis.opendocument.presentation-flat-xml",
|
|
||||||
"application/vnd.oasis.opendocument.presentation-template",
|
|
||||||
"application/vnd.oasis.opendocument.spreadsheet",
|
|
||||||
"application/vnd.oasis.opendocument.spreadsheet-flat-xml",
|
|
||||||
"application/vnd.oasis.opendocument.spreadsheet-template",
|
|
||||||
"application/vnd.oasis.opendocument.text",
|
|
||||||
"application/vnd.oasis.opendocument.text-flat-xml",
|
|
||||||
"application/vnd.oasis.opendocument.text-master",
|
|
||||||
"application/vnd.oasis.opendocument.text-master-template",
|
|
||||||
"application/vnd.oasis.opendocument.text-template",
|
|
||||||
"application/vnd.oasis.opendocument.text-web",
|
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.template",
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template",
|
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
|
||||||
"application/vnd.sun.xml.calc",
|
|
||||||
"application/vnd.sun.xml.calc.template",
|
|
||||||
"application/vnd.sun.xml.chart",
|
|
||||||
"application/vnd.sun.xml.draw",
|
|
||||||
"application/vnd.sun.xml.draw.template",
|
|
||||||
"application/vnd.sun.xml.impress",
|
|
||||||
"application/vnd.sun.xml.impress.template",
|
|
||||||
"application/vnd.sun.xml.math",
|
|
||||||
"application/vnd.sun.xml.writer",
|
|
||||||
"application/vnd.sun.xml.writer.global",
|
|
||||||
"application/vnd.sun.xml.writer.template",
|
|
||||||
"application/vnd.visio",
|
|
||||||
"application/vnd.visio2013",
|
|
||||||
"application/vnd.wordperfect",
|
|
||||||
"application/x-abiword",
|
|
||||||
"application/x-aportisdoc",
|
|
||||||
"application/x-dbase",
|
|
||||||
"application/x-dif-document",
|
|
||||||
"application/x-fictionbook+xml",
|
|
||||||
"application/x-gnumeric",
|
|
||||||
"application/x-hwp",
|
|
||||||
"application/x-iwork-keynote-sffkey",
|
|
||||||
"application/x-iwork-numbers-sffnumbers",
|
|
||||||
"application/x-iwork-pages-sffpages",
|
|
||||||
"application/x-mspublisher",
|
|
||||||
"application/x-mswrite",
|
|
||||||
"application/x-pagemaker",
|
|
||||||
"application/x-sony-bbeb",
|
|
||||||
"application/x-t602",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
isOpenDocument() {
|
|
||||||
if (this.mime.indexOf(this.type) !== -1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
noText() {
|
|
||||||
if (typeof this.options.noText !== "undefined") {
|
|
||||||
return this.options.noText === true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
isChangeIcon() {
|
|
||||||
if (typeof this.options.changeIcon !== "undefined") {
|
|
||||||
return !(
|
|
||||||
this.options.changeIcon === null ||
|
|
||||||
this.options.changeIcon === ""
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
isChangeClass() {
|
|
||||||
if (typeof this.options.changeClass !== "undefined") {
|
|
||||||
return !(
|
|
||||||
this.options.changeClass === null ||
|
|
||||||
this.options.changeClass === ""
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
openModal() {
|
|
||||||
this.loading = true;
|
|
||||||
this.modal.showModal = true;
|
|
||||||
},
|
|
||||||
loaded() {
|
|
||||||
this.loading = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
i18n: {
|
|
||||||
messages: {
|
|
||||||
fr: {
|
|
||||||
online_edit_document: "Éditer en ligne",
|
|
||||||
save_and_quit: "Enregistrer et quitter",
|
|
||||||
loading: "Chargement de l'éditeur en ligne",
|
|
||||||
invalid_title: "Format incompatible",
|
|
||||||
invalid_message:
|
|
||||||
"Désolé, ce format de document n'est pas éditable en ligne.",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// data
|
||||||
|
const modal = ref({
|
||||||
|
showModal: false,
|
||||||
|
modalDialogClass: "modal-fullscreen",
|
||||||
|
});
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
// MIME types
|
||||||
|
const mime = [
|
||||||
|
// TODO temporary hardcoded. to be replaced by twig extension or a collabora server query
|
||||||
|
"application/clarisworks",
|
||||||
|
"application/coreldraw",
|
||||||
|
"application/macwriteii",
|
||||||
|
"application/msword",
|
||||||
|
"application/pdf",
|
||||||
|
"application/vnd.lotus-1-2-3",
|
||||||
|
"application/vnd.ms-excel",
|
||||||
|
"application/vnd.ms-excel.sheet.binary.macroEnabled.12",
|
||||||
|
"application/vnd.ms-excel.sheet.macroEnabled.12",
|
||||||
|
"application/vnd.ms-excel.template.macroEnabled.12",
|
||||||
|
"application/vnd.ms-powerpoint",
|
||||||
|
"application/vnd.ms-powerpoint.presentation.macroEnabled.12",
|
||||||
|
"application/vnd.ms-powerpoint.template.macroEnabled.12",
|
||||||
|
"application/vnd.ms-visio.drawing",
|
||||||
|
"application/vnd.ms-word.document.macroEnabled.12",
|
||||||
|
"application/vnd.ms-word.template.macroEnabled.12",
|
||||||
|
"application/vnd.ms-works",
|
||||||
|
"application/vnd.oasis.opendocument.chart",
|
||||||
|
"application/vnd.oasis.opendocument.formula",
|
||||||
|
"application/vnd.oasis.opendocument.graphics",
|
||||||
|
"application/vnd.oasis.opendocument.graphics-flat-xml",
|
||||||
|
"application/vnd.oasis.opendocument.graphics-template",
|
||||||
|
"application/vnd.oasis.opendocument.presentation",
|
||||||
|
"application/vnd.oasis.opendocument.presentation-flat-xml",
|
||||||
|
"application/vnd.oasis.opendocument.presentation-template",
|
||||||
|
"application/vnd.oasis.opendocument.spreadsheet",
|
||||||
|
"application/vnd.oasis.opendocument.spreadsheet-flat-xml",
|
||||||
|
"application/vnd.oasis.opendocument.spreadsheet-template",
|
||||||
|
"application/vnd.oasis.opendocument.text",
|
||||||
|
"application/vnd.oasis.opendocument.text-flat-xml",
|
||||||
|
"application/vnd.oasis.opendocument.text-master",
|
||||||
|
"application/vnd.oasis.opendocument.text-master-template",
|
||||||
|
"application/vnd.oasis.opendocument.text-template",
|
||||||
|
"application/vnd.oasis.opendocument.text-web",
|
||||||
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||||
|
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
||||||
|
"application/vnd.openxmlformats-officedocument.presentationml.template",
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.template",
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
|
||||||
|
"application/vnd.sun.xml.calc",
|
||||||
|
"application/vnd.sun.xml.calc.template",
|
||||||
|
"application/vnd.sun.xml.chart",
|
||||||
|
"application/vnd.sun.xml.draw",
|
||||||
|
"application/vnd.sun.xml.draw.template",
|
||||||
|
"application/vnd.sun.xml.impress",
|
||||||
|
"application/vnd.sun.xml.impress.template",
|
||||||
|
"application/vnd.sun.xml.math",
|
||||||
|
"application/vnd.sun.xml.writer",
|
||||||
|
"application/vnd.sun.xml.writer.global",
|
||||||
|
"application/vnd.sun.xml.writer.template",
|
||||||
|
"application/vnd.visio",
|
||||||
|
"application/vnd.visio2013",
|
||||||
|
"application/vnd.wordperfect",
|
||||||
|
"application/x-abiword",
|
||||||
|
"application/x-aportisdoc",
|
||||||
|
"application/x-dbase",
|
||||||
|
"application/x-dif-document",
|
||||||
|
"application/x-fictionbook+xml",
|
||||||
|
"application/x-gnumeric",
|
||||||
|
"application/x-hwp",
|
||||||
|
"application/x-iwork-keynote-sffkey",
|
||||||
|
"application/x-iwork-numbers-sffnumbers",
|
||||||
|
"application/x-iwork-pages-sffpages",
|
||||||
|
"application/x-mspublisher",
|
||||||
|
"application/x-mswrite",
|
||||||
|
"application/x-pagemaker",
|
||||||
|
"application/x-sony-bbeb",
|
||||||
|
"application/x-t602",
|
||||||
|
];
|
||||||
|
|
||||||
|
// Computed
|
||||||
|
const isOpenDocument = computed(() => mime.includes(props.type));
|
||||||
|
|
||||||
|
const noText = computed(() => props.options?.noText === true);
|
||||||
|
|
||||||
|
const isChangeIcon = computed(() => !!props.options?.changeIcon);
|
||||||
|
|
||||||
|
const isChangeClass = computed(() => !!props.options?.changeClass);
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
const openModal = () => {
|
||||||
|
loading.value = true;
|
||||||
|
modal.value.showModal = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const loaded = () => {
|
||||||
|
loading.value = false;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,45 +1,3 @@
|
|||||||
const { styles } = require("@ckeditor/ckeditor5-dev-utils");
|
|
||||||
const {
|
|
||||||
CKEditorTranslationsPlugin,
|
|
||||||
} = require("@ckeditor/ckeditor5-dev-translations");
|
|
||||||
|
|
||||||
buildCKEditor = function (encore) {
|
|
||||||
encore
|
|
||||||
.addPlugin(
|
|
||||||
new CKEditorTranslationsPlugin({
|
|
||||||
language: "fr",
|
|
||||||
addMainLanguageTranslationsToAllAssets: true,
|
|
||||||
verbose: !encore.isProduction(),
|
|
||||||
strict: true,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
// Use raw-loader for CKEditor 5 SVG files.
|
|
||||||
.addRule({
|
|
||||||
test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/,
|
|
||||||
loader: "raw-loader",
|
|
||||||
})
|
|
||||||
|
|
||||||
// Configure other image loaders to exclude CKEditor 5 SVG files.
|
|
||||||
.configureLoaderRule("images", (loader) => {
|
|
||||||
loader.exclude =
|
|
||||||
/ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/;
|
|
||||||
})
|
|
||||||
|
|
||||||
// Configure PostCSS loader.
|
|
||||||
.addLoader({
|
|
||||||
test: /ckeditor5-[^/\\]+[/\\]theme[/\\].+\.css$/,
|
|
||||||
loader: "postcss-loader",
|
|
||||||
options: {
|
|
||||||
postcssOptions: styles.getPostCssConfig({
|
|
||||||
themeImporter: {
|
|
||||||
themePath: require.resolve("@ckeditor/ckeditor5-theme-lark"),
|
|
||||||
},
|
|
||||||
minify: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Compile and loads all assets from the Chill Main Bundle
|
// Compile and loads all assets from the Chill Main Bundle
|
||||||
module.exports = function (encore, entries) {
|
module.exports = function (encore, entries) {
|
||||||
@ -79,8 +37,6 @@ module.exports = function (encore, entries) {
|
|||||||
__dirname + "/Resources/public/page/export/download-export.js",
|
__dirname + "/Resources/public/page/export/download-export.js",
|
||||||
);
|
);
|
||||||
|
|
||||||
buildCKEditor(encore);
|
|
||||||
|
|
||||||
// Modules entrypoints
|
// Modules entrypoints
|
||||||
encore.addEntry(
|
encore.addEntry(
|
||||||
"mod_collection",
|
"mod_collection",
|
||||||
|
@ -44,6 +44,9 @@ address_fields: Données liées à l'adresse
|
|||||||
Datas: Données
|
Datas: Données
|
||||||
No title: Aucun titre
|
No title: Aucun titre
|
||||||
icon: icône
|
icon: icône
|
||||||
|
See: Voir
|
||||||
|
Name: Nom
|
||||||
|
Label: Nom
|
||||||
|
|
||||||
user:
|
user:
|
||||||
profile:
|
profile:
|
||||||
@ -124,6 +127,49 @@ address:
|
|||||||
address_homeless: L'adresse est-elle celle d'un domicile fixe ?
|
address_homeless: L'adresse est-elle celle d'un domicile fixe ?
|
||||||
real address: Adresse d'un domicile
|
real address: Adresse d'un domicile
|
||||||
consider homeless: Cette adresse est incomplète
|
consider homeless: Cette adresse est incomplète
|
||||||
|
add_an_address_title: Créer une adresse
|
||||||
|
edit_an_address_title: Modifier une adresse
|
||||||
|
create_a_new_address: Créer une nouvelle adresse
|
||||||
|
edit_address: Modifier l'adresse
|
||||||
|
select_an_address_title: Sélectionner une adresse
|
||||||
|
fill_an_address: Compléter l'adresse
|
||||||
|
select_country: Choisir le pays
|
||||||
|
country: Pays
|
||||||
|
select_city: Choisir une localité
|
||||||
|
city: Localité
|
||||||
|
other_city: Autre localité
|
||||||
|
select_address: Choisir une adresse
|
||||||
|
address: Adresse
|
||||||
|
other_address: Autre adresse
|
||||||
|
create_address: Adresse inconnue. Cliquez ici pour créer une nouvelle adresse
|
||||||
|
isNoAddress: Pas d'adresse complète
|
||||||
|
isConfidential: Adresse confidentielle
|
||||||
|
street: Nom de rue
|
||||||
|
streetNumber: Numéro
|
||||||
|
floor: Étage
|
||||||
|
corridor: Couloir
|
||||||
|
steps: Escalier
|
||||||
|
flat: Appartement
|
||||||
|
buildingName: Résidence
|
||||||
|
extra: Complément d'adresse
|
||||||
|
distribution: Cedex
|
||||||
|
create_postal_code: Localité inconnue. Cliquez ici pour créer une nouvelle localité
|
||||||
|
postalCode_name: Nom
|
||||||
|
postalCode_code: Code postal
|
||||||
|
date: Date de la nouvelle adresse
|
||||||
|
valid_from: L'adresse est valable à partir du
|
||||||
|
valid_to: L'adresse est valable jusqu'au
|
||||||
|
back_to_the_list: Retour à la liste
|
||||||
|
loading: chargement en cours...
|
||||||
|
address_suggestions: Suggestion d'adresses
|
||||||
|
address_new_success: La nouvelle adresse est enregistrée.
|
||||||
|
address_edit_success: L'adresse a été mise à jour.
|
||||||
|
wait_redirection: La page est redirigée.
|
||||||
|
not_yet_address: Il n'y a pas encore d'adresse. Cliquez sur '+ Créer une adresse'
|
||||||
|
use_this_address: Utiliser cette adresse
|
||||||
|
household:
|
||||||
|
move_date: Date du déménagement
|
||||||
|
|
||||||
address more:
|
address more:
|
||||||
floor: ét
|
floor: ét
|
||||||
corridor: coul
|
corridor: coul
|
||||||
@ -508,6 +554,8 @@ Follow workflow: Suivre la décision
|
|||||||
Workflow history: Historique de la décision
|
Workflow history: Historique de la décision
|
||||||
|
|
||||||
workflow:
|
workflow:
|
||||||
|
list: Liste des workflows associés
|
||||||
|
associated: workflow associé
|
||||||
deleted: Workflow supprimé
|
deleted: Workflow supprimé
|
||||||
Created by: Créé par
|
Created by: Créé par
|
||||||
My decision: Ma décision
|
My decision: Ma décision
|
||||||
@ -553,6 +601,7 @@ workflow:
|
|||||||
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
Previous workflow transitionned help: Workflows où vous avez exécuté une action.
|
||||||
For: Pour
|
For: Pour
|
||||||
Cc: Cc
|
Cc: Cc
|
||||||
|
At: Le
|
||||||
You must select a next step, pick another decision if no next steps are available: Il faut une prochaine étape. Choissisez une autre décision si nécessaire.
|
You must select a next step, pick another decision if no next steps are available: Il faut une prochaine étape. Choissisez une autre décision si nécessaire.
|
||||||
An access key was also sent to those addresses: Un lien d'accès a été envoyé à ces adresses
|
An access key was also sent to those addresses: Un lien d'accès a été envoyé à ces adresses
|
||||||
Those users are also granted to apply a transition by using an access key: Ces utilisateurs ont obtenu l'accès grâce au lien reçu par email
|
Those users are also granted to apply a transition by using an access key: Ces utilisateurs ont obtenu l'accès grâce au lien reçu par email
|
||||||
@ -575,6 +624,12 @@ workflow:
|
|||||||
public_views_by_ip: Visualisation par adresse IP
|
public_views_by_ip: Visualisation par adresse IP
|
||||||
May not associate a document: Le workflow ne concerne pas un document
|
May not associate a document: Le workflow ne concerne pas un document
|
||||||
|
|
||||||
|
subscribe_final: Recevoir une notification à l'étape finale
|
||||||
|
unsubscribe_final: Ne plus recevoir de notification à l'étape finale
|
||||||
|
subscribe_all_steps: Recevoir une notification à chaque étape du suivi
|
||||||
|
unsubscribe_all_steps: Ne plus recevoir de notification à chaque étape du suivi
|
||||||
|
|
||||||
|
|
||||||
public_link:
|
public_link:
|
||||||
expired_link_title: Lien expiré
|
expired_link_title: Lien expiré
|
||||||
expired_link_explanation: Le lien a expiré, vous ne pouvez plus visualiser ce document.
|
expired_link_explanation: Le lien a expiré, vous ne pouvez plus visualiser ce document.
|
||||||
@ -656,6 +711,10 @@ notification:
|
|||||||
Remove an email: Supprimer l'adresse email
|
Remove an email: Supprimer l'adresse email
|
||||||
Email with access link: Adresse email ayant reçu un lien d'accès
|
Email with access link: Adresse email ayant reçu un lien d'accès
|
||||||
|
|
||||||
|
mark_as_read: Marquer comme lu
|
||||||
|
mark_as_unread: Marquer comme non-lu
|
||||||
|
|
||||||
|
|
||||||
export:
|
export:
|
||||||
address_helper:
|
address_helper:
|
||||||
id: Identifiant de l'adresse
|
id: Identifiant de l'adresse
|
||||||
@ -795,4 +854,43 @@ gender:
|
|||||||
Select gender translation: Traduction grammaticale
|
Select gender translation: Traduction grammaticale
|
||||||
Select gender icon: Icône à utiliser
|
Select gender icon: Icône à utiliser
|
||||||
|
|
||||||
|
wopi:
|
||||||
|
online_edit_document: Éditer en ligne
|
||||||
|
save_and_quit: Enregistrer et quitter
|
||||||
|
loading: Chargement de l'éditeur en ligne
|
||||||
|
invalid_title: Format incompatible
|
||||||
|
invalid_message: Désolé, ce format de document n'est pas éditable en ligne.
|
||||||
|
|
||||||
|
onthefly:
|
||||||
|
show:
|
||||||
|
person: Détails de l'usager
|
||||||
|
thirdparty: Détails du tiers
|
||||||
|
file_person: Ouvrir la fiche de l'usager
|
||||||
|
file_thirdparty: Voir le Tiers
|
||||||
|
edit:
|
||||||
|
person: Modifier un usager
|
||||||
|
thirdparty: Modifier un tiers
|
||||||
|
create:
|
||||||
|
button: Créer {q}
|
||||||
|
title:
|
||||||
|
default: Création d'un nouvel usager ou d'un tiers professionnel
|
||||||
|
person: Création d'un nouvel usager
|
||||||
|
thirdparty: Création d'un nouveau tiers professionnel
|
||||||
|
person: un nouvel usager
|
||||||
|
thirdparty: un nouveau tiers professionnel
|
||||||
|
addContact:
|
||||||
|
title: Créer un contact pour {q}
|
||||||
|
resource_comment_title: Un commentaire est associé à cet interlocuteur
|
||||||
|
|
||||||
|
modal:
|
||||||
|
action:
|
||||||
|
close: Fermer
|
||||||
|
|
||||||
|
multiselect:
|
||||||
|
placeholder: Choisir
|
||||||
|
tag_placeholder: Créer un nouvel élément
|
||||||
|
select_label: Entrée ou cliquez pour sélectionner
|
||||||
|
deselect_label: Entrée ou cliquez pour désélectionner
|
||||||
|
select_group_label: Appuyer sur "Entrée" pour sélectionner ce groupe
|
||||||
|
deselect_group_label: Appuyer sur "Entrée" pour désélectionner ce groupe
|
||||||
|
selected_label: Sélectionné'
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
<ckeditor
|
<ckeditor
|
||||||
name="content"
|
name="content"
|
||||||
:placeholder="$t('comment.content')"
|
:placeholder="$t('comment.content')"
|
||||||
:editor="editor"
|
:editor="classicEditor"
|
||||||
|
:config="editorConfig"
|
||||||
v-model="content"
|
v-model="content"
|
||||||
tag-name="textarea"
|
tag-name="textarea"
|
||||||
/>
|
/>
|
||||||
@ -60,18 +61,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
import { ClassicEditor } from "ckeditor5";
|
||||||
import ClassicEditor from "../../../../../../ChillMainBundle/Resources/public/module/ckeditor5/editor_config";
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Comment",
|
name: "Comment",
|
||||||
components: {
|
components: {
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editor: ClassicEditor,
|
|
||||||
loading: false,
|
loading: false,
|
||||||
lastRecordedContent: null,
|
lastRecordedContent: null,
|
||||||
};
|
};
|
||||||
@ -80,6 +81,8 @@ export default {
|
|||||||
...mapState({
|
...mapState({
|
||||||
pinnedComment: (state) => state.accompanyingCourse.pinnedComment,
|
pinnedComment: (state) => state.accompanyingCourse.pinnedComment,
|
||||||
}),
|
}),
|
||||||
|
classicEditor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
content: {
|
content: {
|
||||||
set(value) {
|
set(value) {
|
||||||
console.log("new comment value", value);
|
console.log("new comment value", value);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
name="content"
|
name="content"
|
||||||
:placeholder="$t('comment_placeholder')"
|
:placeholder="$t('comment_placeholder')"
|
||||||
:editor="editor"
|
:editor="editor"
|
||||||
|
:config="editorConfig"
|
||||||
v-model="content"
|
v-model="content"
|
||||||
tag-name="textarea"
|
tag-name="textarea"
|
||||||
/>
|
/>
|
||||||
@ -38,14 +39,15 @@
|
|||||||
<script>
|
<script>
|
||||||
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
|
import { ClassicEditor } from "ckeditor5";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "WriteComment",
|
name: "WriteComment",
|
||||||
components: {
|
components: {
|
||||||
Modal,
|
Modal,
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
},
|
},
|
||||||
props: ["resource"],
|
props: ["resource"],
|
||||||
emits: ["updateComment"],
|
emits: ["updateComment"],
|
||||||
@ -55,7 +57,6 @@ export default {
|
|||||||
showModal: false,
|
showModal: false,
|
||||||
modalDialogClass: "modal-dialog-scrollable modal-xl",
|
modalDialogClass: "modal-dialog-scrollable modal-xl",
|
||||||
},
|
},
|
||||||
editor: ClassicEditor,
|
|
||||||
formdata: {
|
formdata: {
|
||||||
content: this.resource.comment,
|
content: this.resource.comment,
|
||||||
},
|
},
|
||||||
@ -71,6 +72,8 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
editor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
content: {
|
content: {
|
||||||
set(value) {
|
set(value) {
|
||||||
this.formdata.content = value;
|
this.formdata.content = value;
|
||||||
|
@ -36,14 +36,20 @@
|
|||||||
<label class="col-form-label">{{ $t("private_comment") }}</label>
|
<label class="col-form-label">{{ $t("private_comment") }}</label>
|
||||||
<ckeditor
|
<ckeditor
|
||||||
v-model="privateComment"
|
v-model="privateComment"
|
||||||
:editor="editor"
|
:editor="classicEditor"
|
||||||
|
:config="editorConfig"
|
||||||
tag-name="textarea"
|
tag-name="textarea"
|
||||||
></ckeditor>
|
></ckeditor>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="comment" class="action-row">
|
<div id="comment" class="action-row">
|
||||||
<label class="col-form-label">{{ $t("comments") }}</label>
|
<label class="col-form-label">{{ $t("comments") }}</label>
|
||||||
<ckeditor v-model="note" :editor="editor" tag-name="textarea"></ckeditor>
|
<ckeditor
|
||||||
|
v-model="note"
|
||||||
|
:editor="classicEditor"
|
||||||
|
:config="editorConfig"
|
||||||
|
tag-name="textarea"
|
||||||
|
></ckeditor>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="objectives" class="action-row">
|
<div id="objectives" class="action-row">
|
||||||
@ -432,23 +438,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapGetters } from "vuex";
|
import { mapState, mapGetters } from "vuex";
|
||||||
import {
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
dateToISO,
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
ISOToDate,
|
import { ClassicEditor } from "ckeditor5";
|
||||||
ISOToDatetime,
|
|
||||||
} from "ChillMainAssets/chill/js/date";
|
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
|
|
||||||
import AddResult from "./components/AddResult.vue";
|
import AddResult from "./components/AddResult.vue";
|
||||||
import AddEvaluation from "./components/AddEvaluation.vue";
|
import AddEvaluation from "./components/AddEvaluation.vue";
|
||||||
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue";
|
import AddPersons from "ChillPersonAssets/vuejs/_components/AddPersons.vue";
|
||||||
import AddressRenderBox from "ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue";
|
|
||||||
import ThirdPartyRenderBox from "ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue";
|
import ThirdPartyRenderBox from "ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue";
|
||||||
import PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
|
|
||||||
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
|
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
|
||||||
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
||||||
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
import PersonText from "ChillPersonAssets/vuejs/_components/Entity/PersonText.vue";
|
||||||
import { buildLinkCreate } from "ChillMainAssets/lib/entity-workflow/api";
|
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
|
|
||||||
const i18n = {
|
const i18n = {
|
||||||
@ -505,13 +504,11 @@ const i18n = {
|
|||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
components: {
|
components: {
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
AddResult,
|
AddResult,
|
||||||
AddEvaluation,
|
AddEvaluation,
|
||||||
AddPersons,
|
AddPersons,
|
||||||
AddressRenderBox,
|
|
||||||
ThirdPartyRenderBox,
|
ThirdPartyRenderBox,
|
||||||
PickTemplate,
|
|
||||||
ListWorkflowModal,
|
ListWorkflowModal,
|
||||||
OnTheFly,
|
OnTheFly,
|
||||||
PersonText,
|
PersonText,
|
||||||
@ -521,7 +518,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
docAnchorId: null,
|
docAnchorId: null,
|
||||||
isExpanded: false,
|
isExpanded: false,
|
||||||
editor: ClassicEditor,
|
|
||||||
showAddObjective: false,
|
showAddObjective: false,
|
||||||
showAddEvaluation: false,
|
showAddEvaluation: false,
|
||||||
handlingThirdPartyPicker: {
|
handlingThirdPartyPicker: {
|
||||||
@ -588,6 +584,8 @@ export default {
|
|||||||
"hasThirdParties",
|
"hasThirdParties",
|
||||||
"hasReferrers",
|
"hasReferrers",
|
||||||
]),
|
]),
|
||||||
|
classicEditor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
startDate: {
|
startDate: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.startDate;
|
return this.$store.state.startDate;
|
||||||
@ -696,7 +694,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goToGenerateWorkflow({ link }) {
|
goToGenerateWorkflow({ link }) {
|
||||||
// console.log('save before leave to generate workflow')
|
// console.log('save before leave to generate workflow')
|
||||||
const callback = (data) => {
|
const callback = () => {
|
||||||
window.location.assign(link);
|
window.location.assign(link);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -707,7 +705,7 @@ export default {
|
|||||||
},
|
},
|
||||||
goToGenerateNotification(tos) {
|
goToGenerateNotification(tos) {
|
||||||
console.log("save before leave to notification");
|
console.log("save before leave to notification");
|
||||||
const callback = (data) => {
|
const callback = () => {
|
||||||
if (tos === true) {
|
if (tos === true) {
|
||||||
window.location.assign(
|
window.location.assign(
|
||||||
`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork&entityId=${this.work.id}&tos[0]=${this.work.accompanyingPeriod.user.id}&returnPath=/fr/person/accompanying-period/${this.work.accompanyingPeriod.id}/work`,
|
`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork&entityId=${this.work.id}&tos[0]=${this.work.accompanyingPeriod.user.id}&returnPath=/fr/person/accompanying-period/${this.work.accompanyingPeriod.id}/work`,
|
||||||
|
@ -89,7 +89,8 @@
|
|||||||
}}</label>
|
}}</label>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<ckeditor
|
<ckeditor
|
||||||
:editor="editor"
|
:editor="classicEditor"
|
||||||
|
:config="editorConfig"
|
||||||
:placeholder="$t('evaluation_comment_placeholder')"
|
:placeholder="$t('evaluation_comment_placeholder')"
|
||||||
v-model="comment"
|
v-model="comment"
|
||||||
tag-name="textarea"
|
tag-name="textarea"
|
||||||
@ -271,14 +272,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { ISOToDatetime } from "ChillMainAssets/chill/js/date";
|
||||||
dateToISO,
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
ISOToDate,
|
import { ClassicEditor } from "ckeditor5";
|
||||||
ISOToDatetime,
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
} from "ChillMainAssets/chill/js/date";
|
import { mapState } from "vuex";
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
|
|
||||||
import { mapGetters, mapState } from "vuex";
|
|
||||||
import PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
|
import PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
|
||||||
import { buildLink } from "ChillDocGeneratorAssets/lib/document-generator";
|
import { buildLink } from "ChillDocGeneratorAssets/lib/document-generator";
|
||||||
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
||||||
@ -325,7 +323,7 @@ export default {
|
|||||||
props: ["evaluation", "docAnchorId"],
|
props: ["evaluation", "docAnchorId"],
|
||||||
components: {
|
components: {
|
||||||
DropFileModal,
|
DropFileModal,
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
PickTemplate,
|
PickTemplate,
|
||||||
ListWorkflowModal,
|
ListWorkflowModal,
|
||||||
DocumentActionButtonsGroup,
|
DocumentActionButtonsGroup,
|
||||||
@ -333,7 +331,6 @@ export default {
|
|||||||
i18n,
|
i18n,
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editor: ClassicEditor,
|
|
||||||
template: null,
|
template: null,
|
||||||
asyncUploadOptions: {
|
asyncUploadOptions: {
|
||||||
maxFiles: 1,
|
maxFiles: 1,
|
||||||
@ -374,6 +371,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["isPosting", "work", "me"]),
|
...mapState(["isPosting", "work", "me"]),
|
||||||
|
classicEditor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
AmIRefferer() {
|
AmIRefferer() {
|
||||||
return !(
|
return !(
|
||||||
this.$store.state.work.accompanyingPeriod.user &&
|
this.$store.state.work.accompanyingPeriod.user &&
|
||||||
@ -596,12 +595,7 @@ export default {
|
|||||||
newStatus: newStatus,
|
newStatus: newStatus,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goToGenerateWorkflowEvaluationDocument({
|
goToGenerateWorkflowEvaluationDocument({ workflowName, payload }) {
|
||||||
event,
|
|
||||||
link,
|
|
||||||
workflowName,
|
|
||||||
payload,
|
|
||||||
}) {
|
|
||||||
const callback = (data) => {
|
const callback = (data) => {
|
||||||
let evaluation = data.accompanyingPeriodWorkEvaluations.find(
|
let evaluation = data.accompanyingPeriodWorkEvaluations.find(
|
||||||
(e) => e.key === this.evaluation.key,
|
(e) => e.key === this.evaluation.key,
|
||||||
|
@ -29,7 +29,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item-row comment">
|
<div class="item-row comment">
|
||||||
<ckeditor :editor="editor" v-model="comment" tag-name="textarea" />
|
<ckeditor
|
||||||
|
:editor="classicEditor"
|
||||||
|
:config="editorConfig"
|
||||||
|
v-model="comment"
|
||||||
|
tag-name="textarea"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item-row participation-details">
|
<div class="item-row participation-details">
|
||||||
@ -98,23 +103,21 @@ div.participation-details {
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import PersonRenderBox from "ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue";
|
import PersonRenderBox from "ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue";
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
|
import { ClassicEditor } from "ckeditor5";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MemberDetails",
|
name: "MemberDetails",
|
||||||
components: {
|
components: {
|
||||||
PersonRenderBox,
|
PersonRenderBox,
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
},
|
},
|
||||||
props: ["conc"],
|
props: ["conc"],
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editor: ClassicEditor,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["concByPersonId"]),
|
...mapGetters(["concByPersonId"]),
|
||||||
|
classicEditor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
isHolder() {
|
isHolder() {
|
||||||
return this.conc.holder;
|
return this.conc.holder;
|
||||||
},
|
},
|
||||||
|
@ -5,27 +5,26 @@
|
|||||||
$t('household_members_editor.positioning.comment_placeholder')
|
$t('household_members_editor.positioning.comment_placeholder')
|
||||||
"
|
"
|
||||||
:editor="editor"
|
:editor="editor"
|
||||||
|
:config="editorConfig"
|
||||||
v-model="content"
|
v-model="content"
|
||||||
tag-name="textarea"
|
tag-name="textarea"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CKEditor from "@ckeditor/ckeditor5-vue";
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
|
import { ClassicEditor } from "ckeditor5";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PersonComment.vue",
|
name: "PersonComment.vue",
|
||||||
components: {
|
components: {
|
||||||
ckeditor: CKEditor.component,
|
ckeditor: Ckeditor,
|
||||||
},
|
},
|
||||||
props: ["conc"],
|
props: ["conc"],
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
editor: ClassicEditor,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
|
editor: () => ClassicEditor,
|
||||||
|
editorConfig: () => classicEditorConfig,
|
||||||
content: {
|
content: {
|
||||||
get() {
|
get() {
|
||||||
return this.$props.conc.comment || "";
|
return this.$props.conc.comment || "";
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div>
|
<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>
|
||||||
|
6
src/vuex.d.ts
vendored
Normal file
6
src/vuex.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
declare module "vuex" {
|
||||||
|
export * from "vuex/types/index.d.ts";
|
||||||
|
export * from "vuex/types/helpers.d.ts";
|
||||||
|
export * from "vuex/types/logger.d.ts";
|
||||||
|
export * from "vuex/types/vue.d.ts";
|
||||||
|
}
|
15
symfony.lock
15
symfony.lock
@ -383,6 +383,21 @@
|
|||||||
"templates/base.html.twig"
|
"templates/base.html.twig"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"symfony/ux-translator": {
|
||||||
|
"version": "2.22",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "2.9",
|
||||||
|
"ref": "bc396565cc4cab95692dd6df810553dc22e352e1"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"assets/translator.js",
|
||||||
|
"config/packages/ux_translator.yaml",
|
||||||
|
"var/translations/configuration.js",
|
||||||
|
"var/translations/index.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/validator": {
|
"symfony/validator": {
|
||||||
"version": "5.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
|
28
ts-config-base.json
Normal file
28
ts-config-base.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"extends": "@tsconfig/node20/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2024",
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"esnext"
|
||||||
|
],
|
||||||
|
"module": "es6",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"isolatedModules": true,
|
||||||
|
"allowJs": false,
|
||||||
|
"checkJs": false,
|
||||||
|
"importHelpers": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"types": [
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"sourceMap": true
|
||||||
|
},
|
||||||
|
"includes": [
|
||||||
|
"./src/**/*.ts",
|
||||||
|
"./src/**/*.vue"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"./docs/*"
|
||||||
|
]
|
||||||
|
}
|
@ -1,31 +1,13 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/node20/tsconfig.json",
|
"extends": [
|
||||||
"compilerOptions": {
|
"./ts-config-base.json"
|
||||||
"paths": {
|
|
||||||
"ChillMainAssets/*": ["./src/Bundle/ChillMainBundle/Resources/public/*"],
|
|
||||||
"ChillDocStoreAssets/*": ["./src/Bundle/ChillDocStoreBundle/Resources/public/*"]
|
|
||||||
},
|
|
||||||
"lib": [
|
|
||||||
"es2020",
|
|
||||||
"dom"
|
|
||||||
],
|
],
|
||||||
"module": "es6",
|
"compilerOptions": {
|
||||||
"moduleResolution": "node",
|
"baseUrl": ".",
|
||||||
"isolatedModules": true,
|
"paths": {
|
||||||
"allowJs": false,
|
"translator": ["./assets/translator.ts"],
|
||||||
"checkJs": false,
|
"ChillMainAssets/*": ["./src/Bundle/ChillMainBundle/Resources/public/*"],
|
||||||
"importHelpers": true,
|
"ChillDocStoreAssets/*": ["./src/Bundle/ChillDocStoreBundle/Resources/public/*"]
|
||||||
"allowSyntheticDefaultImports": true,
|
}
|
||||||
"types": [
|
},
|
||||||
"node"
|
|
||||||
],
|
|
||||||
"sourceMap": true
|
|
||||||
},
|
|
||||||
"includes": [
|
|
||||||
"./src/**/*.ts",
|
|
||||||
"./src/**/*.vue"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"./docs/*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const Encore = require("@symfony/webpack-encore");
|
const Encore = require("@symfony/webpack-encore");
|
||||||
const { resolve, parse } = require("path");
|
const { resolve, parse } = require("path");
|
||||||
|
const {existsSync} = require("fs");
|
||||||
const { readdir } = require("fs").promises;
|
const { readdir } = require("fs").promises;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,25 +93,19 @@ module.exports = (async () => {
|
|||||||
.enableVersioning()
|
.enableVersioning()
|
||||||
.enableSingleRuntimeChunk()
|
.enableSingleRuntimeChunk()
|
||||||
.splitEntryChunks();
|
.splitEntryChunks();
|
||||||
// added when upgrading to symfony 5.4
|
|
||||||
// enables and configure @babel/preset-env polyfills
|
|
||||||
//.configureBabelPresetEnv((config) => {
|
|
||||||
// config.useBuiltIns = 'usage';
|
|
||||||
// config.corejs = '3.23';
|
|
||||||
//})
|
|
||||||
//.addLoader({ test: /\.pdf$/, loader: 'file-loader', options: { name: '[name]_[hash].[ext]', outputPath: 'pdf/' } })
|
|
||||||
|
|
||||||
// populate config with chill entries
|
// populate config with chill entries
|
||||||
let chillEntries = [];
|
let chillEntries = [];
|
||||||
await populateConfig(Encore, chillEntries);
|
await populateConfig(Encore, chillEntries);
|
||||||
// configure Babel
|
|
||||||
// .configureBabel((config) => {
|
|
||||||
// config.plugins.push('@babel/a-babel-plugin');
|
|
||||||
// })
|
|
||||||
|
|
||||||
//getting the encore config and appending chill entries
|
Encore.addAliases({
|
||||||
config = Encore.getWebpackConfig();
|
translator: resolve(__dirname, './assets/translator'),
|
||||||
config.entry.chill = chillEntries;
|
"@symfony/ux-translator": resolve(__dirname, './vendor/symfony/ux-translator/assets'),
|
||||||
|
});
|
||||||
|
|
||||||
|
//getting the encore config and appending chill entries
|
||||||
|
config = Encore.getWebpackConfig();
|
||||||
|
config.entry.chill = chillEntries;
|
||||||
|
|
||||||
if (!Encore.isProduction()) {
|
if (!Encore.isProduction()) {
|
||||||
console.log(config);
|
console.log(config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user