diff --git a/src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx b/src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx index 830bacf8cc..96d58ca614 100644 --- a/src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx +++ b/src/screens/EventVolunteers/Volunteers/VolunteerViewModal.tsx @@ -52,22 +52,22 @@ const VolunteerViewModal: React.FC = ({ const { user, hasAccepted, hoursVolunteered, groups } = volunteer; return ( - + -

{t('volunteerDetails')}

+

{t('volunteerDetails')}

-
+ {/* Volunteer Name & Avatar */} - + = ({ src={user.image} alt="Volunteer" data-testid="volunteer_image" - className={styles.TableImages} + className={styles.tableImage} /> ) : (
= ({ {/* Status and hours volunteered */} - + = ({ startAdornment: ( <> {hasAccepted ? ( - + ) : ( - + )} ), - style: { - color: hasAccepted ? 'green' : '#ed6c02', - }, - }} - inputProps={{ - style: { - WebkitTextFillColor: hasAccepted ? 'green' : '#ed6c02', - }, + className: hasAccepted + ? styles.acceptedStatus + : styles.pendingStatus, }} disabled /> @@ -134,7 +132,7 @@ const VolunteerViewModal: React.FC = ({ @@ -142,13 +140,7 @@ const VolunteerViewModal: React.FC = ({ {/* Table for Associated Volunteer Groups */} {groups && groups.length > 0 && ( - + Volunteer Groups Joined @@ -160,9 +152,13 @@ const VolunteerViewModal: React.FC = ({ - Sr. No. - Group Name - + + Sr. No. + + + Group Name + + No. of Members @@ -171,12 +167,7 @@ const VolunteerViewModal: React.FC = ({ {groups.map((group, index) => { const { _id, name, volunteers } = group; return ( - + {index + 1} @@ -199,4 +190,5 @@ const VolunteerViewModal: React.FC = ({ ); }; + export default VolunteerViewModal; diff --git a/src/style/app.module.css b/src/style/app.module.css index 65e80a2ddd..25e5c4b678 100644 --- a/src/style/app.module.css +++ b/src/style/app.module.css @@ -83,6 +83,7 @@ --search-button-bg: #a8c7fa; --search-button-border: var(--brown-color); --bs-primary: #0056b3; + --bs-warning: #ffc107; --bs-white: #fff; --bs-gray-600: #4b5563; --bs-gray-400: #9ca3af; @@ -4117,3 +4118,73 @@ button[data-testid='createPostBtn'] { overflow-y: scroll; overflow-x: hidden; } + +/* VolunteerViewModal.tsx */ + +.modalTitle { + margin: 0; +} + +.modalForm { + padding: 1rem; +} + +.formGroup { + margin-bottom: 1rem; +} + +.tableImage { + width: 40px; + height: 40px; + border-radius: 50%; + margin-right: 8px; +} + +.statusGroup { + display: flex; + gap: 1rem; + margin: 0 auto; + margin-bottom: 0.5rem; + role: 'status'; +} + +.statusIcon { + margin-right: 0.5rem; +} + +.acceptedStatus { + color: var(--bs-primary); + -webkit-text-fill-color: var(--bs-primary); + outline: 1px solid currentColor; + border-radius: 4px; + padding: 2px 4px; +} + +.pendingStatus { + color: var(--bs-warning); + -webkit-text-fill-color: var(--bs-warning); + outline: 1px solid currentColor; + border-radius: 4px; + padding: 2px 4px; +} + +.hoursField { + width: 100%; +} + +.groupsLabel { + font-weight: lighter; + margin-left: 0.5rem; + margin-bottom: 0; + font-size: 0.8rem; + color: var(--bs-secondary); +} + +.tableHeader { + font-weight: bold; +} + +.tableRow:last-child td, +.tableRow:last-child th { + border: 0; +}