This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
import VueRouter from 'vue-router'; | |
Vue.use(VueRouter); | |
const routes = [ | |
{ | |
path: '/dashboard', | |
name: 'Dashboard', | |
component: () => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the apollo client | |
export const apolloClient = new ApolloClient({ | |
link: authLink.concat(httpLink), | |
cache, | |
typeDefs, | |
resolvers: {} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
export const GET_RESULTS = gql` | |
query GetResults($term: String, $category: String) { | |
search ( | |
term: $term, | |
categories: $category, | |
limit: 50 | |
latitude: 52.237022, | |
longitude: 21.050440, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const apolloProvider = new VueApollo({ | |
defaultClient: apolloClient, | |
defaultOptions: { | |
// apollo options applied to all queries in components | |
$query: { | |
loadingKey: 'loading', | |
fetchPolicy: 'cache-and-network' | |
} | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<ApolloQuery | |
:query="GET_RESULTS" | |
:notifyOnNetworkStatusChange="true" | |
> | |
<template v-slot="{ result: { data, loading }, query }"> | |
<AppNav @search="handleSearch($event, query)" /> | |
<div class="content"> | |
<div class="container"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gql from 'graphql-tag'; | |
export const GET_ZOOM = gql` | |
{ | |
zoom @client | |
} | |
` | |
export const GET_CENTER = gql` | |
{ | |
center @client { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// part of dashboard.interfaces.ts | |
export interface Notification { | |
id: number, | |
type: string, | |
message: string, | |
date: string | |
} | |
export interface NotificationsReturnData { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="dashboard"> | |
<Suspense> | |
<div class="dashboard__content"> | |
<AppHeader | |
class="dashboard__header" | |
@submit-appointment="appointments.handleSubmitAppointment" | |
></AppHeader> | |
<Teleport to="#news-modal"> | |
<div |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="dashboard"> | |
<AppHeader | |
:user="user" | |
class="app__header" | |
@submit-appointment="handleSubmitAppointment" | |
></AppHeader> | |
<div | |
v-if="newsModalOpen" | |
class="modal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<header class="app-header"> | |
<Teleport | |
to="#appointment-modal" | |
:disabled="state.preview" | |
> | |
<div | |
v-if="state.modalOpen && !state.preview" | |
class="modal" | |
> |