mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-28 13:06:13 +00:00
Eslint fixes
This commit is contained in:
parent
1c87280b1e
commit
df09dd2017
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label class="col-sm-4 col-form-label visually-hidden">{{ trans(EVALUATION_PUBLIC_COMMENT) }}</label>
|
<label class="col-sm-4 col-form-label visually-hidden">{{
|
||||||
|
trans(EVALUATION_PUBLIC_COMMENT)
|
||||||
|
}}</label>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<ckeditor
|
<ckeditor
|
||||||
:editor="ClassicEditor"
|
:editor="ClassicEditor"
|
||||||
@ -15,11 +17,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Ckeditor } from '@ckeditor/ckeditor5-vue';
|
import { Ckeditor } from "@ckeditor/ckeditor5-vue";
|
||||||
import { ClassicEditor } from 'ckeditor5';
|
import { ClassicEditor } from "ckeditor5";
|
||||||
import classicEditorConfig from 'ChillMainAssets/module/ckeditor5/editor_config';
|
import classicEditorConfig from "ChillMainAssets/module/ckeditor5/editor_config";
|
||||||
import { EVALUATION_PUBLIC_COMMENT, EVALUATION_COMMENT_PLACEHOLDER, trans } from 'translator';
|
import {
|
||||||
|
EVALUATION_PUBLIC_COMMENT,
|
||||||
|
EVALUATION_COMMENT_PLACEHOLDER,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
defineProps(['comment']);
|
defineProps(["comment"]);
|
||||||
defineEmits(['update:comment']);
|
defineEmits(["update:comment"]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -53,8 +53,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { EVALUATION_STARTDATE, EVALUATION_ENDDATE, EVALUATION_MAXDATE, EVALUATION_WARNING_INTERVAL, trans } from 'translator';
|
import {
|
||||||
|
EVALUATION_STARTDATE,
|
||||||
|
EVALUATION_ENDDATE,
|
||||||
|
EVALUATION_MAXDATE,
|
||||||
|
EVALUATION_WARNING_INTERVAL,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
defineProps(['startDate', 'endDate', 'maxDate', 'warningInterval']);
|
defineProps(["startDate", "endDate", "maxDate", "warningInterval"]);
|
||||||
defineEmits(['update:startDate', 'update:endDate', 'update:maxDate', 'update:warningInterval']);
|
defineEmits([
|
||||||
|
"update:startDate",
|
||||||
|
"update:endDate",
|
||||||
|
"update:maxDate",
|
||||||
|
"update:warningInterval",
|
||||||
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -9,14 +9,21 @@
|
|||||||
@go-to-generate-document="$emit('submitBeforeGenerate', $event)"
|
@go-to-generate-document="$emit('submitBeforeGenerate', $event)"
|
||||||
>
|
>
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<label class="col-form-label">{{ trans(EVALUATION_GENERATE_A_DOCUMENT) }}</label>
|
<label class="col-form-label">{{
|
||||||
|
trans(EVALUATION_GENERATE_A_DOCUMENT)
|
||||||
|
}}</label>
|
||||||
</template>
|
</template>
|
||||||
</pick-template>
|
</pick-template>
|
||||||
<div>
|
<div>
|
||||||
<label class="col-form-label">{{ trans(EVALUATION_DOCUMENT_UPLOAD) }}</label>
|
<label class="col-form-label">{{
|
||||||
|
trans(EVALUATION_DOCUMENT_UPLOAD)
|
||||||
|
}}</label>
|
||||||
<ul class="record_actions document-upload">
|
<ul class="record_actions document-upload">
|
||||||
<li>
|
<li>
|
||||||
<drop-file-modal :allow-remove="false" @add-document="$emit('addDocument', $event)"></drop-file-modal>
|
<drop-file-modal
|
||||||
|
:allow-remove="false"
|
||||||
|
@add-document="$emit('addDocument', $event)"
|
||||||
|
></drop-file-modal>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -24,13 +31,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
|
import PickTemplate from "ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue";
|
||||||
import DropFileModal from 'ChillDocStoreAssets/vuejs/DropFileWidget/DropFileModal.vue';
|
import DropFileModal from "ChillDocStoreAssets/vuejs/DropFileWidget/DropFileModal.vue";
|
||||||
import { EVALUATION_DOCUMENT_ADD,
|
import {
|
||||||
EVALUATION_DOCUMENT_UPLOAD, EVALUATION_GENERATE_A_DOCUMENT, trans } from 'translator';
|
EVALUATION_DOCUMENT_ADD,
|
||||||
|
EVALUATION_DOCUMENT_UPLOAD,
|
||||||
|
EVALUATION_GENERATE_A_DOCUMENT,
|
||||||
|
trans,
|
||||||
|
} from "translator";
|
||||||
|
|
||||||
defineProps(['evaluation', 'templates']);
|
defineProps(["evaluation", "templates"]);
|
||||||
defineEmits(['addDocument', 'submitBeforeGenerate']);
|
defineEmits(["addDocument", "submitBeforeGenerate"]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -34,7 +34,11 @@
|
|||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li v-if="d.workflows_availables.length > 0 || d.workflows.length > 0">
|
<li
|
||||||
|
v-if="
|
||||||
|
d.workflows_availables.length > 0 || d.workflows.length > 0
|
||||||
|
"
|
||||||
|
>
|
||||||
<list-workflow-modal
|
<list-workflow-modal
|
||||||
:workflows="d.workflows"
|
:workflows="d.workflows"
|
||||||
:allowCreate="true"
|
:allowCreate="true"
|
||||||
@ -43,7 +47,9 @@
|
|||||||
:workflowsAvailables="d.workflows_availables"
|
:workflowsAvailables="d.workflows_availables"
|
||||||
:preventDefaultMoveToGenerate="true"
|
:preventDefaultMoveToGenerate="true"
|
||||||
:goToGenerateWorkflowPayload="{ doc: d }"
|
:goToGenerateWorkflowPayload="{ doc: d }"
|
||||||
@go-to-generate-workflow="$emit('goToGenerateWorkflow', $event)"
|
@go-to-generate-workflow="
|
||||||
|
$emit('goToGenerateWorkflow', $event)
|
||||||
|
"
|
||||||
></list-workflow-modal>
|
></list-workflow-modal>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -63,14 +69,23 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
<ul
|
||||||
|
class="dropdown-menu"
|
||||||
|
aria-labelledby="btnGroupNotifyButtons"
|
||||||
|
>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item" @click="$emit('goToGenerateNotification', d, true)">
|
<a
|
||||||
|
class="dropdown-item"
|
||||||
|
@click="$emit('goToGenerateNotification', d, true)"
|
||||||
|
>
|
||||||
{{ trans(EVALUATION_NOTIFICATION_NOTIFY_REFERRER) }}
|
{{ trans(EVALUATION_NOTIFICATION_NOTIFY_REFERRER) }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item" @click="$emit('goToGenerateNotification', d, false)">
|
<a
|
||||||
|
class="dropdown-item"
|
||||||
|
@click="$emit('goToGenerateNotification', d, false)"
|
||||||
|
>
|
||||||
{{ trans(EVALUATION_NOTIFICATION_NOTIFY_ANY) }}
|
{{ trans(EVALUATION_NOTIFICATION_NOTIFY_ANY) }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -84,31 +99,57 @@
|
|||||||
:can-edit="true"
|
:can-edit="true"
|
||||||
:execute-before-leave="submitBeforeLeaveToEditor"
|
:execute-before-leave="submitBeforeLeaveToEditor"
|
||||||
:davLink="d.storedObject._links?.dav_link.href"
|
:davLink="d.storedObject._links?.dav_link.href"
|
||||||
:davLinkExpiration="d.storedObject._links?.dav_link.expiration"
|
:davLinkExpiration="
|
||||||
@on-stored-object-status-change="$emit('statusDocumentChanged', $event)"
|
d.storedObject._links?.dav_link.expiration
|
||||||
|
"
|
||||||
|
@on-stored-object-status-change="
|
||||||
|
$emit('statusDocumentChanged', $event)
|
||||||
|
"
|
||||||
></document-action-buttons-group>
|
></document-action-buttons-group>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="d.storedObject._permissions.canEdit">
|
<li v-if="d.storedObject._permissions.canEdit">
|
||||||
<drop-file-modal
|
<drop-file-modal
|
||||||
:existing-doc="d.storedObject"
|
:existing-doc="d.storedObject"
|
||||||
:allow-remove="false"
|
:allow-remove="false"
|
||||||
@add-document="(arg) => $emit('replaceDocument', d, arg.stored_object, arg.stored_object_version)"
|
@add-document="
|
||||||
|
(arg) =>
|
||||||
|
$emit(
|
||||||
|
'replaceDocument',
|
||||||
|
d,
|
||||||
|
arg.stored_object,
|
||||||
|
arg.stored_object_version,
|
||||||
|
)
|
||||||
|
"
|
||||||
></drop-file-modal>
|
></drop-file-modal>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="d.workflows.length === 0">
|
<li v-if="d.workflows.length === 0">
|
||||||
<a class="btn btn-delete" @click="$emit('removeDocument', d)"> </a>
|
<a class="btn btn-delete" @click="$emit('removeDocument', d)">
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="Number.isInteger(d.id)">
|
<li v-if="Number.isInteger(d.id)">
|
||||||
<div class="duplicate-dropdown">
|
<div class="duplicate-dropdown">
|
||||||
<button class="btn btn-duplicate dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<button
|
||||||
|
class="btn btn-duplicate dropdown-toggle"
|
||||||
|
type="button"
|
||||||
|
data-bs-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
>
|
||||||
Dupliquer
|
Dupliquer
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item" @click="$emit('duplicateDocument', d)">Dupliquer ici</a>
|
<a
|
||||||
|
class="dropdown-item"
|
||||||
|
@click="$emit('duplicateDocument', d)"
|
||||||
|
>Dupliquer ici</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item" @click="prepareDocumentDuplicationToWork(d)">Dupliquer vers un autre actions d'accompagnement</a>
|
<a
|
||||||
|
class="dropdown-item"
|
||||||
|
@click="prepareDocumentDuplicationToWork(d)"
|
||||||
|
>Dupliquer vers un autre actions d'accompagnement</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -131,35 +172,44 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ISOToDatetime } from 'ChillMainAssets/chill/js/date';
|
import { ISOToDatetime } from "ChillMainAssets/chill/js/date";
|
||||||
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
|
import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue";
|
||||||
import DocumentActionButtonsGroup from 'ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue';
|
import DocumentActionButtonsGroup from "ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue";
|
||||||
import DropFileModal from 'ChillDocStoreAssets/vuejs/DropFileWidget/DropFileModal.vue';
|
import DropFileModal from "ChillDocStoreAssets/vuejs/DropFileWidget/DropFileModal.vue";
|
||||||
import {
|
import {
|
||||||
EVALUATION_NOTIFICATION_NOTIFY_REFERRER,
|
EVALUATION_NOTIFICATION_NOTIFY_REFERRER,
|
||||||
EVALUATION_NOTIFICATION_NOTIFY_ANY,
|
EVALUATION_NOTIFICATION_NOTIFY_ANY,
|
||||||
EVALUATION_NOTIFICATION_SEND,
|
EVALUATION_NOTIFICATION_SEND,
|
||||||
EVALUATION_DOCUMENTS,
|
EVALUATION_DOCUMENTS,
|
||||||
trans
|
trans,
|
||||||
} from 'translator';
|
} from "translator";
|
||||||
import {ref, watch} from "vue";
|
import { ref, watch } from "vue";
|
||||||
import AccompanyingPeriodWorkSelectorModal
|
import AccompanyingPeriodWorkSelectorModal from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue";
|
||||||
from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue";
|
|
||||||
|
|
||||||
defineProps(['documents', 'docAnchorId', 'accompanyingPeriodId']);
|
defineProps(["documents", "docAnchorId", "accompanyingPeriodId"]);
|
||||||
const emit = defineEmits(['inputDocumentTitle', 'removeDocument', 'duplicateDocument', 'statusDocumentChanged', 'goToGenerateWorkflow', 'goToGenerateNotification', 'duplicateDocumentToWork']);
|
const emit = defineEmits([
|
||||||
|
"inputDocumentTitle",
|
||||||
|
"removeDocument",
|
||||||
|
"duplicateDocument",
|
||||||
|
"statusDocumentChanged",
|
||||||
|
"goToGenerateWorkflow",
|
||||||
|
"goToGenerateNotification",
|
||||||
|
"duplicateDocumentToWork",
|
||||||
|
]);
|
||||||
|
|
||||||
const showAccompanyingPeriodSelector = ref(false);
|
const showAccompanyingPeriodSelector = ref(false);
|
||||||
const selectedEvaluation = ref(null);
|
const selectedEvaluation = ref(null);
|
||||||
const selectedDocument = ref(null);
|
const selectedDocument = ref(null);
|
||||||
|
|
||||||
const prepareDocumentDuplicationToWork = (d) => {
|
const prepareDocumentDuplicationToWork = (d) => {
|
||||||
selectedDocument.value = d
|
selectedDocument.value = d;
|
||||||
showAccompanyingPeriodSelector.value = true
|
showAccompanyingPeriodSelector.value = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
watch(selectedEvaluation, (val) => {
|
watch(selectedEvaluation, (val) => {
|
||||||
emit('duplicateDocumentToEvaluation', {'evaluation': val, 'document': selectedDocument.value})
|
emit("duplicateDocumentToEvaluation", {
|
||||||
|
evaluation: val,
|
||||||
|
document: selectedDocument.value,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -18,10 +18,7 @@
|
|||||||
@update:timeSpent="updateTimeSpent"
|
@update:timeSpent="updateTimeSpent"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CommentInput
|
<CommentInput :comment="comment" @update:comment="updateComment" />
|
||||||
:comment="comment"
|
|
||||||
@update:comment="updateComment"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<DocumentsList
|
<DocumentsList
|
||||||
v-if="evaluation.documents.length > 0"
|
v-if="evaluation.documents.length > 0"
|
||||||
@ -48,53 +45,50 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from "vue";
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from "vuex";
|
||||||
import DateInputs from './DateInputs.vue';
|
import DateInputs from "./DateInputs.vue";
|
||||||
import TimeSpentInput from './TimeSpentInput.vue';
|
import TimeSpentInput from "./TimeSpentInput.vue";
|
||||||
import CommentInput from './CommentInput.vue';
|
import CommentInput from "./CommentInput.vue";
|
||||||
import DocumentsList from './DocumentsList.vue';
|
import DocumentsList from "./DocumentsList.vue";
|
||||||
import DocumentActions from './DocumentActions.vue';
|
import DocumentActions from "./DocumentActions.vue";
|
||||||
import {makeFetch} from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
import { useToast } from "vue-toast-notification";
|
import { useToast } from "vue-toast-notification";
|
||||||
import {
|
import { DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS, trans } from "translator";
|
||||||
DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS,
|
|
||||||
trans
|
|
||||||
} from 'translator';
|
|
||||||
|
|
||||||
const props = defineProps(['evaluation', 'docAnchorId']);
|
const props = defineProps(["evaluation", "docAnchorId"]);
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
const timeSpentChoices = [
|
const timeSpentChoices = [
|
||||||
{ text: '1 minute', value: 60 },
|
{ text: "1 minute", value: 60 },
|
||||||
{ text: '2 minutes', value: 120 },
|
{ text: "2 minutes", value: 120 },
|
||||||
{ text: '3 minutes', value: 180 },
|
{ text: "3 minutes", value: 180 },
|
||||||
{ text: '4 minutes', value: 240 },
|
{ text: "4 minutes", value: 240 },
|
||||||
{ text: '5 minutes', value: 300 },
|
{ text: "5 minutes", value: 300 },
|
||||||
{ text: '10 minutes', value: 600 },
|
{ text: "10 minutes", value: 600 },
|
||||||
{ text: '15 minutes', value: 900 },
|
{ text: "15 minutes", value: 900 },
|
||||||
{ text: '20 minutes', value: 1200 },
|
{ text: "20 minutes", value: 1200 },
|
||||||
{ text: '25 minutes', value: 1500 },
|
{ text: "25 minutes", value: 1500 },
|
||||||
{ text: '30 minutes', value: 1800 },
|
{ text: "30 minutes", value: 1800 },
|
||||||
{ text: '45 minutes', value: 2700 },
|
{ text: "45 minutes", value: 2700 },
|
||||||
{ text: '1 hour', value: 3600 },
|
{ text: "1 hour", value: 3600 },
|
||||||
{ text: '1 hour 15 minutes', value: 4500 },
|
{ text: "1 hour 15 minutes", value: 4500 },
|
||||||
{ text: '1 hour 30 minutes', value: 5400 },
|
{ text: "1 hour 30 minutes", value: 5400 },
|
||||||
{ text: '1 hour 45 minutes', value: 6300 },
|
{ text: "1 hour 45 minutes", value: 6300 },
|
||||||
{ text: '2 hours', value: 7200 },
|
{ text: "2 hours", value: 7200 },
|
||||||
{ text: '2 hours 30 minutes', value: 9000 },
|
{ text: "2 hours 30 minutes", value: 9000 },
|
||||||
{ text: '3 hours', value: 10800 },
|
{ text: "3 hours", value: 10800 },
|
||||||
{ text: '3 hours 30 minutes', value: 12600 },
|
{ text: "3 hours 30 minutes", value: 12600 },
|
||||||
{ text: '4 hours', value: 14400 },
|
{ text: "4 hours", value: 14400 },
|
||||||
{ text: '4 hours 30 minutes', value: 16200 },
|
{ text: "4 hours 30 minutes", value: 16200 },
|
||||||
{ text: '5 hours', value: 18000 },
|
{ text: "5 hours", value: 18000 },
|
||||||
{ text: '5 hours 30 minutes', value: 19800 },
|
{ text: "5 hours 30 minutes", value: 19800 },
|
||||||
{ text: '6 hours', value: 21600 },
|
{ text: "6 hours", value: 21600 },
|
||||||
{ text: '6 hours 30 minutes', value: 23400 },
|
{ text: "6 hours 30 minutes", value: 23400 },
|
||||||
{ text: '7 hours', value: 25200 },
|
{ text: "7 hours", value: 25200 },
|
||||||
{ text: '7 hours 30 minutes', value: 27000 },
|
{ text: "7 hours 30 minutes", value: 27000 },
|
||||||
{ text: '8 hours', value: 28800 },
|
{ text: "8 hours", value: 28800 },
|
||||||
];
|
];
|
||||||
|
|
||||||
const startDate = computed({
|
const startDate = computed({
|
||||||
@ -102,7 +96,10 @@ const startDate = computed({
|
|||||||
return props.evaluation.startDate;
|
return props.evaluation.startDate;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationStartDate', { key: props.evaluation.key, date: v });
|
store.commit("setEvaluationStartDate", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
date: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -111,7 +108,10 @@ const endDate = computed({
|
|||||||
return props.evaluation.endDate;
|
return props.evaluation.endDate;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationEndDate', { key: props.evaluation.key, date: v });
|
store.commit("setEvaluationEndDate", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
date: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -120,7 +120,10 @@ const maxDate = computed({
|
|||||||
return props.evaluation.maxDate;
|
return props.evaluation.maxDate;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationMaxDate', { key: props.evaluation.key, date: v });
|
store.commit("setEvaluationMaxDate", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
date: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -129,7 +132,10 @@ const warningInterval = computed({
|
|||||||
return props.evaluation.warningInterval;
|
return props.evaluation.warningInterval;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationWarningInterval', { key: props.evaluation.key, days: v });
|
store.commit("setEvaluationWarningInterval", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
days: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -138,7 +144,10 @@ const timeSpent = computed({
|
|||||||
return props.evaluation.timeSpent;
|
return props.evaluation.timeSpent;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationTimeSpent', { key: props.evaluation.key, time: v });
|
store.commit("setEvaluationTimeSpent", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
time: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -147,12 +156,17 @@ const comment = computed({
|
|||||||
return props.evaluation.comment;
|
return props.evaluation.comment;
|
||||||
},
|
},
|
||||||
set(v) {
|
set(v) {
|
||||||
store.commit('setEvaluationComment', { key: props.evaluation.key, comment: v });
|
store.commit("setEvaluationComment", {
|
||||||
|
key: props.evaluation.key,
|
||||||
|
comment: v,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const getTemplatesAvailables = computed(() => {
|
const getTemplatesAvailables = computed(() => {
|
||||||
return store.getters.getTemplatesAvailablesForEvaluation(props.evaluation.evaluation);
|
return store.getters.getTemplatesAvailablesForEvaluation(
|
||||||
|
props.evaluation.evaluation,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// const getAccompanyingPeriod = computed(() => store.work)
|
// const getAccompanyingPeriod = computed(() => store.work)
|
||||||
@ -184,7 +198,7 @@ function onInputDocumentTitle(event) {
|
|||||||
const id = Number(event.target.id);
|
const id = Number(event.target.id);
|
||||||
const key = Number(event.target.dataset.key) + 1;
|
const key = Number(event.target.dataset.key) + 1;
|
||||||
const title = event.target.value;
|
const title = event.target.value;
|
||||||
store.commit('updateDocumentTitle', {
|
store.commit("updateDocumentTitle", {
|
||||||
id: id,
|
id: id,
|
||||||
key: key,
|
key: key,
|
||||||
evaluationKey: props.evaluation.key,
|
evaluationKey: props.evaluation.key,
|
||||||
@ -194,11 +208,11 @@ function onInputDocumentTitle(event) {
|
|||||||
|
|
||||||
function addDocument({ stored_object, stored_object_version }) {
|
function addDocument({ stored_object, stored_object_version }) {
|
||||||
let document = {
|
let document = {
|
||||||
type: 'accompanying_period_work_evaluation_document',
|
type: "accompanying_period_work_evaluation_document",
|
||||||
storedObject: stored_object,
|
storedObject: stored_object,
|
||||||
title: 'Nouveau document',
|
title: "Nouveau document",
|
||||||
};
|
};
|
||||||
store.commit('addDocument', {
|
store.commit("addDocument", {
|
||||||
key: props.evaluation.key,
|
key: props.evaluation.key,
|
||||||
document,
|
document,
|
||||||
stored_object_version,
|
stored_object_version,
|
||||||
@ -206,8 +220,14 @@ function addDocument({ stored_object, stored_object_version }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeDocument(document) {
|
function removeDocument(document) {
|
||||||
if (window.confirm('Êtes-vous sûr·e de vouloir supprimer le document qui a pour titre "' + document.title + '" ?')) {
|
if (
|
||||||
store.commit('removeDocument', {
|
window.confirm(
|
||||||
|
'Êtes-vous sûr·e de vouloir supprimer le document qui a pour titre "' +
|
||||||
|
document.title +
|
||||||
|
'" ?',
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
store.commit("removeDocument", {
|
||||||
key: props.evaluation.key,
|
key: props.evaluation.key,
|
||||||
document: document,
|
document: document,
|
||||||
});
|
});
|
||||||
@ -215,21 +235,19 @@ function removeDocument(document) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function duplicateDocument(document) {
|
function duplicateDocument(document) {
|
||||||
store.dispatch('duplicateDocument', {
|
store.dispatch("duplicateDocument", {
|
||||||
evaluation_key: props.evaluation.key,
|
evaluation_key: props.evaluation.key,
|
||||||
document: document,
|
document: document,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function duplicateDocumentToEvaluation({ evaluation, document }) {
|
||||||
function duplicateDocumentToEvaluation({evaluation, document}) {
|
|
||||||
|
|
||||||
const url = `/api/1.0/person/accompanying-course-work-evaluation-document/${document.id}/evaluation/${evaluation.id}/duplicate`;
|
const url = `/api/1.0/person/accompanying-course-work-evaluation-document/${document.id}/evaluation/${evaluation.id}/duplicate`;
|
||||||
// console.log('document id', document.id, 'evaluation id', evaluation.id)
|
// console.log('document id', document.id, 'evaluation id', evaluation.id)
|
||||||
|
|
||||||
makeFetch("POST", url)
|
makeFetch("POST", url)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log('new document', response)
|
console.log("new document", response);
|
||||||
toast.open({ message: trans(DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS) });
|
toast.open({ message: trans(DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS) });
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@ -238,7 +256,7 @@ function duplicateDocumentToEvaluation({evaluation, document}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onStatusDocumentChanged(newStatus) {
|
function onStatusDocumentChanged(newStatus) {
|
||||||
store.commit('statusDocumentChanged', {
|
store.commit("statusDocumentChanged", {
|
||||||
key: props.evaluation.key,
|
key: props.evaluation.key,
|
||||||
newStatus: newStatus,
|
newStatus: newStatus,
|
||||||
});
|
});
|
||||||
@ -246,18 +264,22 @@ function onStatusDocumentChanged(newStatus) {
|
|||||||
|
|
||||||
function goToGenerateWorkflowEvaluationDocument({ workflowName, payload }) {
|
function goToGenerateWorkflowEvaluationDocument({ workflowName, payload }) {
|
||||||
const callback = (data) => {
|
const callback = (data) => {
|
||||||
let evaluation = data.accompanyingPeriodWorkEvaluations.find((e) => e.key === props.evaluation.key);
|
let evaluation = data.accompanyingPeriodWorkEvaluations.find(
|
||||||
let updatedDocument = evaluation.documents.find((d) => d.key === payload.doc.key);
|
(e) => e.key === props.evaluation.key,
|
||||||
|
);
|
||||||
|
let updatedDocument = evaluation.documents.find(
|
||||||
|
(d) => d.key === payload.doc.key,
|
||||||
|
);
|
||||||
window.location.assign(
|
window.location.assign(
|
||||||
buildLinkCreate(
|
buildLinkCreate(
|
||||||
workflowName,
|
workflowName,
|
||||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
"Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument",
|
||||||
updatedDocument.id,
|
updatedDocument.id,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
store.dispatch('submit', callback).catch((e) => {
|
store.dispatch("submit", callback).catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
@ -265,18 +287,24 @@ function goToGenerateWorkflowEvaluationDocument({ workflowName, payload }) {
|
|||||||
|
|
||||||
function goToGenerateDocumentNotification(document, tos) {
|
function goToGenerateDocumentNotification(document, tos) {
|
||||||
const callback = (data) => {
|
const callback = (data) => {
|
||||||
let evaluation = data.accompanyingPeriodWorkEvaluations.find((e) => e.key === props.evaluation.key);
|
let evaluation = data.accompanyingPeriodWorkEvaluations.find(
|
||||||
let updatedDocument = evaluation.documents.find((d) => d.key === document.key);
|
(e) => e.key === props.evaluation.key,
|
||||||
|
);
|
||||||
|
let updatedDocument = evaluation.documents.find(
|
||||||
|
(d) => d.key === document.key,
|
||||||
|
);
|
||||||
window.location.assign(
|
window.location.assign(
|
||||||
buildLinkCreateNotification(
|
buildLinkCreateNotification(
|
||||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
"Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument",
|
||||||
updatedDocument.id,
|
updatedDocument.id,
|
||||||
tos === true ? store.state.work.accompanyingPeriod.user.id : null,
|
tos === true ? store.state.work.accompanyingPeriod.user.id : null,
|
||||||
window.location.pathname + window.location.search + window.location.hash,
|
window.location.pathname +
|
||||||
|
window.location.search +
|
||||||
|
window.location.hash,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
store.dispatch('submit', callback).catch((e) => {
|
store.dispatch("submit", callback).catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
throw e;
|
throw e;
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,11 @@
|
|||||||
@input="$emit('update:timeSpent', $event.target.value)"
|
@input="$emit('update:timeSpent', $event.target.value)"
|
||||||
>
|
>
|
||||||
<option disabled value="">{{ trans(EVALUATION_TIME_SPENT) }}</option>
|
<option disabled value="">{{ trans(EVALUATION_TIME_SPENT) }}</option>
|
||||||
<option v-for="time in timeSpentChoices" :value="time.value" :key="time.value">
|
<option
|
||||||
|
v-for="time in timeSpentChoices"
|
||||||
|
:value="time.value"
|
||||||
|
:key="time.value"
|
||||||
|
>
|
||||||
{{ time.text }}
|
{{ time.text }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
@ -19,8 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { EVALUATION_TIME_SPENT, trans } from 'translator';
|
import { EVALUATION_TIME_SPENT, trans } from "translator";
|
||||||
|
|
||||||
defineProps(['timeSpent', 'timeSpentChoices']);
|
defineProps(["timeSpent", "timeSpentChoices"]);
|
||||||
defineEmits(['update:timeSpent']);
|
defineEmits(["update:timeSpent"]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -43,7 +43,7 @@ import {
|
|||||||
} from "translator";
|
} from "translator";
|
||||||
import { ISOToDate } from "ChillMainAssets/chill/js/date";
|
import { ISOToDate } from "ChillMainAssets/chill/js/date";
|
||||||
import { DateTime } from "ChillMainAssets/types";
|
import { DateTime } from "ChillMainAssets/types";
|
||||||
import {AccompanyingPeriodWorkEvaluation} from "../../../types";
|
import { AccompanyingPeriodWorkEvaluation } from "../../../types";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const props = defineProps<{ eval: AccompanyingPeriodWorkEvaluation }>();
|
const props = defineProps<{ eval: AccompanyingPeriodWorkEvaluation }>();
|
||||||
|
@ -22,10 +22,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {AccompanyingPeriodWorkEvaluation} from "../../../types";
|
import { AccompanyingPeriodWorkEvaluation } from "../../../types";
|
||||||
import { defineProps, ref, watch } from "vue";
|
import { defineProps, ref, watch } from "vue";
|
||||||
import AccompanyingPeriodWorkEvaluationItem
|
import AccompanyingPeriodWorkEvaluationItem from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationItem.vue";
|
||||||
from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationItem.vue";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
<modal
|
<modal
|
||||||
v-if="showModal"
|
v-if="showModal"
|
||||||
@ -65,23 +64,21 @@ import {
|
|||||||
CONFIRM,
|
CONFIRM,
|
||||||
} from "translator";
|
} from "translator";
|
||||||
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
|
||||||
import AccompanyingPeriodWorkEvaluationList
|
import AccompanyingPeriodWorkEvaluationList from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue";
|
||||||
from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue";
|
import { AccompanyingPeriodWorkEvaluation } from "../../../types";
|
||||||
import {AccompanyingPeriodWorkEvaluation} from "../../../types";
|
|
||||||
|
|
||||||
const selectedAcpw = ref<AccompanyingPeriodWork | null>(null);
|
const selectedAcpw = ref<AccompanyingPeriodWork | null>(null);
|
||||||
const selectedEvaluation = ref<AccompanyingPeriodWorkEvaluation | null>(null);
|
const selectedEvaluation = ref<AccompanyingPeriodWorkEvaluation | null>(null);
|
||||||
const showModal = ref(false);
|
const showModal = ref(false);
|
||||||
const accompanyingPeriodWorks = ref<AccompanyingPeriodWork[]>([]);
|
const accompanyingPeriodWorks = ref<AccompanyingPeriodWork[]>([]);
|
||||||
const evaluations = ref<AccompanyingPeriodWorkEvaluation[]>([])
|
const evaluations = ref<AccompanyingPeriodWorkEvaluation[]>([]);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
accompanyingPeriodId: String,
|
accompanyingPeriodId: String,
|
||||||
isEvaluationSelector: Boolean
|
isEvaluationSelector: Boolean,
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['closeModal', 'update:selectedEvaluation'])
|
const emit = defineEmits(["closeModal", "update:selectedEvaluation"]);
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.accompanyingPeriodId) {
|
if (props.accompanyingPeriodId) {
|
||||||
@ -114,30 +111,29 @@ watch(selectedAcpw, (newValue) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const openModal = () => {
|
const openModal = () => {
|
||||||
showModal.value = true
|
showModal.value = true;
|
||||||
}
|
};
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
showModal.value = false
|
showModal.value = false;
|
||||||
selectedEvaluation.value = null
|
selectedEvaluation.value = null;
|
||||||
selectedAcpw.value = null
|
selectedAcpw.value = null;
|
||||||
emit('closeModal')
|
emit("closeModal");
|
||||||
}
|
};
|
||||||
const confirmSelection = () => {
|
const confirmSelection = () => {
|
||||||
selectedAcpw.value = selectedAcpw.value;
|
selectedAcpw.value = selectedAcpw.value;
|
||||||
|
|
||||||
if(false === props.isEvaluationSelector) {
|
if (false === props.isEvaluationSelector) {
|
||||||
closeModal();
|
closeModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectedAcpw.value && props.isEvaluationSelector) {
|
if (selectedAcpw.value && props.isEvaluationSelector) {
|
||||||
evaluations.value = selectedAcpw.value.accompanyingPeriodWorkEvaluations
|
evaluations.value = selectedAcpw.value.accompanyingPeriodWorkEvaluations;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectedEvaluation.value && props.isEvaluationSelector) {
|
if (selectedEvaluation.value && props.isEvaluationSelector) {
|
||||||
// console.log('evaluation log in modal', selectedEvaluation.value)
|
// console.log('evaluation log in modal', selectedEvaluation.value)
|
||||||
emit("update:selectedEvaluation", selectedEvaluation.value);
|
emit("update:selectedEvaluation", selectedEvaluation.value);
|
||||||
closeModal()
|
closeModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user