Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f003c6c
Add initial database dumps
Vafdaf12 May 31, 2023
1beabd3
Scaffold Admin page and related services
Vafdaf12 May 31, 2023
db037fb
Added HomePage and ToolBar
21434809 May 31, 2023
110cbe1
Added SideNav & Cards
21434809 May 31, 2023
61d70ae
Implement winery service using Mock data from Faker.js
Vafdaf12 May 31, 2023
5824d98
Implement winery component and list
Vafdaf12 May 31, 2023
1fa229f
Added Wineries Scroll List
21434809 May 31, 2023
a57b26b
implemented login and signup
FrancovV May 31, 2023
b7946ce
Added Top Wines List
21434809 May 31, 2023
adcd516
added generic response interface
FrancovV May 31, 2023
0a1efcd
Added TopWinesList
21434809 May 31, 2023
b4f205f
Implement Winery editing and deletion
Vafdaf12 May 31, 2023
4a1a4e6
Implement list of editable wine cards
Vafdaf12 May 31, 2023
997f054
Add functionality to edit wine information
Vafdaf12 May 31, 2023
db6baed
Document winery service with stronger typing
Vafdaf12 May 31, 2023
d88c36b
Fix name conflicts on Admin page
Vafdaf12 Jun 1, 2023
54000b8
Fix global styling issues
Vafdaf12 Jun 1, 2023
1803c11
Merge pull request #9 from S3BzA/Home-Page-FrontEnd
Vafdaf12 Jun 1, 2023
5517558
Merge branch 'frontend' into login-page-frontend
Vafdaf12 Jun 1, 2023
7002bbf
Merge pull request #10 from S3BzA/login-page-frontend
Vafdaf12 Jun 1, 2023
b67d6ff
Merge branch 'frontend' into vafdaf12/admin-page
Vafdaf12 Jun 1, 2023
1bc5387
Merge pull request #11 from S3BzA/vafdaf12/admin-page
Vafdaf12 Jun 1, 2023
daa91d5
Merge branch 'frontend' into vafdaf12/wineries-page
Vafdaf12 Jun 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions database/grogbase_reviews_wine.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
-- MariaDB dump 10.19 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: wheatley.cs.up.ac.za Database: u22563777_grogbase
-- ------------------------------------------------------
-- Server version 10.3.31-MariaDB-0+deb10u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `reviews_wine`
--

DROP TABLE IF EXISTS `reviews_wine`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_wine` (
`user_id` int(10) unsigned NOT NULL,
`wine_id` int(10) unsigned NOT NULL,
`points` tinyint(3) unsigned NOT NULL,
`review` text NOT NULL,
`drunk` tinyint(1) NOT NULL,
PRIMARY KEY (`user_id`,`wine_id`),
KEY `FK_review_wine` (`wine_id`),
CONSTRAINT `FK_review_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_review_wine` FOREIGN KEY (`wine_id`) REFERENCES `wines` (`wine_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `reviews_wine`
--

LOCK TABLES `reviews_wine` WRITE;
/*!40000 ALTER TABLE `reviews_wine` DISABLE KEYS */;
INSERT INTO `reviews_wine` VALUES (7,2,6,'I had mixed feelings about this wine. It had a light and fruity flavor, but it lacked depth and complexity. Not my favorite.',0),(7,13,7,'I enjoyed a glass of this wine with dinner. It had a smooth finish and a medium body. Not too strong, but definitely enjoyable.',0),(13,14,8,'I had a great time with friends, sipping on this wine. It had a balanced taste with a touch of sweetness. Perfect for a relaxed evening!',1),(16,6,9,'I got a bit tipsy after a couple of glasses of this wine. It has a bold and robust taste with intense aromas of black cherry and chocolate. Loved it!',1),(16,16,8,'This wine got me pleasantly drunk. It has a rich and complex flavor profile with notes of dark berries and a hint of oak. I would highly recommend it!',1);
/*!40000 ALTER TABLE `reviews_wine` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-05-31 10:48:02
56 changes: 56 additions & 0 deletions database/grogbase_reviews_winery.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
-- MariaDB dump 10.19 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: wheatley.cs.up.ac.za Database: u22563777_grogbase
-- ------------------------------------------------------
-- Server version 10.3.31-MariaDB-0+deb10u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `reviews_winery`
--

DROP TABLE IF EXISTS `reviews_winery`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reviews_winery` (
`winery_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`points` tinyint(3) unsigned NOT NULL,
`review` text NOT NULL,
PRIMARY KEY (`winery_id`,`user_id`),
KEY `FK_wreview_user` (`user_id`),
CONSTRAINT `FK_wreview_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_wreview_winery` FOREIGN KEY (`winery_id`) REFERENCES `wineries` (`winery_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `reviews_winery`
--

LOCK TABLES `reviews_winery` WRITE;
/*!40000 ALTER TABLE `reviews_winery` DISABLE KEYS */;
INSERT INTO `reviews_winery` VALUES (2,19,6,'I visited this winery with high expectations but was somewhat disappointed. The wines were average, lacking complexity and depth. The service was mediocre, and the tasting room felt crowded.'),(3,7,9,'This winery is truly exceptional. The ambiance is beautiful, and the staff is knowledgeable and friendly. The wines are exquisite, with a wide range of flavors to choose from. Highly recommended!'),(4,13,8,'I had a great experience visiting this winery. The tasting room was inviting, and the staff was helpful in guiding me through the wine selection. The wines were delicious, especially the red blends.'),(6,19,9,'This winery is truly exceptional. The ambiance is beautiful, and the staff is knowledgeable and friendly. The wines are exquisite, with a wide range of flavors to choose from. Highly recommended!'),(7,13,9,'I had an amazing time at this winery. The vineyards were stunning, and the wine tasting experience was top-notch. The wines were superb, particularly the Chardonnay and Pinot Noir.'),(7,16,7,'This winery has a nice atmosphere, and the wines are decent. The staff was friendly, although they seemed a bit overwhelmed during peak hours. Overall, a satisfactory experience.');
/*!40000 ALTER TABLE `reviews_winery` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-05-31 10:48:02
56 changes: 56 additions & 0 deletions database/grogbase_users.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
-- MariaDB dump 10.19 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: wheatley.cs.up.ac.za Database: u22563777_grogbase
-- ------------------------------------------------------
-- Server version 10.3.31-MariaDB-0+deb10u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(255) NOT NULL,
`last_name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`user_type` enum('User','Critic','Manager','Admin') NOT NULL DEFAULT 'User',
PRIMARY KEY (`user_id`),
UNIQUE KEY `UK_USER` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES (1,'Mason','Stuart','Jerry@Suspendisse.org','f3G#k7rMx&','User'),(2,'Rachel','Hester','Kenyon@sollicitudin.org','P@ssw0rd123!','Manager'),(3,'Caesar','Robinson','Katelyn@amet.net','QW8r#h%2T','Critic'),(4,'Portia','Melendez','Yolanda@rutrum.org','x9$z6&v5P@','User'),(5,'Ivan','Molina','Bruce@laoreet.org','7s@Df4gT','Manager'),(6,'Driscoll','Bradford','Illiana@tempus.net','b2@L!c8Hn','Critic'),(7,'Quentin','Guerra','Ross@consectetuer.net','R#p5*Yq9S!','User'),(8,'Blythe','Rutledge','Gavin@orci.gov','M8s@k4Zv7!','Manager'),(9,'Grace','Santos','Noel@sapien.com','#q7r2Gf4T','Critic'),(10,'Mark','Wade','Ryder@facilisis.gov','P!w5D@r9S','User'),(11,'Nash','Mcgowan','Bo@aliquet.edu','L$7v#d3Np','Manager'),(12,'Vielka','Spears','Abraham@vulputate.us','9c@B#j4Zm','Critic'),(13,'Evan','Stafford','Rae@faucibus.org','Xp9$z6*Y','User'),(14,'Lael','Hughes','Micah@ullamcorper.us','T4h@W3q2P','Manager'),(15,'Curran','Black','Hunter@vel.net','6N!j7Xm#','Critic'),(16,'Jemima','Conner','Tanisha@erat.org','3v@S#k9Bd','User'),(17,'Frances','Caldwell','Amelia@fames.gov','5m#J&d7Rz','Manager'),(18,'Sasha','Velasquez','Declan@ut.org','W!7y4Qb9K','Critic'),(19,'Len','Odonnell','Michael@pulvinar.gov','F6@q3z#Xv','User'),(20,'Hedwig','Soto','Hiram@montes.com','D!2s%P7rC','Manager');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-05-31 10:48:02
58 changes: 58 additions & 0 deletions database/grogbase_wineries.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
-- MariaDB dump 10.19 Distrib 10.6.12-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: wheatley.cs.up.ac.za Database: u22563777_grogbase
-- ------------------------------------------------------
-- Server version 10.3.31-MariaDB-0+deb10u1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `wineries`
--

DROP TABLE IF EXISTS `wineries`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `wineries` (
`winery_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` text NOT NULL DEFAULT '',
`established` year(4) NOT NULL,
`location` varchar(255) NOT NULL,
`region` varchar(255) NOT NULL,
`country` varchar(255) NOT NULL,
`website` varchar(255) DEFAULT NULL,
`manager_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`winery_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `wineries`
--

LOCK TABLES `wineries` WRITE;
/*!40000 ALTER TABLE `wineries` DISABLE KEYS */;
INSERT INTO `wineries` VALUES (1,'J. Lohr','Located amidst rolling vineyards and breathtaking landscapes, our winery combines traditional craftsmanship with modern techniques. We take pride in producing exquisite wines that reflect the unique terroir of our region.',1950,'Paso Robles',' Central Coast',' US','www.J.Lohr.com',20),(2,'Antucura','Nestled in the heart of wine country, our family-owned winery is dedicated to creating wines that capture the essence of the land. With a meticulous approach to winemaking, we strive to deliver exceptional quality and a memorable experience for every wine lover.',1960,'Vista Flores',' Mendoza Province',' Argentina','www.Antucura.com',5),(3,'Quinta do Portal','Discover the artistry and passion behind our winery, where generations of winemakers have honed their skills. From vine to bottle, we carefully craft wines that showcase the rich flavors and distinct character of our vineyards.',1949,'Douro','',' Portugal','www.QuintadoPortal.com',17),(4,'Tenuta di Ghizzano','Journey to our boutique winery, hidden away in a picturesque valley. Experience the harmony of nature and winemaking as we produce small-batch wines that celebrate the harmony of fruit, oak, and time.',1956,'Toscana',' Tuscany',' Italy','www.TenutadiGhizzano.com',20),(5,'Tenuta San Francesco','At our modern winery, innovation meets tradition. Our winemakers are constantly pushing boundaries to create unique and captivating wines. Explore our portfolio and indulge in the artistry of our winemaking.',1957,'Campania',' Southern Italy',' Italy','www.TenutaSanFrancesco.com',11),(6,'Las Positas','Step into our historic winery, where time-honored traditions are preserved. With a legacy spanning decades, we continue to produce wines of exceptional quality and finesse, blending old-world techniques with a touch of modern elegance.',1961,'Livermore Valley',' Central Coast',' US','www.LasPositas.com',20),(7,'Krupp Brothers','Situated amidst lush vineyards, our sustainable winery is committed to environmental stewardship. From organic farming practices to eco-friendly production methods, we strive to create wines that are not only delicious but also respectful of the earth.',1957,'Napa Valley',' Napa',' US','www.KruppBrothers.com',17);
/*!40000 ALTER TABLE `wineries` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-05-31 10:48:02
Loading