- poble (que cada poble només tinga accés a lo del seu poble, la resta de pobles no els han de poder tocar): Alaquàs / Albal / Aldaia / Alfafar / Algemesí / Alginet / Alcàsser / Benetússer / Beniparrell / Carlet / Catarroja / Dosaigües / Godelleta / Guadassuar / Iàtova / L'Alcúdia / Llocnou de la Corona / Massanassa / Paiporta / Parke Alkosa / Picanya / Sedaví / Setaigües / Utiel / València-Castellar Oliveral / València-Forn d'Alcedo / València-La Torre / Xest / Xiva / Llombai / Tremolar
- estat: impossible de trobar / disponible / pendent / enviada / ha arribat (que cada poble puga tocar aquestes opcions dels subministres per al seu poble)
- tipus de subministre: maquinària / menjar i beguda / productes infantils / higiene i neteja / sanitari / roba i calçat / ferramentes / necessitats especials / EPIs / electrònica / per a animals / roba de llit, mantes, cortines i mantells / vaixella i utensilis de cuina / papereria i material escolar / mobiliari i electrodomèstics /altres
- necessitat (que la plataforma et dóne un desplegable amb totes les necessitats que s'han demanat fins ara en eixa categoria i pugues buscar, però també afegir-ne coses noves) - que la plataforma demane en aquest punt que siguen tant específiques com puguen (que no em fiquen com a necessitat "mobles" sinó per exemple "rentadora")
-
- NOMÉS EN CAS DE MOBILIARI I ELECTRODOMÈSTICS:
+
- NOMÉS EN CAS DE MOBILIARI I ELECTRODOMÈSTICS:
---- adreça de la casa o lloc on s'ha de dur (tenda, casa, baix...)
---- que afegisquen dies i horaris en què estaran a eixa adreça
---- especificar que el contacte que afegisquen ha de ser necessàriament de la persona que ho va a rebre en la casa o espai
- - que la plataforma recullga la data en la que es fa una petició de subministres
+ - que la plataforma recullga la data en la que es fa una petició de subministres
- que la plataforma recullga la data en la que el subministre es canvia a l'estat "ha arribat)
@@ -45,6 +80,7 @@ export const App = () => (
} />
+ } />
} />
diff --git a/server/main.js b/server/main.js
index 0198535..307c4c2 100644
--- a/server/main.js
+++ b/server/main.js
@@ -1,37 +1,180 @@
import { Meteor } from 'meteor/meteor';
-import { LinksCollection } from '/imports/api/links';
+import { PoblesCollection } from '/imports/api/pobles.js';
-async function insertLink({ title, url }) {
- await LinksCollection.insertAsync({ title, url, createdAt: new Date() });
+async function insertPoble({ nomPoble, cp, comarca }) {
+ await PoblesCollection.insertAsync({ nomPoble, cp, comarca, createdAt: new Date() });
}
Meteor.startup(async () => {
- // If the Links collection is empty, add some data.
- if (await LinksCollection.find().countAsync() === 0) {
- await insertLink({
- title: 'Do the Tutorial',
- url: 'https://www.meteor.com/tutorials/react/creating-an-app',
+ // If the Pobles collection is empty, add some data.
+ if (await PoblesCollection.find().countAsync() === 0) {
+ await insertPoble({
+ nomPoble: "Alaquàs",
+ cp: "",
+ comarca: ""
});
- await insertLink({
- title: 'Follow the Guide',
- url: 'https://guide.meteor.com',
+ await insertPoble({
+ nomPoble: "Albal",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Aldaia",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Alfafar",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Algemesí",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Alginet",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Alcàsser",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Benetússer",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Beniparrell",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Carlet",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Catarroja",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Dosaigües",
+ cp: "",
+ comarca: ""
});
- await insertLink({
- title: 'Read the Docs',
- url: 'https://docs.meteor.com',
+ await insertPoble({
+ nomPoble: "Godelleta",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Guadassuar",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Iàtova",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "L'Alcúdia",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Llocnou de la Corona",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Massanassa",
+ cp: "",
+ comarca: ""
});
- await insertLink({
- title: 'Discussions',
- url: 'https://forums.meteor.com',
+
+
+ await insertPoble({
+ nomPoble: "Paiporta",
+ cp: "",
+ comarca: ""
});
+ await insertPoble({
+ nomPoble: "Parke Alkosa",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Picanya",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Sedaví",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Setaigües",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Utiel",
+ cp: "",
+ comarca: ""
+ });
+
+ await insertPoble({
+ nomPoble: "València-Castellar Oliveral",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "València-Forn d'Alcedo",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "València-La Torre",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Xest",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Xiva",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Llombai",
+ cp: "",
+ comarca: ""
+ });
+ await insertPoble({
+ nomPoble: "Tremolar",
+ cp: "",
+ comarca: ""
+ });
+
}
- // We publish the entire Links collection to all clients.
+ // We publish the entire Pobles collection to all clients.
// In order to be fetched in real-time to the clients
- Meteor.publish("links", function () {
- return LinksCollection.find();
+ Meteor.publish("pobles", function () {
+ return PoblesCollection.find();
});
});