diff --git a/.gitignore b/.gitignore index 2fa2ca95..00cc3549 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,7 @@ local_settings.py tmp/* node_modules/ +# Vite/Vue +.vite/ + **/tmp diff --git a/apps/ui/index.html b/apps/ui/index.html index a7d96c41..ef8072b5 100644 --- a/apps/ui/index.html +++ b/apps/ui/index.html @@ -5,6 +5,7 @@ AFB - Animal Food Bank +
diff --git a/apps/ui/package.json b/apps/ui/package.json index 17d1c020..bf53f122 100644 --- a/apps/ui/package.json +++ b/apps/ui/package.json @@ -1,6 +1,8 @@ { "name": "afb-ui", "version": "0.1.0", + "private": true, + "license": "UNLICENSED", "scripts": { "build": "vue-tsc --noEmit && vite build", "dev": "vite", @@ -13,6 +15,7 @@ "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.6", "@types/vue-router": "^2.0.0", + "@vueform/vueform": "^1.5.4", "vue": "^3.3.7", "vue-router": "^4.2.5", "vue-service": "^1.0.3" @@ -29,7 +32,7 @@ "tailwindcss": "^3.3.5", "typescript": "^4.4.4", "vitawind": "^2.0.0", - "vite": "^2.7.2", - "vue-tsc": "^0.29.8" + "vite": "^4.5.0", + "vue-tsc": "1.2.0" } } diff --git a/apps/ui/src/App.vue b/apps/ui/src/App.vue index fc8a4fc7..1e2419c6 100644 --- a/apps/ui/src/App.vue +++ b/apps/ui/src/App.vue @@ -37,13 +37,15 @@ Animal Food Bank logo
@@ -172,7 +174,7 @@ const user = { const navigation = [ { name: 'Dashboard', href: '/dashboard', current: true }, { name: 'About', href: '/about', current: false }, - { name: 'Requests', href: '/request', current: false }, + { name: 'Requests', href: '/requests', current: false }, ] const userNavigation = [ diff --git a/apps/ui/src/components/NewRequestForm.vue b/apps/ui/src/components/NewRequestForm.vue new file mode 100644 index 00000000..09d5d5c6 --- /dev/null +++ b/apps/ui/src/components/NewRequestForm.vue @@ -0,0 +1,12 @@ + + + diff --git a/apps/ui/src/env.d.ts b/apps/ui/src/env.d.ts index d27eb5a3..8ee27aee 100644 --- a/apps/ui/src/env.d.ts +++ b/apps/ui/src/env.d.ts @@ -6,3 +6,6 @@ declare module '*.vue' { const component: DefineComponent<{}, {}, any> export default component } +interface Window { + google: any; +} diff --git a/apps/ui/src/main.ts b/apps/ui/src/main.ts index 1982d84b..8053c86b 100644 --- a/apps/ui/src/main.ts +++ b/apps/ui/src/main.ts @@ -6,4 +6,15 @@ import App from './App.vue' import './index.css' import router from './router' -createApp(App).use(router).mount('#app') +// import Vueform from '@vueform/vueform' +// import vueformConfig from './../vueform.config' +import { Plugin } from 'vue' + + +const app = createApp(App) +app.use(router) + +// Attach Vueform and its config +// app.use(Vueform as any, vueformConfig) + +app.mount('#app') diff --git a/apps/ui/src/router/index.ts b/apps/ui/src/router/index.ts index 544c9c45..d225841a 100644 --- a/apps/ui/src/router/index.ts +++ b/apps/ui/src/router/index.ts @@ -15,15 +15,19 @@ type Route = { path: string; name: string; component: any; + alias?: string; } +const defaultRoute: Route = { + path: '/', + component: DashboardView, + name: 'DashboardView', + alias: '/dashboard', +}; + const routes: Route[] = [ - { - path: '/dashboard', - component: DashboardView, - name: 'DashboardView', - }, + defaultRoute, { path: '/requests', component: MakeRequestView, diff --git a/apps/ui/src/types.d.ts b/apps/ui/src/types.d.ts new file mode 100644 index 00000000..f464b0e4 --- /dev/null +++ b/apps/ui/src/types.d.ts @@ -0,0 +1,3 @@ + +declare module '@vueform/vueform/themes/tailwind'; +declare module '@vueform/vueform/locales/en'; diff --git a/apps/ui/src/views/MakeRequestView.vue b/apps/ui/src/views/MakeRequestView.vue index e826f170..1ce0485b 100644 --- a/apps/ui/src/views/MakeRequestView.vue +++ b/apps/ui/src/views/MakeRequestView.vue @@ -1,16 +1,280 @@ + +