Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(staff): sidebar updated with register a new doctor #87

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 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 } 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', 'doctor'],
},
{
title: 'Patient creation',
url: '/app/patients/register-patient',
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
Loading