diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index 986bf1a..9c16f94 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -25,6 +25,11 @@
:to="{ name: 'team', params: { seasonNumber: seasonNumber(), teamAbbreviation: 'FA' } }">Free Agents
+
+
+ Managers
+
+
Rules Ref
diff --git a/src/router/index.ts b/src/router/index.ts
index c6d94dc..2678e7f 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -47,6 +47,12 @@ export const routes: RouteRecordRaw[] = [
component: () => import('../views/ScheduleView.vue'),
props: castScheduleRouteParams
},
+ {
+ path: '/managers/:managerName?',
+ name: 'managers',
+ component: () => import('../views/ManagerView.vue'),
+ props: castManagersRouteParams
+ },
]
function castTeamsRouteParams(route: { params: { teamAbbreviation: string, seasonNumber: string } }) {
@@ -70,6 +76,12 @@ function castScheduleRouteParams(route: { params: { seasonNumber: string, weekNu
}
}
+function castManagersRouteParams(route: { params: { managerName: string } }) {
+ return {
+ managerName: route.params.managerName
+ }
+}
+
const router = createRouter({
history: createWebHistory(), //import.meta.env.BASE_URL),
routes,
diff --git a/src/services/managerService.ts b/src/services/managerService.ts
new file mode 100644
index 0000000..36600e5
--- /dev/null
+++ b/src/services/managerService.ts
@@ -0,0 +1,21 @@
+import type { Manager } from './apiResponseTypes'
+import { SITE_URL } from './utilities'
+
+export async function fetchActiveManagers(): Promise {
+ return await fetchManagers(true)
+}
+
+export async function fetchRetiredManagers(): Promise {
+ return await fetchManagers(false)
+}
+
+async function fetchManagers(active: boolean): Promise {
+ const response = await fetch(`${SITE_URL}/api/v3/managers?active=${active}&short_output=true`)
+
+ const managersResponse: {
+ count: number
+ managers: Manager[]
+ } = await response.json()
+
+ return managersResponse.managers
+}
diff --git a/src/views/ManagerView.vue b/src/views/ManagerView.vue
index 0a7456a..4d0d690 100644
--- a/src/views/ManagerView.vue
+++ b/src/views/ManagerView.vue
@@ -1,12 +1,39 @@
-
-
-
{{ managerName }}
+
+
+
Active
+
+
+
+
+ {{ manager.name }}
+
+
-
🚧 Coming Soon 🚧
+
+
Retired
+
+
+
+
+ {{ manager.name }}
+
+
+
+
+
+
+
+
{{ managerName }}
+
+
+
🚧 Coming Soon 🚧
+
-
\ No newline at end of file