diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/DocumentsList.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/DocumentsList.vue
index c7f84d624..45ab10335 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/DocumentsList.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/DocumentsList.vue
@@ -151,8 +151,9 @@ defineEmits(['inputDocumentTitle', 'removeDocument', 'duplicateDocument', 'statu
const showAccompanyingPeriodSelector = ref(false);
const selectedEvaluation = ref(null);
-/*watch(selectedAcpw, (val) => {
- console.log("selected acpw changed:", val);
-});*/
+
+watch(selectedEvaluation, (val) => {
+ console.log("selected evaluation changed:", val);
+});
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationItem.vue
new file mode 100644
index 000000000..88aafe479
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationItem.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+ {{ trans(EVALUATION) }}:
+
+ {{ eval?.evaluation?.title.fr }}
+
+
+
+
+ -
+
+ {{ trans(ACCOMPANYING_COURSE_WORK_START_DATE) }} :
+
+ {{ formatDate(eval.startDate) }}
+
+
+ -
+
+ {{ trans(ACCOMPANYING_COURSE_WORK_END_DATE) }} :
+
+ {{ formatDate(eval.endDate) }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue
new file mode 100644
index 000000000..9409eb2ec
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue
index 98c062323..2d6b657d9 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue
@@ -33,9 +33,15 @@
+
@@ -59,16 +65,23 @@ import {
CONFIRM,
} from "translator";
import { makeFetch } from "ChillMainAssets/lib/api/apiMethods";
+import AccompanyingPeriodWorkEvaluationList
+ from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkEvaluationList.vue";
+import {AccompanyingPeriodWorkEvaluation} from "../../../types";
const selectedAcpw = ref(null);
+const selectedEvaluation = ref(null);
const showModal = ref(false);
const accompanyingPeriodWorks = ref([]);
+const evaluations = ref([])
+
const props = defineProps({
accompanyingPeriodId: String,
isEvaluationSelector: Boolean
});
-const emit = defineEmits(['closeModal', 'update:selectedAcpw'])
+const emit = defineEmits(['closeModal', 'update:selectedEvaluation'])
+
onMounted(() => {
if (props.accompanyingPeriodId) {
@@ -105,28 +118,26 @@ const openModal = () => {
}
const closeModal = () => {
showModal.value = false
+ selectedEvaluation.value = null
+ selectedAcpw.value = null
emit('closeModal')
}
-
-const getEvaluationsForSelectedAcpw = (acpwId: number) => {
- const url = `/api/1.0/person/accompanying-course/${periodId}/works.json`;
-
- makeFetch("GET", url)
- .then((response) => {
- accompanyingPeriodWorks.value = response;
- })
- .catch((error) => {
- console.log(error);
- });
-}
const confirmSelection = () => {
selectedAcpw.value = selectedAcpw.value;
- if(selectedAcpw.value && props.isEvaluationSelector) {
- console.log('i want evaluations', selectedAcpw.id)
- // emit("update:selectedAcpw", selectedAcpw.value);
+ if(false === props.isEvaluationSelector) {
+ closeModal();
+ }
+
+ if(selectedAcpw.value && props.isEvaluationSelector) {
+ evaluations.value = selectedAcpw.value.accompanyingPeriodWorkEvaluations
+ }
+
+ if(selectedEvaluation.value && props.isEvaluationSelector) {
+ // console.log('evaluation log in modal', selectedEvaluation.value)
+ emit("update:selectedEvaluation", selectedEvaluation.value);
+ closeModal()
}
- closeModal();
};