diff --git a/core/files/media_v2.py b/core/files/media_v2.py
index 00161b3..9cc8f23 100644
--- a/core/files/media_v2.py
+++ b/core/files/media_v2.py
@@ -38,8 +38,6 @@ def media_urls(request, hash):
'Age': 0,
'ETag': file.hash,
})
- except FileNotFoundError:
- return Response(status=status.HTTP_404_NOT_FOUND)
except File.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)
except EmailAttachment.DoesNotExist:
@@ -82,8 +80,6 @@ def thumbnail_urls(request, size, hash):
'ETag': file.hash + "_" + str(size),
})
- except FileNotFoundError:
- return Response(status=status.HTTP_404_NOT_FOUND)
except File.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)
except EmailAttachment.DoesNotExist:
diff --git a/web/src/App.vue b/web/src/App.vue
index d2c9f7d..bd4956f 100644
--- a/web/src/App.vue
+++ b/web/src/App.vue
@@ -1,6 +1,5 @@
-
@@ -17,22 +16,20 @@ import {mapState, mapMutations, mapActions, mapGetters} from 'vuex';
import AddTicketModal from "@/components/AddTicketModal.vue";
import AddBoxModal from "@/components/AddBoxModal.vue";
import AddEventModal from "@/components/AddEventModal.vue";
-import Lightbox from "@/components/Lightbox.vue";
export default {
name: 'app',
- components: {Lightbox, AddBoxModal, AddEventModal, Navbar, AddItemModal, AddTicketModal},
+ components: {AddBoxModal, AddEventModal, Navbar, AddItemModal, AddTicketModal},
computed: {
- ...mapState(['loadedItems', 'layout', 'toasts', 'showAddBoxModal', 'showAddEventModal', 'lightboxHash']),
+ ...mapState(['loadedItems', 'layout', 'toasts', 'showAddBoxModal', 'showAddEventModal']),
...mapGetters(['isLoggedIn']),
},
data: () => ({
addItemModalOpen: false,
- addTicketModalOpen: false,
+ addTicketModalOpen: false
}),
methods: {
- ...mapMutations(['removeToast', 'createToast', 'closeAddBoxModal', 'openAddBoxModal', 'closeAddEventModal',
- 'openLightboxModalWith']),
+ ...mapMutations(['removeToast', 'createToast', 'closeAddBoxModal', 'openAddBoxModal', 'closeAddEventModal']),
...mapActions(['loadEvents', 'scheduleAfterInit']),
openAddItemModal() {
this.addItemModalOpen = true;
@@ -45,7 +42,7 @@ export default {
},
closeAddTicketModal() {
this.addTicketModalOpen = false;
- },
+ }
},
created: function () {
document.title = document.location.hostname;
diff --git a/web/src/components/AuthenticatedImage.vue b/web/src/components/AuthenticatedImage.vue
index 8b463b0..9e1a963 100644
--- a/web/src/components/AuthenticatedImage.vue
+++ b/web/src/components/AuthenticatedImage.vue
@@ -42,27 +42,19 @@ export default {
url: this.src,
data: this.image_data
});
- },
- deferImage() {
- setTimeout(() => {
- if (this.cached) {
- const c = this.getThumbnail(this.src);
- if (c) {
- this.image_data = c;
- return;
- }
- }
- this.loadImage();
- }, 0);
- }
- },
- watch: {
- src: function (newVal, oldVal) {
- this.deferImage()
}
},
mounted() {
- this.deferImage();
+ setTimeout(() => {
+ if (this.cached) {
+ const c = this.getThumbnail(this.src);
+ if (c) {
+ this.image_data = c;
+ return;
+ }
+ }
+ this.loadImage();
+ }, 0);
}
}
\ No newline at end of file
diff --git a/web/src/components/CollapsableCards.vue b/web/src/components/CollapsableCards.vue
index d38206a..d1edab7 100644
--- a/web/src/components/CollapsableCards.vue
+++ b/web/src/components/CollapsableCards.vue
@@ -52,7 +52,7 @@ export default {
};
},
created() {
- const query = this.route ? (this.route.query ? this.route.query.collapsed : null) : null;
+ const query = this.$router.currentRoute ? (this.$router.currentRoute.query ? this.$router.currentRoute.query.collapsed : null) : null;
if (query !== null && query !== undefined) {
this.collapsed = this.unpackInt(parseInt(query), this.sections.length);
} else {
@@ -84,8 +84,8 @@ export default {
const encoded = this.packInt(this.collapsed).toString()
if (this.route.query.collapsed !== encoded)
this.$router.push({
- ...this.route,
- query: {...this.route.query, collapsed: encoded}
+ ...this.$router.currentRoute,
+ query: {...this.$router.currentRoute.query, collapsed: encoded}
});
},
deep: true,
diff --git a/web/src/components/EditItem.vue b/web/src/components/EditItem.vue
index 833bfd5..9bea6f9 100644
--- a/web/src/components/EditItem.vue
+++ b/web/src/components/EditItem.vue
@@ -12,16 +12,13 @@
field="description"
:validation-fn="str => str && str.length > 0"
/>
-
-
-
-
+
diff --git a/web/src/components/Timeline.vue b/web/src/components/Timeline.vue
index 41e1274..88bfa94 100644
--- a/web/src/components/Timeline.vue
+++ b/web/src/components/Timeline.vue
@@ -21,9 +21,6 @@
-
-
-
@@ -33,15 +30,40 @@
-
-
{{ item }}
-
+
+
+
+
-
+
+
+
+
@@ -56,20 +78,12 @@ import TimelineAssignment from "@/components/TimelineAssignment.vue";
import TimelineRelatedItem from "@/components/TimelineRelatedItem.vue";
import TimelineShippingVoucher from "@/components/TimelineShippingVoucher.vue";
import AsyncButton from "@/components/inputs/AsyncButton.vue";
-import TimelinePlacement from "@/components/TimelinePlacement.vue";
-import TimelineRelatedTicket from "@/components/TimelineRelatedTicket.vue";
export default {
name: 'Timeline',
components: {
- TimelineRelatedTicket,
- TimelinePlacement,
- TimelineShippingVoucher,
- TimelineRelatedItem,
- TimelineAssignment,
- TimelineStateChange,
- TimelineComment,
- TimelineMail
+ TimelineShippingVoucher, AsyncButton,
+ TimelineRelatedItem, TimelineAssignment, TimelineStateChange, TimelineComment, TimelineMail
},
props: {
timeline: {
@@ -77,13 +91,33 @@ export default {
default: () => []
}
},
+ emits: ['sendMail', 'addComment'],
+ data: () => ({
+ newMail: "",
+ newComment: ""
+ }),
computed: {
- ...mapGetters(['stateInfo'])
+ ...mapGetters(['stateInfo']),
+ newestMailSubject() {
+ const mail = this.timeline.filter(item => item.type === 'mail').pop();
+ return mail ? mail.subject : "";
+ },
},
+ methods: {
+ ...mapActions(['sendMail', 'postComment']),
+ sendMailAndClear: async function () {
+ await this.sendMail(this.newMail);
+ this.newMail = "";
+ },
+ addCommentAndClear: async function () {
+ await this.postComment(this.newComment);
+ this.newComment = "";
+ }
+ }
};
-
\ No newline at end of file
diff --git a/web/src/components/TimelineRelatedItem.vue b/web/src/components/TimelineRelatedItem.vue
index 2670215..c17a3a8 100644
--- a/web/src/components/TimelineRelatedItem.vue
+++ b/web/src/components/TimelineRelatedItem.vue
@@ -1,15 +1,12 @@
+
- linked item #{{
- item.item.id
- }} on as {{
- item.status
- }}
+ linked item #{{ item.item.uid }} on as {{ item.status }}
-
id: {{ item.item.id }} box: {{ item.item.box }}
-
- {{ item.item.description }}
-
+ uid: {{ item.item.uid }} box: {{ item.item.box }}
+ {{ item.item.description }}
+
+
@@ -38,11 +72,16 @@
import AuthenticatedImage from "@/components/AuthenticatedImage.vue";
import AuthenticatedDataLink from "@/components/AuthenticatedDataLink.vue";
-import {mapMutations} from "vuex";
+import Lightbox from "@/components/Lightbox.vue";
export default {
name: 'TimelineRelatedItem',
- components: {AuthenticatedImage, AuthenticatedDataLink},
+ components: {Lightbox, AuthenticatedImage, AuthenticatedDataLink},
+ data() {
+ return {
+ lightboxHash: null,
+ }
+ },
props: {
'item': {
type: Object,
@@ -59,8 +98,13 @@ export default {
},
methods: {
- ...mapMutations(['openLightboxModalWith'])
- }
+ openLightboxModalWith(attachment) {
+ this.lightboxHash = attachment.hash;
+ },
+ closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item.
+ this.lightboxHash = null;
+ },
+ },
};
diff --git a/web/src/components/TimelineRelatedTicket.vue b/web/src/components/TimelineRelatedTicket.vue
deleted file mode 100644
index 694a4e0..0000000
--- a/web/src/components/TimelineRelatedTicket.vue
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
- linked ticket #{{ item.issue_thread.id }} on
- as
- {{ item.status }}
-
-
-
-
- Ticket #{{ item.issue_thread.id }} - {{ item.issue_thread.name }}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/web/src/components/inputs/AsyncButton.vue b/web/src/components/inputs/AsyncButton.vue
index 833f964..a3c1712 100644
--- a/web/src/components/inputs/AsyncButton.vue
+++ b/web/src/components/inputs/AsyncButton.vue
@@ -24,6 +24,7 @@ export default {
},
methods: {
async handleClick() {
+ console.log("AsyncButton.handleClick() called");
if (this.task && typeof this.task === 'function') {
this.disabled = true;
try {
diff --git a/web/src/components/inputs/InputCombo.vue b/web/src/components/inputs/InputCombo.vue
index fc64d42..50b5459 100644
--- a/web/src/components/inputs/InputCombo.vue
+++ b/web/src/components/inputs/InputCombo.vue
@@ -1,36 +1,39 @@
-