Skip to content

Commit e05de8f

Browse files
committed
a TODO list is created and the PostDetail and Create Post modules are worked on
1 parent ab6e36e commit e05de8f

21 files changed

+389
-154
lines changed

db.json

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
{
2+
"users": [
3+
{
4+
"name": "Pablo",
5+
"username": "pablsch.it@gmail.com",
6+
"password": "$2b$10$/kBuLvxoenYLoDQvVCUIyuW1Ush3D.BVsHOJ2Mkajxy0RVEnLz4/q",
7+
"id": 1
8+
},
9+
{
10+
"name": "José",
11+
"username": "Pedro.it@gmail.com",
12+
"password": "$2b$10$/kBuLvxoenYLoDQvVCUIyuW1Ush3D.BVsHOJ2Mkajxy0RVEnLz4/q",
13+
"id": 2
14+
},
15+
{
16+
"name": "Pedro",
17+
"username": "jose.JJ@gmail.com",
18+
"password": "$2b$10$PfblmuGsB.lxsuV7dXkSAe3uHjucMlVuyaOna.qXR5XRNr4GrJAeu",
19+
"id": 3
20+
}
21+
],
22+
"posts": [
23+
{
24+
"image": "http://localhost:8000//file-1745777864788.png",
25+
"name": "Synthetic Wheat",
26+
"tag": "fashion",
27+
"description": "It is used but still in very good condition.",
28+
"price": "35",
29+
"isPurchase": true,
30+
"userId": 1,
31+
"updatedAt": "2025-04-27T18:17:44.846Z",
32+
"id": 8
33+
},
34+
{
35+
"image": "http://localhost:8000//file-1745775601839.jpg",
36+
"name": "Cellphone",
37+
"tag": "tech",
38+
"description": "Modern Cell Phone. Fresh out of the box. \nSpecifications:\n-XXXXXXXXXXXXXXXXXXXXXX\n-XXX\n-X.X.X.X.X",
39+
"price": "480",
40+
"isPurchase": false,
41+
"userId": 2,
42+
"updatedAt": "2025-04-27T17:40:01.914Z",
43+
"id": 10
44+
},
45+
{
46+
"image": "http://localhost:8000//file-1745776219721.jpg",
47+
"name": "Native forest wood chair",
48+
"tag": null,
49+
"description": "Used native forest wood chair. I have been using it for 4 years and no longer need it.",
50+
"price": "60",
51+
"isPurchase": true,
52+
"userId": 2,
53+
"updatedAt": "2025-04-27T17:50:19.782Z",
54+
"id": 11
55+
},
56+
{
57+
"image": "http://localhost:8000//file-1745776159099.jpg",
58+
"name": "Veneered wood table",
59+
"tag": "home",
60+
"description": "Dimensions 4x2x1.5 Meters",
61+
"price": "120",
62+
"isPurchase": true,
63+
"userId": 2,
64+
"updatedAt": "2025-04-27T17:49:20.188Z",
65+
"id": 12
66+
},
67+
{
68+
"image": "http://localhost:8000//file-1745777215469.jpg",
69+
"name": "Monitor 4K",
70+
"tag": "tech",
71+
"description": "Original price 1,200 + 40% discount!",
72+
"price": "480",
73+
"isPurchase": false,
74+
"userId": 3,
75+
"updatedAt": "2025-04-27T18:06:55.528Z",
76+
"id": 13
77+
},
78+
{
79+
"image": "http://localhost:8000//file-1745777249789.jpg",
80+
"name": "Power saw with a 15% discount.",
81+
"tag": "tech",
82+
"description": "Original Price 120 Euros.\n\n1400 Watts\n230 Volts\n",
83+
"price": "48",
84+
"isPurchase": false,
85+
"userId": 3,
86+
"updatedAt": "2025-04-27T18:07:29.846Z",
87+
"id": 14
88+
},
89+
{
90+
"image": "http://localhost:8000//file-1745777270542.jpg",
91+
"name": "Beret",
92+
"tag": "fashion",
93+
"description": "Men's black wool Basque beret for men",
94+
"price": "20",
95+
"isPurchase": true,
96+
"userId": 3,
97+
"updatedAt": "2025-04-27T18:07:50.601Z",
98+
"id": 15
99+
},
100+
{
101+
"image": "http://localhost:8000//file-1745777393338.jpg",
102+
"name": "Wine Skin",
103+
"tag": "travel",
104+
"description": "Spanish Bota Bag Leather 1L Curved Wineskin Wine Skin",
105+
"price": "80",
106+
"isPurchase": true,
107+
"userId": 3,
108+
"updatedAt": "2025-04-27T18:09:53.399Z",
109+
"id": 16
110+
},
111+
{
112+
"image": "../../../../public/no-image-available.jpg",
113+
"name": "Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text ",
114+
"tag": "food",
115+
"description": "Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text Full Text ",
116+
"price": "1",
117+
"isPurchase": false,
118+
"userId": 1,
119+
"updatedAt": "2025-04-27T18:18:21.278Z",
120+
"id": 17
121+
},
122+
{
123+
"image": "../../../../public/no-image-available.jpg",
124+
"name": "...",
125+
"tag": null,
126+
"description": "...",
127+
"price": "999",
128+
"isPurchase": false,
129+
"userId": 1,
130+
"updatedAt": "2025-04-27T18:19:17.709Z",
131+
"id": 18
132+
},
133+
{
134+
"image": "http://localhost:8000//file-1745778143745.jpg",
135+
"name": "Doppio Passo Primitivo Puglia, red wine Italy, 6 x 750ml -12 %",
136+
"tag": "food",
137+
"description": "Doppio Passo Primitivo Puglia, red wine Italy, 6 x 750mlDoppio Passo Primitivo - the multi-award-winning, exceptionally aromatic red wine from Apulia.",
138+
"price": "42",
139+
"isPurchase": false,
140+
"userId": 1,
141+
"updatedAt": "2025-04-27T18:22:23.809Z",
142+
"id": 19
143+
},
144+
{
145+
"image": "http://localhost:8000//file-1745778254513.jpg",
146+
"name": "Ikigai: The Japanese secret to a long and happy life",
147+
"tag": "education",
148+
"description": "Prices include VAT. Depending on the delivery address, VAT may be added at the checkout.",
149+
"price": "13",
150+
"isPurchase": true,
151+
"userId": 1,
152+
"updatedAt": "2025-04-27T18:24:14.572Z",
153+
"id": 20
154+
},
155+
{
156+
"image": "http://localhost:8000//file-1745778393238.jpg",
157+
"name": "Crocs Unisex Adult Classic Clog",
158+
"tag": "sports",
159+
"description": "Find Your Size: We recommend sizing down (e.g. if you are a 7.5, size down to a 7)\n",
160+
"price": "43",
161+
"isPurchase": true,
162+
"userId": 1,
163+
"updatedAt": "2025-04-27T18:26:33.297Z",
164+
"id": 21
165+
},
166+
{
167+
"image": "http://localhost:8000//file-1745778506638.jpg",
168+
"name": "Clothes Hangers, Pack of 50, Black -16%",
169+
"tag": "home",
170+
"description": "INCLUDES: 50 suit clothes hangers in Black/Silver for keeping shirts, blazers, slacks, and more neatly hung and organized",
171+
"price": "21",
172+
"isPurchase": false,
173+
"userId": 1,
174+
"updatedAt": "2025-04-27T18:28:26.698Z",
175+
"id": 22
176+
}
177+
]
178+
}

docs/README.es.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,21 @@ Esto levantará el servidor y pondrá en funcionamiento el API REST para que pue
122122

123123
1. Descargue el comprimido del proyecto desde GitHub a su ordenador.
124124

125-
2. Una vez descarcargado el comprimido, abra el proyecto en Visual Studio agregando el directorio del proyecto a su espacio de trabajo.
125+
2. Una vez descargado el comprimido, abra el proyecto en Visual Studio agregando el directorio del proyecto a su espacio de trabajo.
126126

127127
### Notas
128128

129129
- Asegúrate de tener correctamente instalados todos los programas necesarios antes de proceder con la ejecución del proyecto.
130130

131+
- En el archivo db.json se posee tres cuentas y 14 posts. Estas son las credenciales de cada cuenta para por iniciar sesión en el proyecto y editar los posts ya creados:
132+
- pablsch.it@gmail.com / pwd: 123456
133+
- Pedro.it@gmail.com / pwd: 123456
134+
- jose.JJ@gmail.com / pwd: 123456
135+
131136
## Sin Contribuciones ni Licencias
132137

133138
Este proyecto no cuenta con contribuciones externas ni licencia en este momento.
134139

135140
## Vista Previa del Proyecto
141+
142+
...

etc/TODO List.rtf

1.59 KB
Binary file not shown.

public/cellphone.jpg

-225 KB
Binary file not shown.

public/chair.jpg

-260 KB
Binary file not shown.

public/drawer.jpg

-147 KB
Binary file not shown.

public/electric_saw.jpg

-162 KB
Binary file not shown.

public/monitor.jpg

-216 KB
Binary file not shown.

public/table.jpg

-325 KB
Binary file not shown.

src/js/components/navbar/navbarController.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { isAuthenticated } from '../../auth/auth.js';
44
export function navbarController(container) {
55
container.innerHTML = navbarView();
66

7+
78
handleVisibility();
89
searchForm();
910
}
@@ -53,16 +54,16 @@ function searchForm() {
5354
event.preventDefault();
5455

5556
const searchQuery = document.getElementById('search').value.trim();
56-
const selectedCategory = document.getElementById('category-select').value;
57+
const tag = document.getElementById('post-tag').value;
5758

58-
if (!searchQuery && !selectedCategory) {
59+
/* if (!searchQuery && !selectedCategory) {
5960
dispatchErrorNotification("Enter a word or select a category.");
6061
return;
61-
}
62+
} */
6263

6364
const params = new URLSearchParams();
6465
if (searchQuery) params.set('search', searchQuery);
65-
if (selectedCategory) params.set('category', selectedCategory);
66+
if (tag) params.set('tag', tag);
6667

6768
window.location.href = `/index.html?${params.toString()}`;
6869
});

0 commit comments

Comments
 (0)