|
| 1 | +/* eslint-disable jsx-a11y/no-redundant-roles */ |
| 2 | + |
| 3 | +import React, { useContext, useEffect, useState } from 'react'; |
| 4 | +import { useTranslation } from 'react-i18next'; |
| 5 | +// eslint-disable-next-line import/no-useless-path-segments |
| 6 | +import { Link } from 'react-router-dom'; |
| 7 | +import { UserContext } from '../hook/useAuth'; |
| 8 | +import AdminTraineeDashboard from './AdminTraineeDashboard'; |
| 9 | +import CoordinatorTraineeDashboard from './coordinatorTraineDashboard'; |
| 10 | + |
| 11 | +function CoordinatorDashboard() { |
| 12 | + const { user } = useContext(UserContext); |
| 13 | + const { t }: any = useTranslation(); |
| 14 | + const organizationToken = localStorage.getItem('orgToken'); |
| 15 | + return ( |
| 16 | + <> |
| 17 | + <div className="flex flex-col grow bg-light-bg dark:bg-dark-frame-bg"> |
| 18 | + <div className="flex flex-row"> |
| 19 | + <div className="flex flex-col w-[80%] mdl:w-[100%] mdl:justify-between gap-5 xmd:flex-row xmd:flex-wrap bg-light-bg dark:bg-dark-frame-bg py-4 font-serif"> |
| 20 | + <div className="w-[20rem] p-4 bg-indigo-100 border border-gray-200 rounded-lg shadow sm:p-8 dark:bg-gray-800 dark:border-gray-700"> |
| 21 | + <div className="flex items-center justify-between mb-4 h-8"> |
| 22 | + <h5 className="text-xl font-bold leading-none text-gray-900 dark:text-white"> |
| 23 | + Top perfoming cohorts |
| 24 | + </h5> |
| 25 | + </div> |
| 26 | + <div className="flow-root"> |
| 27 | + <ul |
| 28 | + role="list" |
| 29 | + className="divide-y divide-gray-200 dark:divide-gray-700" |
| 30 | + > |
| 31 | + <li |
| 32 | + className={`py-3 sm:py-4 border-t border-t-black dark:border-t-gray-200 `} |
| 33 | + > |
| 34 | + <div className="flex items-center "> |
| 35 | + <div className="flex-shrink-0"> |
| 36 | + <div className="w-8 h-8 rounded-full bg-white text-black flex items-center justify-center"> |
| 37 | + B |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + <div className="flex-1 min-w-0 ms-4"> |
| 41 | + <p className="text-sm font-medium text-gray-900 truncate dark:text-white"> |
| 42 | + Bonnie Green |
| 43 | + </p> |
| 44 | + <p className="text-sm text-gray-500 truncate dark:text-gray-400"> |
| 45 | + |
| 46 | + </p> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </li> |
| 50 | + </ul> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + |
| 54 | + <div className="w-[20rem] p-4 bg-indigo-100 border border-gray-200 rounded-lg shadow sm:p-8 dark:bg-gray-800 dark:border-gray-700"> |
| 55 | + <div className="flex items-center justify-between mb-4 h-8"> |
| 56 | + <h5 className="text-xl font-bold leading-none text-gray-900 dark:text-white"> |
| 57 | + Top 3 Trainees |
| 58 | + </h5> |
| 59 | + </div> |
| 60 | + <div className="flow-root"> |
| 61 | + <ul |
| 62 | + role="list" |
| 63 | + className="divide-y divide-gray-200 dark:divide-gray-700" |
| 64 | + > |
| 65 | + <li |
| 66 | + className={`py-3 sm:py-4 border-t border-t-black dark:border-t-gray-200 `} |
| 67 | + > |
| 68 | + <div className="flex items-center "> |
| 69 | + <div className="flex-shrink-0"> |
| 70 | + <div className="w-8 h-8 rounded-full bg-white text-black flex items-center justify-center"> |
| 71 | + B |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + <div className="flex-1 min-w-0 ms-4"> |
| 75 | + <p className="text-sm font-medium text-gray-900 truncate dark:text-white"> |
| 76 | + Bonnie Green |
| 77 | + </p> |
| 78 | + <p className="text-sm text-gray-500 truncate dark:text-gray-400"> |
| 79 | + |
| 80 | + </p> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + </li> |
| 84 | + </ul> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + |
| 88 | + <div className="w-[20rem] p-4 bg-indigo-100 border border-gray-200 rounded-lg shadow sm:p-8 dark:bg-gray-800 dark:border-gray-700"> |
| 89 | + <div className="flex items-center justify-between mb-4 h-8"> |
| 90 | + <h5 className="text-xl font-bold leading-none text-gray-900 dark:text-white"> |
| 91 | + Last 3 Trainees |
| 92 | + </h5> |
| 93 | + </div> |
| 94 | + <div className="flow-root"> |
| 95 | + <ul |
| 96 | + role="list" |
| 97 | + className="divide-y divide-gray-200 dark:divide-gray-700" |
| 98 | + > |
| 99 | + <li |
| 100 | + className={`py-3 sm:py-4 border-t border-t-black dark:border-t-gray-200 `} |
| 101 | + > |
| 102 | + <div className="flex items-center "> |
| 103 | + <div className="flex-shrink-0"> |
| 104 | + <div className="w-8 h-8 rounded-full bg-white text-black flex items-center justify-center"> |
| 105 | + B |
| 106 | + </div> |
| 107 | + </div> |
| 108 | + <div className="flex-1 min-w-0 ms-4"> |
| 109 | + <p className="text-sm font-medium text-gray-900 truncate dark:text-white"> |
| 110 | + Bonnie Green |
| 111 | + </p> |
| 112 | + <p className="text-sm text-gray-500 truncate dark:text-gray-400"> |
| 113 | + |
| 114 | + </p> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + </li> |
| 118 | + </ul> |
| 119 | + </div> |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + <div className=" fex-row justify-ceter w-[100%] pb8"> |
| 124 | + <CoordinatorTraineeDashboard /> |
| 125 | + </div> |
| 126 | + </div> |
| 127 | + </> |
| 128 | + ); |
| 129 | +} |
| 130 | + |
| 131 | +export default CoordinatorDashboard; |
0 commit comments