From b911b380748dcfbedd30d4e623a94fae7fda26e9 Mon Sep 17 00:00:00 2001 From: jedi Date: Thu, 5 Dec 2019 20:10:43 +0100 Subject: [PATCH] populate items trough apicall --- API.md | 4 +++- src/store/index.js | 17 +---------------- src/views/Items.vue | 14 +++++++------- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/API.md b/API.md index 56db654..72c6a7a 100644 --- a/API.md +++ b/API.md @@ -55,4 +55,6 @@ returns a list of all tracked events ### Files/Images -#### ``GET /api//images/`` \ No newline at end of file +#### ``GET /api//images/`` + +#### ``GET /api//thumbs/`` \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 97b12eb..a1c4557 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -10,22 +10,7 @@ const store = new Vuex.Store({ state: { events: Array, layout: 'cards', - loadedItems: [ - { uid: 1, description: 'sleeping bag', box: 7, image: 41 }, - { uid: 2, description: 'tent', box: 7, image: 23 }, - { uid: 3, description: 'chest', box: 7, image: 52 }, - { uid: 4, description: 'power supply black', box: 5, image: 62 }, - { uid: 5, description: 'pullover yellow "pesthörnchen"', box: 5, image: 84 }, - { uid: 6, description: '"blue black second skin"', box: 6, image: 72 }, - { uid: 7, description: '"the bike blog" bottle orange', box: 6, image: 83 }, - { uid: 8, description: 'tshirt guad3c', box: 6, image: 26 }, - { uid: 9, description: 'power supply dell', box: 6, image: 74 }, - { uid: 10, description: 'blanket green blue', box: 6, image: 25 }, - { uid: 11, description: 'cap "ega"', box: 6, image: 71 }, - { uid: 12, description: 'water bottle blue "sistema"', box: 3, image: 12 }, - { uid: 13, description: 'sun hat black', box: 5, image: 1 }, - { uid: 14, description: 'toy truck', box: 6, image: 51 } - ] + loadedItems: Array, }, getters: { getEventSlug: state => state.route.params.event, diff --git a/src/views/Items.vue b/src/views/Items.vue index af26931..fea016c 100644 --- a/src/views/Items.vue +++ b/src/views/Items.vue @@ -3,27 +3,27 @@
item
-
{{ item.description }}
-
uid: {{ item.uid }} box: {{ item.box }}
+
{{ item.bezeichnung }}
+
uid: {{ item.item_uid }} box: {{ item.container }}