Skip to content

Commit

Permalink
fix visuals / styles
Browse files Browse the repository at this point in the history
  • Loading branch information
larinam committed Aug 24, 2024
1 parent 70b15c1 commit fb09f3a
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 14 deletions.
21 changes: 13 additions & 8 deletions frontend/src/components/CalendarComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {
faChevronDown,
faChevronRight,
faEdit,
faEye,
faGripVertical,
faInfoCircle,
faPencilAlt,
faSave
faSave,
faTrashAlt
} from '@fortawesome/free-solid-svg-icons';
import './CalendarComponent.css';
import MonthSelector from './MonthSelector';
Expand Down Expand Up @@ -558,14 +559,16 @@ const CalendarComponent = ({serverTeamData, holidays, dayTypes, updateTeamData})
<FontAwesomeIcon icon={faEye}/>
</span>
{team.name}
{team.team_members.length === 0 && (
<span className="delete-icon" onClick={() => deleteTeam(team._id)}>🗑️</span>
)}
<span className="add-icon" onClick={() => handleAddMemberIconClick(team._id)}
title="Add team member"></span>
<span className="edit-icon" onClick={() => handleEditTeamClick(team._id)}>
<FontAwesomeIcon icon={faPencilAlt}/>
<FontAwesomeIcon icon={faEdit}/>
</span>
{team.team_members.length === 0 && (
<span className="delete-icon" onClick={() => deleteTeam(team._id)}>
<FontAwesomeIcon icon={faTrashAlt}/>
</span>
)}
</td>
{daysHeader.map(({date}, idx) => {
return (<td
Expand Down Expand Up @@ -596,9 +599,11 @@ const CalendarComponent = ({serverTeamData, holidays, dayTypes, updateTeamData})
<FontAwesomeIcon icon={faGripVertical}/>
</span>
<span className="edit-icon" onClick={() => handleEditMemberClick(team._id, member.uid)}>
<FontAwesomeIcon icon={faPencilAlt}/>
<FontAwesomeIcon icon={faEdit}/>
</span>
<span className="delete-icon" onClick={() => deleteTeamMember(team._id, member.uid)}>
<FontAwesomeIcon icon={faTrashAlt}/>
</span>
<span className="delete-icon" onClick={() => deleteTeamMember(team._id, member.uid)}>🗑️</span>
</td>
{daysHeader.map(({date}, idx) => {
const dateStr = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`;
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/settings/DayTypes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ const DayTypes = () => {
{dayType.color}
</td>
<td>
<FontAwesomeIcon icon={faEdit} onClick={() => editDayType(dayType)}/>
<FontAwesomeIcon icon={faTrashAlt} onClick={() => deleteDayType(dayType._id)}/>
<FontAwesomeIcon icon={faEdit} onClick={() => editDayType(dayType)}
className="firstActionIcon"
/>
<FontAwesomeIcon icon={faTrashAlt}
onClick={() => deleteDayType(dayType._id)}
className="actionIcon"
/>
</td>
</tr>
))}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/settings/InviteManagement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const InviteManagement = ({ refreshTrigger }) => {
<FontAwesomeIcon
icon={faTrashAlt}
onClick={() => handleWithdrawInvite(invite._id, invite.email)}
className="firstActionIcon"
/>
</td>
</tr>
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/settings/SettingsComponent.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
margin: 10px 0 10px 0;
}

.firstActionIcon {
cursor: pointer;
}

.actionIcon {
margin-left: 10px;
cursor: pointer;
}

/*Table styles*/
.settingsTable {
width: 100%;
Expand Down
17 changes: 13 additions & 4 deletions frontend/src/components/settings/UserManagement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const UserManagement = () => {
const handleModalClose = () => {
setShowUserModal(false);
setShowInviteModal(false);
fetchUsers();
setRefreshInvites(!refreshInvites); // Trigger refresh of invites
};

Expand Down Expand Up @@ -87,13 +88,21 @@ const UserManagement = () => {
<td>{u.name}</td>
<td>{u.email}</td>
<td>{u.username}</td>
<td>{u.telegram_username || 'N/A'}</td>
<td>{u.telegram_username}</td>
<td>{u.disabled ? 'Disabled' : 'Active'}</td>
<td>
<FontAwesomeIcon icon={faEdit} onClick={() => handleEditUserClick(u)}/>
<FontAwesomeIcon icon={faTrashAlt} onClick={() => handleDeleteUser(u._id, u.name)}/>
<FontAwesomeIcon icon={faEdit}
onClick={() => handleEditUserClick(u)}
className="firstActionIcon"
/>
<FontAwesomeIcon icon={faTrashAlt}
onClick={() => handleDeleteUser(u._id, u.name)}
className="actionIcon"/>
{u._id === user._id && (
<FontAwesomeIcon icon={faKey} onClick={() => handlePasswordChangeClick(u)}/>
<FontAwesomeIcon icon={faKey}
onClick={() => handlePasswordChangeClick(u)}
className="actionIcon"
/>
)}
</td>
</tr>
Expand Down

0 comments on commit fb09f3a

Please sign in to comment.