mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 16:55:00 +00:00
allow changing evaluation for a document
- Remove restriction on changing evaluation in entity logic
This commit is contained in:
@@ -46,7 +46,6 @@ readonly class AccompanyingPeriodWorkEvaluationDocumentMoveController
|
|||||||
throw new AccessDeniedHttpException('not allowed to edit this accompanying period work');
|
throw new AccessDeniedHttpException('not allowed to edit this accompanying period work');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simply set the new evaluation - Doctrine will handle the collection updates
|
|
||||||
$document->setAccompanyingPeriodWorkEvaluation($evaluation);
|
$document->setAccompanyingPeriodWorkEvaluation($evaluation);
|
||||||
|
|
||||||
$this->entityManager->persist($document);
|
$this->entityManager->persist($document);
|
||||||
|
@@ -100,14 +100,14 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
|||||||
{
|
{
|
||||||
// if an evaluation is already associated, we cannot change the association (removing the association,
|
// if an evaluation is already associated, we cannot change the association (removing the association,
|
||||||
// by setting a null value, is allowed.
|
// by setting a null value, is allowed.
|
||||||
if (
|
// if (
|
||||||
$this->accompanyingPeriodWorkEvaluation instanceof AccompanyingPeriodWorkEvaluation
|
// $this->accompanyingPeriodWorkEvaluation instanceof AccompanyingPeriodWorkEvaluation
|
||||||
&& $accompanyingPeriodWorkEvaluation instanceof AccompanyingPeriodWorkEvaluation
|
// && $accompanyingPeriodWorkEvaluation instanceof AccompanyingPeriodWorkEvaluation
|
||||||
) {
|
// ) {
|
||||||
if ($this->accompanyingPeriodWorkEvaluation !== $accompanyingPeriodWorkEvaluation) {
|
// if ($this->accompanyingPeriodWorkEvaluation !== $accompanyingPeriodWorkEvaluation) {
|
||||||
throw new \RuntimeException('It is not allowed to change the evaluation for a document');
|
// throw new \RuntimeException('It is not allowed to change the evaluation for a document');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
$this->accompanyingPeriodWorkEvaluation = $accompanyingPeriodWorkEvaluation;
|
$this->accompanyingPeriodWorkEvaluation = $accompanyingPeriodWorkEvaluation;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@@ -140,8 +140,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="d.storedObject._permissions.canEdit">
|
<li v-if="d.storedObject._permissions.canEdit">
|
||||||
<a class="btn btn-choose" @click="prepareDocumentMoveToWork(d)"
|
<a
|
||||||
>EVALUATION_DOCUMENT_MOVE</a
|
class="btn btn-choose"
|
||||||
|
@click="prepareDocumentMoveToWork(d)"
|
||||||
|
>{{ trans(EVALUATION_DOCUMENT_MOVE) }}</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="d.storedObject._permissions.canEdit">
|
<li v-if="d.storedObject._permissions.canEdit">
|
||||||
@@ -186,14 +188,15 @@ import ListWorkflowModal from "ChillMainAssets/vuejs/_components/EntityWorkflow/
|
|||||||
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,
|
||||||
EVALUATION_DOCUMENT_DUPLICATE,
|
EVALUATION_DOCUMENT_MOVE,
|
||||||
EVALUATION_DOCUMENT_DUPLICATE_HERE,
|
EVALUATION_DOCUMENT_DUPLICATE,
|
||||||
EVALUATION_DOCUMENT_DUPLICATE_TO_OTHER_EVALUATION,
|
EVALUATION_DOCUMENT_DUPLICATE_HERE,
|
||||||
trans,
|
EVALUATION_DOCUMENT_DUPLICATE_TO_OTHER_EVALUATION,
|
||||||
|
trans,
|
||||||
} from "translator";
|
} from "translator";
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import AccompanyingPeriodWorkSelectorModal from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue";
|
import AccompanyingPeriodWorkSelectorModal from "ChillPersonAssets/vuejs/_components/AccompanyingPeriodWorkSelector/AccompanyingPeriodWorkSelectorModal.vue";
|
||||||
|
@@ -777,6 +777,7 @@ evaluation:
|
|||||||
notification_notify_any: Notifier d'autres utilisateurs
|
notification_notify_any: Notifier d'autres utilisateurs
|
||||||
notification_send: Envoyer une notification
|
notification_send: Envoyer une notification
|
||||||
document:
|
document:
|
||||||
|
move: Déplacer
|
||||||
duplicate: Dupliquer
|
duplicate: Dupliquer
|
||||||
duplicate_here: Dupliquer ici
|
duplicate_here: Dupliquer ici
|
||||||
duplicate_to_other_evaluation: Dupliquer vers une autre évaluation
|
duplicate_to_other_evaluation: Dupliquer vers une autre évaluation
|
||||||
|
Reference in New Issue
Block a user