├── .babelrc ├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── README.md ├── TasksPage.png ├── assets ├── README.md └── variables.scss ├── components ├── Logo.vue ├── README.md ├── VuetifyLogo.vue └── tasks │ └── TaskList.vue ├── jest.config.js ├── jsconfig.json ├── layouts ├── README.md ├── default.vue └── error.vue ├── middleware └── README.md ├── nuxt.config.js ├── package-lock.json ├── package.json ├── pages ├── Lists │ └── index.vue ├── README.md ├── Tasks │ ├── _id │ │ └── index.vue │ └── index.vue ├── index.vue └── inspire.vue ├── plugins └── README.md ├── static ├── README.md ├── favicon.ico ├── icon.png ├── v.png └── vuetify-logo.svg ├── store ├── README.md ├── index.js ├── lists.js ├── projects.js └── tasks.js └── test └── Logo.spec.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "test": { 4 | "presets": [ 5 | [ 6 | "@babel/preset-env", 7 | { 8 | "targets": { 9 | "node": "current" 10 | } 11 | } 12 | ] 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | browser: true, 5 | node: true 6 | }, 7 | parserOptions: { 8 | parser: 'babel-eslint' 9 | }, 10 | extends: [ 11 | '@nuxtjs', 12 | // 'prettier', 13 | // 'prettier/vue', 14 | // 'plugin:prettier/recommended', 15 | // 'plugin:nuxt/recommended' 16 | ], 17 | plugins: [ 18 | // 'prettier' 19 | ], 20 | // add your custom rules here 21 | rules: { 22 | 'comma-dangle': 'warn' 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | /logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | 62 | # parcel-bundler cache (https://parceljs.org/) 63 | .cache 64 | 65 | # next.js build output 66 | .next 67 | 68 | # nuxt.js build output 69 | .nuxt 70 | 71 | # Nuxt generate 72 | dist 73 | 74 | # vuepress build output 75 | .vuepress/dist 76 | 77 | # Serverless directories 78 | .serverless 79 | 80 | # IDE / Editor 81 | .idea 82 | 83 | # Service worker 84 | sw.* 85 | 86 | # macOS 87 | .DS_Store 88 | 89 | # Vim swap files 90 | *.swp 91 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "arrowParens": "always", 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reasonable Productivity Front-End 2 | 3 | Productivity application built with Vue.js. 4 | 5 | ## Overview 6 | 7 | This app manages tasks and lists. Future versions will also handle and syncing calendar and contacts to use with tasks. 8 | 9 | ### Technologies 10 | 11 | * Vue.js 12 | * Nuxt 13 | * Vuex 14 | * VueRouter 15 | * Vuetify 16 | * Axios 17 | 18 | ## Build Setup 19 | 20 | ```bash 21 | # install dependencies 22 | $ npm install 23 | 24 | # serve with hot reload at localhost:3000 25 | $ npm run dev 26 | 27 | # build for production and launch server 28 | $ npm run build 29 | $ npm run start 30 | 31 | # generate static project 32 | $ npm run generate 33 | ``` 34 | 35 | ## Routes 36 | 37 | ### Tasks 38 | 39 | **/tasks** 40 | 41 | **/tasks/:taskId** 42 | 43 | ### Lists 44 | 45 | **/lists** 46 | 47 | **/lists/:listId** 48 | 49 | ### Auth 50 | 51 | **/login** 52 | 53 | **/register** 54 | 55 | **/verify** 56 | 57 | **/forgot-password** 58 | 59 | **/reset-password** 60 | 61 | ### Other 62 | 63 | **/settings** 64 | 65 | ## Mockups 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /TasksPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reasonable-productivity/web-front-end/155a31cdea6cdb36d4afa444b1ffdaf1f2a0c002/TasksPage.png -------------------------------------------------------------------------------- /assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). 8 | -------------------------------------------------------------------------------- /assets/variables.scss: -------------------------------------------------------------------------------- 1 | // Ref: https://github.com/nuxt-community/vuetify-module#customvariables 2 | // 3 | // The variables you want to modify 4 | // $font-size-root: 20px; 5 | -------------------------------------------------------------------------------- /components/Logo.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 80 | -------------------------------------------------------------------------------- /components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | The components directory contains your Vue.js Components. 6 | 7 | _Nuxt.js doesn't supercharge these components._ 8 | -------------------------------------------------------------------------------- /components/VuetifyLogo.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | -------------------------------------------------------------------------------- /components/tasks/TaskList.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 19 | 25 | 26 | mdi-close-circle 27 | 28 | 29 | 33 | 34 | {{ task.title }} 35 | 36 | 37 | 38 | mdi-pencil 39 | 40 | 41 | mdi-delete-outline 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 82 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | moduleNameMapper: { 3 | '^@/(.*)$': '/$1', 4 | '^~/(.*)$': '/$1', 5 | '^vue$': 'vue/dist/vue.common.js' 6 | }, 7 | moduleFileExtensions: ['js', 'vue', 'json'], 8 | transform: { 9 | '^.+\\.js$': 'babel-jest', 10 | '.*\\.(vue)$': 'vue-jest' 11 | }, 12 | collectCoverage: true, 13 | collectCoverageFrom: [ 14 | '/components/**/*.vue', 15 | '/pages/**/*.vue' 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "~/*": ["./*"], 6 | "@/*": ["./*"], 7 | "~~/*": ["./*"], 8 | "@@/*": ["./*"] 9 | } 10 | }, 11 | "exclude": ["node_modules", ".nuxt", "dist"] 12 | } 13 | -------------------------------------------------------------------------------- /layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Application Layouts. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). 8 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Tasks 11 | 12 | 13 | Calendar 14 | 15 | 16 | Lists 17 | 18 | 19 | 20 | mdi-menu 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 41 | 42 | © {{ new Date().getFullYear() }} 43 | 44 | 45 | 46 | 47 | 74 | -------------------------------------------------------------------------------- /layouts/error.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ pageNotFound }} 5 | 6 | 7 | {{ otherError }} 8 | 9 | 10 | Home page 11 | 12 | 13 | 14 | 15 | 39 | 40 | 45 | -------------------------------------------------------------------------------- /middleware/README.md: -------------------------------------------------------------------------------- 1 | # MIDDLEWARE 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your application middleware. 6 | Middleware let you define custom functions that can be run before rendering either a page or a group of pages. 7 | 8 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware). 9 | -------------------------------------------------------------------------------- /nuxt.config.js: -------------------------------------------------------------------------------- 1 | import colors from 'vuetify/es5/util/colors' 2 | 3 | export default { 4 | mode: 'spa', 5 | /* 6 | ** Headers of the page 7 | */ 8 | head: { 9 | titleTemplate: '%s - ' + process.env.npm_package_name, 10 | title: process.env.npm_package_name || '', 11 | meta: [ 12 | { charset: 'utf-8' }, 13 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 14 | { 15 | hid: 'description', 16 | name: 'description', 17 | content: process.env.npm_package_description || '' 18 | } 19 | ], 20 | link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }] 21 | }, 22 | /* 23 | ** Customize the progress-bar color 24 | */ 25 | loading: { color: '#fff' }, 26 | /* 27 | ** Global CSS 28 | */ 29 | css: [], 30 | /* 31 | ** Plugins to load before mounting the App 32 | */ 33 | plugins: [], 34 | /* 35 | ** Nuxt.js dev-modules 36 | */ 37 | buildModules: [ 38 | // Doc: https://github.com/nuxt-community/eslint-module 39 | '@nuxtjs/eslint-module', 40 | '@nuxtjs/vuetify' 41 | ], 42 | /* 43 | ** Nuxt.js modules 44 | */ 45 | modules: [ 46 | // Doc: https://axios.nuxtjs.org/usage 47 | '@nuxtjs/axios', 48 | '@nuxtjs/pwa', 49 | // Doc: https://github.com/nuxt-community/dotenv-module 50 | '@nuxtjs/dotenv' 51 | ], 52 | /* 53 | ** Axios module configuration 54 | ** See https://axios.nuxtjs.org/options 55 | */ 56 | axios: {}, 57 | /* 58 | ** vuetify module configuration 59 | ** https://github.com/nuxt-community/vuetify-module 60 | */ 61 | vuetify: { 62 | customVariables: ['~/assets/variables.scss'], 63 | theme: { 64 | dark: false, 65 | themes: { 66 | dark: { 67 | primary: colors.blue.darken2, 68 | accent: colors.grey.darken3, 69 | secondary: colors.amber.darken3, 70 | info: colors.teal.lighten1, 71 | warning: colors.amber.base, 72 | error: colors.deepOrange.accent4, 73 | success: colors.green.accent3 74 | } 75 | } 76 | } 77 | }, 78 | /* 79 | ** Build configuration 80 | */ 81 | build: { 82 | /* 83 | ** You can extend webpack config here 84 | */ 85 | extend (config, ctx) {} 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "productivity-front-end", 3 | "version": "1.0.0", 4 | "description": "My great Nuxt.js project", 5 | "author": "gwenf", 6 | "private": true, 7 | "scripts": { 8 | "dev": "nuxt", 9 | "build": "nuxt build", 10 | "start": "nuxt start", 11 | "generate": "nuxt generate", 12 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 13 | "test": "jest" 14 | }, 15 | "dependencies": { 16 | "nuxt": "^2.0.0", 17 | "@nuxtjs/axios": "^5.3.6", 18 | "@nuxtjs/pwa": "^3.0.0-0", 19 | "@nuxtjs/dotenv": "^1.4.0" 20 | }, 21 | "devDependencies": { 22 | "@nuxtjs/eslint-config": "^2.0.0", 23 | "@nuxtjs/eslint-module": "^1.0.0", 24 | "@nuxtjs/vuetify": "1.11.2", 25 | "@vue/test-utils": "^1.0.0-beta.27", 26 | "babel-eslint": "^10.0.1", 27 | "babel-jest": "^24.1.0", 28 | "eslint": "^6.1.0", 29 | "eslint-config-prettier": "^6.10.0", 30 | "eslint-plugin-nuxt": ">=0.4.2", 31 | "eslint-plugin-prettier": "^3.1.2", 32 | "jest": "^24.1.0", 33 | "prettier": "^1.19.1", 34 | "vue-jest": "^4.0.0-0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /pages/Lists/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Add List Item 9 | 10 | 11 | 12 | 13 | 14 | 15 | mdi-pencil 16 | 17 | 18 | mdi-delete-outline 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 36 | 37 | 38 | Edit Item 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | Cancel 54 | 55 | 56 | 61 | Save 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 121 | -------------------------------------------------------------------------------- /pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the `*.vue` files inside this directory and creates the router of your application. 5 | 6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). 7 | -------------------------------------------------------------------------------- /pages/Tasks/_id/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ $route.params.id }} 4 | 5 | 6 | -------------------------------------------------------------------------------- /pages/Tasks/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All 7 | Next 8 | Inbox 9 | Maybe 10 | Projects 11 | 12 | 13 | 18 | 19 | 24 | 25 | 26 | 27 | 33 | 38 | 46 | 47 | 48 | 52 | Save 53 | 54 | 58 | Cancel 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | Actions 70 | 71 | 72 | 73 | 80 | 81 | 82 | 83 | 84 | 85 | Inbox 86 | 87 | 88 | 89 | 96 | 97 | 98 | 99 | 100 | 101 | Maybe 102 | 103 | 104 | 105 | 112 | 113 | 114 | 115 | 116 | 117 | 121 | 129 | 130 | 131 | 132 | 133 | 137 | 138 | {{ project.title }} 139 | 140 | 141 | {{ project.description }} 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | mdi-plus 150 | 151 | 152 | 153 | 154 | 155 | 156 | 265 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Reasonable Productivity 6 | 7 | 8 | 9 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /pages/inspire.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | “First, solve the problem. Then, write the code.” 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains Javascript plugins that you want to run before mounting the root Vue.js application. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins). 8 | -------------------------------------------------------------------------------- /static/README.md: -------------------------------------------------------------------------------- 1 | # STATIC 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your static files. 6 | Each file inside this directory is mapped to `/`. 7 | Thus you'd want to delete this README.md before deploying to production. 8 | 9 | Example: `/static/robots.txt` is mapped as `/robots.txt`. 10 | 11 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static). 12 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reasonable-productivity/web-front-end/155a31cdea6cdb36d4afa444b1ffdaf1f2a0c002/static/favicon.ico -------------------------------------------------------------------------------- /static/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reasonable-productivity/web-front-end/155a31cdea6cdb36d4afa444b1ffdaf1f2a0c002/static/icon.png -------------------------------------------------------------------------------- /static/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reasonable-productivity/web-front-end/155a31cdea6cdb36d4afa444b1ffdaf1f2a0c002/static/v.png -------------------------------------------------------------------------------- /static/vuetify-logo.svg: -------------------------------------------------------------------------------- 1 | Artboard 46 2 | -------------------------------------------------------------------------------- /store/README.md: -------------------------------------------------------------------------------- 1 | # STORE 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Vuex Store files. 6 | Vuex Store option is implemented in the Nuxt.js framework. 7 | 8 | Creating a file in this directory automatically activates the option in the framework. 9 | 10 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store). 11 | -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | export const state = () => ({ 2 | counter: 0 3 | }) 4 | 5 | export const mutations = { 6 | increment (state) { 7 | state.counter++ 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /store/lists.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | const API_URL = 'http://localhost:8000' 4 | 5 | export const state = { 6 | lists: [] 7 | } 8 | 9 | export const actions = { 10 | async getAllLists ({ commit }) { 11 | const { data } = await axios.get(`${API_URL}/lists`) 12 | commit('set', data) 13 | }, 14 | async postNewList ({ commit }, payload) { 15 | const { data } = await axios.post(`${API_URL}/lists/`, payload) 16 | commit('addList', data) 17 | }, 18 | async patchList ({ commit }, payload) { 19 | const { data, listId } = payload 20 | await axios.patch(`${API_URL}/lists/${listId}/`, data) 21 | commit('editList', payload) 22 | } 23 | } 24 | 25 | export const mutations = { 26 | set (state, payload) { 27 | state.lists = payload 28 | }, 29 | addList (state, payload) { 30 | state.lists.push(payload) 31 | }, 32 | editList (state, payload) { 33 | const index = state.lists.findIndex((list) => { 34 | return list.id === payload.listId 35 | }) 36 | const updatedList = { 37 | ...state.lists[index], 38 | name: payload.data.name 39 | } 40 | state.lists.splice(index, 1, updatedList) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /store/projects.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | const API_URL = 'http://localhost:8000' 4 | 5 | export const state = () => ({ 6 | projects: [] 7 | }) 8 | 9 | export const actions = { 10 | async getProjects ({ commit }) { 11 | const { data } = await axios.get(`${API_URL}/projects`) 12 | commit('setProjects', data) 13 | } 14 | } 15 | 16 | export const mutations = { 17 | setProjects (state, payload) { 18 | state.projects = payload 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /store/tasks.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | const API_URL = 'http://localhost:8000' 4 | 5 | export const state = () => ({ 6 | tasks: [] 7 | }) 8 | 9 | export const getters = { 10 | sortedTasks (state) { 11 | const tasks = [...state.tasks] 12 | return tasks.sort((taskA, taskB) => { 13 | if (taskA.completed) { 14 | return 1 15 | } 16 | return -1 17 | }) 18 | } 19 | } 20 | 21 | export const actions = { 22 | async getAllTasks ({ commit }) { 23 | const { data } = await axios.get(`${API_URL}/tasks/`) 24 | commit('set', data) 25 | }, 26 | async postNewTask ({ commit }, payload) { 27 | const { data } = await axios.post(`${API_URL}/tasks/`, payload) 28 | commit('add', data) 29 | }, 30 | async deleteTask ({ commit }, id) { 31 | await axios.delete(`${API_URL}/tasks/${id}/`) 32 | commit('remove', id) 33 | }, 34 | async patchTask ({ commit }, payload) { 35 | const { id, task } = payload 36 | await axios.patch(`${API_URL}/tasks/${id}/`, task) 37 | commit('edit', payload) 38 | } 39 | } 40 | 41 | export const mutations = { 42 | set (state, tasks) { 43 | state.tasks = tasks 44 | }, 45 | add (state, task) { 46 | state.tasks.push(task) 47 | }, 48 | edit (state, payload) { 49 | const { id, task } = payload 50 | 51 | const index = state.tasks.findIndex((task) => { 52 | return task.id === id 53 | }) 54 | const updatedTask = { 55 | ...state.tasks[index], 56 | ...task 57 | } 58 | state.tasks.splice(index, 1, updatedTask) 59 | }, 60 | remove (state, id) { 61 | const index = state.tasks.findIndex((task) => { 62 | return task.id === id 63 | }) 64 | state.tasks.splice(index, 1) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /test/Logo.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@vue/test-utils' 2 | import Logo from '@/components/Logo.vue' 3 | 4 | describe('Logo', () => { 5 | test('is a Vue instance', () => { 6 | const wrapper = mount(Logo) 7 | expect(wrapper.isVueInstance()).toBeTruthy() 8 | }) 9 | }) 10 | --------------------------------------------------------------------------------
6 | “First, solve the problem. Then, write the code.” 7 | 12 |