Skip to content

Commit

Permalink
Merge pull request #82 from ctc-uci/69-archived-program-page-and-dele…
Browse files Browse the repository at this point in the history
…terestore-functionality

69 archived program page and delete restore functionality
  • Loading branch information
theNatePi authored Feb 23, 2025
2 parents 2c28e5d + 8bfe1fb commit 3d5a77f
Show file tree
Hide file tree
Showing 8 changed files with 1,192 additions and 43 deletions.
5 changes: 5 additions & 0 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { AuthProvider } from "./contexts/AuthContext";
import { BackendProvider } from "./contexts/BackendContext";
import { RoleProvider } from "./contexts/RoleContext";
import { Home } from "./components/home/Home";
import { ArchivedPrograms } from "./components/programs/ArchivedPrograms";
import { Settings } from "./components/settings/Settings";

const App = () => {
Expand Down Expand Up @@ -130,6 +131,10 @@ const App = () => {
path="*"
element={<ProtectedRoute element={<CatchAll />} />}
/>
<Route
path='/programs/archived'
element={<ProtectedRoute element={<ArchivedPrograms/>} />}
/>
</Routes>
</Router>
</RoleProvider>
Expand Down
10 changes: 10 additions & 0 deletions client/src/assets/ArchiveIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';

export const ArchiveIcon = () => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" style={{ display: "inline-block", verticalAlign: "middle" }}>
<path d="M2.5 7.30371V16.835C2.5 17.4151 2.73047 17.9715 3.1407 18.3818C3.55094 18.792 4.10734 19.0225 4.6875 19.0225H15.3125C15.8927 19.0225 16.4491 18.792 16.8593 18.3818C17.2695 17.9715 17.5 17.4151 17.5 16.835V7.30371C17.5 7.26227 17.4835 7.22253 17.4542 7.19323C17.4249 7.16392 17.3852 7.14746 17.3438 7.14746H2.65625C2.61481 7.14746 2.57507 7.16392 2.54576 7.19323C2.51646 7.22253 2.5 7.26227 2.5 7.30371ZM12.9297 13.2268L10.4418 15.7143C10.3246 15.8314 10.1657 15.8972 10 15.8972C9.83431 15.8972 9.6754 15.8314 9.5582 15.7143L7.07031 13.2268C6.83242 12.9889 6.81055 12.6018 7.03711 12.3525C7.09398 12.2899 7.16298 12.2394 7.23993 12.2042C7.31688 12.1691 7.40018 12.1499 7.48477 12.1478C7.56936 12.1458 7.65348 12.1609 7.73204 12.1923C7.8106 12.2238 7.88196 12.2708 7.9418 12.3307L9.375 13.7635V9.66504C9.375 9.32871 9.63359 9.04004 9.96992 9.02324C10.0544 9.01917 10.1389 9.0323 10.2182 9.06183C10.2974 9.09136 10.3699 9.13668 10.4312 9.19505C10.4924 9.25341 10.5412 9.3236 10.5745 9.40137C10.6078 9.47914 10.625 9.56286 10.625 9.64746V13.7635L12.0582 12.3307C12.118 12.2708 12.1894 12.2238 12.268 12.1923C12.3465 12.1609 12.4306 12.1458 12.5152 12.1478C12.5998 12.1499 12.6831 12.1691 12.7601 12.2042C12.837 12.2394 12.906 12.2899 12.9629 12.3525C13.1895 12.6014 13.1676 12.9889 12.9297 13.2268Z" fill="#474849"/>
<path d="M17.5 2.77246H2.5C1.80964 2.77246 1.25 3.3321 1.25 4.02246V4.64746C1.25 5.33782 1.80964 5.89746 2.5 5.89746H17.5C18.1904 5.89746 18.75 5.33782 18.75 4.64746V4.02246C18.75 3.3321 18.1904 2.77246 17.5 2.77246Z" fill="#474849"/>
</svg>
);
};
75 changes: 75 additions & 0 deletions client/src/assets/icons/ProgramIcons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,79 @@ export const sessionsFilterMapPin = (props) => {
)
};

export const archiveBox = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none">
<path d="M3.6795 7.6875V19.125C3.6795 19.8212 3.95607 20.4889 4.44835 20.9812C4.94063 21.4734 5.60831 21.75 6.3045 21.75H19.0545C19.7507 21.75 20.4184 21.4734 20.9107 20.9812C21.4029 20.4889 21.6795 19.8212 21.6795 19.125V7.6875C21.6795 7.63777 21.6598 7.59008 21.6246 7.55492C21.5894 7.51975 21.5417 7.5 21.492 7.5H3.867C3.81728 7.5 3.76958 7.51975 3.73442 7.55492C3.69926 7.59008 3.6795 7.63777 3.6795 7.6875ZM16.1951 14.7952L13.2097 17.7802C13.069 17.9207 12.8783 17.9997 12.6795 17.9997C12.4807 17.9997 12.29 17.9207 12.1493 17.7802L9.16388 14.7952C8.87841 14.5097 8.85216 14.0452 9.12404 13.7461C9.19228 13.6709 9.27509 13.6104 9.36742 13.5681C9.45976 13.5259 9.55972 13.5029 9.66123 13.5004C9.76273 13.498 9.86368 13.5161 9.95795 13.5539C10.0522 13.5916 10.1379 13.648 10.2097 13.7198L11.9295 15.4392V10.5211C11.9295 10.1175 12.2398 9.77109 12.6434 9.75094C12.7448 9.74605 12.8462 9.76181 12.9413 9.79724C13.0364 9.83268 13.1234 9.88707 13.1969 9.9571C13.2704 10.0271 13.3289 10.1114 13.3689 10.2047C13.4089 10.298 13.4295 10.3985 13.4295 10.5V15.4392L15.1493 13.7198C15.2211 13.648 15.3068 13.5916 15.4011 13.5539C15.4953 13.5161 15.5963 13.498 15.6978 13.5004C15.7993 13.5029 15.8992 13.5259 15.9916 13.5681C16.0839 13.6104 16.1667 13.6709 16.235 13.7461C16.5068 14.0447 16.4806 14.5097 16.1951 14.7952Z" fill="#474849"/>
<path d="M21.6795 2.25H3.6795C2.85108 2.25 2.1795 2.92157 2.1795 3.75V4.5C2.1795 5.32843 2.85108 6 3.6795 6H21.6795C22.5079 6 23.1795 5.32843 23.1795 4.5V3.75C23.1795 2.92157 22.5079 2.25 21.6795 2.25Z" fill="#474849"/>
</svg>
)
};

export const archiveCalendar = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none">
<path d="M16.3333 15.8335H4.66661V6.66683H16.3333M13.8333 0.833496V2.50016H7.16661V0.833496H5.49994V2.50016H4.66661C3.74161 2.50016 2.99994 3.24183 2.99994 4.16683V15.8335C2.99994 16.2755 3.17553 16.6994 3.48809 17.012C3.80065 17.3246 4.22458 17.5002 4.66661 17.5002H16.3333C16.7753 17.5002 17.1992 17.3246 17.5118 17.012C17.8243 16.6994 17.9999 16.2755 17.9999 15.8335V4.16683C17.9999 3.7248 17.8243 3.30088 17.5118 2.98832C17.1992 2.67576 16.7753 2.50016 16.3333 2.50016H15.4999V0.833496M14.6666 10.0002H10.4999V14.1668H14.6666V10.0002Z" fill="#767778"/>
</svg>
)
};

export const archiveClock = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M14.1666 2.78357C15.4235 3.50928 16.4691 4.55067 17.1998 5.80465C17.9305 7.05863 18.3211 8.48171 18.3328 9.93302C18.3445 11.3843 17.977 12.8135 17.2666 14.0792C16.5563 15.3448 15.5277 16.4029 14.2827 17.1488C13.0377 17.8948 11.6194 18.3026 10.1684 18.332C8.71732 18.3613 7.28375 18.0112 6.00959 17.3163C4.73542 16.6213 3.66485 15.6057 2.90385 14.3698C2.14284 13.134 1.7178 11.7208 1.67079 10.2702L1.66663 10.0002L1.67079 9.73024C1.71746 8.29106 2.13625 6.88854 2.88633 5.6594C3.6364 4.43026 4.69217 3.41645 5.9507 2.7168C7.20923 2.01716 8.62758 1.65557 10.0675 1.66727C11.5073 1.67897 12.9196 2.06357 14.1666 2.78357ZM9.99996 5.00024C9.79585 5.00026 9.59884 5.0752 9.44631 5.21083C9.29379 5.34646 9.19634 5.53336 9.17246 5.73607L9.16663 5.83357V10.0002L9.17413 10.1094C9.19313 10.254 9.24973 10.391 9.33829 10.5069L9.41079 10.5902L11.9108 13.0902L11.9891 13.1586C12.1353 13.272 12.315 13.3335 12.5 13.3335C12.6849 13.3335 12.8646 13.272 13.0108 13.1586L13.0891 13.0894L13.1583 13.0111C13.2717 12.8649 13.3332 12.6852 13.3332 12.5002C13.3332 12.3153 13.2717 12.1355 13.1583 11.9894L13.0891 11.9111L10.8333 9.6544V5.83357L10.8275 5.73607C10.8036 5.53336 10.7061 5.34646 10.5536 5.21083C10.4011 5.0752 10.2041 5.00026 9.99996 5.00024Z" fill="#767778"/>
</svg>
)
};

export const archiveMapPin = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.38504 18.4448C9.38504 18.4448 3.33337 13.3482 3.33337 8.33317C3.33337 6.56506 4.03575 4.86937 5.286 3.61913C6.53624 2.36888 8.23193 1.6665 10 1.6665C11.7682 1.6665 13.4638 2.36888 14.7141 3.61913C15.9643 4.86937 16.6667 6.56506 16.6667 8.33317C16.6667 13.3482 10.615 18.4448 10.615 18.4448C10.2784 18.7548 9.72421 18.7515 9.38504 18.4448ZM10 11.2498C10.3831 11.2498 10.7623 11.1744 11.1162 11.0278C11.4701 10.8812 11.7916 10.6664 12.0624 10.3956C12.3333 10.1247 12.5481 9.8032 12.6947 9.44933C12.8413 9.09546 12.9167 8.71619 12.9167 8.33317C12.9167 7.95015 12.8413 7.57088 12.6947 7.21701C12.5481 6.86314 12.3333 6.54161 12.0624 6.27078C11.7916 5.99994 11.4701 5.7851 11.1162 5.63852C10.7623 5.49195 10.3831 5.4165 10 5.4165C9.22649 5.4165 8.48463 5.72379 7.93765 6.27078C7.39067 6.81776 7.08337 7.55962 7.08337 8.33317C7.08337 9.10672 7.39067 9.84858 7.93765 10.3956C8.48463 10.9425 9.22649 11.2498 10 11.2498Z" fill="#767778"/>
</svg>
)
};

export const archivePerson = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21" fill="none">
<path d="M4.25 18C4.25 18 3 18 3 16.75C3 15.5 4.25 11.75 10.5 11.75C16.75 11.75 18 15.5 18 16.75C18 18 16.75 18 16.75 18H4.25ZM10.5 10.5C11.4946 10.5 12.4484 10.1049 13.1517 9.40165C13.8549 8.69839 14.25 7.74456 14.25 6.75C14.25 5.75544 13.8549 4.80161 13.1517 4.09835C12.4484 3.39509 11.4946 3 10.5 3C9.50544 3 8.55161 3.39509 7.84835 4.09835C7.14509 4.80161 6.75 5.75544 6.75 6.75C6.75 7.74456 7.14509 8.69839 7.84835 9.40165C8.55161 10.1049 9.50544 10.5 10.5 10.5Z" fill="#767778"/>
</svg>
)
};

export const archiveMagnifyingGlass = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20" fill="none">
<path d="M8.41667 13.3333C6.90278 13.3333 5.62167 12.8089 4.57333 11.76C3.525 10.7111 3.00056 9.43 3 7.91667C2.99944 6.40333 3.52389 5.12222 4.57333 4.07333C5.62278 3.02444 6.90389 2.5 8.41667 2.5C9.92944 2.5 11.2108 3.02444 12.2608 4.07333C13.3108 5.12222 13.835 6.40333 13.8333 7.91667C13.8333 8.52778 13.7361 9.10417 13.5417 9.64583C13.3472 10.1875 13.0833 10.6667 12.75 11.0833L17.4167 15.75C17.5694 15.9028 17.6458 16.0972 17.6458 16.3333C17.6458 16.5694 17.5694 16.7639 17.4167 16.9167C17.2639 17.0694 17.0694 17.1458 16.8333 17.1458C16.5972 17.1458 16.4028 17.0694 16.25 16.9167L11.5833 12.25C11.1667 12.5833 10.6875 12.8472 10.1458 13.0417C9.60417 13.2361 9.02778 13.3333 8.41667 13.3333ZM8.41667 11.6667C9.45833 11.6667 10.3439 11.3022 11.0733 10.5733C11.8028 9.84444 12.1672 8.95889 12.1667 7.91667C12.1661 6.87444 11.8017 5.98917 11.0733 5.26083C10.345 4.5325 9.45944 4.16778 8.41667 4.16667C7.37389 4.16556 6.48861 4.53028 5.76083 5.26083C5.03306 5.99139 4.66833 6.87667 4.66667 7.91667C4.665 8.95667 5.02972 9.84222 5.76083 10.5733C6.49195 11.3044 7.37722 11.6689 8.41667 11.6667Z" fill="#767778"/>
</svg>
)
};

export const duplicateIcon = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="19" viewBox="0 0 16 19" fill="none">
<path d="M13.8333 0.666504C14.2754 0.666504 14.6993 0.842099 15.0118 1.15466C15.3244 1.46722 15.5 1.89114 15.5 2.33317V12.3332C15.5 12.7752 15.3244 13.1991 15.0118 13.5117C14.6993 13.8242 14.2754 13.9998 13.8333 13.9998H12.1667V15.6665C12.1667 16.1085 11.9911 16.5325 11.6785 16.845C11.3659 17.1576 10.942 17.3332 10.5 17.3332H2.16667C1.72464 17.3332 1.30072 17.1576 0.988155 16.845C0.675595 16.5325 0.5 16.1085 0.5 15.6665V5.6665C0.5 5.22448 0.675595 4.80055 0.988155 4.48799C1.30072 4.17543 1.72464 3.99984 2.16667 3.99984H3.83333V2.33317C3.83333 1.89114 4.00893 1.46722 4.32149 1.15466C4.63405 0.842099 5.05797 0.666504 5.5 0.666504H13.8333ZM6.33333 11.4998H4.66667C4.45427 11.5001 4.24997 11.5814 4.09553 11.7272C3.94108 11.873 3.84814 12.0723 3.83569 12.2843C3.82324 12.4964 3.89223 12.7052 4.02855 12.868C4.16488 13.0309 4.35825 13.1356 4.56917 13.1607L4.66667 13.1665H6.33333C6.54573 13.1663 6.75003 13.0849 6.90447 12.9391C7.05892 12.7933 7.15186 12.594 7.16431 12.382C7.17676 12.17 7.10777 11.9612 6.97145 11.7983C6.83512 11.6354 6.64175 11.5308 6.43083 11.5057L6.33333 11.4998ZM13.8333 2.33317H5.5V3.99984H10.5C10.942 3.99984 11.3659 4.17543 11.6785 4.48799C11.9911 4.80055 12.1667 5.22448 12.1667 5.6665V12.3332H13.8333V2.33317ZM8 8.1665H4.66667C4.44565 8.1665 4.23369 8.2543 4.07741 8.41058C3.92113 8.56686 3.83333 8.77882 3.83333 8.99984C3.83333 9.22085 3.92113 9.43281 4.07741 9.58909C4.23369 9.74537 4.44565 9.83317 4.66667 9.83317H8C8.22101 9.83317 8.43297 9.74537 8.58926 9.58909C8.74554 9.43281 8.83333 9.22085 8.83333 8.99984C8.83333 8.77882 8.74554 8.56686 8.58926 8.41058C8.43297 8.2543 8.22101 8.1665 8 8.1665Z" fill="#767778"/>
</svg>
)
};

export const reactivateIcon = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.3333 17.0148C16.2944 14.5259 14.4838 13.1137 12.9016 12.7782C11.3194 12.4426 9.81301 12.3919 8.38246 12.6261V17.0832L1.66663 9.81025L8.38246 2.9165V7.15275C11.0277 7.17359 13.2766 8.12262 15.1291 9.99984C16.9813 11.8771 18.0494 14.2154 18.3333 17.0148Z" fill="#767778" stroke="#767778" stroke-width="2" stroke-linejoin="round"/>
</svg>
)
};

export const deleteIcon = (props) => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M12.7008 3.10083L12.945 4.79167H16.25C16.4158 4.79167 16.5747 4.85751 16.6919 4.97472C16.8092 5.09193 16.875 5.25091 16.875 5.41667C16.875 5.58243 16.8092 5.7414 16.6919 5.85861C16.5747 5.97582 16.4158 6.04167 16.25 6.04167H15.6092L14.8817 14.5292C14.8375 15.0458 14.8017 15.4708 14.7442 15.8142C14.6858 16.1717 14.5967 16.4917 14.4225 16.7883C14.149 17.2543 13.7424 17.6278 13.255 17.8608C12.945 18.0083 12.6183 18.0692 12.2567 18.0975C11.9092 18.125 11.4833 18.125 10.965 18.125H9.035C8.51667 18.125 8.09083 18.125 7.74333 18.0975C7.38167 18.0692 7.055 18.0083 6.745 17.8608C6.25757 17.6278 5.85098 17.2543 5.5775 16.7883C5.4025 16.4917 5.315 16.1717 5.25583 15.8142C5.19833 15.47 5.1625 15.0458 5.11833 14.5292L4.39083 6.04167H3.75C3.58424 6.04167 3.42527 5.97582 3.30806 5.85861C3.19085 5.7414 3.125 5.58243 3.125 5.41667C3.125 5.25091 3.19085 5.09193 3.30806 4.97472C3.42527 4.85751 3.58424 4.79167 3.75 4.79167H7.055L7.29917 3.10083L7.30833 3.05C7.46 2.39167 8.025 1.875 8.73333 1.875H11.2667C11.975 1.875 12.54 2.39167 12.6917 3.05L12.7008 3.10083ZM8.3175 4.79167H11.6817L11.4683 3.31167C11.4283 3.1725 11.3267 3.125 11.2658 3.125H8.73417C8.67333 3.125 8.57167 3.1725 8.53167 3.31167L8.3175 4.79167ZM9.375 8.75C9.375 8.58424 9.30915 8.42527 9.19194 8.30806C9.07473 8.19085 8.91576 8.125 8.75 8.125C8.58424 8.125 8.42527 8.19085 8.30806 8.30806C8.19085 8.42527 8.125 8.58424 8.125 8.75V12.9167C8.125 13.0824 8.19085 13.2414 8.30806 13.3586C8.42527 13.4758 8.58424 13.5417 8.75 13.5417C8.91576 13.5417 9.07473 13.4758 9.19194 13.3586C9.30915 13.2414 9.375 13.0824 9.375 12.9167V8.75ZM11.875 8.75C11.875 8.58424 11.8092 8.42527 11.6919 8.30806C11.5747 8.19085 11.4158 8.125 11.25 8.125C11.0842 8.125 10.9253 8.19085 10.8081 8.30806C10.6908 8.42527 10.625 8.58424 10.625 8.75V12.9167C10.625 13.0824 10.6908 13.2414 10.8081 13.3586C10.9253 13.4758 11.0842 13.5417 11.25 13.5417C11.4158 13.5417 11.5747 13.4758 11.6919 13.3586C11.8092 13.2414 11.875 13.0824 11.875 12.9167V8.75Z" fill="#90080F"/>
</svg>
)
};




Loading

0 comments on commit 3d5a77f

Please sign in to comment.