Display date status

This commit is contained in:
meraghon committed 2026-01-02 15:30:40 -05:00
1 parent 53fd3a56c4
commit bb9eb465f4
1 file changed
+26 -3
+26 -3
View File
@@ -1,4 +1,4 @@
use crate::common::{DateInfo, DateRange}; use crate::common::{DateInfo, DateRange, DateStatus};
use crate::components::{DashboardButton, Date}; use crate::components::{DashboardButton, Date};
use leptos::prelude::*; use leptos::prelude::*;
@@ -42,10 +42,11 @@ pub fn TestPage() -> impl IntoView {
title: "Title".to_string(), title: "Title".to_string(),
date: DateRange::Range("February 2nd, 2026".to_string(), "February 10th, 2026".to_string()), date: DateRange::Range("February 2nd, 2026".to_string(), "February 10th, 2026".to_string()),
description: "This is a test".to_string(), description: "This is a test".to_string(),
status: DateStatus::Upcoming
} }
} }
icon="/Check_Style2.png" icon="/Check_Style2.png"
status="Open"
/> />
<Date <Date
important_dates=vec!{ important_dates=vec!{
@@ -53,10 +54,32 @@ pub fn TestPage() -> impl IntoView {
title: "Scholarships Due".to_string(), title: "Scholarships Due".to_string(),
date: DateRange::Single("November 4th, 2025".to_string()), date: DateRange::Single("November 4th, 2025".to_string()),
description: "This is a test".to_string(), description: "This is a test".to_string(),
status: DateStatus::Open
}
}
icon="/Warning_Style2.png"
/>
<Date
important_dates=vec!{
DateInfo {
title: "Scholarships Due".to_string(),
date: DateRange::Single("November 4th, 2025".to_string()),
description: "This is a test".to_string(),
status: DateStatus::Deadline
}
}
icon="/Warning_Style2.png"
/>
<Date
important_dates=vec!{
DateInfo {
title: "Scholarships Due".to_string(),
date: DateRange::Single("November 4th, 2025".to_string()),
description: "This is a test".to_string(),
status: DateStatus::Closed
} }
} }
icon="/Warning_Style2.png" icon="/Warning_Style2.png"
status="Upcoming"
/> />
</div> </div>
</div> </div>