mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 00:24:59 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
9d2dfbe610
|
|||
70e6aee3c5 | |||
6c16967cdc
|
|||
4359c2dddc
|
3
.changes/v2.2.1.md
Normal file
3
.changes/v2.2.1.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## v2.2.1 - 2023-06-19
|
||||
### Fixed
|
||||
* ([#114](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/114)) [notification on document evaluation] fix entityId and return path when adding a notification on a document in an evaluation
|
@@ -6,7 +6,7 @@ versionExt: md
|
||||
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
|
||||
kindFormat: '### {{.Kind}}'
|
||||
changeFormat: >-
|
||||
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{- end }}{{.Body}}
|
||||
* {{ if not (eq .Custom.Issue "") }}([#{{ .Custom.Issue }}](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/{{ .Custom.Issue }})) {{ end }}{{.Body}}
|
||||
custom:
|
||||
- key: Issue
|
||||
label: Issue number (on chill-bundles repository) (optional)
|
||||
|
@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v2.2.1 - 2023-06-19
|
||||
### Fixed
|
||||
* ([#114](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/114)) [notification on document evaluation] fix entityId and return path when adding a notification on a document in an evaluation
|
||||
|
||||
## v2.2.0 - 2023-06-18
|
||||
### Feature
|
||||
* When navigating from a workflow regarding to an evaluation's document to an accompanying course, scroll directly to the document, and blink to highlight this document
|
||||
|
@@ -0,0 +1,20 @@
|
||||
const buildLinkCreate = function (relatedEntityClass: string, relatedEntityId: number, to: number | null, returnPath: string | null): string
|
||||
{
|
||||
const params = new URLSearchParams();
|
||||
params.append('entityClass', relatedEntityClass);
|
||||
params.append('entityId', relatedEntityId.toString());
|
||||
|
||||
if (null !== to) {
|
||||
params.append('tos[0]', to.toString());
|
||||
}
|
||||
|
||||
if (null !== returnPath) {
|
||||
params.append('returnPath', returnPath);
|
||||
}
|
||||
|
||||
return `/fr/notification/create?${params.toString()}`;
|
||||
}
|
||||
|
||||
export {
|
||||
buildLinkCreate,
|
||||
}
|
@@ -201,6 +201,7 @@ import AddAsyncUpload from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUpload
|
||||
import AddAsyncUploadDownloader from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUploadDownloader.vue';
|
||||
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
|
||||
import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js';
|
||||
import {buildLinkCreate as buildLinkCreateNotification} from 'ChillMainAssets/lib/entity-notification/api';
|
||||
import DocumentActionButtonsGroup from "ChillDocStoreAssets/vuejs/DocumentActionButtonsGroup.vue";
|
||||
|
||||
const i18n = {
|
||||
@@ -413,14 +414,16 @@ export default {
|
||||
return this.$store.dispatch('submit', callback)
|
||||
.catch(e => { console.log(e); throw e; });
|
||||
},
|
||||
goToGenerateDocumentNotification(document, tos){
|
||||
goToGenerateDocumentNotification(document, tos) {
|
||||
const callback = (data) => {
|
||||
let evaluation = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key);
|
||||
if (tos === true) {
|
||||
window.location.assign(`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument&entityId=${document.id}&tos[0]=${this.$store.state.work.accompanyingPeriod.user.id}&returnPath=/fr/person/accompanying-period/work/${evaluation.id}/edit`)
|
||||
} else {
|
||||
window.location.assign(`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument&entityId=${document.id}&returnPath=/fr/person/accompanying-period/work/${evaluation.id}/edit`)
|
||||
}
|
||||
let updatedDocument = evaluation.documents.find(d => d.key === document.key);
|
||||
window.location.assign(buildLinkCreateNotification(
|
||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument',
|
||||
updatedDocument.id,
|
||||
tos === true ? this.$store.state.work.accompanyingPeriod.user.id : null,
|
||||
window.location.pathname + window.location.search + window.location.hash
|
||||
));
|
||||
};
|
||||
return this.$store.dispatch('submit', callback)
|
||||
.catch(e => {console.log(e); throw e});
|
||||
|
Reference in New Issue
Block a user