├── .editorconfig ├── .env.dist ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── Dockerfile ├── LICENSE ├── README.md ├── assets ├── bg.png └── variables.scss ├── components ├── ApiTable.vue ├── History.vue ├── Loader.vue ├── Show │ ├── ShowRow.vue │ ├── ShowRowCreatedAt.vue │ ├── ShowRowIsActive.vue │ ├── ShowRowUpdatedAt.vue │ └── ShowRowUpdatedBy.vue ├── chart │ ├── BarChart.vue │ ├── DoughnutChart.vue │ └── box │ │ ├── BarBox.vue │ │ └── DoughnutBox.vue ├── filters │ ├── LabelsFilter.vue │ ├── ProjectStatusFilter.vue │ ├── ProjectTypeFilter.vue │ └── TaskStatusFilter.vue ├── form │ ├── FormCheckbox.vue │ ├── FormDatePicker.vue │ ├── FormFile.vue │ ├── FormInput.vue │ ├── FormNumber.vue │ ├── FormPassword.vue │ ├── FormPreview.vue │ ├── FormSelect.vue │ ├── FormSelectAutocomplete.vue │ └── FormTextarea.vue └── layout │ ├── IsFooter.vue │ ├── IsKeyTable.vue │ ├── IsMainTemplate.vue │ ├── IsShowTemplate.vue │ ├── IsTable.vue │ ├── IsTitle.vue │ ├── ItemEditActions.vue │ ├── ItemShowActions.vue │ ├── ModalNotDoneTasks.vue │ └── errors │ └── ItemErrors.vue ├── jsconfig.json ├── lang └── en.js ├── layouts ├── dashboard.vue └── default.vue ├── middleware ├── authenticated.js └── authenticatedSignin.js ├── mixin ├── DateMixin.vue ├── Security.vue └── Translate.vue ├── nuxt.config.js ├── package.json ├── pages ├── address │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── calendar.vue ├── client │ ├── ClientAddresses.vue │ ├── ClientContacts.vue │ ├── Form.vue │ ├── ModalAddressForm.vue │ ├── ModalContactForm.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── contact │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── contact_type │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── country │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── dashboard.vue ├── document │ ├── FilesTable.vue │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── group │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── history.vue ├── index.vue ├── label │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── project │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── project_status │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── project_type │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── task │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue ├── task_status │ ├── Form.vue │ ├── _id │ │ ├── show.vue │ │ └── update.vue │ ├── create.vue │ └── index.vue └── user │ ├── Form.vue │ ├── _id │ ├── show.vue │ └── update.vue │ ├── create.vue │ └── index.vue ├── plugins ├── axios.js ├── dayjs.js ├── dot.js ├── formComponents.js ├── layout.js ├── mixins.js └── vuetify.js ├── static ├── favicon.ico └── logo.png ├── store ├── address.js ├── auth.js ├── client.js ├── contact.js ├── contact_type.js ├── country.js ├── document.js ├── group.js ├── history.js ├── index.js ├── label.js ├── language.js ├── module.js ├── project.js ├── project_status.js ├── project_type.js ├── role.js ├── task.js ├── task_status.js └── user.js ├── table ├── ColumnAddressCountry.vue ├── ColumnAddressPostCode.vue ├── ColumnContacts.vue ├── ColumnCreatedAt.vue ├── ColumnData.vue ├── ColumnDeadline.vue ├── ColumnGroups.vue ├── ColumnIsActive.vue ├── ColumnLabels.vue ├── ColumnLoggedAt.vue ├── ColumnParentTranslatedName.vue ├── ColumnQ.vue ├── ColumnStatus.vue ├── ColumnTranslatedName.vue ├── ColumnTranslatedTitle.vue ├── ColumnType.vue └── ColumnUpdatedAt.vue ├── utils ├── crud.js └── decamelize.js ├── vuetify.options.js └── yarn.lock /.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 | -------------------------------------------------------------------------------- /.env.dist: -------------------------------------------------------------------------------- 1 | NUXT_ENV_API_URL=/api/proxy 2 | NUXT_ENV_API_PROXY_URL=http://localhost:8888 3 | 4 | NUXT_ENV_APP_GA='' 5 | 6 | NUXT_ENV_APP_SENTRY_PUBLIC_KEY='' 7 | NUXT_ENV_APP_SENTRY_PROJECT_ID='' 8 | NUXT_ENV_APP_SENTRY_SERVER='' 9 | NUXT_ENV_APP_SENTRY_PROTOCOL='https' 10 | -------------------------------------------------------------------------------- /.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: ['prettier'], 18 | // add your custom rules here 19 | rules: { 20 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 21 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 22 | 'vue/require-default-prop': 'off', 23 | 'vue/no-v-html': 'off', 24 | 'import/no-dynamic-require': 'off', 25 | 'import/no-unresolved': 'off', 26 | 'no-var': 2, 27 | 'prefer-const': 2, 28 | // 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], 29 | 30 | // TODO: check disabled rules 31 | 'import/no-extraneous-dependencies': 0, 32 | 'no-param-reassign': 0, 33 | 'import/no-cycle': 0, 34 | 'import/extensions': 0, 35 | 'import/prefer-default-export': 0, 36 | 'array-callback-return': 0, 37 | 'global-require': 0, 38 | 'no-restricted-globals': 0, 39 | 'vue/no-template-shadow': 0, 40 | 'no-underscore-dangle': 0, 41 | 'no-plusplus': 0, 42 | 'prefer-destructuring': 0, 43 | 'consistent-return': 0, 44 | 'no-return-assign': 0, 45 | 'default-case': 0, 46 | 'no-unused-vars': 0, 47 | 'vue/require-v-for-key': 0, 48 | camelcase: 0, 49 | radix: 0, 50 | 'no-alert': 0, 51 | 'no-shadow': 0, 52 | 'nuxt/no-globals-in-created': 0, 53 | 'import/no-absolute-path': 0, 54 | 'no-undef': 0, 55 | 'prefer-template': 0, 56 | 'vue/valid-v-slot': 0, 57 | }, 58 | } 59 | -------------------------------------------------------------------------------- /.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 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10 2 | 3 | WORKDIR /var/www 4 | ADD . /var/www 5 | 6 | RUN cp .env.dist .env 7 | RUN npm install 8 | RUN npm run build 9 | 10 | RUN chown -R node:node /var/www 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Inshop Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inshopgroup/inshop-crm-admin/3e02cda0279a48406d7150e3e159c8f9e3933a43/assets/bg.png -------------------------------------------------------------------------------- /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/History.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 70 | -------------------------------------------------------------------------------- /components/Loader.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 22 | -------------------------------------------------------------------------------- /components/Show/ShowRow.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 22 | -------------------------------------------------------------------------------- /components/Show/ShowRowCreatedAt.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /components/Show/ShowRowIsActive.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | -------------------------------------------------------------------------------- /components/Show/ShowRowUpdatedAt.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /components/Show/ShowRowUpdatedBy.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /components/chart/BarChart.vue: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /components/chart/DoughnutChart.vue: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /components/chart/box/BarBox.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 69 | -------------------------------------------------------------------------------- /components/chart/box/DoughnutBox.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 106 | -------------------------------------------------------------------------------- /components/filters/LabelsFilter.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 73 | -------------------------------------------------------------------------------- /components/filters/ProjectStatusFilter.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 73 | -------------------------------------------------------------------------------- /components/filters/ProjectTypeFilter.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 73 | -------------------------------------------------------------------------------- /components/filters/TaskStatusFilter.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 73 | -------------------------------------------------------------------------------- /components/form/FormCheckbox.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 46 | -------------------------------------------------------------------------------- /components/form/FormDatePicker.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 69 | -------------------------------------------------------------------------------- /components/form/FormInput.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 47 | -------------------------------------------------------------------------------- /components/form/FormNumber.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 44 | -------------------------------------------------------------------------------- /components/form/FormPassword.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 57 | -------------------------------------------------------------------------------- /components/form/FormPreview.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 74 | 75 | 85 | -------------------------------------------------------------------------------- /components/form/FormSelect.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 69 | -------------------------------------------------------------------------------- /components/form/FormSelectAutocomplete.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 93 | -------------------------------------------------------------------------------- /components/form/FormTextarea.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 42 | -------------------------------------------------------------------------------- /components/layout/IsFooter.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 31 | -------------------------------------------------------------------------------- /components/layout/IsKeyTable.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 60 | -------------------------------------------------------------------------------- /components/layout/IsMainTemplate.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 58 | -------------------------------------------------------------------------------- /components/layout/IsShowTemplate.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 118 | -------------------------------------------------------------------------------- /components/layout/IsTitle.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 20 | -------------------------------------------------------------------------------- /components/layout/ItemEditActions.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 99 | -------------------------------------------------------------------------------- /components/layout/ItemShowActions.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 94 | -------------------------------------------------------------------------------- /components/layout/ModalNotDoneTasks.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 86 | -------------------------------------------------------------------------------- /components/layout/errors/ItemErrors.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "~/*": ["./*"], 6 | "@/*": ["./*"], 7 | "~~/*": ["./*"], 8 | "@@/*": ["./*"] 9 | } 10 | }, 11 | "exclude": ["node_modules", ".nuxt", "dist"] 12 | } 13 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 17 | -------------------------------------------------------------------------------- /middleware/authenticated.js: -------------------------------------------------------------------------------- 1 | export default function (params) { 2 | const token = params.store.getters['auth/jwtDecoded'] || null 3 | 4 | if (!(token && token.exp > Date.now() / 1000)) { 5 | params.store.commit('auth/RESET') 6 | 7 | return params.redirect('/') 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /middleware/authenticatedSignin.js: -------------------------------------------------------------------------------- 1 | export default function (params) { 2 | const token = params.store.getters['auth/jwtDecoded'] || null 3 | 4 | if (token && token.exp > Date.now() / 1000) { 5 | return params.redirect('/dashboard') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /mixin/DateMixin.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /mixin/Security.vue: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /mixin/Translate.vue: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inshopcrm-client", 3 | "description": "Inshop CRM / ERP Client", 4 | "version": "2.0.0", 5 | "author": "info@inshop.com.ua", 6 | "license": "MIT", 7 | "scripts": { 8 | "dev": "nuxt", 9 | "build": "nuxt build", 10 | "start": "nuxt start", 11 | "generate": "nuxt generate", 12 | "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .", 13 | "lint": "yarn lint:js" 14 | }, 15 | "dependencies": { 16 | "@mdi/font": "^5.8.55", 17 | "@nuxtjs/axios": "^5.12.5", 18 | "@nuxtjs/dotenv": "^1.4.1", 19 | "@nuxtjs/pwa": "^3.3.5", 20 | "chart.js": "2.7.3", 21 | "color": "^3.1.3", 22 | "cookie-universal-nuxt": "^2.1.4", 23 | "core-js": "^3.8.3", 24 | "dayjs": "^1.10.4", 25 | "dot-object": "^2.1.4", 26 | "filesize": "^6.1.0", 27 | "jwt-decode": "^3.1.2", 28 | "lodash.debounce": "^4.0.8", 29 | "nuxt": "^2.14.12", 30 | "nuxt-i18n": "^6.15.4", 31 | "pluralize": "^8.0.0", 32 | "vue-chartjs": "3.5.0", 33 | "vue-tables-2": "^2.0.14", 34 | "vue-toastr": "^2.1.2", 35 | "vue2-sentry": "^1.2.1" 36 | }, 37 | "devDependencies": { 38 | "@nuxtjs/eslint-config": "^5.0.0", 39 | "@nuxtjs/eslint-module": "^3.0.2", 40 | "@nuxtjs/vuetify": "^1.11.3", 41 | "babel-eslint": "^10.1.0", 42 | "eslint": "^7.18.0", 43 | "eslint-config-prettier": "^7.2.0", 44 | "eslint-plugin-nuxt": "^2.0.0", 45 | "eslint-plugin-prettier": "^3.3.1", 46 | "eslint-plugin-vue": "^7.5.0", 47 | "prettier": "^2.2.1" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /pages/address/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 66 | -------------------------------------------------------------------------------- /pages/address/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/address/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/address/index.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 87 | -------------------------------------------------------------------------------- /pages/client/Form.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 89 | -------------------------------------------------------------------------------- /pages/client/ModalAddressForm.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 82 | -------------------------------------------------------------------------------- /pages/client/ModalContactForm.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 82 | -------------------------------------------------------------------------------- /pages/client/_id/show.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 72 | -------------------------------------------------------------------------------- /pages/client/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/client/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/client/index.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 84 | -------------------------------------------------------------------------------- /pages/contact/Form.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 82 | -------------------------------------------------------------------------------- /pages/contact/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 41 | -------------------------------------------------------------------------------- /pages/contact/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/contact/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/contact/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 70 | -------------------------------------------------------------------------------- /pages/contact_type/Form.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 72 | -------------------------------------------------------------------------------- /pages/contact_type/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /pages/contact_type/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 51 | -------------------------------------------------------------------------------- /pages/contact_type/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/contact_type/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 67 | -------------------------------------------------------------------------------- /pages/country/Form.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 66 | -------------------------------------------------------------------------------- /pages/country/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /pages/country/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/country/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/country/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 67 | -------------------------------------------------------------------------------- /pages/dashboard.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 80 | -------------------------------------------------------------------------------- /pages/document/FilesTable.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 66 | -------------------------------------------------------------------------------- /pages/document/Form.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 101 | -------------------------------------------------------------------------------- /pages/document/_id/show.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 48 | -------------------------------------------------------------------------------- /pages/document/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/document/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/document/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 70 | -------------------------------------------------------------------------------- /pages/group/_id/show.vue: -------------------------------------------------------------------------------- 1 | 40 | 41 | 92 | -------------------------------------------------------------------------------- /pages/group/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | 56 | 78 | -------------------------------------------------------------------------------- /pages/group/create.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 53 | -------------------------------------------------------------------------------- /pages/group/index.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 65 | -------------------------------------------------------------------------------- /pages/history.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 61 | -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 100 | 101 | 113 | -------------------------------------------------------------------------------- /pages/label/Form.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 66 | -------------------------------------------------------------------------------- /pages/label/_id/show.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 27 | -------------------------------------------------------------------------------- /pages/label/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/label/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/label/index.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 63 | -------------------------------------------------------------------------------- /pages/project/Form.vue: -------------------------------------------------------------------------------- 1 | 58 | 59 | 97 | -------------------------------------------------------------------------------- /pages/project/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 51 | -------------------------------------------------------------------------------- /pages/project/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/project/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/project/index.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 90 | -------------------------------------------------------------------------------- /pages/project_status/Form.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 72 | -------------------------------------------------------------------------------- /pages/project_status/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /pages/project_status/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/project_status/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/project_status/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 67 | -------------------------------------------------------------------------------- /pages/project_type/Form.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 72 | -------------------------------------------------------------------------------- /pages/project_type/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /pages/project_type/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/project_type/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/project_type/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 67 | -------------------------------------------------------------------------------- /pages/task/_id/show.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 59 | -------------------------------------------------------------------------------- /pages/task/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/task/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/task/index.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 89 | -------------------------------------------------------------------------------- /pages/task_status/Form.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 68 | -------------------------------------------------------------------------------- /pages/task_status/_id/show.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /pages/task_status/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/task_status/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/task_status/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 67 | -------------------------------------------------------------------------------- /pages/user/Form.vue: -------------------------------------------------------------------------------- 1 | 58 | 59 | 99 | -------------------------------------------------------------------------------- /pages/user/_id/show.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 41 | -------------------------------------------------------------------------------- /pages/user/_id/update.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 55 | -------------------------------------------------------------------------------- /pages/user/create.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 48 | -------------------------------------------------------------------------------- /pages/user/index.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 74 | -------------------------------------------------------------------------------- /plugins/axios.js: -------------------------------------------------------------------------------- 1 | export default function ({ $axios, store, redirect, error }) { 2 | $axios.onRequest((config) => { 3 | store.dispatch('loadingStart') 4 | 5 | const token = store.getters['auth/jwtDecoded'] || null 6 | const authorized = token && token.exp > Date.now() / 1000 7 | 8 | if (authorized) { 9 | config.headers.common.Authorization = 'Bearer ' + store.state.auth.token 10 | } 11 | 12 | return config 13 | }) 14 | 15 | $axios.onResponse((data) => { 16 | store.dispatch('loadingStop') 17 | }) 18 | 19 | $axios.onError((e) => { 20 | store.dispatch('loadingStop') 21 | 22 | const code = parseInt(e.response && e.response.status) 23 | if (code === 401) { 24 | store.dispatch('auth/logout').then(() => { 25 | redirect('/') 26 | }) 27 | } 28 | 29 | if (code === 404) { 30 | return error({ statusCode: 404, message: e.message }) 31 | } 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /plugins/dayjs.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import dayjs from 'dayjs' 3 | 4 | Vue.prototype.$date = dayjs 5 | -------------------------------------------------------------------------------- /plugins/dot.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import dot from 'dot-object' 3 | 4 | Vue.prototype.$dot = dot 5 | -------------------------------------------------------------------------------- /plugins/formComponents.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import FormInput from '@/components/form/FormInput' 4 | import FormNumber from '@/components/form/FormNumber' 5 | import FormTextarea from '@/components/form/FormTextarea' 6 | import FormCheckbox from '@/components/form/FormCheckbox' 7 | import FormSelect from '@/components/form/FormSelect' 8 | import FormSelectAutocomplete from '@/components/form/FormSelectAutocomplete' 9 | import FormDatePicker from '@/components/form/FormDatePicker' 10 | import FormFile from '@/components/form/FormFile' 11 | import FormPreview from '@/components/form/FormPreview' 12 | 13 | Vue.component('FormInput', FormInput) 14 | Vue.component('FormNumber', FormNumber) 15 | Vue.component('FormTextarea', FormTextarea) 16 | Vue.component('FormCheckbox', FormCheckbox) 17 | Vue.component('FormSelect', FormSelect) 18 | Vue.component('FormSelectAutocomplete', FormSelectAutocomplete) 19 | Vue.component('FormDatePicker', FormDatePicker) 20 | Vue.component('FormFile', FormFile) 21 | Vue.component('FormPreview', FormPreview) 22 | -------------------------------------------------------------------------------- /plugins/layout.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import IsTitle from '../components/layout/IsTitle' 3 | import IsFooter from '../components/layout/IsFooter' 4 | import IsMainTemplate from '../components/layout/IsMainTemplate' 5 | import IsShowTemplate from '../components/layout/IsShowTemplate' 6 | import IsTable from '../components/layout/IsTable' 7 | import IsKeyTable from '../components/layout/IsKeyTable' 8 | 9 | Vue.component('IsTitle', IsTitle) 10 | Vue.component('IsFooter', IsFooter) 11 | Vue.component('IsMainTemplate', IsMainTemplate) 12 | Vue.component('IsShowTemplate', IsShowTemplate) 13 | Vue.component('IsTable', IsTable) 14 | Vue.component('IsKeyTable', IsKeyTable) 15 | -------------------------------------------------------------------------------- /plugins/mixins.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import DateMixin from '@/mixin/DateMixin' 4 | import Security from '@/mixin/Security' 5 | import Translate from '@/mixin/Translate' 6 | 7 | import { ServerTable } from 'vue-tables-2' 8 | 9 | Vue.use(ServerTable, {}, false, 'bootstrap4', 'default') 10 | 11 | Vue.mixin(DateMixin) 12 | Vue.mixin(Security) 13 | Vue.mixin(Translate) 14 | -------------------------------------------------------------------------------- /plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuetify from 'vuetify' 3 | import 'vuetify/dist/vuetify.min.css' 4 | import '@mdi/font/css/materialdesignicons.css' 5 | 6 | Vue.use(Vuetify) 7 | 8 | export default new Vuetify({ 9 | icons: { 10 | iconfont: 'mdi', 11 | }, 12 | theme: { 13 | themes: { 14 | light: { 15 | primary: '#0c5c6f', 16 | secondary: '#003145', 17 | }, 18 | }, 19 | }, 20 | }) 21 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inshopgroup/inshop-crm-admin/3e02cda0279a48406d7150e3e159c8f9e3933a43/static/favicon.ico -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inshopgroup/inshop-crm-admin/3e02cda0279a48406d7150e3e159c8f9e3933a43/static/logo.png -------------------------------------------------------------------------------- /store/address.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'address', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'address', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'address') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'address') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'address', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'address') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/auth.js: -------------------------------------------------------------------------------- 1 | import jwtDecode from 'jwt-decode' 2 | 3 | export const state = () => ({ 4 | token: null, 5 | refreshToken: null, 6 | type: null, 7 | error: null, 8 | roles: [], 9 | language: 'en', 10 | }) 11 | 12 | export const mutations = { 13 | UPDATE_TOKEN(state, data) { 14 | this.$cookiz.set('t', data) 15 | state.token = data 16 | }, 17 | UPDATE_REFRESH_TOKEN(state, data) { 18 | this.$cookiz.set('rt', data) 19 | state.refreshToken = data 20 | }, 21 | UPDATE_ROLES(state, data) { 22 | this.$cookiz.set('roles', data) 23 | state.roles = data 24 | }, 25 | ERROR_CHANGE(state, error) { 26 | state.error = error 27 | }, 28 | UPDATE_LANGUAGE(state, language) { 29 | state.language = language 30 | }, 31 | RESET(state) { 32 | this.$cookiz.remove('t') 33 | this.$cookiz.remove('rt') 34 | 35 | state.token = null 36 | state.refreshToken = null 37 | state.error = null 38 | }, 39 | } 40 | 41 | export const getters = { 42 | jwtDecoded: (state) => { 43 | const token = state.token || null 44 | if (token !== null) { 45 | return jwtDecode(state.token) 46 | } 47 | }, 48 | refreshToken: (state) => state.refreshToken, 49 | error: (state) => state.error, 50 | roles: (state) => state.roles, 51 | language: (state) => state.language, 52 | id: (state, getters) => { 53 | if (getters.jwtDecoded) { 54 | return getters.jwtDecoded.id 55 | } 56 | }, 57 | } 58 | 59 | export const actions = { 60 | login({ commit }, data) { 61 | commit('ERROR_CHANGE', null) 62 | 63 | const link = process.env.NUXT_ENV_API_URL + '/login' 64 | 65 | return this.$axios 66 | .post(link, data) 67 | .then((response) => { 68 | commit('UPDATE_TOKEN', response.data.token) 69 | commit('UPDATE_REFRESH_TOKEN', response.data.refresh_token) 70 | commit('UPDATE_ROLES', response.data.roles) 71 | 72 | return response.data 73 | }) 74 | .catch((error) => { 75 | commit('ERROR_CHANGE', 'Username or password is incorrect') 76 | throw error 77 | }) 78 | }, 79 | refreshToken({ commit, getters }) { 80 | const link = process.env.NUXT_ENV_API_URL + '/frontend/token/refresh' 81 | 82 | return this.$axios 83 | .post(link, { refresh_token: getters.refreshToken }) 84 | .then((response) => { 85 | commit('UPDATE_TOKEN', response.data.token) 86 | commit('UPDATE_ROLES', response.data.roles) 87 | 88 | return response 89 | }) 90 | }, 91 | loginByToken({ commit, getters }, token) { 92 | const link = process.env.NUXT_ENV_API_URL + '/frontend/login/' + token 93 | 94 | return this.$axios 95 | .get(link) 96 | .then((response) => { 97 | commit('UPDATE_TOKEN', response.data.token) 98 | commit('UPDATE_REFRESH_TOKEN', response.data.refresh_token) 99 | commit('UPDATE_ROLES', response.data.roles) 100 | 101 | return response 102 | }) 103 | .catch((e) => { 104 | throw e 105 | }) 106 | }, 107 | logout({ commit }) { 108 | commit('RESET') 109 | }, 110 | } 111 | -------------------------------------------------------------------------------- /store/client.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'client', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'client', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'client') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'client') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'client', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'client') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/contact.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'contact', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'contact', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'contact') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'contact') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'contact', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'contact') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/contact_type.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'contact_type', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'contact_type', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'contact_type') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'contact_type') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'contact_type', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'contact_type') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/country.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'COUNTRY', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'COUNTRY', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'COUNTRY') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'COUNTRY') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'COUNTRY', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'COUNTRY') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/document.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | files: [], 6 | isActive: true, 7 | }, 8 | items: [], 9 | error: null, 10 | errors: {}, 11 | }) 12 | 13 | export const state = () => defaultState() 14 | 15 | export const mutations = { 16 | SET_ITEM(state, item) { 17 | Object.assign(state, { item }) 18 | }, 19 | UPDATE_ITEM(state, item) { 20 | state.item = Object.assign({}, state.item, item) 21 | }, 22 | SET_ITEMS(state, items) { 23 | Object.assign(state, { items }) 24 | }, 25 | SET_ERROR(state, error) { 26 | Object.assign(state, { error }) 27 | }, 28 | SET_ERRORS(state, errors) { 29 | Object.assign(state, { errors }) 30 | }, 31 | RESET(state) { 32 | Object.assign(state, defaultState()) 33 | }, 34 | ADD_FILE(state, file) { 35 | state.item.files.push(file) 36 | }, 37 | DELETE_FILE(state, fileId) { 38 | state.item.files = state.item.files.filter((file) => file.id !== fileId) 39 | }, 40 | } 41 | 42 | export const getters = { 43 | item: (state) => state.item, 44 | items: (state) => state.items, 45 | error: (state) => state.error, 46 | errors: (state) => state.errors, 47 | } 48 | 49 | export const actions = { 50 | getItem(context, id) { 51 | return crud.getItem(context, this.$axios, 'document', id) 52 | }, 53 | getItems(context, query) { 54 | return crud.getItems(context, this.$axios, 'document', query) 55 | }, 56 | create(context) { 57 | return crud.create(context, this.$axios, 'document') 58 | }, 59 | update(context) { 60 | return crud.update(context, this.$axios, 'document') 61 | }, 62 | remove(context, item) { 63 | return crud.remove(context, this.$axios, 'document', item) 64 | }, 65 | reset(context) { 66 | return crud.reset(context, 'document') 67 | }, 68 | } 69 | -------------------------------------------------------------------------------- /store/group.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | roles: [], 6 | roleIRIs: [], 7 | isActive: true, 8 | }, 9 | items: [], 10 | error: null, 11 | errors: {}, 12 | }) 13 | 14 | export const state = () => defaultState() 15 | 16 | export const mutations = { 17 | SET_ITEM(state, item) { 18 | Object.assign(state, { item }) 19 | }, 20 | UPDATE_ITEM(state, item) { 21 | state.item = Object.assign({}, state.item, item) 22 | }, 23 | UPDATE_ITEM_ROLES(state, iri) { 24 | if (!state.item.roleIRIs.includes(iri)) { 25 | state.item.roleIRIs.push(iri) 26 | } else { 27 | const index = state.item.roleIRIs.indexOf(iri) 28 | 29 | if (index > -1) { 30 | state.item.roleIRIs.splice(index, 1) 31 | } 32 | } 33 | }, 34 | SET_ITEMS(state, items) { 35 | Object.assign(state, { items }) 36 | }, 37 | SET_ERROR(state, error) { 38 | Object.assign(state, { error }) 39 | }, 40 | SET_ERRORS(state, errors) { 41 | Object.assign(state, { errors }) 42 | }, 43 | RESET(state) { 44 | Object.assign(state, defaultState()) 45 | }, 46 | } 47 | 48 | export const getters = { 49 | item: (state) => state.item, 50 | items: (state) => state.items, 51 | error: (state) => state.error, 52 | errors: (state) => state.errors, 53 | } 54 | 55 | export const actions = { 56 | getItem(context, id) { 57 | context.commit('SET_ERROR', null) 58 | 59 | return this.$axios 60 | .get(`${process.env.NUXT_ENV_API_URL}/groups/${id}`) 61 | .then((response) => response.data) 62 | .then((data) => { 63 | const roles = [] 64 | data.roles.forEach((role) => { 65 | roles.push(role['@id']) 66 | }) 67 | data.roleIRIs = roles 68 | 69 | context.commit(`SET_ITEM`, data) 70 | }) 71 | .catch((e) => { 72 | context.commit(`SET_ERROR`, e.message) 73 | }) 74 | }, 75 | getItems(context, query) { 76 | return crud.getItems(context, this.$axios, 'GROUP', query) 77 | }, 78 | create(context) { 79 | context.commit('UPDATE_ITEM', { roles: context.state.item.roleIRIs }) 80 | 81 | return crud.create(context, this.$axios, 'GROUP').then((data) => { 82 | context.commit('RESET') 83 | 84 | return data 85 | }) 86 | }, 87 | update(context) { 88 | context.commit('UPDATE_ITEM', { roles: context.state.item.roleIRIs }) 89 | 90 | return crud.update(context, this.$axios, 'GROUP').then((data) => { 91 | context.commit('RESET') 92 | 93 | return data 94 | }) 95 | }, 96 | remove(context, item) { 97 | return crud.remove(context, this.$axios, 'GROUP', item) 98 | }, 99 | reset(context) { 100 | return crud.reset(context, 'GROUP') 101 | }, 102 | } 103 | -------------------------------------------------------------------------------- /store/history.js: -------------------------------------------------------------------------------- 1 | const defaultState = () => ({ 2 | item: { 3 | isActive: true, 4 | }, 5 | items: [], 6 | error: null, 7 | errors: {}, 8 | }) 9 | 10 | export const state = () => defaultState() 11 | 12 | export const mutations = { 13 | SET_ITEM(state, item) { 14 | Object.assign(state, { item }) 15 | }, 16 | UPDATE_ITEM(state, item) { 17 | state.item = Object.assign({}, state.item, item) 18 | }, 19 | SET_ITEMS(state, items) { 20 | Object.assign(state, { items }) 21 | }, 22 | SET_ERROR(state, error) { 23 | Object.assign(state, { error }) 24 | }, 25 | SET_ERRORS(state, errors) { 26 | Object.assign(state, { errors }) 27 | }, 28 | RESET(state) { 29 | Object.assign(state, defaultState()) 30 | }, 31 | } 32 | 33 | export const getters = { 34 | item: (state) => state.item, 35 | items: (state) => state.items, 36 | error: (state) => state.error, 37 | errors: (state) => state.errors, 38 | } 39 | 40 | export const actions = { 41 | getItems({ commit }, params) { 42 | const url = `${process.env.NUXT_ENV_API_URL}/histories/${params.entity}/${params.id}` 43 | 44 | return this.$axios 45 | .get(url) 46 | .then((response) => response.data) 47 | .then((data) => { 48 | commit('SET_ITEMS', data['hydra:member']) 49 | 50 | return data['hydra:member'] 51 | }) 52 | .catch((e) => { 53 | commit('SET_ERROR', e.message) 54 | }) 55 | }, 56 | } 57 | -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | export const strict = true 2 | 3 | export const state = () => ({ 4 | isLoading: 0, 5 | loadingAllow: true, 6 | locales: ['en', 'de', 'pl', 'es', 'fr', 'it'], 7 | locale: 'en', 8 | }) 9 | 10 | export const mutations = { 11 | LOADING_START(state) { 12 | if (state.loadingAllow) { 13 | state.isLoading += 1 14 | } 15 | }, 16 | LOADING_STOP(state) { 17 | state.loadingAllow = true 18 | 19 | if (state.isLoading > 0) { 20 | state.isLoading -= 1 21 | } 22 | }, 23 | LOADING_ALLOW(state, value) { 24 | state.loadingAllow = value 25 | }, 26 | SET_LOCALE(state, locale) { 27 | if (state.locales.includes(locale)) { 28 | state.locale = locale 29 | } 30 | }, 31 | } 32 | 33 | export const getters = { 34 | isLoading: (state) => state.isLoading !== 0, 35 | } 36 | 37 | export const actions = { 38 | loadingStart({ commit }) { 39 | commit('LOADING_START') 40 | }, 41 | loadingStop({ commit }) { 42 | commit('LOADING_STOP') 43 | }, 44 | loadingAllow({ commit }, value) { 45 | commit('LOADING_ALLOW', value) 46 | }, 47 | async nuxtServerInit({ commit, dispatch }, context) { 48 | const t = context.app.$cookiz.get('t') 49 | const rt = context.app.$cookiz.get('rt') 50 | const roles = context.app.$cookiz.get('roles') 51 | const locale = context.app.$cookiz.get('locale') 52 | 53 | if (t) { 54 | await commit('auth/UPDATE_TOKEN', t) 55 | } 56 | 57 | if (rt) { 58 | await commit('auth/UPDATE_REFRESH_TOKEN', rt) 59 | } 60 | 61 | if (roles) { 62 | await commit('auth/UPDATE_ROLES', roles) 63 | } 64 | 65 | if (locale) { 66 | await commit('SET_LOCALE', locale) 67 | } 68 | }, 69 | } 70 | -------------------------------------------------------------------------------- /store/label.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'label', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'label', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'label') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'label') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'label', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'label') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/language.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'language', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'language', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'language') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'language') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'language', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'language') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/module.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'module', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'module', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'module') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'module') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'module', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'module') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/project.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'project', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'project', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'project') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'project') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'project', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'project') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/project_status.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'project_status', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'project_status', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'project_status') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'project_status') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'project_status', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'project_status') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/project_type.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'project_type', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'project_type', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'project_type') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'project_type') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'project_type', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'project_type') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/role.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'role', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'role', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'role') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'role') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'role', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'role') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/task.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'task', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'task', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'task') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'task') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'task', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'task') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/task_status.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'task_status', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'task_status', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'task_status') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'task_status') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'task_status', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'task_status') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /store/user.js: -------------------------------------------------------------------------------- 1 | import * as crud from '~/utils/crud' 2 | 3 | const defaultState = () => ({ 4 | item: { 5 | isActive: true, 6 | }, 7 | items: [], 8 | error: null, 9 | errors: {}, 10 | }) 11 | 12 | export const state = () => defaultState() 13 | 14 | export const mutations = { 15 | SET_ITEM(state, item) { 16 | Object.assign(state, { item }) 17 | }, 18 | UPDATE_ITEM(state, item) { 19 | state.item = Object.assign({}, state.item, item) 20 | }, 21 | SET_ITEMS(state, items) { 22 | Object.assign(state, { items }) 23 | }, 24 | SET_ERROR(state, error) { 25 | Object.assign(state, { error }) 26 | }, 27 | SET_ERRORS(state, errors) { 28 | Object.assign(state, { errors }) 29 | }, 30 | RESET(state) { 31 | Object.assign(state, defaultState()) 32 | }, 33 | } 34 | 35 | export const getters = { 36 | item: (state) => state.item, 37 | items: (state) => state.items, 38 | error: (state) => state.error, 39 | errors: (state) => state.errors, 40 | } 41 | 42 | export const actions = { 43 | getItem(context, id) { 44 | return crud.getItem(context, this.$axios, 'user', id) 45 | }, 46 | getItems(context, query) { 47 | return crud.getItems(context, this.$axios, 'user', query) 48 | }, 49 | create(context) { 50 | return crud.create(context, this.$axios, 'user') 51 | }, 52 | update(context) { 53 | return crud.update(context, this.$axios, 'user') 54 | }, 55 | remove(context, item) { 56 | return crud.remove(context, this.$axios, 'user', item) 57 | }, 58 | reset(context) { 59 | return crud.reset(context, 'user') 60 | }, 61 | } 62 | -------------------------------------------------------------------------------- /table/ColumnAddressCountry.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /table/ColumnAddressPostCode.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /table/ColumnContacts.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 45 | -------------------------------------------------------------------------------- /table/ColumnCreatedAt.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnData.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 45 | -------------------------------------------------------------------------------- /table/ColumnDeadline.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnGroups.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | -------------------------------------------------------------------------------- /table/ColumnIsActive.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /table/ColumnLabels.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /table/ColumnLoggedAt.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnParentTranslatedName.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnQ.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 24 | -------------------------------------------------------------------------------- /table/ColumnStatus.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnTranslatedName.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnTranslatedTitle.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnType.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /table/ColumnUpdatedAt.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /utils/decamelize.js: -------------------------------------------------------------------------------- 1 | export default (text, separator) => { 2 | if (typeof text !== 'string') { 3 | throw new TypeError('Expected a string') 4 | } 5 | 6 | separator = typeof separator === 'undefined' ? '_' : separator 7 | 8 | return text 9 | .replace( 10 | /([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu, 11 | `$1${separator}$2` 12 | ) 13 | .replace( 14 | /(\p{Lowercase_Letter}+)(\p{Uppercase_Letter}[\p{Lowercase_Letter}\d]+)/gu, 15 | `$1${separator}$2` 16 | ) 17 | .toLowerCase() 18 | } 19 | -------------------------------------------------------------------------------- /vuetify.options.js: -------------------------------------------------------------------------------- 1 | // Customization vuetify theme here 2 | // https://vuetifyjs.com/ru/customization/theme 3 | 4 | export default { 5 | theme: { 6 | light: true, 7 | options: { 8 | customProperties: true, 9 | }, 10 | themes: { 11 | light: { 12 | primary: '#0c5c6f', 13 | secondary: '#003145', 14 | }, 15 | }, 16 | }, 17 | } 18 | --------------------------------------------------------------------------------