diff --git a/capacitor.config.ts b/capacitor.config.ts
index 3565837..fb45b68 100644
--- a/capacitor.config.ts
+++ b/capacitor.config.ts
@@ -2,7 +2,7 @@ import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'io.ionic.starter',
- appName: 'tainacanteste',
+ appName: 'tainacan-mobile',
webDir: 'dist',
bundledWebRuntime: false
};
diff --git a/src/pages/ColletionsList.vue b/src/components/base/BaseCollectionList.vue
similarity index 50%
rename from src/pages/ColletionsList.vue
rename to src/components/base/BaseCollectionList.vue
index 4c3a456..8b5dbec 100644
--- a/src/pages/ColletionsList.vue
+++ b/src/components/base/BaseCollectionList.vue
@@ -1,27 +1,25 @@
-
-
-
-
-
-
-
- {{ collection.name }}
-
-
-
+
+
+
+
+
+
+ {{ collection.name }}
+
+
\ No newline at end of file
diff --git a/src/main.ts b/src/main.ts
index 7b69597..1dd540f 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -2,6 +2,8 @@ import { createApp } from 'vue'
import App from './App.vue'
import BaseLayout from './components/base/BaseLayout.vue';
+import BaseCollectionList from './components/base/BaseCollectionList.vue';
+import BaseItemList from './components/base/BaseItemList.vue';
import router from './router';
import { createPinia } from 'pinia';
@@ -34,6 +36,8 @@ const app = createApp(App)
.use(createPinia());
app.component('base-layout', BaseLayout);
+app.component('base-collectionlist', BaseCollectionList);
+app.component('base-itemlist', BaseItemList);
router.isReady().then(() => {
app.mount('#app');
diff --git a/src/pages/HomeCollectionItensList.vue b/src/pages/HomeCollectionItensList.vue
new file mode 100644
index 0000000..bbf34ee
--- /dev/null
+++ b/src/pages/HomeCollectionItensList.vue
@@ -0,0 +1,47 @@
+
+
+ Acessar WordPress
+
+
+ Coleções
+
+
+
+ Acessar lista completa de coleções
+
+
+ Items
+
+
+
+ Acessar lista completa de itens
+
+
+
+
+
diff --git a/src/pages/ItemsList.vue b/src/pages/ItemsFullList.vue
similarity index 94%
rename from src/pages/ItemsList.vue
rename to src/pages/ItemsFullList.vue
index 6385baf..ca8de20 100644
--- a/src/pages/ItemsList.vue
+++ b/src/pages/ItemsFullList.vue
@@ -47,7 +47,7 @@ export default {
async created(){
this.setOpen(true)
- await this.collectionsStore.fetchItems(this.collectionId)
+ await this.collectionsStore.fetchFullItems()
this.setOpen(false)
},
}
diff --git a/src/pages/ItemsListbyCollection.vue b/src/pages/ItemsListbyCollection.vue
new file mode 100644
index 0000000..05731c0
--- /dev/null
+++ b/src/pages/ItemsListbyCollection.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+ {{ item.title }}
+ Item não possui título
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/router/index.ts b/src/router/index.ts
index c95f7ca..4d8b327 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -14,15 +14,23 @@ const routes: Array = [
},
{
path: '/collections',
- component: () => import('../pages/ColletionsList.vue')
+ component: () => import('../pages/HomeCollectionItensList.vue')
},
{
path: '/collections/:id',
- component: () => import('../pages/ItemsList.vue')
+ component: () => import('../pages/ItemsListbyCollection.vue')
},
{
- path: '/adminwebview',
- component: () => import('../pages/AdminWebView.vue')
+ path: '/collectionsitems',
+ component: () => import('../pages/HomeCollectionItensList.vue')//mudar
+ },
+ {
+ path: '/collectionsfull',
+ component: () => import('../pages/ColletionsFullList.vue')
+ },
+ {
+ path: '/itemsfull',
+ component: () => import('../pages/ItemsFullList.vue')
}
]
diff --git a/src/store/storeCollections.ts b/src/store/storeCollections.ts
index cc801fd..62ebf39 100644
--- a/src/store/storeCollections.ts
+++ b/src/store/storeCollections.ts
@@ -34,7 +34,7 @@ const useCollectionsStore = defineStore('collections', {
}
},
- async fetchItems(collectionId :string) {
+ async fetchItemsByCollection (collectionId :string) {
try {
this.items = [];
const response = await axios.get(`https://${this.urlMuseum}/wp-json/tainacan/v2/collection/${collectionId}/items?perpage=12&orderby=modified&fetch_only=id,title,thumbnail`);
@@ -44,6 +44,30 @@ const useCollectionsStore = defineStore('collections', {
console.error('Erro no carregamento das coleções:', err);
return err;
}
+ },
+
+ async fetchItems() {
+ try {
+ this.items = [];
+ const response = await axios.get(`https://${this.urlMuseum}/wp-json/tainacan/v2/items?perpage=12&orderby=modified&fetch_only=id,title,thumbnail`);
+ this.items = response.data.items;
+ } catch (err) {
+ this.items = [];
+ console.error('Erro no carregamento das coleções:', err);
+ return err;
+ }
+ },
+
+ async fetchFullItems() {
+ try {
+ this.items = [];
+ const response = await axios.get(`https://${this.urlMuseum}/wp-json/tainacan/v2/items?perpage=20&orderby=modified&fetch_only=id,title,thumbnail`);
+ this.items = response.data.items;
+ } catch (err) {
+ this.items = [];
+ console.error('Erro no carregamento das coleções:', err);
+ return err;
+ }
}
}
})