+
View gift requests
+
Filter gift requests using the dropdown below.
+
+ {(selectedOption?.value == "0" || selectedOption?.value == "2") && (
+
+
+ Incomplete requests
+
+ {incompleteRequests.map((req) => {
+ return ;
+ })}
+
+ )}
+ {(selectedOption?.value == "1" || selectedOption?.value == "2") && (
+
+
Complete requests
+ {completeRequests.map((req) => {
+ return ;
+ })}
+
+ )}
+
+ );
+}
\ No newline at end of file
diff --git a/client/src/pages/mockData.tsx b/client/src/pages/mockData.tsx
new file mode 100644
index 0000000..755314f
--- /dev/null
+++ b/client/src/pages/mockData.tsx
@@ -0,0 +1,133 @@
+import { GiftRequest } from "../types";
+
+export const completeRequests: GiftRequest[] = [
+ {
+ CustomerId: 1,
+ GiftResponseId: null,
+ RecipientName: "Alice",
+ RecipientAge: 25,
+ Occasion: ["Birthday", "Anniversary"],
+ RecipientInterests: ["Reading", "Traveling"],
+ BudgetMax: 100,
+ BudgetMin: 50,
+ GiftResponse: {
+ GiftCollection: {
+ CustomerId: 1,
+ Customer: { UserId: 1 },
+ CollectionName: "Books",
+ Gifts: [
+ {
+ Name: "The Catcher in the Rye",
+ Price: 20,
+ Link: "https://book-link",
+ Description: "Classic novel",
+ Demographic: "Adult",
+ GiftCollections: [],
+ },
+ {
+ Name: "To Kill a Mockingbird",
+ Price: 15,
+ Link: "https://book-link",
+ Description: "Classic novel",
+ Demographic: "Adult",
+ GiftCollections: [],
+ },
+ ],
+ },
+ GiftCollectionId: 1,
+ CustomMessage: "Happy Birthday!",
+ },
+ DateNeeded: new Date("2023-01-15"),
+ },
+ {
+ CustomerId: 2,
+ GiftResponseId: null,
+ RecipientName: "Bob",
+ RecipientAge: 30,
+ Occasion: ["Christmas"],
+ RecipientInterests: ["Music", "Sports"],
+ BudgetMax: 150,
+ BudgetMin: 100,
+ GiftResponse: {
+ GiftCollection: {
+ CustomerId: 2,
+ Customer: { UserId: 2 },
+ CollectionName: "Tech Gadgets",
+ Gifts: [
+ {
+ Name: "Wireless Headphones",
+ Price: 80,
+ Link: "https://headphones-link",
+ Description: "High-quality sound",
+ Demographic: "Adult",
+ GiftCollections: [],
+ },
+ {
+ Name: "Smartwatch",
+ Price: 120,
+ Link: "https://smartwatch-link",
+ Description: "Fitness tracking and notifications",
+ Demographic: "Adult",
+ GiftCollections: [],
+ },
+ ],
+ },
+ GiftCollectionId: 2,
+ CustomMessage: "Merry Christmas!",
+ },
+ DateNeeded: new Date("2023-12-25"),
+ },
+ {
+ CustomerId: 3,
+ GiftResponseId: null,
+ RecipientName: "Charlie",
+ RecipientAge: 22,
+ Occasion: ["Graduation"],
+ RecipientInterests: ["Art", "Movies"],
+ BudgetMax: 80,
+ BudgetMin: 50,
+ GiftResponse: {
+ GiftCollection: {
+ CustomerId: 3,
+ Customer: { UserId: 3 },
+ CollectionName: "Art Supplies",
+ Gifts: [
+ {
+ Name: "Acrylic Paint Set",
+ Price: 30,
+ Link: "https://paint-set-link",
+ Description: "High-quality pigments",
+ Demographic: "Young Adult",
+ GiftCollections: [],
+ },
+ {
+ Name: "Sketchbook",
+ Price: 20,
+ Link: "https://sketchbook-link",
+ Description: "Blank pages for creative ideas",
+ Demographic: "Young Adult",
+ GiftCollections: [],
+ },
+ ],
+ },
+ GiftCollectionId: 3,
+ CustomMessage: "Congratulations on your graduation!",
+ },
+ DateNeeded: new Date("2023-05-20"),
+ },
+];
+
+export const incompleteRequests: GiftRequest[] = [
+ {
+ CustomerId: 3,
+ GiftResponseId: null,
+ RecipientName: "Charlie",
+ RecipientAge: 22,
+ Occasion: ["Graduation"],
+ RecipientInterests: ["Art", "Movies"],
+ BudgetMax: 80,
+ BudgetMin: 50,
+ GiftResponse: null,
+ DateNeeded: new Date("2023-05-20"),
+ },
+];
\ No newline at end of file
diff --git a/client/src/types.tsx b/client/src/types.tsx
new file mode 100644
index 0000000..92f038c
--- /dev/null
+++ b/client/src/types.tsx
@@ -0,0 +1,49 @@
+export interface Gift {
+ Name: string;
+ Price: number;
+ Link: string;
+ Description: string;
+ Demographic: string;
+ GiftCollections: GiftCollection[];
+}
+
+export interface GiftRequest {
+ CustomerId: number;
+ GiftResponseId: number | null;
+ RecipientName: string;
+ RecipientAge: number;
+ Occasion: string[];
+ RecipientInterests: string[];
+ BudgetMax: number;
+ BudgetMin: number;
+ GiftResponse: GiftResponse | null;
+ DateNeeded: Date;
+}
+
+export interface GiftCollection {
+ CustomerId: number | null;
+ Customer: Customer;
+ CollectionName: string;
+ Gifts: Gift[];
+}
+
+export interface GiftResponse {
+ GiftCollection: GiftCollection;
+ GiftCollectionId: number;
+ CustomMessage: string;
+}
+
+export interface User {
+ Email: string;
+ FirstName: string;
+ LastName: string;
+ Password: string;
+}
+
+export interface Customer {
+ UserId: number;
+}
+
+export interface Admin {
+ UserId: number;
+}
\ No newline at end of file