diff --git a/web/src/App.vue b/web/src/App.vue
index bd4956f..d2c9f7d 100644
--- a/web/src/App.vue
+++ b/web/src/App.vue
@@ -1,5 +1,6 @@
+
@@ -16,20 +17,22 @@ 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: {AddBoxModal, AddEventModal, Navbar, AddItemModal, AddTicketModal},
+ components: {Lightbox, AddBoxModal, AddEventModal, Navbar, AddItemModal, AddTicketModal},
computed: {
- ...mapState(['loadedItems', 'layout', 'toasts', 'showAddBoxModal', 'showAddEventModal']),
+ ...mapState(['loadedItems', 'layout', 'toasts', 'showAddBoxModal', 'showAddEventModal', 'lightboxHash']),
...mapGetters(['isLoggedIn']),
},
data: () => ({
addItemModalOpen: false,
- addTicketModalOpen: false
+ addTicketModalOpen: false,
}),
methods: {
- ...mapMutations(['removeToast', 'createToast', 'closeAddBoxModal', 'openAddBoxModal', 'closeAddEventModal']),
+ ...mapMutations(['removeToast', 'createToast', 'closeAddBoxModal', 'openAddBoxModal', 'closeAddEventModal',
+ 'openLightboxModalWith']),
...mapActions(['loadEvents', 'scheduleAfterInit']),
openAddItemModal() {
this.addItemModalOpen = true;
@@ -42,7 +45,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 9e1a963..8b463b0 100644
--- a/web/src/components/AuthenticatedImage.vue
+++ b/web/src/components/AuthenticatedImage.vue
@@ -42,19 +42,27 @@ 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() {
- setTimeout(() => {
- if (this.cached) {
- const c = this.getThumbnail(this.src);
- if (c) {
- this.image_data = c;
- return;
- }
- }
- this.loadImage();
- }, 0);
+ this.deferImage();
}
}
\ No newline at end of file
diff --git a/web/src/components/CollapsableCards.vue b/web/src/components/CollapsableCards.vue
index d1edab7..d38206a 100644
--- a/web/src/components/CollapsableCards.vue
+++ b/web/src/components/CollapsableCards.vue
@@ -52,7 +52,7 @@ export default {
};
},
created() {
- const query = this.$router.currentRoute ? (this.$router.currentRoute.query ? this.$router.currentRoute.query.collapsed : null) : null;
+ const query = this.route ? (this.route.query ? this.route.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.$router.currentRoute,
- query: {...this.$router.currentRoute.query, collapsed: encoded}
+ ...this.route,
+ query: {...this.route.query, collapsed: encoded}
});
},
deep: true,
diff --git a/web/src/components/EditItem.vue b/web/src/components/EditItem.vue
index 9bea6f9..833bfd5 100644
--- a/web/src/components/EditItem.vue
+++ b/web/src/components/EditItem.vue
@@ -12,13 +12,16 @@
field="description"
:validation-fn="str => str && str.length > 0"
/>
-
+
+
+
+
diff --git a/web/src/components/Timeline.vue b/web/src/components/Timeline.vue
index 88bfa94..41e1274 100644
--- a/web/src/components/Timeline.vue
+++ b/web/src/components/Timeline.vue
@@ -21,6 +21,9 @@
+
+
+
@@ -30,40 +33,15 @@
+
+
{{ item }}
-
-
-
-
+
-
-
-
-
+
@@ -78,12 +56,20 @@ 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: {
- TimelineShippingVoucher, AsyncButton,
- TimelineRelatedItem, TimelineAssignment, TimelineStateChange, TimelineComment, TimelineMail
+ TimelineRelatedTicket,
+ TimelinePlacement,
+ TimelineShippingVoucher,
+ TimelineRelatedItem,
+ TimelineAssignment,
+ TimelineStateChange,
+ TimelineComment,
+ TimelineMail
},
props: {
timeline: {
@@ -91,33 +77,13 @@ export default {
default: () => []
}
},
- emits: ['sendMail', 'addComment'],
- data: () => ({
- newMail: "",
- newComment: ""
- }),
computed: {
- ...mapGetters(['stateInfo']),
- newestMailSubject() {
- const mail = this.timeline.filter(item => item.type === 'mail').pop();
- return mail ? mail.subject : "";
- },
+ ...mapGetters(['stateInfo'])
},
- 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 c17a3a8..2670215 100644
--- a/web/src/components/TimelineRelatedItem.vue
+++ b/web/src/components/TimelineRelatedItem.vue
@@ -1,12 +1,15 @@
-
- linked item #{{ item.item.uid }} on as {{ item.status }}
+ linked item #{{
+ item.item.id
+ }} on as {{
+ item.status
+ }}
-
uid: {{ item.item.uid }} box: {{ item.item.box }}
- {{ item.item.description }}
-
+ id: {{ item.item.id }} box: {{ item.item.box }}
+
+ {{ item.item.description }}
+
-
@@ -72,16 +38,11 @@
import AuthenticatedImage from "@/components/AuthenticatedImage.vue";
import AuthenticatedDataLink from "@/components/AuthenticatedDataLink.vue";
-import Lightbox from "@/components/Lightbox.vue";
+import {mapMutations} from "vuex";
export default {
name: 'TimelineRelatedItem',
- components: {Lightbox, AuthenticatedImage, AuthenticatedDataLink},
- data() {
- return {
- lightboxHash: null,
- }
- },
+ components: {AuthenticatedImage, AuthenticatedDataLink},
props: {
'item': {
type: Object,
@@ -98,13 +59,8 @@ export default {
},
methods: {
- openLightboxModalWith(attachment) {
- this.lightboxHash = attachment.hash;
- },
- closeLightboxModal() { // Closes the editing modal and discards the edited copy of the item.
- this.lightboxHash = null;
- },
- },
+ ...mapMutations(['openLightboxModalWith'])
+ }
};
diff --git a/web/src/components/TimelineRelatedTicket.vue b/web/src/components/TimelineRelatedTicket.vue
new file mode 100644
index 0000000..694a4e0
--- /dev/null
+++ b/web/src/components/TimelineRelatedTicket.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+ 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 a3c1712..833f964 100644
--- a/web/src/components/inputs/AsyncButton.vue
+++ b/web/src/components/inputs/AsyncButton.vue
@@ -24,7 +24,6 @@ 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 50b5459..fc64d42 100644
--- a/web/src/components/inputs/InputCombo.vue
+++ b/web/src/components/inputs/InputCombo.vue
@@ -1,39 +1,36 @@
-