From e1f28d7a8f9c6bbcaddb71f3e072bec1b2040d79 Mon Sep 17 00:00:00 2001 From: Marley Date: Thu, 13 Jul 2023 17:24:24 -0700 Subject: [PATCH] Extract patron mock data to seperate file --- frontend/.idea/codeStyles/Project.xml | 19 +++++++++++++++++++ frontend/.idea/codeStyles/codeStyleConfig.xml | 2 +- frontend/data/patrons.ts | 13 +++++++++++++ frontend/nuxt.config.ts | 8 ++++++-- frontend/pages/patrons/index.vue | 12 +----------- frontend/webStorm.config.js | 5 +++++ 6 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 frontend/.idea/codeStyles/Project.xml create mode 100644 frontend/data/patrons.ts create mode 100644 frontend/webStorm.config.js diff --git a/frontend/.idea/codeStyles/Project.xml b/frontend/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..29abe77 --- /dev/null +++ b/frontend/.idea/codeStyles/Project.xml @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/frontend/.idea/codeStyles/codeStyleConfig.xml b/frontend/.idea/codeStyles/codeStyleConfig.xml index a55e7a1..79ee123 100644 --- a/frontend/.idea/codeStyles/codeStyleConfig.xml +++ b/frontend/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/frontend/data/patrons.ts b/frontend/data/patrons.ts new file mode 100644 index 0000000..504dc3f --- /dev/null +++ b/frontend/data/patrons.ts @@ -0,0 +1,13 @@ +const patrons = [ + {id: 1, name: 'Bob Harrison', email: 'bob.harrison@gmail.com', status: 'Active', checkedOut: 5, overdue: 0, fines: 0}, + {id: 2, name: 'Rachel Levington', email: 'rachel97@hotmail.com', status: 'Active', checkedOut: 8, overdue: 0, fines: 0}, + {id: 3, name: 'Jackson Smith', email: 'j.smith@gmail.com', status: 'Overdue', checkedOut: 3, overdue: 3, fines: 9}, + {id: 4, name: 'Thomas Fletcher', email: 'fletchieT@gmail.com', status: 'Active', checkedOut: 7, overdue: 0, fines: 0}, + {id: 5, name: 'Steve Terry', email: 'sterry@outlook.com', status: 'Overdue', checkedOut: 1, overdue: 1, fines: 5}, + {id: 6, name: 'Carrie Pine', email: 'carrie1994@hotmail.com', status: 'Active', checkedOut: 8, overdue: 0, fines: 0}, + {id: 7, name: 'Delilah Lowry', email: 'heytheredelilah@yahoo.com', status: 'Active', checkedOut: 8, overdue: 0, fines: 0}, + {id: 8, name: 'George Jefferson', email: 'mrpresidential@protonmail.com', status: 'Active', checkedOut: 3, overdue: 0, fines: 0}, + {id: 9, name: 'Sharon Mattison', email: 'sharon.mattison@gmail.com', status: 'Overdue', checkedOut: 4, overdue: 4, fines: 7}, +] + +export default patrons diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index 1a420db..e1ffec0 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -1,15 +1,19 @@ -// https://nuxt.com/docs/api/configuration/nuxt-config +import {fileURLToPath, URL} from 'node:url' +// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ modules: ['@nuxtjs/tailwindcss', '@nuxtjs/google-fonts', 'nuxt-typed-router'], devServer: { host: 'bibliothecary.test', }, telemetry: false, + alias: { + '@data': fileURLToPath(new URL('./data', import.meta.url)) + }, googleFonts: { preconnect: true, families: { Imprima: true, } } -}); +}) diff --git a/frontend/pages/patrons/index.vue b/frontend/pages/patrons/index.vue index 5884ac2..db57448 100644 --- a/frontend/pages/patrons/index.vue +++ b/frontend/pages/patrons/index.vue @@ -1,15 +1,5 @@ diff --git a/frontend/webStorm.config.js b/frontend/webStorm.config.js new file mode 100644 index 0000000..f3f8471 --- /dev/null +++ b/frontend/webStorm.config.js @@ -0,0 +1,5 @@ +System.config({ + "paths": { + "@data/*": "./data/*" + } +})