Skip to content

Commit

Permalink
Merge pull request #87 from FIS2425/feat/86-add-register-staff-form-t…
Browse files Browse the repository at this point in the history
…o-sidebar

Feat(staff): sidebar updated with register a new doctor
  • Loading branch information
AntonioRodriguezRuiz authored Jan 7, 2025
2 parents 1613a53 + 23cea70 commit 19197c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/components/layouts/sidebar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Calendar, Home, Search, ChevronRight, ChevronsUpDown, LogOut, CalendarCheck, UserPen } from 'lucide-react';
import { Calendar, Home, Search, ChevronRight, ChevronsUpDown, LogOut, CalendarCheck, UserPen, ClipboardPlus, Stethoscope, Hospital } from 'lucide-react';
import { Link } from 'react-router';
import { MoreHorizontal } from 'lucide-react';
import {
Expand Down Expand Up @@ -46,9 +46,15 @@ const data = [
{
title: 'My staff profile',
url: '/app/staff/me',
icon: UserPen,
icon: Stethoscope,
roles: ['doctor'],
},
{
title: 'Register a new doctor',
url: '/app/register-staff',
icon: ClipboardPlus,
roles: ['clinicadmin'],
},
{
title: 'Patient creation',
url: '/app/patients/register-patient',
Expand All @@ -70,7 +76,7 @@ const data = [
{
title: 'Clinic actions',
url: '#',
icon: UserPen,
icon: Hospital,
roles: ['admin','clinicadmin'],
items: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/app/RegisterStaff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function RegisterStaffCard() {
if (err.response && err.response.status === 400) {
setError('A doctor with the same DNI or Email already exists');
} else if (err.response && err.response.status === 403) {
setError(err.reponse.data.message);
setError(err.response.data.message);
} else {
setError('An error occurred. Please try again later.');
console.error(err);
Expand Down

0 comments on commit 19197c3

Please sign in to comment.