Skip to content

Commit bae0a39

Browse files
committed
Merge branch 'main' into develop
2 parents aef8797 + 94a75af commit bae0a39

6 files changed

Lines changed: 11 additions & 7 deletions

File tree

recoco/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.64.2"
1+
__version__ = "2.65.1"

recoco/apps/projects/templates/projects/project/fragments/tasks_modal/task_modal.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
<div class="d-flex flex-grow-1 align-items-stretch w-65 task-modal-content"
5656
:class="!contentIsLoading && 'visible'"
5757
x-effect="taskId && loadContent()">
58-
<template x-if="currentTask && taskId && currentTask?.resource_id">
58+
<template x-if="taskId && currentTask.resource_id">
5959
<iframe class="w-100 d-flex flex-column rounded"
60-
:src="resourcePreviewUrl(currentTask?.resource_id, taskId)"></iframe>
60+
:src="resourcePreviewUrl(currentTask.resource_id, taskId)"></iframe>
6161
</template>
62-
<template x-if="currentTask && taskId && !currentTask?.resource_id">
62+
<template x-if="taskId && !currentTask.resource_id">
6363
<div class="w-100 text-break fr-p-2w specific-maxheight-90vh scroll-gestion">
6464
<div class="resource-details">
6565
<h1 x-text="currentTask?.intent" class="fr-mb-2w"></h1>

recoco/apps/tasks/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class Meta:
113113
contact_id = serializers.IntegerField(write_only=True, required=False)
114114

115115
resource = ResourceSerializer(read_only=True)
116-
resource_id = serializers.IntegerField(write_only=True, required=False)
116+
resource_id = serializers.IntegerField(required=False)
117117

118118
created_by = UserSerializer(read_only=True)
119119
document = DocumentSerializer(read_only=True, many=True)

recoco/frontend/src/js/components/PreviewModal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ export default function PreviewModal() {
4848
return `${this.index + 1} sur ${this.newTasks.length} nouvelle${this.newTasks.length > 0 ? 's' : ''} recommandation${this.newTasks.length > 0 ? 's' : ''}`;
4949
},
5050
hasNotification(followupId) {
51+
if (this.notifications) return false;
52+
5153
return (
5254
this.notifications.filter(
5355
(n) => n.action_object.who && n.action_object.id === followupId
@@ -63,7 +65,7 @@ export default function PreviewModal() {
6365
this.currentTask,
6466
undefined,
6567
content,
66-
contactAdded??null
68+
contactAdded ?? null
6769
);
6870
await this.$store.previewModal.loadFollowups();
6971
await this.$store.tasksView.updateView();

recoco/frontend/src/js/components/Tutorial.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function Tutorial(challengeCode) {
2121
this.challengeCode = challengeCode;
2222
const challengeDefinition =
2323
await this.getChallengeDefinition(challengeCode);
24-
24+
if (!challengeDefinition) return;
2525
//Get current challenge for current user
2626
//Can be empty object
2727
const challenge = await this.getChallenge(this.challengeCode);

recoco/frontend/src/js/store/previewModal.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ document.addEventListener('alpine:init', () => {
1717
index: null,
1818
scrollY: null,
1919

20+
notifications: [],
21+
2022
contact: null,
2123

2224
get projectId() {

0 commit comments

Comments
 (0)