diff --git a/src/layouts/DefaultLayout.vue b/src/layouts/DefaultLayout.vue index 5c72451..63cd0fc 100644 --- a/src/layouts/DefaultLayout.vue +++ b/src/layouts/DefaultLayout.vue @@ -66,7 +66,15 @@ Utilitaires + + Tâches + + + + Impression diff --git a/src/pages/StockItem.vue b/src/pages/StockItem.vue index 0a3d4b6..b6fdc33 100644 --- a/src/pages/StockItem.vue +++ b/src/pages/StockItem.vue @@ -230,7 +230,7 @@ {{ getDate(selectedHistory.created) }} - + @@ -391,10 +391,16 @@ export default { collection: 'history', itemId: history.id, data: { - ...history, + id: history.id, solved_at: new Date().toISOString(), solved_by: this.username } + }).then(_ => { + this.$store.dispatch('core/loadAppData').then(_ => { + this.loadItem() + this.showHistory = false + this.selectedHistory = null + }) }) }, async uploadFile (file) { diff --git a/src/pages/TasksPage.vue b/src/pages/TasksPage.vue new file mode 100644 index 0000000..f815b9f --- /dev/null +++ b/src/pages/TasksPage.vue @@ -0,0 +1,142 @@ + + + Tâches + + + + + + + + + + + + + {{ issue.item.type }} / + {{ issue.item.name }} + #{{ issue.item.ref }} + + + {{ issue.user }} + + + fait par {{ issue.solved_by }} le {{ getDate(issue.solved_at) }} + + + + + {{ getDate(issue.created) }} + + + + + + + + + + + {{ selectedHistory.item.type }} / + {{ selectedHistory.item.name }} + #{{ selectedHistory.item.ref }} + + {{ selectedHistory.user }} + + + fait par {{ selectedHistory.solved_by }} le {{ getDate(selectedHistory.solved_at) }} + + + + + + + + + + Supprimer + Fermer + + + + + + + + + + + diff --git a/src/router/routes.js b/src/router/routes.js index beb323e..5001701 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -14,6 +14,7 @@ const routes = [ { path: 'category/:categoryCode', props: true, component: () => import('pages/StockItems.vue') }, { path: 'item/:itemRef', props: true, component: () => import('pages/StockItem.vue') }, { path: 'print-settings', props: true, component: () => import('pages/PrintSettings.vue') }, + { path: 'tasks', props: true, component: () => import('pages/TasksPage.vue') }, { path: ':shortId', props: true, component: () => import('pages/StockItem.vue') } ] }