Setup alias for use in standalone chill-bundles project and replace relative paths

This commit is contained in:
2025-02-19 10:57:59 +00:00
committed by Julien Fastré
parent c89e3785ef
commit d2fcb6945b
42 changed files with 924 additions and 9449 deletions

View File

@@ -16,7 +16,8 @@
<ckeditor
name="content"
:placeholder="$t('comment.content')"
:editor="editor"
:editor="classicEditor"
:config="editorConfig"
v-model="content"
tag-name="textarea"
/>
@@ -60,18 +61,18 @@
</template>
<script>
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "../../../../../../ChillMainBundle/Resources/public/module/ckeditor5/editor_config";
import { ClassicEditor } from "ckeditor5";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { mapState } from "vuex";
export default {
name: "Comment",
components: {
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
},
data() {
return {
editor: ClassicEditor,
loading: false,
lastRecordedContent: null,
};
@@ -80,6 +81,8 @@ export default {
...mapState({
pinnedComment: (state) => state.accompanyingCourse.pinnedComment,
}),
classicEditor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
content: {
set(value) {
console.log("new comment value", value);

View File

@@ -22,6 +22,7 @@
name="content"
:placeholder="$t('comment_placeholder')"
:editor="editor"
:config="editorConfig"
v-model="content"
tag-name="textarea"
/>
@@ -38,14 +39,15 @@
<script>
import Modal from "ChillMainAssets/vuejs/_components/Modal.vue";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { ClassicEditor } from "ckeditor5";
export default {
name: "WriteComment",
components: {
Modal,
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
},
props: ["resource"],
emits: ["updateComment"],
@@ -55,7 +57,6 @@ export default {
showModal: false,
modalDialogClass: "modal-dialog-scrollable modal-xl",
},
editor: ClassicEditor,
formdata: {
content: this.resource.comment,
},
@@ -71,6 +72,8 @@ export default {
},
},
computed: {
editor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
content: {
set(value) {
this.formdata.content = value;

View File

@@ -36,14 +36,20 @@
<label class="col-form-label">{{ $t("private_comment") }}</label>
<ckeditor
v-model="privateComment"
:editor="editor"
:editor="classicEditor"
:config="editorConfig"
tag-name="textarea"
></ckeditor>
</div>
<div id="comment" class="action-row">
<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 id="objectives" class="action-row">
@@ -432,23 +438,16 @@
<script>
import { mapState, mapGetters } from "vuex";
import {
dateToISO,
ISOToDate,
ISOToDatetime,
} from "ChillMainAssets/chill/js/date";
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { ClassicEditor } from "ckeditor5";
import AddResult from "./components/AddResult.vue";
import AddEvaluation from "./components/AddEvaluation.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 PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue";
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.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";
const i18n = {
@@ -505,13 +504,11 @@ const i18n = {
export default {
name: "App",
components: {
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
AddResult,
AddEvaluation,
AddPersons,
AddressRenderBox,
ThirdPartyRenderBox,
PickTemplate,
ListWorkflowModal,
OnTheFly,
PersonText,
@@ -521,7 +518,6 @@ export default {
return {
docAnchorId: null,
isExpanded: false,
editor: ClassicEditor,
showAddObjective: false,
showAddEvaluation: false,
handlingThirdPartyPicker: {
@@ -588,6 +584,8 @@ export default {
"hasThirdParties",
"hasReferrers",
]),
classicEditor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
startDate: {
get() {
return this.$store.state.startDate;
@@ -696,7 +694,7 @@ export default {
},
goToGenerateWorkflow({ link }) {
// console.log('save before leave to generate workflow')
const callback = (data) => {
const callback = () => {
window.location.assign(link);
};
@@ -707,7 +705,7 @@ export default {
},
goToGenerateNotification(tos) {
console.log("save before leave to notification");
const callback = (data) => {
const callback = () => {
if (tos === true) {
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`,

View File

@@ -89,7 +89,8 @@
}}</label>
<div class="col-sm-12">
<ckeditor
:editor="editor"
:editor="classicEditor"
:config="editorConfig"
:placeholder="$t('evaluation_comment_placeholder')"
v-model="comment"
tag-name="textarea"
@@ -271,14 +272,11 @@
</template>
<script>
import {
dateToISO,
ISOToDate,
ISOToDatetime,
} from "ChillMainAssets/chill/js/date";
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
import { mapGetters, mapState } from "vuex";
import { ISOToDatetime } from "ChillMainAssets/chill/js/date";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import { ClassicEditor } from "ckeditor5";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { mapState } from "vuex";
import PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
import { buildLink } from "ChillDocGeneratorAssets/lib/document-generator";
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
@@ -325,7 +323,7 @@ export default {
props: ["evaluation", "docAnchorId"],
components: {
DropFileModal,
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
PickTemplate,
ListWorkflowModal,
DocumentActionButtonsGroup,
@@ -333,7 +331,6 @@ export default {
i18n,
data() {
return {
editor: ClassicEditor,
template: null,
asyncUploadOptions: {
maxFiles: 1,
@@ -374,6 +371,8 @@ export default {
},
computed: {
...mapState(["isPosting", "work", "me"]),
classicEditor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
AmIRefferer() {
return !(
this.$store.state.work.accompanyingPeriod.user &&
@@ -596,12 +595,7 @@ export default {
newStatus: newStatus,
});
},
goToGenerateWorkflowEvaluationDocument({
event,
link,
workflowName,
payload,
}) {
goToGenerateWorkflowEvaluationDocument({ workflowName, payload }) {
const callback = (data) => {
let evaluation = data.accompanyingPeriodWorkEvaluations.find(
(e) => e.key === this.evaluation.key,

View File

@@ -29,7 +29,12 @@
</div>
<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 class="item-row participation-details">
@@ -98,23 +103,21 @@ div.participation-details {
<script>
import { mapGetters } from "vuex";
import PersonRenderBox from "ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue";
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { ClassicEditor } from "ckeditor5";
export default {
name: "MemberDetails",
components: {
PersonRenderBox,
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
},
props: ["conc"],
data() {
return {
editor: ClassicEditor,
};
},
computed: {
...mapGetters(["concByPersonId"]),
classicEditor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
isHolder() {
return this.conc.holder;
},

View File

@@ -5,27 +5,26 @@
$t('household_members_editor.positioning.comment_placeholder')
"
:editor="editor"
:config="editorConfig"
v-model="content"
tag-name="textarea"
/>
</template>
<script>
import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "ChillMainAssets/module/ckeditor5/editor_config";
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
import { ClassicEditor } from "ckeditor5";
export default {
name: "PersonComment.vue",
components: {
ckeditor: CKEditor.component,
ckeditor: Ckeditor,
},
props: ["conc"],
data() {
return {
editor: ClassicEditor,
};
},
computed: {
editor: () => ClassicEditor,
editorConfig: () => classicEditorConfig,
content: {
get() {
return this.$props.conc.comment || "";

View File

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