-
-
{a.serviceName}
-
- {a.appointmentStatus}
-
+ ) : (() => {
+ const activeAppts = appointments.filter((a) => a.appointmentStatus?.toLowerCase() === "booked");
+ const pastAppts = appointments.filter((a) => a.appointmentStatus?.toLowerCase() !== "booked");
+ const q = apptSearch.toLowerCase();
+ const filteredActive = activeAppts.filter((a) =>
+ !q || [a.serviceName, a.storeName, a.petName].some((v) => v?.toLowerCase().includes(q))
+ );
+ return (
+ <>
+
setApptSearch(e.target.value)}
+ />
+ {filteredActive.length === 0 ? (
+
{activeAppts.length === 0 ? "No active appointments." : "No results."}
+ ) : (
+
+ {filteredActive.map((a) => (
+
+
+ {a.serviceName}
+
+ {a.appointmentStatus}
+
+
+
+ {a.storeName}
+ {a.appointmentDate} at {formatTime(a.appointmentTime)}
+
+ {a.petName && (
+
Pet: {a.petName}
+ )}
+
+
+
+
+ ))}
-
-
{a.storeName}
-
{a.appointmentDate} at {formatTime(a.appointmentTime)}
+ )}
+ {pastAppts.length > 0 && (
+
+
+ {showPastAppts && (
+
+ {pastAppts.map((a) => (
+
+
+ {a.serviceName}
+
+ {a.appointmentStatus}
+
+
+
+ {a.storeName}
+ {a.appointmentDate} at {formatTime(a.appointmentTime)}
+
+ {a.petName && (
+
Pet: {a.petName}
+ )}
+
+ ))}
+
+ )}
- {a.petName && (
-
- Pet: {a.petName}
-
- )}
- {a.appointmentStatus?.toLowerCase() === "booked" && (
-
-
-
- )}
-
- ))}
-
- )}
+ )}
+ >
+ );
+ })()}
{canBookAppointments ? "Your Adoptions" : "Adoptions"}
{loadingAdoptions ? (
Loading adoptions...
- ) : adoptions.length === 0 ? (
-
No adoption requests yet.
- ) : (
-
- {adoptions.map((a) => (
-
-
-
{a.petName}
-
- {a.adoptionStatus}
-
+ ) : (() => {
+ const activeAdoptions = adoptions.filter((a) => a.adoptionStatus?.toLowerCase() === "pending");
+ const pastAdoptions = adoptions.filter((a) => a.adoptionStatus?.toLowerCase() !== "pending");
+ const q = adoptionSearch.toLowerCase();
+ const filteredActive = activeAdoptions.filter((a) =>
+ !q || [a.petName, a.sourceStoreName].some((v) => v?.toLowerCase().includes(q))
+ );
+ return (
+ <>
+
setAdoptionSearch(e.target.value)}
+ />
+ {filteredActive.length === 0 ? (
+
{activeAdoptions.length === 0 ? "No active adoption requests." : "No results."}
+ ) : (
+
+ {filteredActive.map((a) => (
+
+
+ {a.petName}
+
+ {a.adoptionStatus}
+
+
+
+ {a.sourceStoreName}
+ {a.adoptionDate}
+
+
+
+
+
+ ))}
-
-
{a.sourceStoreName}
-
{a.adoptionDate}
+ )}
+ {pastAdoptions.length > 0 && (
+
+
+ {showPastAdoptions && (
+
+ {pastAdoptions.map((a) => (
+
+
+ {a.petName}
+
+ {a.adoptionStatus}
+
+
+
+ {a.sourceStoreName}
+ {a.adoptionDate}
+
+
+ ))}
+
+ )}
- {a.adoptionStatus?.toLowerCase() === "pending" && (
-
-
-
- )}
-
- ))}
-
- )}
+ )}
+ >
+ );
+ })()}
diff --git a/web/app/contact/page.js b/web/app/contact/page.js
index 5ae4b5e4..1983bd72 100644
--- a/web/app/contact/page.js
+++ b/web/app/contact/page.js
@@ -38,6 +38,10 @@ export default function ContactPage() {
async function handleSend(e) {
e.preventDefault();
+ if (!token) {
+ setSendError("Please log in to send a message.");
+ return;
+ }
setSending(true);
setSendError(null);
try {
@@ -72,44 +76,42 @@ export default function ContactPage() {
Phone: (03) 9000 0000
Hours: Mon–Sat, 9:00 AM – 6:00 PM
- {token && (
-
-
Send Us a Message
- {sendSuccess ? (
-
Your message has been sent. We'll be in touch soon.
- ) : (
-
- )}
-
- )}
+
+
Send Us a Message
+ {sendSuccess ? (
+
Your message has been sent. We'll be in touch soon.
+ ) : (
+
+ )}
+
diff --git a/web/app/globals.css b/web/app/globals.css
index 24bfbae7..e144cd7f 100644
--- a/web/app/globals.css
+++ b/web/app/globals.css
@@ -713,7 +713,7 @@ body {
.info-content {
max-width: 1200px;
margin: 0 auto;
- padding: 0 2rem 3rem;
+ padding: 0 2rem 1.5rem;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
@@ -737,6 +737,7 @@ body {
padding-left: 1.2rem;
display: grid;
gap: 0.5rem;
+ list-style-type: disc;
}
.info-card-grid {
@@ -1713,6 +1714,49 @@ body {
cursor: default;
}
+.appt-search {
+ width: 100%;
+ padding: 0.5rem 0.75rem;
+ margin-bottom: 0.75rem;
+ border: 1px solid #e0e0e0;
+ border-radius: 8px;
+ font-size: 0.9rem;
+ background: #fff;
+ box-sizing: border-box;
+}
+
+.appt-search:focus {
+ outline: none;
+ border-color: #e68672;
+}
+
+.appt-past-section {
+ margin-top: 1rem;
+}
+
+.appt-past-toggle {
+ background: none;
+ border: none;
+ padding: 0;
+ font-size: 0.85rem;
+ color: #888;
+ cursor: pointer;
+ text-decoration: underline;
+ margin-bottom: 0.75rem;
+}
+
+.appt-past-toggle:hover {
+ color: #555;
+}
+
+.appt-list--past {
+ opacity: 0.7;
+}
+
+.appt-card--past {
+ background: #f9f9f9;
+}
+
/* Adoption Pet Selection */
.appt-adopt-grid {