feat: replace our home-grown gantt implementation with ganttastic #2180

Merged
konrad merged 78 commits from feature/ganttastic into main 2022-10-27 16:03:27 +00:00
5 changed files with 291 additions and 227 deletions
Showing only changes of commit e968c88cfd - Show all commits

View File

@ -71,17 +71,17 @@ specifiers:
sortablejs: 1.15.0
typescript: 4.8.4
ufo: 0.8.5
vite: 3.1.4
vite: 3.1.8
vite-plugin-pwa: 0.13.1
vite-svg-loader: 3.6.0
vitest: 0.23.4
vue: 3.2.40
vue: 3.2.41
vue-advanced-cropper: 2.8.6
vue-drag-resize: 2.0.3
vue-flatpickr-component: 9.0.6
vue-flatpickr-component: 9.0.8
vue-i18n: 9.2.2
vue-router: 4.1.5
vue-tsc: 1.0.2
vue-tsc: 1.0.8
wait-on: 6.0.1
workbox-cli: 6.5.4
workbox-precaching: 6.5.4
@ -91,17 +91,17 @@ dependencies:
'@fortawesome/fontawesome-svg-core': 6.2.0
'@fortawesome/free-regular-svg-icons': 6.2.0
'@fortawesome/free-solid-svg-icons': 6.2.0
'@fortawesome/vue-fontawesome': 3.0.1_ehtls4nlds6e63ahmro7mfqbhy
'@fortawesome/vue-fontawesome': 3.0.1_lteq7vqmz6gtgcgatkvrcm56su
'@github/hotkey': 2.0.1
'@infectoone/vue-ganttastic': file:vendor/infectoone-vue-ganttastic-2.1.1.tgz_dayjs@1.11.5+vue@3.2.40
'@kyvg/vue3-notification': 2.4.1_vue@3.2.40
'@infectoone/vue-ganttastic': file:vendor/infectoone-vue-ganttastic-2.1.1.tgz_dayjs@1.11.5+vue@3.2.41
'@kyvg/vue3-notification': 2.4.1_vue@3.2.41
'@sentry/tracing': 7.14.1
'@sentry/vue': 7.14.1_vue@3.2.40
'@sentry/vue': 7.14.1_vue@3.2.41
'@types/is-touch-device': 1.0.0
'@types/lodash.clonedeep': 4.5.7
'@types/sortablejs': 1.15.0
'@vueuse/core': 9.3.0_vue@3.2.40
'@vueuse/router': 9.3.0_c7eza3xvlyb4mo6qeit5ggeo6u
'@vueuse/core': 9.3.0_vue@3.2.41
'@vueuse/router': 9.3.0_4g567gsol3fv3jos66rjdswwp4
axios: 0.27.2
blurhash: 2.0.3
bulma-css-variables: 0.9.33
@ -113,31 +113,31 @@ dependencies:
easymde: 2.18.0
flatpickr: 4.6.13
flexsearch: 0.7.21
floating-vue: 2.0.0-beta.20_vue@3.2.40
floating-vue: 2.0.0-beta.20_vue@3.2.41
highlight.js: 11.6.0
is-touch-device: 1.0.1
lodash.clonedeep: 4.5.0
lodash.debounce: 4.0.8
marked: 4.1.1
minimist: 1.2.6
pinia: 2.0.22_bfjwoga25wxjazzogo7o372nwq
pinia: 2.0.22_l7r24p6nevbtlimqmqcwa3ouhu
register-service-worker: 1.7.2
snake-case: 3.0.4
sortablejs: 1.15.0
ufo: 0.8.5
vue: 3.2.40
vue-advanced-cropper: 2.8.6_vue@3.2.40
vue: 3.2.41
vue-advanced-cropper: 2.8.6_vue@3.2.41
vue-drag-resize: 2.0.3
vue-flatpickr-component: 9.0.6_vue@3.2.40
vue-i18n: 9.2.2_vue@3.2.40
vue-router: 4.1.5_vue@3.2.40
vue-flatpickr-component: 9.0.8_vue@3.2.41
vue-i18n: 9.2.2_vue@3.2.41
vue-router: 4.1.5_vue@3.2.41
workbox-precaching: 6.5.4
zhyswan-vuedraggable: 4.1.3_vue@3.2.40
zhyswan-vuedraggable: 4.1.3_vue@3.2.41
devDependencies:
'@4tw/cypress-drag-drop': 2.2.1_cypress@10.9.0
'@cypress/vite-dev-server': 3.2.0
'@cypress/vue': 4.2.0_cypress@10.9.0+vue@3.2.40
'@cypress/vue': 4.2.0_cypress@10.9.0+vue@3.2.41
'@faker-js/faker': 7.5.0
'@rushstack/eslint-patch': 1.2.0
'@types/dompurify': 2.3.4
@ -147,10 +147,10 @@ devDependencies:
'@types/node': 16.11.64
'@typescript-eslint/eslint-plugin': 5.39.0_xyciw6oqjoiiono4dhv3uhn5my
'@typescript-eslint/parser': 5.39.0_ypn2ylkkyfa5i233caldtndbqa
'@vitejs/plugin-legacy': 2.2.0_terser@5.15.1+vite@3.1.4
'@vitejs/plugin-vue': 3.1.2_vite@3.1.4+vue@3.2.40
'@vitejs/plugin-legacy': 2.2.0_terser@5.15.1+vite@3.1.8
'@vitejs/plugin-vue': 3.1.2_vite@3.1.8+vue@3.2.41
'@vue/eslint-config-typescript': 11.0.2_vnnms2vwgxhb7jv3u2ncwd7xzm
'@vue/test-utils': 2.1.0_vue@3.2.40
'@vue/test-utils': 2.1.0_vue@3.2.41
'@vue/tsconfig': 0.1.3_@types+node@16.11.64
autoprefixer: 10.4.12_postcss@8.4.17
browserslist: 4.21.4
@ -168,11 +168,11 @@ devDependencies:
rollup-plugin-visualizer: 5.8.2_rollup@2.79.1
sass: 1.55.0
typescript: 4.8.4
vite: 3.1.4_sass@1.55.0+terser@5.15.1
vite-plugin-pwa: 0.13.1_bhe5iaipiq3lmbaxwdxgnnn2gq
vite: 3.1.8_sass@1.55.0+terser@5.15.1
vite-plugin-pwa: 0.13.1_2txo4viysstjrz5b6oxcrxybay
vite-svg-loader: 3.6.0
vitest: 0.23.4_k3tqzgv3vrnpmbq3o6ks4hg4vi
vue-tsc: 1.0.2_typescript@4.8.4
vue-tsc: 1.0.8_typescript@4.8.4
wait-on: 6.0.1
workbox-cli: 6.5.4
@ -1600,7 +1600,7 @@ packages:
- supports-color
dev: true
/@cypress/vue/4.2.0_cypress@10.9.0+vue@3.2.40:
/@cypress/vue/4.2.0_cypress@10.9.0+vue@3.2.41:
resolution: {integrity: sha512-a+5TCBMwng+UUcFSWxzdJ+Wsvtu+XltUKBQCvidysVvPkPF/c/Z+Geyl+sX7tasKT8KIOW9pI90PIwxzQvQh7A==}
engines: {node: '>=8'}
peerDependencies:
@ -1612,7 +1612,7 @@ packages:
optional: true
dependencies:
cypress: 10.9.0
vue: 3.2.40
vue: 3.2.41
dev: true
/@cypress/xvfb/1.2.4_supports-color@8.1.1:
@ -1712,14 +1712,14 @@ packages:
'@fortawesome/fontawesome-common-types': 6.2.0
dev: false
/@fortawesome/vue-fontawesome/3.0.1_ehtls4nlds6e63ahmro7mfqbhy:
/@fortawesome/vue-fontawesome/3.0.1_lteq7vqmz6gtgcgatkvrcm56su:
resolution: {integrity: sha512-CdXZJoCS+aEPec26ZP7hWWU3SaJlQPZSCGdgpQ2qGl2HUmtUUNrI3zC4XWdn1JUmh3t5OuDeRG1qB4eGRNSD4A==}
peerDependencies:
'@fortawesome/fontawesome-svg-core': ~1 || ~6
vue: '>= 3.0.0 < 4'
dependencies:
'@fortawesome/fontawesome-svg-core': 6.2.0
vue: 3.2.40
vue: 3.2.41
dev: false
/@github/hotkey/2.0.1:
@ -1875,12 +1875,12 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@kyvg/vue3-notification/2.4.1_vue@3.2.40:
/@kyvg/vue3-notification/2.4.1_vue@3.2.41:
resolution: {integrity: sha512-SYwnGsTTKJ2TwFQ60hgYHEvuhkLscrnqSGPvdFRRiOwUb1sULJAPl5s+h+EEjan24kbizBtsxLTPC1D1qLs1EA==}
peerDependencies:
vue: ^3.0.0
dependencies:
vue: 3.2.40
vue: 3.2.41
dev: false
/@mapbox/node-pre-gyp/1.0.10:
@ -2798,7 +2798,7 @@ packages:
tslib: 1.14.1
dev: false
/@sentry/vue/7.14.1_vue@3.2.40:
/@sentry/vue/7.14.1_vue@3.2.41:
resolution: {integrity: sha512-6iGzaWUDu4wbuc4RbAaQv4GhMpz/qVcujl72updvsCsLNWl/xa0bAbsy4wtYvafCt/IXEBot6J4RnDe4mNLL2A==}
engines: {node: '>=8'}
peerDependencies:
@ -2809,7 +2809,7 @@ packages:
'@sentry/types': 7.14.1
'@sentry/utils': 7.14.1
tslib: 1.14.1
vue: 3.2.40
vue: 3.2.41
dev: false
/@sideway/address/4.1.4:
@ -3360,7 +3360,7 @@ packages:
- supports-color
dev: true
/@vitejs/plugin-legacy/2.2.0_terser@5.15.1+vite@3.1.4:
/@vitejs/plugin-legacy/2.2.0_terser@5.15.1+vite@3.1.8:
resolution: {integrity: sha512-xkSXZl2LNk0KKyo5CJknNW84mSlmHIClFzsBuFXkX3yBt+Lr8UO/n4QOg2X7+jvurgBRies9FRn3ZvMem+TmIg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -3373,58 +3373,58 @@ packages:
regenerator-runtime: 0.13.9
systemjs: 6.13.0
terser: 5.15.1
vite: 3.1.4_sass@1.55.0+terser@5.15.1
vite: 3.1.8_sass@1.55.0+terser@5.15.1
dev: true
/@vitejs/plugin-vue/3.1.2_vite@3.1.4+vue@3.2.40:
/@vitejs/plugin-vue/3.1.2_vite@3.1.8+vue@3.2.41:
resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
vite: ^3.0.0
vue: ^3.2.25
dependencies:
vite: 3.1.4_sass@1.55.0+terser@5.15.1
vue: 3.2.40
vite: 3.1.8_sass@1.55.0+terser@5.15.1
vue: 3.2.41
dev: true
/@volar/language-core/1.0.2:
resolution: {integrity: sha512-kNzrnZYxNWcIgU8b1Yzm4pDb4fEM/LNicWLyVOxaNRvemU5Sh4ORDzKihI5AkzGGkvy0F/67xVe7/5/o9U1oPg==}
/@volar/language-core/1.0.8:
resolution: {integrity: sha512-uxYSOqBk8ZFSzGjUIPOBEFPOg8F3CE6cLO5meK95DODGIlUlPytGiy9sy8QZ9w7RpUH4XMOX3MH/G48SLgP07A==}
dependencies:
'@volar/source-map': 1.0.2
'@vue/reactivity': 3.2.40
'@volar/source-map': 1.0.8
'@vue/reactivity': 3.2.41
muggle-string: 0.1.0
dev: true
/@volar/source-map/1.0.2:
resolution: {integrity: sha512-MizyyDw+Eg704bSVkS/8MeP7G4t5U4ZmaXdA2SW3cYAncQKn10P2r6eSyI/8vno+y8wgpM3k9aRfineXB1fMkQ==}
/@volar/source-map/1.0.8:
resolution: {integrity: sha512-uKMe+alyfl1Abs5SviKejFoe7x9g6jDPVpVt63Tet4qn1Ziy7tFsvtCpM2Y1Ko5qw2nLIeloLslPqm9/gmbBLQ==}
dependencies:
muggle-string: 0.1.0
dev: true
/@volar/typescript/1.0.2:
resolution: {integrity: sha512-yQ6ze+gmf+jYTT/Y+IIH9cBE2YF3I92N6vGfdrVgwnDOj1jnulvJ5viwdTYcAIeEQRB0qtwYfRpSHOrGG2FL2w==}
/@volar/typescript/1.0.8:
resolution: {integrity: sha512-2oY1Apvzcs/5tAn7p1tRlDxNgal5ezaK0h9cutcWALeimsaQBAEE2NAirCrLMHl8DneuDce0tzJqHaQeHw9RmQ==}
dependencies:
'@volar/language-core': 1.0.2
'@volar/language-core': 1.0.8
dev: true
/@volar/vue-language-core/1.0.2:
resolution: {integrity: sha512-SiFHeXu0yWl9N+sIrvQ+iIh/P2oMCBkUT6XFhhh6RCY01KNKc7/iO/xB/OJlO9yl/6mAiFwIVdtPcp6GNOkb3g==}
/@volar/vue-language-core/1.0.8:
resolution: {integrity: sha512-cXb7oTybxcm1vpz003agdYQHyxij7UAaSub60d7W1aMWpqb2iaCbVaq9izgQFlrpC4/JnVs+cJPb/Q6fAUVxBg==}
dependencies:
'@volar/language-core': 1.0.2
'@volar/source-map': 1.0.2
'@vue/compiler-dom': 3.2.40
'@vue/compiler-sfc': 3.2.40
'@volar/language-core': 1.0.8
'@volar/source-map': 1.0.8
'@vue/compiler-dom': 3.2.41
'@vue/compiler-sfc': 3.2.41
'@vue/reactivity': 3.2.40
'@vue/shared': 3.2.40
'@vue/shared': 3.2.41
minimatch: 5.1.0
vue-template-compiler: 2.7.10
dev: true
/@volar/vue-typescript/1.0.2:
resolution: {integrity: sha512-wOUebVHS8ENF0uMGvFdnkjVdVnf80SHUKbCoCkgngxeVFQBvAlEShcm/XT8bSX3QKoNPl1ZGqYN4UQRgZFyaow==}
/@volar/vue-typescript/1.0.8:
resolution: {integrity: sha512-6jBvA7iwBkRqS2VQx2gLJgfLcF3hcODyJ6Lmiw2tN8D/LVfFCovvzJgPvIQb9Y4i+rha1Y0cpsYOUt9XW2Z7ZA==}
dependencies:
'@volar/typescript': 1.0.2
'@volar/vue-language-core': 1.0.2
'@volar/typescript': 1.0.8
'@volar/vue-language-core': 1.0.8
dev: true
/@vue/compiler-core/3.2.40:
@ -3434,12 +3434,28 @@ packages:
'@vue/shared': 3.2.40
estree-walker: 2.0.2
source-map: 0.6.1
dev: true
/@vue/compiler-core/3.2.41:
resolution: {integrity: sha512-oA4mH6SA78DT+96/nsi4p9DX97PHcNROxs51lYk7gb9Z4BPKQ3Mh+BLn6CQZBw857Iuhu28BfMSRHAlPvD4vlw==}
dependencies:
'@babel/parser': 7.19.3
'@vue/shared': 3.2.41
estree-walker: 2.0.2
source-map: 0.6.1
/@vue/compiler-dom/3.2.40:
resolution: {integrity: sha512-OZCNyYVC2LQJy4H7h0o28rtk+4v+HMQygRTpmibGoG9wZyomQiS5otU7qo3Wlq5UfHDw2RFwxb9BJgKjVpjrQw==}
dependencies:
'@vue/compiler-core': 3.2.40
'@vue/shared': 3.2.40
dev: true
/@vue/compiler-dom/3.2.41:
resolution: {integrity: sha512-xe5TbbIsonjENxJsYRbDJvthzqxLNk+tb3d/c47zgREDa/PCp6/Y4gC/skM4H6PIuX5DAxm7fFJdbjjUH2QTMw==}
dependencies:
'@vue/compiler-core': 3.2.41
'@vue/shared': 3.2.41
/@vue/compiler-sfc/3.2.40:
resolution: {integrity: sha512-tzqwniIN1fu1PDHC3CpqY/dPCfN/RN1thpBC+g69kJcrl7mbGiHKNwbA6kJ3XKKy8R6JLKqcpVugqN4HkeBFFg==}
@ -3454,12 +3470,34 @@ packages:
magic-string: 0.25.9
postcss: 8.4.17
source-map: 0.6.1
dev: true
/@vue/compiler-sfc/3.2.41:
resolution: {integrity: sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w==}
dependencies:
'@babel/parser': 7.19.3
'@vue/compiler-core': 3.2.41
'@vue/compiler-dom': 3.2.41
'@vue/compiler-ssr': 3.2.41
'@vue/reactivity-transform': 3.2.41
'@vue/shared': 3.2.41
estree-walker: 2.0.2
magic-string: 0.25.9
postcss: 8.4.17
source-map: 0.6.1
/@vue/compiler-ssr/3.2.40:
resolution: {integrity: sha512-80cQcgasKjrPPuKcxwuCx7feq+wC6oFl5YaKSee9pV3DNq+6fmCVwEEC3vvkf/E2aI76rIJSOYHsWSEIxK74oQ==}
dependencies:
'@vue/compiler-dom': 3.2.40
'@vue/shared': 3.2.40
dev: true
/@vue/compiler-ssr/3.2.41:
resolution: {integrity: sha512-Y5wPiNIiaMz/sps8+DmhaKfDm1xgj6GrH99z4gq2LQenfVQcYXmHIOBcs5qPwl7jaW3SUQWjkAPKMfQemEQZwQ==}
dependencies:
'@vue/compiler-dom': 3.2.41
'@vue/shared': 3.2.41
/@vue/devtools-api/6.4.3:
resolution: {integrity: sha512-9WCRwdROJvWcHAdyrR7SZMM/qUvllDZnpndHXokThkUsjnJ2xe4/pvsH9FZrxFe22L+JmDKczL79HjLJ7DK9rg==}
@ -3494,43 +3532,63 @@ packages:
'@vue/shared': 3.2.40
estree-walker: 2.0.2
magic-string: 0.25.9
dev: true
/@vue/reactivity-transform/3.2.41:
resolution: {integrity: sha512-mK5+BNMsL4hHi+IR3Ft/ho6Za+L3FA5j8WvreJ7XzHrqkPq8jtF/SMo7tuc9gHjLDwKZX1nP1JQOKo9IEAn54A==}
dependencies:
'@babel/parser': 7.19.3
'@vue/compiler-core': 3.2.41
'@vue/shared': 3.2.41
estree-walker: 2.0.2
magic-string: 0.25.9
/@vue/reactivity/3.2.40:
resolution: {integrity: sha512-N9qgGLlZmtUBMHF9xDT4EkD9RdXde1Xbveb+niWMXuHVWQP5BzgRmE3SFyUBBcyayG4y1lhoz+lphGRRxxK4RA==}
dependencies:
'@vue/shared': 3.2.40
dev: true
/@vue/runtime-core/3.2.40:
resolution: {integrity: sha512-U1+rWf0H8xK8aBUZhnrN97yoZfHbjgw/bGUzfgKPJl69/mXDuSg8CbdBYBn6VVQdR947vWneQBFzdhasyzMUKg==}
/@vue/reactivity/3.2.41:
resolution: {integrity: sha512-9JvCnlj8uc5xRiQGZ28MKGjuCoPhhTwcoAdv3o31+cfGgonwdPNuvqAXLhlzu4zwqavFEG5tvaoINQEfxz+l6g==}
dependencies:
'@vue/reactivity': 3.2.40
'@vue/shared': 3.2.40
'@vue/shared': 3.2.41
/@vue/runtime-dom/3.2.40:
resolution: {integrity: sha512-AO2HMQ+0s2+MCec8hXAhxMgWhFhOPJ/CyRXnmTJ6XIOnJFLrH5Iq3TNwvVcODGR295jy77I6dWPj+wvFoSYaww==}
/@vue/runtime-core/3.2.41:
resolution: {integrity: sha512-0LBBRwqnI0p4FgIkO9q2aJBBTKDSjzhnxrxHYengkAF6dMOjeAIZFDADAlcf2h3GDALWnblbeprYYpItiulSVQ==}
dependencies:
'@vue/runtime-core': 3.2.40
'@vue/shared': 3.2.40
'@vue/reactivity': 3.2.41
'@vue/shared': 3.2.41
/@vue/runtime-dom/3.2.41:
resolution: {integrity: sha512-U7zYuR1NVIP8BL6jmOqmapRAHovEFp7CSw4pR2FacqewXNGqZaRfHoNLQsqQvVQ8yuZNZtxSZy0FFyC70YXPpA==}
dependencies:
'@vue/runtime-core': 3.2.41
'@vue/shared': 3.2.41
csstype: 2.6.21
/@vue/server-renderer/3.2.40_vue@3.2.40:
resolution: {integrity: sha512-gtUcpRwrXOJPJ4qyBpU3EyxQa4EkV8I4f8VrDePcGCPe4O/hd0BPS7v9OgjIQob6Ap8VDz9G+mGTKazE45/95w==}
/@vue/server-renderer/3.2.41_vue@3.2.41:
resolution: {integrity: sha512-7YHLkfJdTlsZTV0ae5sPwl9Gn/EGr2hrlbcS/8naXm2CDpnKUwC68i1wGlrYAfIgYWL7vUZwk2GkYLQH5CvFig==}
peerDependencies:
vue: 3.2.40
vue: 3.2.41
dependencies:
'@vue/compiler-ssr': 3.2.40
'@vue/shared': 3.2.40
vue: 3.2.40
'@vue/compiler-ssr': 3.2.41
'@vue/shared': 3.2.41
vue: 3.2.41
/@vue/shared/3.2.40:
resolution: {integrity: sha512-0PLQ6RUtZM0vO3teRfzGi4ltLUO5aO+kLgwh4Um3THSR03rpQWLTuRCkuO5A41ITzwdWeKdPHtSARuPkoo5pCQ==}
dev: true
/@vue/test-utils/2.1.0_vue@3.2.40:
/@vue/shared/3.2.41:
resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==}
/@vue/test-utils/2.1.0_vue@3.2.41:
resolution: {integrity: sha512-U4AxAD/tKJ3ajxYew1gkfEotpr96DE/gLXpbl+nPbsNRqGBfQZZA7YhwGoQNDPgon56v+IGZDrYq7pe3GDl9aw==}
peerDependencies:
vue: ^3.0.1
dependencies:
vue: 3.2.40
vue: 3.2.41
dev: true
/@vue/tsconfig/0.1.3_@types+node@16.11.64:
@ -3544,13 +3602,13 @@ packages:
'@types/node': 16.11.64
dev: true
/@vueuse/core/9.3.0_vue@3.2.40:
/@vueuse/core/9.3.0_vue@3.2.41:
resolution: {integrity: sha512-64Rna8IQDWpdrJxgitDg7yv1yTp41ZmvV8zlLEylK4QQLWAhz1OFGZDPZ8bU4lwcGgbEJ2sGi2jrdNh4LttUSQ==}
dependencies:
'@types/web-bluetooth': 0.0.15
'@vueuse/metadata': 9.3.0
'@vueuse/shared': 9.3.0_vue@3.2.40
vue-demi: 0.13.11_vue@3.2.40
'@vueuse/shared': 9.3.0_vue@3.2.41
vue-demi: 0.13.11_vue@3.2.41
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -3560,23 +3618,23 @@ packages:
resolution: {integrity: sha512-GnnfjbzIPJIh9ngL9s9oGU1+Hx/h5/KFqTfJykzh/1xjaHkedV9g0MASpdmPZIP+ynNhKAcEfA6g5i8KXwtoMA==}
dev: false
/@vueuse/router/9.3.0_c7eza3xvlyb4mo6qeit5ggeo6u:
/@vueuse/router/9.3.0_4g567gsol3fv3jos66rjdswwp4:
resolution: {integrity: sha512-UFN2MFciprH21oYsAgNHeDJ4Bd86HpRm9gximSN8j6h4fc2aa62fvfhprfHqdTxYAcgcGkMwcc9TO75jOvr8gg==}
peerDependencies:
vue-router: '>=4.0.0-rc.1'
dependencies:
'@vueuse/shared': 9.3.0_vue@3.2.40
vue-demi: 0.13.11_vue@3.2.40
vue-router: 4.1.5_vue@3.2.40
'@vueuse/shared': 9.3.0_vue@3.2.41
vue-demi: 0.13.11_vue@3.2.41
vue-router: 4.1.5_vue@3.2.41
transitivePeerDependencies:
- '@vue/composition-api'
- vue
dev: false
/@vueuse/shared/9.3.0_vue@3.2.40:
/@vueuse/shared/9.3.0_vue@3.2.41:
resolution: {integrity: sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==}
dependencies:
vue-demi: 0.13.11_vue@3.2.40
vue-demi: 0.13.11_vue@3.2.41
transitivePeerDependencies:
- '@vue/composition-api'
- vue
@ -6768,14 +6826,14 @@ packages:
resolution: {integrity: sha512-W7cHV7Hrwjid6lWmy0IhsWDFQboWSng25U3VVywpHOTJnnAZNPScog67G+cVpeX9f7yDD21ih0WDrMMT+JoaYg==}
dev: false
/floating-vue/2.0.0-beta.20_vue@3.2.40:
/floating-vue/2.0.0-beta.20_vue@3.2.41:
resolution: {integrity: sha512-N68otcpp6WwcYC7zP8GeJqNZVdfvS7tEY88lwmuAHeqRgnfWx1Un8enzLxROyVnBDZ3TwUoUdj5IFg+bUT7JeA==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@floating-ui/dom': 0.1.10
vue: 3.2.40
vue-resize: 2.0.0-alpha.1_vue@3.2.40
vue: 3.2.41
vue-resize: 2.0.0-alpha.1_vue@3.2.41
dev: false
/flush-write-stream/2.0.0:
@ -9457,14 +9515,14 @@ packages:
resolution: {integrity: sha512-8Q1hXew6ETzqKRAs3jjLioSxNfT1cx74ooiF8RlAONwVMcfq+UdzLC2eB5qcPldUxaE5w3ytLkrmV1TGddhZTA==}
engines: {node: '>=6.0'}
dependencies:
'@babel/parser': 7.16.8
'@babel/parser': 7.19.3
dev: true
/node-source-walk/5.0.0:
resolution: {integrity: sha512-58APXoMXpmmU+oVBJFajhTCoD8d/OGtngnVAWzIo2A8yn0IXwBzvIVIsTzoie/SrA37u+1hnpNz2HMWx/VIqlw==}
engines: {node: '>=12'}
dependencies:
'@babel/parser': 7.16.8
'@babel/parser': 7.19.3
dev: true
/node-stream-zip/1.15.0:
@ -10125,7 +10183,7 @@ packages:
engines: {node: '>=6'}
dev: true
/pinia/2.0.22_bfjwoga25wxjazzogo7o372nwq:
/pinia/2.0.22_l7r24p6nevbtlimqmqcwa3ouhu:
resolution: {integrity: sha512-u+b8/BC+tmvo3ACbYO2w5NfxHWFOjvvw9DQnyT0dW8aUMCPRQT5QnfZ5R5W2MzZBMTeZRMQI7V/QFbafmM9QHw==}
peerDependencies:
'@vue/composition-api': ^1.4.0
@ -10139,8 +10197,8 @@ packages:
dependencies:
'@vue/devtools-api': 6.4.3
typescript: 4.8.4
vue: 3.2.40
vue-demi: 0.13.11_vue@3.2.40
vue: 3.2.41
vue-demi: 0.13.11_vue@3.2.41
dev: false
/pinkie-promise/2.0.1:
@ -12578,7 +12636,7 @@ packages:
extsprintf: 1.3.0
dev: true
/vite-plugin-pwa/0.13.1_bhe5iaipiq3lmbaxwdxgnnn2gq:
/vite-plugin-pwa/0.13.1_2txo4viysstjrz5b6oxcrxybay:
resolution: {integrity: sha512-NR3dIa+o2hzlzo4lF4Gu0cYvoMjSw2DdRc6Epw1yjmCqWaGuN86WK9JqZie4arNlE1ZuWT3CLiMdiX5wcmmUmg==}
peerDependencies:
vite: ^3.1.0
@ -12589,7 +12647,7 @@ packages:
fast-glob: 3.2.12
pretty-bytes: 6.0.0
rollup: 2.79.1
vite: 3.1.4_sass@1.55.0+terser@5.15.1
vite: 3.1.8_sass@1.55.0+terser@5.15.1
workbox-build: 6.5.4
workbox-window: 6.5.4
transitivePeerDependencies:
@ -12603,8 +12661,8 @@ packages:
svgo: 2.8.0
dev: true
/vite/3.1.4_sass@1.55.0+terser@5.15.1:
resolution: {integrity: sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==}
/vite/3.1.8_sass@1.55.0+terser@5.15.1:
resolution: {integrity: sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -12665,7 +12723,7 @@ packages:
tinybench: 2.3.0
tinypool: 0.3.0
tinyspy: 1.0.2
vite: 3.1.4_sass@1.55.0+terser@5.15.1
vite: 3.1.8_sass@1.55.0+terser@5.15.1
transitivePeerDependencies:
- less
- sass
@ -12674,7 +12732,7 @@ packages:
- terser
dev: true
/vue-advanced-cropper/2.8.6_vue@3.2.40:
/vue-advanced-cropper/2.8.6_vue@3.2.41:
resolution: {integrity: sha512-R1vkXG/Vam3OEd3vMJsVSJkXUc9ejM9l/NzPcPvkyzKGHwF69c2v1lh2Kqj2A5MCqrTmk76bmzmWFuYj+AcwmA==}
engines: {node: '>=8', npm: '>=5'}
peerDependencies:
@ -12683,10 +12741,10 @@ packages:
classnames: 2.3.2
debounce: 1.2.1
easy-bem: 1.1.1
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-demi/0.13.11_vue@3.2.40:
/vue-demi/0.13.11_vue@3.2.41:
resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==}
engines: {node: '>=12'}
hasBin: true
@ -12698,7 +12756,7 @@ packages:
'@vue/composition-api':
optional: true
dependencies:
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-drag-resize/2.0.3:
@ -12723,17 +12781,17 @@ packages:
- supports-color
dev: true
/vue-flatpickr-component/9.0.6_vue@3.2.40:
resolution: {integrity: sha512-U3355po5WPejAagvDig+MA7v8NWr0+Dbx3a1pds19hx4i9CeXuBSpD7vl0fxKhk+Hfu3T+DN2aOR69HIwSJh1A==}
engines: {node: '>=10.13.0'}
/vue-flatpickr-component/9.0.8_vue@3.2.41:
resolution: {integrity: sha512-wuvG3ijNkGwUKP+F5l4Jai5za46pI7T2AQ+boPY0QB2Y4EP6hcaubfaYwMqrs4w69u8JCnqsKqGg+mWpqF5j3A==}
engines: {node: '>=12.13.0'}
peerDependencies:
vue: ^3.0.0
dependencies:
flatpickr: 4.6.13
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-i18n/9.2.2_vue@3.2.40:
/vue-i18n/9.2.2_vue@3.2.41:
resolution: {integrity: sha512-yswpwtj89rTBhegUAv9Mu37LNznyu3NpyLQmozF3i1hYOhwpG8RjcjIFIIfnu+2MDZJGSZPXaKWvnQA71Yv9TQ==}
engines: {node: '>= 14'}
peerDependencies:
@ -12743,24 +12801,24 @@ packages:
'@intlify/shared': 9.2.2
'@intlify/vue-devtools': 9.2.2
'@vue/devtools-api': 6.4.3
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-resize/2.0.0-alpha.1_vue@3.2.40:
/vue-resize/2.0.0-alpha.1_vue@3.2.41:
resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==}
peerDependencies:
vue: ^3.0.0
dependencies:
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-router/4.1.5_vue@3.2.40:
/vue-router/4.1.5_vue@3.2.41:
resolution: {integrity: sha512-IsvoF5D2GQ/EGTs/Th4NQms9gd2NSqV+yylxIyp/OYp8xOwxmU8Kj/74E9DTSYAyH5LX7idVUngN3JSj1X4xcQ==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.4.3
vue: 3.2.40
vue: 3.2.41
dev: false
/vue-template-compiler/2.7.10:
@ -12770,25 +12828,25 @@ packages:
he: 1.2.0
dev: true
/vue-tsc/1.0.2_typescript@4.8.4:
resolution: {integrity: sha512-Atl8vBo1ThxZ8OjnCcquRCjRYczmQVF2nAjXVOqHA19Q4lvPX+bpbbDUhk8SDww6U10sttGc4Vjb+1xBwA4yow==}
/vue-tsc/1.0.8_typescript@4.8.4:
resolution: {integrity: sha512-+0sJ+QVH7SHLt8mV/uIw4xlHDk1mWigZkMFugfZTv8rlHpM3S2tCVZ0BWEGclT/0rKdO8j+St+mljpvhWPN/eQ==}
hasBin: true
peerDependencies:
typescript: '*'
dependencies:
'@volar/vue-language-core': 1.0.2
'@volar/vue-typescript': 1.0.2
'@volar/vue-language-core': 1.0.8
'@volar/vue-typescript': 1.0.8
typescript: 4.8.4
dev: true
/vue/3.2.40:
resolution: {integrity: sha512-1mGHulzUbl2Nk3pfvI5aXYYyJUs1nm4kyvuz38u4xlQkLUn1i2R7nDbI4TufECmY8v1qNBHYy62bCaM+3cHP2A==}
/vue/3.2.41:
resolution: {integrity: sha512-uuuvnrDXEeZ9VUPljgHkqB5IaVO8SxhPpqF2eWOukVrBnRBx2THPSGQBnVRt0GrIG1gvCmFXMGbd7FqcT1ixNQ==}
dependencies:
'@vue/compiler-dom': 3.2.40
'@vue/compiler-sfc': 3.2.40
'@vue/runtime-dom': 3.2.40
'@vue/server-renderer': 3.2.40_vue@3.2.40
'@vue/shared': 3.2.40
'@vue/compiler-dom': 3.2.41
'@vue/compiler-sfc': 3.2.41
'@vue/runtime-dom': 3.2.41
'@vue/server-renderer': 3.2.41_vue@3.2.41
'@vue/shared': 3.2.41
/wait-on/6.0.1:
resolution: {integrity: sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw==}
@ -13234,13 +13292,13 @@ packages:
engines: {node: '>=12.20'}
dev: true
/zhyswan-vuedraggable/4.1.3_vue@3.2.40:
/zhyswan-vuedraggable/4.1.3_vue@3.2.41:
resolution: {integrity: sha512-q4Mp52tQIvTAWG0CKxLCVLyG/3RnIskDxoJvfjDZ2kM8yTcMkY80VTc8rd3q9KwqJ0UVtjEGLufb23sjDp0peQ==}
peerDependencies:
vue: ^3.0.1
dependencies:
sortablejs: 1.14.0
vue: 3.2.40
vue: 3.2.41
dev: false
/zip-stream/4.1.0:
@ -13252,15 +13310,15 @@ packages:
readable-stream: 3.6.0
dev: true
file:vendor/infectoone-vue-ganttastic-2.1.1.tgz_dayjs@1.11.5+vue@3.2.40:
resolution: {integrity: sha512-d9gBXW+UoKekBV3TNUpxC43QrrGUDeYeJ2+2oGt3UTu3Amuw53XYke7ea9TIi5R5RwfOdwinvwGCgf4CG8cUrQ==, tarball: file:vendor/infectoone-vue-ganttastic-2.1.1.tgz}
file:vendor/infectoone-vue-ganttastic-2.1.1.tgz_dayjs@1.11.5+vue@3.2.41:
resolution: {integrity: sha512-FCOa5sioj/e6k9QXzCHHt0Qydy733BdQMrCcjz4Dag5e7lBFPAoL1EgAA+JfmL4ZXldVpukjnmNYEPWdeIaftQ==, tarball: file:vendor/infectoone-vue-ganttastic-2.1.1.tgz}
id: file:vendor/infectoone-vue-ganttastic-2.1.1.tgz
name: '@infectoone/vue-ganttastic'
version: 2.1.1
peerDependencies:
dayjs: ^1.11.5
vue: ^3.2.38
vue: ^3.2.40
dependencies:
dayjs: 1.11.5
vue: 3.2.40
vue: 3.2.41
dev: false

View File

@ -1,31 +1,32 @@
<template>
<Loading
v-if="taskService.loading || taskCollectionService.loading || dayjsLanguageLoading"
class="gantt-container"
/>
<div class="gantt-container" v-else>
<GGanttChart
dateFormat="YYYY-MM-DDTHH:mm:ssZ[Z]"
:chart-start="`${dateFrom} 00:00`"
:chart-end="`${dateTo} 23:59`"
precision="day"
bar-start="startDate"
bar-end="endDate"
:grid="true"
@dragend-bar="updateTask"
@dblclick-bar="openTask"
:width="ganttChartWidth + 'px'"
>
<template #timeunit="{label, value}">
<div
class="timeunit-wrapper"
:class="{'today': dayIsToday(label)}">
<span>{{ value }}</span>
<span class="weekday">
{{ weekdayFromTimeLabel(label) }}
</span>
</div>
</template>
<div>
konrad marked this conversation as resolved Outdated

Use loading component. This way it's easier for us to refactor the is-loading styles from bulma later.

Use loading component. This way it's easier for us to refactor the `is-loading` styles from bulma later.

Done.

Done.
<Loading
v-if="taskService.loading || taskCollectionService.loading || dayjsLanguageLoading"
class="gantt-container"
/>
<div class="gantt-container" v-else>
<GGanttChart
:chart-start="`${props.dateFrom} 00:00`"
:chart-end="`${props.dateTo} 23:59`"
precision="day"
bar-start="startDate"
konrad marked this conversation as resolved Outdated

Is it possible to use here simply inherit as value?

Is it possible to use here simply `inherit` as value?

Seems to work, yes.

Seems to work, yes.

Not necessary with lates release. Removed.

Not necessary with lates release. Removed.
bar-end="endDate"
:grid="true"
@dragend-bar="updateTask"
@dblclick-bar="openTask"
:width="ganttChartWidth + 'px'"
>
<template #timeunit="{label, value}">
<div
class="timeunit-wrapper"
:class="{'today': dayIsToday(label)}"
>
<span>{{ value }}</span>
<span class="weekday">
{{ weekdayFromTimeLabel(label) }}
</span>
</div>
</template>
<GGanttRow
v-for="(bar, k) in ganttBars"
:key="k"
@ -33,15 +34,17 @@
:bars="bar"
/>
</GGanttChart>
</div>
<TaskForm v-if="canWrite" @create-task="createTask" />
</div>
<TaskForm v-if="canWrite" @create-task="createTask" />
</template>
<script setup lang="ts">
import {computed, ref, watch, watchEffect, shallowReactive, type PropType} from 'vue'
import {computed, ref, watch, watchEffect, shallowReactive} from 'vue'
import {useRouter} from 'vue-router'
import {format, parse} from 'date-fns'
import dayjs from 'dayjs'
import isToday from 'dayjs/plugin/isToday'
import {useDayjsLanguageSync} from '@/i18n'
import TaskCollectionService from '@/services/taskCollection'
@ -71,9 +74,12 @@ export type DateRange = {
dateTo: string,
}
export interface GanttChartProps extends DateRange {
// export interface GanttChartProps extends DateRange {
export interface GanttChartProps {
listId: IList['id']
showTasksWithoutDates: boolean
dateFrom: string,
dateTo: string,
}
// export const DATE_FORMAT = 'yyyy-LL-dd HH:mm'
@ -83,7 +89,9 @@ const props = withDefaults(defineProps<GanttChartProps>(), {
})
konrad marked this conversation as resolved Outdated

picky: If you use a default value there is no need to define required

picky: If you use a default value there is no need to define `required`

Done.

Done.
// setup dayjs for vue-ganttastic
const dayjsLanguageLoading = useDayjsLanguageSync(dayjs)
const dayjsLanguageLoading = ref(false)
// const dayjsLanguageLoading = useDayjsLanguageSync(dayjs)
dayjs.extend(isToday)
extendDayjs()
const baseStore = useBaseStore()
@ -92,8 +100,8 @@ const router = useRouter()
const taskCollectionService = shallowReactive(new TaskCollectionService())
const taskService = shallowReactive(new TaskService())
const dateFromDate = computed(() => parse(props.dateFrom, 'yyyy-LL-dd', new Date()))
const dateToDate = computed(() => parse(props.dateTo, 'yyyy-LL-dd', new Date()))
const dateFromDate = computed(() => parse(props.dateFrom, 'yyyy-LL-dd', new Date(new Date().setHours(0,0,0,0))))
const dateToDate = computed(() => parse(props.dateTo, 'yyyy-LL-dd', new Date(new Date().setHours(23,59,0,0))))
const DAY_WIDTH_PIXELS = 30
const ganttChartWidth = computed(() => {
dpschen marked this conversation as resolved Outdated

User TaskModel['id']

User `TaskModel['id']`

Done (I think you did that one?)

Done (I think you did that one?)
@ -116,6 +124,13 @@ watch(
{deep: true}
)
type DateKebab = `${string}-${string}-${string}`
type DateISO = string
const DATE_FORMAT_KEBAB = 'yyyy-LL-dd'
function isoToKebabDate(isoDate: DateISO) {
return format(new Date(isoDate), DATE_FORMAT_KEBAB) as DateKebab
}
const defaultStartDate = new Date().toISOString()
const defaultEndDate = new Date((new Date()).setDate((new Date()).getDate() + 7)).toISOString()
@ -123,8 +138,8 @@ function transformTaskToGanttBar(t: ITask) {
const black = 'var(--grey-800)'
console.log(t)
return [{
startDate: t.startDate ? new Date(t.startDate).toISOString() : defaultStartDate,
endDate: t.endDate ? new Date(t.endDate).toISOString() : defaultEndDate,
startDate: isoToKebabDate(new Date(t.startDate ? t.startDate : defaultStartDate).toISOString()),
endDate: isoToKebabDate(new Date(t.endDate ? t.endDate : defaultEndDate).toISOString()),
ganttBarConfig: {
id: String(t.id),
konrad marked this conversation as resolved Outdated

define types

define types

Done.

Done.
label: t.title,

View File

@ -29,12 +29,12 @@
<pre>{{dateRange}}</pre>
<pre>{{new Date(dateRange.dateFrom).toISOString()}}</pre>
<pre>{{new Date(dateRange.dateTo).toISOString()}}</pre>
<!-- <gantt-chart
<gantt-chart
:list-id="filters.listId"
:date-from="filters.dateFrom"
:date-to="filters.dateTo"
:date-from="isoToKebabDate(filters.dateFrom)"
:date-to="isoToKebabDate(filters.dateTo)"
:show-tasks-without-dates="showTasksWithoutDates"
/> -->
/>
</card>
</div>
</template>
@ -56,6 +56,7 @@ import ListWrapper from './ListWrapper.vue'
import Fancycheckbox from '@/components/input/fancycheckbox.vue'
import {createAsyncComponent} from '@/helpers/createAsyncComponent'
import GanttChart from '@/components/tasks/gantt-chart.vue'
import type { IList } from '@/modelTypes/IList'
export type DateKebab = `${string}-${string}-${string}`
@ -82,7 +83,7 @@ export interface GanttFilter {

Can you explain in a different way?

Can you explain in a different way?

The problem is the gantt chart already updates when only one date (the start or end date) is selected. Ideally, they would only update the prop when both of these dates are available to avoid these partial updates.

The problem is the gantt chart already updates when only one date (the start or end date) is selected. Ideally, they would only update the prop when both of these dates are available to avoid these partial updates.

Maybe I'm still not getting this correctly, but can't we just update the value when both (start and end) are set?

Maybe I'm still not getting this correctly, but can't we just update the value when both (start and end) are set?

Currently the from and to dates get passed as individual props. That means if one changes, it changes directly in the chart.

I think the way to go here would be to pass a single object with both dates instead?

Currently the from and to dates get passed as individual props. That means if one changes, it changes directly in the chart. I think the way to go here would be to pass a single object with both dates instead?

That seems like the right approach

That seems like the right approach

Will check this out again. Shouldn't be too hard.

Will check this out again. Shouldn't be too hard.
type Options = Flatpickr.Options.Options
const GanttChart = createAsyncComponent(() => import('@/components/tasks/gantt-chart.vue'))
// const GanttChart = createAsyncComponent(() => import('@/components/tasks/gantt-chart.vue'))
const props = defineProps<GanttParams>()
@ -123,10 +124,14 @@ function parseBooleanProp(booleanProp: string) {
: Boolean(booleanProp)
}
const DATE_FORMAT_KEBAB = 'yyyy-LL-dd'
function isoToKebabDate(isoDate: DateISO) {
return format(new Date(isoDate), DATE_FORMAT_KEBAB) as DateKebab
}
const DEFAULT_SHOW_TASKS_WITHOUT_DATES = false
const DEFAULT_DATEFROM_DAY_OFFSET = 0
// const DEFAULT_DATEFROM_DAY_OFFSET = -15
const DEFAULT_DATEFROM_DAY_OFFSET = -15
const DEFAULT_DATETO_DAY_OFFSET = +55
const now = new Date()
@ -140,6 +145,8 @@ function getDefaultDateTo() {
}
function routeToFilter(route: RouteLocationNormalized): GanttFilter {
console.log('parseDateProp', parseDateProp(route.query.dateTo as DateKebab))
console.log(parseDateProp(route.query.dateTo as DateKebab))
return {
listId: Number(route.params.listId as string),
dateFrom: parseDateProp(route.query.dateFrom as DateKebab) || getDefaultDateFrom(),
@ -155,8 +162,8 @@ function filterToRoute(filters: GanttFilter): RouteLocationRaw {
filters.dateTo !== getDefaultDateTo()
) {
query = {
dateFrom: format(new Date(filters.dateFrom), 'yyyy-LL-dd'),
dateTo: format(new Date(filters.dateTo), 'yyyy-LL-dd'),
dateFrom: isoToKebabDate(filters.dateFrom),
dateTo: isoToKebabDate(filters.dateTo),
}
}

View File

@ -61,7 +61,6 @@ import {useTitle} from '@/composables/useTitle'
import {useBaseStore} from '@/stores/base'
import {useListStore} from '@/stores/lists'
import {useKanbanStore} from '@/stores/kanban'
const props = defineProps({
listId: {
@ -77,7 +76,6 @@ const props = defineProps({
const route = useRoute()
const baseStore = useBaseStore()
const kanbanStore = useKanbanStore()
const listStore = useListStore()
const listService = ref(new ListService())
const loadedListId = ref(0)
@ -90,6 +88,7 @@ const currentList = computed(() => {
maxRight: null,
} : baseStore.currentList
})
useTitle(() => currentList.value.id ? getListTitle(currentList.value) : '')
// watchEffect would be called every time the prop would get a value assigned, even if that value was the same as before.
// This resulted in loading and setting the list multiple times, even when navigating away from it.
@ -98,62 +97,47 @@ const currentList = computed(() => {
// of it, most likely due to the rights not being properly populated.
watch(
() => props.listId,
listId => loadList(listId),
// loadList
async (listIdToLoad: number) => {
const listData = {id: listIdToLoad}
saveListToHistory(listData)
// Don't load the list if we either already loaded it or aren't dealing with a list at all currently and
// the currently loaded list has the right set.
if (
(
listIdToLoad === loadedListId.value ||
typeof listIdToLoad === 'undefined' ||
listIdToLoad === currentList.value.id
)
&& typeof currentList.value !== 'undefined' && currentList.value.maxRight !== null
) {
loadedListId.value = props.listId
return
}
console.debug(`Loading list, props.viewName = ${props.viewName}, $route.params =`, route.params, `, loadedListId = ${loadedListId.value}, currentList = `, currentList.value)
// Set the current list to the one we're about to load so that the title is already shown at the top
loadedListId.value = 0
const listFromStore = listStore.getListById(listData.id)
if (listFromStore !== null) {
baseStore.setBackground(null)
baseStore.setBlurHash(null)
baseStore.handleSetCurrentList({list: listFromStore})
}
// We create an extra list object instead of creating it in list.value because that would trigger a ui update which would result in bad ux.
const list = new ListModel(listData)
try {
const loadedList = await listService.value.get(list)
await baseStore.handleSetCurrentList({list: loadedList})
} finally {
loadedListId.value = props.listId
}
},
{immediate: true},
)
useTitle(() => currentList.value.id ? getListTitle(currentList.value) : '')
async function loadList(listIdToLoad: number) {
const listData = {id: listIdToLoad}
saveListToHistory(listData)
// This invalidates the loaded list at the kanban board which lets it reload its content when
// switched to it. This ensures updates done to tasks in the gantt or list views are consistently
// shown in all views while preventing reloads when closing a task popup.
// We don't do this for the table view because that does not change tasks.
// FIXME: remove this
if (
props.viewName === 'list.list' ||
props.viewName === 'list.gantt'
) {
kanbanStore.setListId(0)
}
// Don't load the list if we either already loaded it or aren't dealing with a list at all currently and
// the currently loaded list has the right set.
if (
(
listIdToLoad === loadedListId.value ||
typeof listIdToLoad === 'undefined' ||
listIdToLoad === currentList.value.id
)
&& typeof currentList.value !== 'undefined' && currentList.value.maxRight !== null
) {
loadedListId.value = props.listId
return
}
console.debug(`Loading list, props.viewName = ${props.viewName}, $route.params =`, route.params, `, loadedListId = ${loadedListId.value}, currentList = `, currentList.value)
// Set the current list to the one we're about to load so that the title is already shown at the top
loadedListId.value = 0
const listFromStore = listStore.getListById(listData.id)
if (listFromStore !== null) {
baseStore.setBackground(null)
baseStore.setBlurHash(null)
baseStore.handleSetCurrentList({list: listFromStore})
}
// We create an extra list object instead of creating it in list.value because that would trigger a ui update which would result in bad ux.
const list = new ListModel(listData)
try {
const loadedList = await listService.value.get(list)
await baseStore.handleSetCurrentList({list: loadedList})
} finally {
loadedListId.value = props.listId
}
}
</script>
<style lang="scss" scoped>

Binary file not shown.