├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .postcssrc.js ├── README.md ├── Vue.install.choices.GIF ├── build ├── build.js ├── check-versions.js ├── logo.png ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js └── webpack.prod.conf.js ├── config ├── Entities │ ├── FamilyAdvocacyCasePlan.js │ ├── FamilyAdvocacyGuardianship.js │ ├── FamilyAdvocacyTanfDetail.js │ ├── KinshipChild.js │ ├── KinshipChildCustodyStatus.js │ ├── KinshipChildIncome.js │ ├── OtherInHousehold.js │ ├── OtherInHouseholdIncome.js │ ├── PrimaryKinshipCaregiver.js │ ├── PrimaryKinshipCaregiverContact.js │ ├── PrimaryKinshipCaregiverFundsDispersed.js │ ├── PrimaryKinshipCaregiverIncome.js │ └── RootEntity.js ├── credentials.template.js ├── dev.env.js ├── index.js └── prod.env.js ├── documentation ├── Basic Program Flow Control - as of commit id 3d2ecbaf7bc72fe79c37ea529f7302a78458bec3.Draw.io └── Basic Program Flow Control - as of commit id 3d2ecbaf7bc72fe79c37ea529f7302a78458bec3.pdf ├── index.html ├── package-lock.json ├── package.json ├── src ├── .gitrepo ├── App.vue ├── assets │ └── logo.png ├── components │ ├── Dashboard.vue │ ├── Login.vue │ ├── Search.vue │ ├── TemplateLoader.vue │ ├── import.vue │ └── shared │ │ ├── DialogConfirm.vue │ │ ├── EntityForm.Vue │ │ ├── EntitySearch.vue │ │ ├── EntitySubtotals.vue │ │ ├── FormFields │ │ ├── Checkbox.vue │ │ ├── Date.vue │ │ ├── Select.vue │ │ └── Text.vue │ │ ├── SearchBox.vue │ │ ├── SubEntityList.vue │ │ └── Templates │ │ └── Column-Two.vue ├── main.js ├── router │ └── index.js └── store │ └── store.js └── static └── .gitkeep /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /srcx/ 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parser: 'babel-eslint', 6 | parserOptions: { 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | extends: 'airbnb-base', 13 | // required to lint *.vue files 14 | plugins: [ 15 | 'html' 16 | ], 17 | // check if imports actually resolve 18 | settings: { 19 | 'import/resolver': { 20 | webpack: { 21 | config: 'build/webpack.base.conf.js' 22 | } 23 | } 24 | }, 25 | // add your custom rules here 26 | rules: { 27 | 'linebreak-style':0, 28 | 'no-console':0, 29 | // don't require .vue extension when importing 30 | 'import/extensions': ['error', 'always', { 31 | js: 'never', 32 | vue: 'never' 33 | }], 34 | // disallow reassignment of function parameters 35 | // disallow parameter object manipulation except for specific exclusions 36 | 'no-param-reassign': ['error', { 37 | props: true, 38 | ignorePropertyModificationsFor: [ 39 | 'state', // for vuex state 40 | 'acc', // for reduce accumulators 41 | 'e' // for e.returnvalue 42 | ] 43 | }], 44 | // allow optionalDependencies 45 | 'import/no-extraneous-dependencies': ['error', { 46 | optionalDependencies: ['test/unit/index.js'] 47 | }], 48 | // allow debugger during development 49 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | config/credentials.js 9 | 10 | # Editor directories and files 11 | .idea 12 | .vscode 13 | *.suo 14 | *.ntvs* 15 | *.njsproj 16 | *.sln 17 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fk.vuetify.firebase.database 2 | 3 | > Client Database (Developed for Non-Profit FosterKinship.org) - using VueJS, VuetifyJS, and Google Firebase 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | 12 | # Database functionality used Google Firebase 13 | # - Aquire Google Firebase Credentials: https://firebase.google.com/ 14 | # - Don't forget to secure your database with authorization rules 15 | # Search Functionality uses Algolia Search 16 | # - Aquire Algolia Search Credentials: https://www.algolia.com/ 17 | # - Create Indexes (see documentation TODO) 18 | # Then Configure Credentials 19 | see config/credentials.template.js 20 | 21 | # Server for testing with hot reload at localhost:8080 22 | npm run dev 23 | 24 | # build for production with minification 25 | npm run build 26 | 27 | # build for production and view the bundle analyzer report 28 | npm run build --report 29 | 30 | ``` 31 | 32 | This app was started from the [Vuetify Webpack repository](https://github.com/vuetifyjs/webpack) 33 | 34 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 35 | 36 | 37 | ## App Info 38 | This app is documented on [A YouTube Playlist - Real Time Database with Vue.js + Vuex + Vuetify + Firebase Firestore (+ Firebase Authentication)](https://www.youtube.com/playlist?list=PLjuQOVlnQv2UxCWdis189jYjZESsYP4vP) 39 | 40 | ### Author 41 | 42 | Dedicated Managers, Inc. 43 | [DedicatedManagers.com](http://www.DedicatedManagers.com.com) 44 | 45 | ### Version 46 | 47 | 0.0.1 48 | 49 | ### License 50 | 51 | This project is free for personal use. Any other use must aquire a license from Dedicated Managers, Inc. 52 | -------------------------------------------------------------------------------- /Vue.install.choices.GIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DedicatedManagers/vue.vuex.vuetify.firebase-realtime-database/7cb4773d561b70dae32a7f445838b86f935f4501/Vue.install.choices.GIF -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DedicatedManagers/vue.vuex.vuetify.firebase-realtime-database/7cb4773d561b70dae32a7f445838b86f935f4501/build/logo.png -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const config = require('../config') 4 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 5 | const packageConfig = require('../package.json') 6 | 7 | exports.assetsPath = function (_path) { 8 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 9 | ? config.build.assetsSubDirectory 10 | : config.dev.assetsSubDirectory 11 | 12 | return path.posix.join(assetsSubDirectory, _path) 13 | } 14 | 15 | exports.cssLoaders = function (options) { 16 | options = options || {} 17 | 18 | const cssLoader = { 19 | loader: 'css-loader', 20 | options: { 21 | sourceMap: options.sourceMap 22 | } 23 | } 24 | 25 | const postcssLoader = { 26 | loader: 'postcss-loader', 27 | options: { 28 | sourceMap: options.sourceMap 29 | } 30 | } 31 | 32 | // generate loader string to be used with extract text plugin 33 | function generateLoaders (loader, loaderOptions) { 34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 35 | 36 | if (loader) { 37 | loaders.push({ 38 | loader: loader + '-loader', 39 | options: Object.assign({}, loaderOptions, { 40 | sourceMap: options.sourceMap 41 | }) 42 | }) 43 | } 44 | 45 | // Extract CSS when that option is specified 46 | // (which is the case during production build) 47 | if (options.extract) { 48 | return ExtractTextPlugin.extract({ 49 | use: loaders, 50 | fallback: 'vue-style-loader' 51 | }) 52 | } else { 53 | return ['vue-style-loader'].concat(loaders) 54 | } 55 | } 56 | 57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 58 | return { 59 | css: generateLoaders(), 60 | postcss: generateLoaders(), 61 | less: generateLoaders('less'), 62 | sass: generateLoaders('sass', { indentedSyntax: true }), 63 | scss: generateLoaders('sass'), 64 | stylus: generateLoaders('stylus'), 65 | styl: generateLoaders('stylus') 66 | } 67 | } 68 | 69 | // Generate loaders for standalone style files (outside of .vue) 70 | exports.styleLoaders = function (options) { 71 | const output = [] 72 | const loaders = exports.cssLoaders(options) 73 | 74 | for (const extension in loaders) { 75 | const loader = loaders[extension] 76 | output.push({ 77 | test: new RegExp('\\.' + extension + '$'), 78 | use: loader 79 | }) 80 | } 81 | 82 | return output 83 | } 84 | 85 | exports.createNotifierCallback = () => { 86 | const notifier = require('node-notifier') 87 | 88 | return (severity, errors) => { 89 | if (severity !== 'error') return 90 | 91 | const error = errors[0] 92 | const filename = error.file && error.file.split('!').pop() 93 | 94 | notifier.notify({ 95 | title: packageConfig.name, 96 | message: severity + ': ' + error.name, 97 | subtitle: filename || '', 98 | icon: path.join(__dirname, 'logo.png') 99 | }) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const config = require('../config') 5 | const vueLoaderConfig = require('./vue-loader.conf') 6 | 7 | function resolve (dir) { 8 | return path.join(__dirname, '..', dir) 9 | } 10 | 11 | const createLintingRule = () => ({ 12 | test: /\.(js|vue)$/, 13 | loader: 'eslint-loader', 14 | enforce: 'pre', 15 | include: [resolve('src'), resolve('test')], 16 | options: { 17 | formatter: require('eslint-friendly-formatter'), 18 | emitWarning: !config.dev.showEslintErrorsInOverlay 19 | } 20 | }) 21 | 22 | module.exports = { 23 | context: path.resolve(__dirname, '../'), 24 | entry: { 25 | app: './src/main.js' 26 | }, 27 | output: { 28 | path: config.build.assetsRoot, 29 | filename: '[name].js', 30 | publicPath: process.env.NODE_ENV === 'production' 31 | ? config.build.assetsPublicPath 32 | : config.dev.assetsPublicPath 33 | }, 34 | resolve: { 35 | extensions: ['.js', '.vue', '.json'], 36 | alias: { 37 | 'vue$': 'vue/dist/vue.esm.js', 38 | '@': resolve('src'), 39 | } 40 | }, 41 | module: { 42 | rules: [ 43 | ...(config.dev.useEslint ? [createLintingRule()] : []), 44 | { 45 | test: /\.vue$/, 46 | loader: 'vue-loader', 47 | options: vueLoaderConfig 48 | }, 49 | { 50 | test: /\.js$/, 51 | loader: 'babel-loader', 52 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 53 | }, 54 | { 55 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 56 | loader: 'url-loader', 57 | options: { 58 | limit: 10000, 59 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 60 | } 61 | }, 62 | { 63 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 64 | loader: 'url-loader', 65 | options: { 66 | limit: 10000, 67 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 68 | } 69 | }, 70 | { 71 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 72 | loader: 'url-loader', 73 | options: { 74 | limit: 10000, 75 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 76 | } 77 | } 78 | ] 79 | }, 80 | node: { 81 | // prevent webpack from injecting useless setImmediate polyfill because Vue 82 | // source contains it (although only uses it if it's native). 83 | setImmediate: false, 84 | // prevent webpack from injecting mocks to Node native modules 85 | // that does not make sense for the client 86 | dgram: 'empty', 87 | fs: 'empty', 88 | net: 'empty', 89 | tls: 'empty', 90 | child_process: 'empty' 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const webpack = require('webpack') 4 | const config = require('../config') 5 | const merge = require('webpack-merge') 6 | const path = require('path') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 11 | const portfinder = require('portfinder') 12 | 13 | const HOST = process.env.HOST 14 | const PORT = process.env.PORT && Number(process.env.PORT) 15 | 16 | const devWebpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 19 | }, 20 | // cheap-module-eval-source-map is faster for development 21 | devtool: config.dev.devtool, 22 | 23 | // these devServer options should be customized in /config/index.js 24 | devServer: { 25 | clientLogLevel: 'warning', 26 | historyApiFallback: { 27 | rewrites: [ 28 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 29 | ], 30 | }, 31 | hot: true, 32 | contentBase: false, // since we use CopyWebpackPlugin. 33 | compress: true, 34 | host: HOST || config.dev.host, 35 | port: PORT || config.dev.port, 36 | open: config.dev.autoOpenBrowser, 37 | overlay: config.dev.errorOverlay 38 | ? { warnings: false, errors: true } 39 | : false, 40 | publicPath: config.dev.assetsPublicPath, 41 | proxy: config.dev.proxyTable, 42 | quiet: true, // necessary for FriendlyErrorsPlugin 43 | watchOptions: { 44 | poll: config.dev.poll, 45 | } 46 | }, 47 | plugins: [ 48 | new webpack.DefinePlugin({ 49 | 'process.env': require('../config/dev.env') 50 | }), 51 | new webpack.HotModuleReplacementPlugin(), 52 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 53 | new webpack.NoEmitOnErrorsPlugin(), 54 | // https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: 'index.html', 57 | template: 'index.html', 58 | inject: true 59 | }), 60 | // copy custom static assets 61 | new CopyWebpackPlugin([ 62 | { 63 | from: path.resolve(__dirname, '../static'), 64 | to: config.dev.assetsSubDirectory, 65 | ignore: ['.*'] 66 | } 67 | ]) 68 | ] 69 | }) 70 | 71 | module.exports = new Promise((resolve, reject) => { 72 | portfinder.basePort = process.env.PORT || config.dev.port 73 | portfinder.getPort((err, port) => { 74 | if (err) { 75 | reject(err) 76 | } else { 77 | // publish the new Port, necessary for e2e tests 78 | process.env.PORT = port 79 | // add port to devServer config 80 | devWebpackConfig.devServer.port = port 81 | 82 | // Add FriendlyErrorsPlugin 83 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 84 | compilationSuccessInfo: { 85 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 86 | }, 87 | onErrors: config.dev.notifyOnErrors 88 | ? utils.createNotifierCallback() 89 | : undefined 90 | })) 91 | 92 | resolve(devWebpackConfig) 93 | } 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | const utils = require('./utils') 4 | const webpack = require('webpack') 5 | const config = require('../config') 6 | const merge = require('webpack-merge') 7 | const baseWebpackConfig = require('./webpack.base.conf') 8 | const CopyWebpackPlugin = require('copy-webpack-plugin') 9 | const HtmlWebpackPlugin = require('html-webpack-plugin') 10 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 13 | 14 | const env = require('../config/prod.env') 15 | 16 | const webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true, 21 | usePostCSS: true 22 | }) 23 | }, 24 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 25 | output: { 26 | path: config.build.assetsRoot, 27 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 29 | }, 30 | plugins: [ 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new UglifyJsPlugin({ 36 | uglifyOptions: { 37 | compress: { 38 | warnings: false 39 | } 40 | }, 41 | sourceMap: config.build.productionSourceMap, 42 | parallel: true 43 | }), 44 | // extract css into its own file 45 | new ExtractTextPlugin({ 46 | filename: utils.assetsPath('css/[name].[contenthash].css'), 47 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 51 | allChunks: true, 52 | }), 53 | // Compress extracted CSS. We are using this plugin so that possible 54 | // duplicated CSS from different components can be deduped. 55 | new OptimizeCSSPlugin({ 56 | cssProcessorOptions: config.build.productionSourceMap 57 | ? { safe: true, map: { inline: false } } 58 | : { safe: true } 59 | }), 60 | // generate dist index.html with correct asset hash for caching. 61 | // you can customize output by editing /index.html 62 | // see https://github.com/ampedandwired/html-webpack-plugin 63 | new HtmlWebpackPlugin({ 64 | filename: config.build.index, 65 | template: 'index.html', 66 | inject: true, 67 | minify: { 68 | removeComments: true, 69 | collapseWhitespace: true, 70 | removeAttributeQuotes: true 71 | // more options: 72 | // https://github.com/kangax/html-minifier#options-quick-reference 73 | }, 74 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 75 | chunksSortMode: 'dependency' 76 | }), 77 | // keep module.id stable when vendor modules does not change 78 | new webpack.HashedModuleIdsPlugin(), 79 | // enable scope hoisting 80 | new webpack.optimize.ModuleConcatenationPlugin(), 81 | // split vendor js into its own file 82 | new webpack.optimize.CommonsChunkPlugin({ 83 | name: 'vendor', 84 | minChunks (module) { 85 | // any required modules inside node_modules are extracted to vendor 86 | return ( 87 | module.resource && 88 | /\.js$/.test(module.resource) && 89 | module.resource.indexOf( 90 | path.join(__dirname, '../node_modules') 91 | ) === 0 92 | ) 93 | } 94 | }), 95 | // extract webpack runtime and module manifest to its own file in order to 96 | // prevent vendor hash from being updated whenever app bundle is updated 97 | new webpack.optimize.CommonsChunkPlugin({ 98 | name: 'manifest', 99 | minChunks: Infinity 100 | }), 101 | // This instance extracts shared chunks from code splitted chunks and bundles them 102 | // in a separate chunk, similar to the vendor chunk 103 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 104 | new webpack.optimize.CommonsChunkPlugin({ 105 | name: 'app', 106 | async: 'vendor-async', 107 | children: true, 108 | minChunks: 3 109 | }), 110 | 111 | // copy custom static assets 112 | new CopyWebpackPlugin([ 113 | { 114 | from: path.resolve(__dirname, '../static'), 115 | to: config.build.assetsSubDirectory, 116 | ignore: ['.*'] 117 | } 118 | ]) 119 | ] 120 | }) 121 | 122 | if (config.build.productionGzip) { 123 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 124 | 125 | webpackConfig.plugins.push( 126 | new CompressionWebpackPlugin({ 127 | asset: '[path].gz[query]', 128 | algorithm: 'gzip', 129 | test: new RegExp( 130 | '\\.(' + 131 | config.build.productionGzipExtensions.join('|') + 132 | ')$' 133 | ), 134 | threshold: 10240, 135 | minRatio: 0.8 136 | }) 137 | ) 138 | } 139 | 140 | if (config.build.bundleAnalyzerReport) { 141 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 142 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 143 | } 144 | 145 | module.exports = webpackConfig 146 | -------------------------------------------------------------------------------- /config/Entities/FamilyAdvocacyCasePlan.js: -------------------------------------------------------------------------------- 1 | import {FamilyAdvocacyGuardianship} from '@/../config/Entities/FamilyAdvocacyGuardianship.js'; 2 | import {FamilyAdvocacyTanfDetail} from '@/../config/Entities/FamilyAdvocacyTanfDetail.js'; 3 | 4 | export const FamilyAdvocacyCasePlan = { 5 | title:'Case Plan', 6 | toolbarTitle:"Case Plan", 7 | collectionId:"FamilyAdvocacyCasePlan", 8 | icon:"import_contacts", 9 | addIcon:"import_contacts", 10 | addButtonText:"Add Case Plan", 11 | evalFunctions:{ 12 | breadCrumb:'"Case Plan - " + entityId', 13 | subEntityListDisplayText:'"Case Plan Needed: " + (entityFormFields.CommunityConnectionNeeded?"Yes":"No")', 14 | }, 15 | onDelete:{ 16 | confirmMessage:"Are you sure you want to delete case plan from the primary kinship caregiver?", 17 | route:"/dashboard", 18 | }, 19 | formFields:[ 20 | { 21 | fieldType:'text', 22 | fieldName:"DateAdded", 23 | fieldLabel:"Date Added", 24 | disabled:true, 25 | }, 26 | { 27 | fieldType:'checkbox', 28 | fieldName:"CommunityConnectionNeeded", 29 | fieldLabel:"Community Connection Needed", 30 | }, 31 | { 32 | fieldType:'text', 33 | fieldName:"ListReferralsProvided", 34 | fieldLabel:"List Referrals Provided", 35 | }, 36 | { 37 | fieldType:'checkbox', 38 | fieldName:"CommunityAchieved", 39 | fieldLabel:"Community Achieved", 40 | }, 41 | { 42 | fieldType:'date', 43 | fieldName:"PreTest", 44 | fieldLabel:"Pre-Test (legal, financial, emotional goals only)", 45 | }, 46 | { 47 | fieldType:'text', 48 | fieldName:"LegalNeeded", 49 | fieldLabel:"Legal Needed?", 50 | }, 51 | { 52 | fieldType:'select', 53 | fieldName:"LegalGoal", 54 | fieldLabel:"Legal Goal", 55 | fieldItems:[ 56 | "6-Month Temporary", 57 | "Legal Guardianship", 58 | "Licensed Caregiver", 59 | "Adoption", 60 | "N/A", 61 | ], 62 | }, 63 | { 64 | fieldType:'select', 65 | fieldName:"LegalStatus", 66 | fieldLabel:"Legal Status", 67 | fieldItems:[ 68 | "In Progress", 69 | "Granted", 70 | "Denied", 71 | "N/A", 72 | ], 73 | }, 74 | { 75 | fieldType:'checkbox', 76 | fieldName:"LegalAchieved", 77 | fieldLabel:"Legal Achieved", 78 | }, 79 | { 80 | fieldType:'checkbox', 81 | fieldName:"FinancialAssistanceNeeded", 82 | fieldLabel:"Financial Assistance Needed?", 83 | }, 84 | { 85 | fieldType:'select', 86 | fieldName:"TANFStatus", 87 | fieldLabel:"TANFStatus", 88 | fieldItems:[ 89 | "Approved", 90 | "Denied", 91 | "Pending", 92 | "N/A- Already complete", 93 | "N/A - Parents in home", 94 | "N/A- Income", 95 | "N/A- Fictive", 96 | "N/A- Child's Income", 97 | "N/A- Child not a citizen", 98 | "N/A-Does not wish to cooperate with Child Support", 99 | ], 100 | }, 101 | { 102 | fieldType:'select', 103 | fieldName:"KinshipLicensing", 104 | fieldLabel:"Kinship Licensing", 105 | fieldItems:[ 106 | "Approved", 107 | "Pending", 108 | "Denied", 109 | "N/A- not formal", 110 | "N/A- not willing", 111 | ], 112 | }, 113 | { 114 | fieldType:'select', 115 | fieldName:"SNAPStatus", 116 | fieldLabel:"SNAP Status", 117 | fieldItems:[ 118 | "Approved", 119 | "Denied", 120 | "Pending", 121 | "N/a", 122 | ], 123 | }, 124 | { 125 | fieldType:'select', 126 | fieldName:"SSI", 127 | fieldLabel:"SSI", 128 | fieldItems:[ 129 | "Approved", 130 | "Denied", 131 | "Pending", 132 | "N/a", 133 | ], 134 | }, 135 | { 136 | fieldType:'select', 137 | fieldName:"MedicaidStatus", 138 | fieldLabel:"Medicaid Status", 139 | fieldItems:[ 140 | "Approved", 141 | "Denied", 142 | "Pending", 143 | "N/A", 144 | ], 145 | }, 146 | { 147 | fieldType:'checkbox', 148 | fieldName:"FinancialAchieved", 149 | fieldLabel:"Financial Achieved", 150 | }, 151 | { 152 | fieldType:'checkbox', 153 | fieldName:"EmotionalSupportNeeded", 154 | fieldLabel:"Emotional Support Needed", 155 | }, 156 | { 157 | fieldType:'checkbox', 158 | fieldName:"EmotionalAchieved", 159 | fieldLabel:"Emotional Achieved", 160 | }, 161 | { 162 | fieldType:'date', 163 | fieldName:"PostTest", 164 | fieldLabel:"Post Test (only if pre-test done)", 165 | }, 166 | ], 167 | subEntities:{ 168 | FamilyAdvocacyGuardianship:FamilyAdvocacyGuardianship, 169 | FamilyAdvocacyTanfDetail:FamilyAdvocacyTanfDetail, 170 | }, 171 | } 172 | -------------------------------------------------------------------------------- /config/Entities/FamilyAdvocacyGuardianship.js: -------------------------------------------------------------------------------- 1 | export const FamilyAdvocacyGuardianship = { 2 | title:'Guardianship', 3 | toolbarTitle:"Guardianship", 4 | collectionId:"FamilyAdvocacyGuardianship", 5 | icon:"assignment_ind", 6 | addIcon:"assignment_ind", 7 | addButtonText:"Add Guardianship", 8 | evalFunctions:{ 9 | breadCrumb:'"Guardianship - " + entityId', 10 | subEntityListDisplayText:'"Guardianship Type: " + entityFormFields.GuardianshipAdoptionType', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this Guardianship from the Family Advocacy Case Plan?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'select', 25 | fieldName:"GuardianshipAdoptionType", 26 | fieldLabel:"Guardianship/Adoption Type", 27 | fieldItems:[ 28 | "Consent", 29 | "No-Consent", 30 | ], 31 | }, 32 | { 33 | fieldType:'date', 34 | fieldName:"PaperworkProvided", 35 | fieldLabel:"Paperwork Provided", 36 | }, 37 | { 38 | fieldType:'date', 39 | fieldName:"PaperworkCompleted", 40 | fieldLabel:"Paperwork Completed", 41 | }, 42 | { 43 | fieldType:'date', 44 | fieldName:"PaperworkSubmitted", 45 | fieldLabel:"Paperwork Submitted", 46 | }, 47 | { 48 | fieldType:'date', 49 | fieldName:"CourtDate", 50 | fieldLabel:"Court Date", 51 | }, 52 | ], 53 | } 54 | -------------------------------------------------------------------------------- /config/Entities/FamilyAdvocacyTanfDetail.js: -------------------------------------------------------------------------------- 1 | export const FamilyAdvocacyTanfDetail = { 2 | title:'TANF Details', 3 | toolbarTitle:"TANF Details", 4 | collectionId:"FamilyAdvocacyTanfDetail", 5 | icon:"assignment_ind", 6 | addIcon:"assignment_ind", 7 | addButtonText:"Add TANF Detail", 8 | evalFunctions:{ 9 | breadCrumb:'"TANF Detail - " + entityId', 10 | subEntityListDisplayText:'"TANF Detail: " + entityFormFields.ApplicationCompleted', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this TANF Detail from the Family Advocacy Case Plan?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'date', 25 | fieldName:"ApplicationCompleted", 26 | fieldLabel:"Application Completed", 27 | }, 28 | { 29 | fieldType:'date', 30 | fieldName:"ApplicationSubmitted", 31 | fieldLabel:"ApplicationSubmitted", 32 | }, 33 | { 34 | fieldType:'date', 35 | fieldName:"ApplicationApprovalDenial", 36 | fieldLabel:"Application Approval Denial", 37 | }, 38 | { 39 | fieldType:'text', 40 | fieldName:"DenialReasons", 41 | fieldLabel:"Denial Reasons", 42 | }, 43 | { 44 | fieldType:'date', 45 | fieldName:"ResubmitAppeal", 46 | fieldLabel:"Resubmit Appeal", 47 | }, 48 | { 49 | fieldType:'text', 50 | fieldName:"AppealInfo", 51 | fieldLabel:"Appeal Info", 52 | }, 53 | { 54 | fieldType:'text', 55 | fieldName:"LocationOfDenial", 56 | fieldLabel:"Location Of Denial", 57 | }, 58 | { 59 | fieldType:'text', 60 | fieldName:"WorkerName", 61 | fieldLabel:"Worker Name", 62 | }, 63 | ], 64 | } 65 | -------------------------------------------------------------------------------- /config/Entities/KinshipChild.js: -------------------------------------------------------------------------------- 1 | import {KinshipChildIncome} from '@/../config/Entities/KinshipChildIncome.js'; 2 | import {KinshipChildCustodyStatus} from '@/../config/Entities/KinshipChildCustodyStatus.js'; 3 | 4 | export const KinshipChild = { 5 | title:'Kinship Child', 6 | toolbarTitle:"Kinship Children", 7 | collectionId:"KinshipChild", 8 | icon:"person", 9 | addIcon:"person_add", 10 | addButtonText:"Add Child", 11 | evalFunctions:{ 12 | breadCrumb:'entityFormFields.LastName + ", " + entityFormFields.FirstName + " " + (entityFormFields.MiddleName?entityFormFields.MiddleName:"")', 13 | subEntityListDisplayText:'entityFormFields.LastName + ", " + entityFormFields.FirstName + " " + (entityFormFields.MiddleName?entityFormFields.MiddleName:"")', 14 | }, 15 | onDelete:{ 16 | confirmMessage:"Are you sure you want to delete this Kinship Child from his/her Primary Kinship Caregiver?", 17 | route:"/dashboard", 18 | }, 19 | formFields:[ 20 | { 21 | fieldType:'text', 22 | fieldName:"DateAdded", 23 | fieldLabel:"Date Added", 24 | disabled:true, 25 | fieldAutoFillDate:true, 26 | }, 27 | { 28 | fieldType:'text', 29 | fieldName:"FirstName", 30 | fieldLabel:"First Name", 31 | rules:[ 32 | "v => !!v || 'Required'", 33 | "v => v.length <= 30 || 'Name must be less than 30'", 34 | ], 35 | }, 36 | { 37 | fieldType:'text', 38 | fieldName:"MiddleName", 39 | fieldLabel:"Middle Name", 40 | rules:[ 41 | "v => v.length <= 30 || 'Name must be less than 30'", 42 | ], 43 | }, 44 | { 45 | fieldType:'text', 46 | fieldName:"LastName", 47 | fieldLabel:"Last Name", 48 | rules:[ 49 | "v => !!v || 'Required'", 50 | "v => v.length <= 30 || 'Name must be less than 30'", 51 | ], 52 | }, 53 | { 54 | fieldType:'date', 55 | fieldName:"Birthdate", 56 | fieldLabel:"BirthDate", 57 | }, 58 | { 59 | fieldType:'select', 60 | fieldName:"RelationOfCaregiver", 61 | fieldLabel:"Relation Of Caregiver", 62 | fieldItems:[ 63 | "Grandmother", 64 | "Grandfather", 65 | "Aunt", 66 | "Uncle", 67 | "Great Aunt", 68 | "Great Uncle", 69 | "Great Grandmother", 70 | "Great Grandfather", 71 | "Cousin", 72 | "Sibling", 73 | "Step-parent", 74 | "Fictive Kin", 75 | ], 76 | }, 77 | { 78 | fieldType:'select', 79 | fieldName:"FamilySideOfCaregiver", 80 | fieldLabel:"Family Side Of Caregiver", 81 | fieldItems:[ 82 | "Paternal", 83 | "Maternal", 84 | "Fictive", 85 | "Sibling", 86 | ], 87 | }, 88 | { 89 | fieldType:'checkbox', 90 | fieldName:"FatherOnBirthCertificate", 91 | fieldLabel:"Father On Birth Certificate", 92 | }, 93 | { 94 | fieldType:'checkbox', 95 | fieldName:"BioFatherInvolved", 96 | fieldLabel:"Bio Father Involved", 97 | }, 98 | { 99 | fieldType:'checkbox', 100 | fieldName:"BioMotherInvolved", 101 | fieldLabel:"Bio Mother Involved", 102 | }, 103 | { 104 | fieldType:'checkbox', 105 | fieldName:"CPSInvolved", 106 | fieldLabel:"CPS Involved", 107 | }, 108 | { 109 | fieldType:'select', 110 | fieldName:"Gender", 111 | fieldLabel:"Gender", 112 | fieldItems:[ 113 | "M", 114 | "F", 115 | ], 116 | }, 117 | { 118 | fieldType:'text', 119 | fieldName:"AgeYears", 120 | fieldLabel:"Age (Years)", 121 | rules:[ 122 | "v => !!v || 'Required'", 123 | ], 124 | }, 125 | ], 126 | subEntities:{ 127 | KinshipChildIncome:KinshipChildIncome, 128 | KinshipChildCustodyStatus:KinshipChildCustodyStatus, 129 | }, 130 | } 131 | -------------------------------------------------------------------------------- /config/Entities/KinshipChildCustodyStatus.js: -------------------------------------------------------------------------------- 1 | export const KinshipChildCustodyStatus = { 2 | title:'Custody Status', 3 | toolbarTitle:"Custody Status", 4 | collectionId:"KinshipChildCustodyStatus", 5 | icon:"person", 6 | addIcon:"person_add", 7 | addButtonText:"Add Status", 8 | evalFunctions:{ 9 | breadCrumb:'"Custody Status - " + entityId', 10 | subEntityListDisplayText:'(entityFormFields.CustodyStartDate||"") + " - " + (entityFormFields.CustodyStatus||"")', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this Custody Status from the Kinship Child?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'date', 25 | fieldName:"CustodyStartDate", 26 | fieldLabel:"Custody Start Date", 27 | }, 28 | { 29 | fieldType:'select', 30 | fieldName:"CustodyStatus", 31 | fieldLabel:"Custody Status", 32 | fieldItems:[ 33 | "Physical Custody Only", 34 | "Unlicensed Caregiver: Unable to be Licensed", 35 | "Unlicensed Relative Caregiver: Working Towards License", 36 | "Licensed Relative Caregiver", 37 | "6-Month Temporary Guardianship", 38 | "Court Ordered Guardianship", 39 | "Legal Custody (court ordered)", 40 | "Adoption", 41 | "Reunification", 42 | "Disruption", 43 | "Other", 44 | ], 45 | }, 46 | { 47 | fieldType:'text', 48 | fieldName:"Notes", 49 | fieldLabel:"Notes", 50 | }, 51 | ], 52 | } 53 | -------------------------------------------------------------------------------- /config/Entities/KinshipChildIncome.js: -------------------------------------------------------------------------------- 1 | export const KinshipChildIncome = { 2 | title:'Income', 3 | toolbarTitle:"Income", 4 | collectionId:"KinshipChildIncome", 5 | icon:"monetization_on", 6 | addIcon:"monetization_on", 7 | addButtonText:"Add Income", 8 | evalFunctions:{ 9 | breadCrumb:'"Income - " + entityId', 10 | subEntityListDisplayText:'(entityFormFields.IncomeSource||"") + " - $" + (entityFormFields.IncomePerMonth||"" + "/Month")', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this Income from the Kinship Child?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'text', 25 | fieldName:"IncomeSource", 26 | fieldLabel:"Income Source", 27 | rules:[ 28 | "v => !!v || 'Required'", 29 | ] , 30 | }, 31 | { 32 | fieldType:'text', 33 | fieldName:"IncomePerMonth", 34 | fieldLabel:"Income / Month", 35 | rules:[ 36 | "v => !!v || 'Required'", 37 | "v => !/ /.test(v) || 'Check for and remove errant spaces'", 38 | "v => /^[0-9]*\.?[0-9]+$/.test(v) || 'Only numbers are allowed'", 39 | ] , 40 | subTotals:['houseHoldIncome'], 41 | }, 42 | { 43 | fieldType:'text', 44 | fieldName:"Notes", 45 | fieldLabel:"Notes", 46 | }, 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /config/Entities/OtherInHousehold.js: -------------------------------------------------------------------------------- 1 | import {OtherInHouseholdIncome} from '@/../config/Entities/OtherInHouseholdIncome.js'; 2 | 3 | export const OtherInHousehold = { 4 | title:'Other In Household', 5 | toolbarTitle:"Others In Household", 6 | collectionId:"OtherInHousehold", 7 | icon:"person", 8 | addIcon:"person_add", 9 | addButtonText:"Add Other", 10 | evalFunctions:{ 11 | breadCrumb:'entityFormFields.LastName + ", " + entityFormFields.FirstName + " " + (entityFormFields.MiddleName?entityFormFields.MiddleName:"")', 12 | subEntityListDisplayText:'entityFormFields.LastName + ", " + entityFormFields.FirstName + " " + (entityFormFields.MiddleName?entityFormFields.MiddleName:"")', 13 | }, 14 | onDelete:{ 15 | confirmMessage:"Are you sure you want to delete this Other Household Member from his/her Primary Kinship Caregiver?", 16 | route:"/dashboard", 17 | }, 18 | formFields:[ 19 | { 20 | fieldType:'text', 21 | fieldName:"DateAdded", 22 | fieldLabel:"Date Added", 23 | disabled:true, 24 | }, 25 | { 26 | fieldType:'text', 27 | fieldName:"FirstName", 28 | fieldLabel:"First Name", 29 | rules:[ 30 | "v => !!v || 'Required'", 31 | "v => v.length <= 30 || 'Name must be less than 30'", 32 | ], 33 | }, 34 | { 35 | fieldType:'text', 36 | fieldName:"MiddleName", 37 | fieldLabel:"Middle Name", 38 | rules:[ 39 | "v => v.length <= 30 || 'Name must be less than 30'", 40 | ], 41 | }, 42 | { 43 | fieldType:'text', 44 | fieldName:"LastName", 45 | fieldLabel:"Last Name", 46 | rules:[ 47 | "v => !!v || 'Required'", 48 | "v => v.length <= 30 || 'Name must be less than 30'", 49 | ], 50 | }, 51 | { 52 | fieldType:'date', 53 | fieldName:"Birthdate", 54 | fieldLabel:"BirthDate", 55 | }, 56 | { 57 | fieldType:'text', 58 | fieldName:"Age", 59 | fieldLabel:"Age (Years)", 60 | rules:[ 61 | "v => !!v || 'Required'", 62 | ], 63 | }, 64 | { 65 | fieldType:'select', 66 | fieldName:"Gender", 67 | fieldLabel:"Gender", 68 | fieldItems:[ 69 | "M", 70 | "F", 71 | ], 72 | }, 73 | { 74 | fieldType:'select', 75 | fieldName:"RelationToCaregiver", 76 | fieldLabel:"Relation To Caregiver", 77 | fieldItems:[ 78 | "Daughter/Son", 79 | "Husband/Wife/Partner", 80 | "Mother/Father", 81 | "Sibling", 82 | "Roommate", 83 | "Other", 84 | ], 85 | }, 86 | { 87 | fieldType:'text', 88 | fieldName:"Email", 89 | fieldLabel:"Email Address", 90 | }, 91 | { 92 | fieldType:'text', 93 | fieldName:"Notes", 94 | fieldLabel:"Notes", 95 | }, 96 | 97 | ], 98 | subEntities:{ 99 | OtherInHouseholdIncome:OtherInHouseholdIncome, 100 | }, 101 | } 102 | -------------------------------------------------------------------------------- /config/Entities/OtherInHouseholdIncome.js: -------------------------------------------------------------------------------- 1 | export const OtherInHouseholdIncome = { 2 | title:'Income', 3 | toolbarTitle:"Income", 4 | collectionId:"OtherInHouseholdIncome", 5 | icon:"monetization_on", 6 | addIcon:"monetization_on", 7 | addButtonText:"Add Income", 8 | evalFunctions:{ 9 | breadCrumb:'"Income - " + entityId', 10 | subEntityListDisplayText:'(entityFormFields.IncomeSource||"") + " - $" + (entityFormFields.IncomePerMonth||"" + "/Month")', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this Income from the Other In Household?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'text', 25 | fieldName:"IncomeSource", 26 | fieldLabel:"Income Source", 27 | rules:[ 28 | "v => !!v || 'Required'", 29 | ] , 30 | }, 31 | { 32 | fieldType:'text', 33 | fieldName:"IncomePerMonth", 34 | fieldLabel:"Income / Month", 35 | rules:[ 36 | "v => !!v || 'Required'", 37 | "v => !/ /.test(v) || 'Check for and remove errant spaces'", 38 | "v => /^[0-9]*\.?[0-9]+$/.test(v) || 'Only numbers are allowed'", 39 | ] , 40 | subTotals:['houseHoldIncome'], 41 | }, 42 | { 43 | fieldType:'text', 44 | fieldName:"Notes", 45 | fieldLabel:"Notes", 46 | }, 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /config/Entities/PrimaryKinshipCaregiver.js: -------------------------------------------------------------------------------- 1 | import {FamilyAdvocacyCasePlan} from '@/../config/Entities/FamilyAdvocacyCasePlan.js'; 2 | import {PrimaryKinshipCaregiverIncome} from '@/../config/Entities/PrimaryKinshipCaregiverIncome.js'; 3 | import {KinshipChild} from '@/../config/Entities/KinshipChild.js'; 4 | import {OtherInHousehold} from '@/../config/Entities/OtherInHousehold.js'; 5 | import {PrimaryKinshipCaregiverContact} from '@/../config/Entities/PrimaryKinshipCaregiverContact.js'; 6 | import {PrimaryKinshipCaregiverFundsDispersed} from '@/../config/Entities/PrimaryKinshipCaregiverFundsDispersed.js'; 7 | 8 | 9 | export const PrimaryKinshipCaregiver = { 10 | collectionId:"PrimaryKinshipCaregiver", 11 | title:'Primary Kinship Caregiver', 12 | icon:"person", 13 | addIcon:"person_add", 14 | addButtonText:"Add New Client", 15 | evalFunctions:{ 16 | breadCrumb:'entityFormFields.LastName + ", " + entityFormFields.FirstName + " " + (entityFormFields.MiddleName?entityFormFields.MiddleName:"")', 17 | subEntityListDisplayText:'', 18 | }, 19 | onDelete:{ 20 | confirmMessage:"Are you sure you want to delete this Primary Kinship Caregiver?", 21 | route:"/dashboard", 22 | }, 23 | formFields:[ 24 | { 25 | fieldType:'checkbox', 26 | fieldName:"NavigatorProgram", 27 | fieldLabel:"Navigator Program", 28 | }, 29 | { 30 | fieldType:'checkbox', 31 | fieldName:"FamilyAdvocacy", 32 | fieldLabel:"Family Advocacy (Legal, Financial, Emotional)", 33 | }, 34 | { 35 | fieldType:'date', 36 | fieldName:"DateAdded", 37 | fieldLabel:"Date Added", 38 | fieldAutoFillDate:true, 39 | }, 40 | { 41 | fieldType:'date', 42 | fieldName:"FollowUpDate", 43 | fieldLabel:"Follow Up Date", 44 | }, 45 | { 46 | fieldType:'checkbox', 47 | fieldName:"SpanishFollowUpNeeded", 48 | fieldLabel:"Spanish Follow Up Needed", 49 | }, 50 | { 51 | fieldType:'date', 52 | fieldName:"CaseComplete", 53 | fieldLabel:"Case Complete", 54 | }, 55 | { 56 | fieldType:'text', 57 | fieldName:"FirstName", 58 | fieldLabel:"First Name", 59 | rules:[ 60 | "v => !!v || 'Required'", 61 | "v => v.length <= 30 || 'Name must be less than 30'", 62 | ] , 63 | }, 64 | { 65 | fieldType:'text', 66 | fieldName:"LastName", 67 | fieldLabel:"Last Name", 68 | rules:[ 69 | "v => !!v || 'Required'", 70 | "v => v.length <= 30 || 'Name must be less than 30'", 71 | ] , 72 | }, 73 | { 74 | fieldType:'date', 75 | fieldName:"Birthdate", 76 | fieldLabel:"BirthDate", 77 | }, 78 | { 79 | fieldType:'select', 80 | fieldName:"Gender", 81 | fieldLabel:"Gender", 82 | fieldItems:[ 83 | "M", 84 | "F", 85 | ], 86 | }, 87 | { 88 | fieldType:'text', 89 | fieldName:"PrimaryPhoneNumber", 90 | fieldLabel:"Primary Phone Number", 91 | rules:[ 92 | "v => !!v || 'Required'", 93 | ] , 94 | }, 95 | { 96 | fieldType:'text', 97 | fieldName:"SecondaryPhoneNumber", 98 | fieldLabel:"Secondary Phone Number", 99 | }, 100 | { 101 | fieldType:'text', 102 | fieldName:"EmailAddress", 103 | fieldLabel:"EmailAddress", 104 | rules:[ 105 | "v => !!v || 'Required'", 106 | ] , 107 | }, 108 | { 109 | fieldType:'text', 110 | fieldName:"StreetAddress1", 111 | fieldLabel:"Street Address", 112 | rules:[ 113 | "v => !!v || 'Required'", 114 | ] , 115 | }, 116 | { 117 | fieldType:'text', 118 | fieldName:"City", 119 | fieldLabel:"City", 120 | rules:[ 121 | "v => !!v || 'Required'", 122 | ] , 123 | }, 124 | { 125 | fieldType:'text', 126 | fieldName:"State", 127 | fieldLabel:"State", 128 | rules:[ 129 | "v => !!v || 'Required'", 130 | ] , 131 | }, 132 | { 133 | fieldType:'text', 134 | fieldName:"ZipCode", 135 | fieldLabel:"ZipCode", 136 | rules:[ 137 | "v => !!v || 'Required'", 138 | ] , 139 | }, 140 | { 141 | fieldType:'select', 142 | fieldName:"ClientTypeAtIntake", 143 | fieldLabel:"Client Type At Intake", 144 | fieldItems:[ 145 | "1- Formal/Licensed", 146 | "2- Formal/Licensing in progress", 147 | "3- Formal/Unable to be licensed; blood relative", 148 | "4- Formal/Unable to be licensed; fictive", 149 | "5- Informal/Guardianship; blood relative", 150 | "6- Informal/Guardianship; fictive", 151 | "7- Informal/Temp guardianship; blood relative", 152 | "8- Informal/Temp guardianship; fictive", 153 | "9- Informal/No guardianship; blood relative", 154 | "10- Informal/No guardianship; fictive", 155 | "11-Adoptive Parent", 156 | "12-No Custody", 157 | ], 158 | }, 159 | { 160 | fieldType:'checkbox', 161 | fieldName:"Diversion", 162 | fieldLabel:"Diversion?", 163 | }, 164 | { 165 | fieldType:'select', 166 | fieldName:"PrimaryReasonForKinshipCare", 167 | fieldLabel:"Primary Reason For Kinship Care", 168 | fieldItems:[ 169 | "Substance Abuse", 170 | "Mental Health", 171 | "Domestic Violence", 172 | "Child Abuse/Neglect", 173 | "Incarceration", 174 | "Homelessness", 175 | "Poverty", 176 | "Unwillingness to Parent", 177 | "Death", 178 | "Military Service", 179 | "Deportation", 180 | ], 181 | }, 182 | { 183 | fieldType:'select', 184 | fieldName:"SecondaryReasonForKinshipCare", 185 | fieldLabel:"Secondary Reason For Kinship Care", 186 | fieldItems:[ 187 | "Substance Abuse", 188 | "Mental Health", 189 | "Domestic Violence", 190 | "Child Abuse/Neglect", 191 | "Incarceration", 192 | "Homelessness", 193 | "Poverty", 194 | "Unwillingness to Parent", 195 | "Death", 196 | "Military Service", 197 | "Deportation", 198 | ], 199 | }, 200 | { 201 | fieldType:'select', 202 | fieldName:"ThirdReasonForKinshipCare", 203 | fieldLabel:"Third Reason For Kinship Care", 204 | fieldItems:[ 205 | "Substance Abuse", 206 | "Mental Health", 207 | "Domestic Violence", 208 | "Child Abuse/Neglect", 209 | "Incarceration", 210 | "Homelessness", 211 | "Poverty", 212 | "Unwillingness to Parent", 213 | "Death", 214 | "Military Service", 215 | "Deportation", 216 | ], 217 | }, 218 | { 219 | fieldType:'select', 220 | fieldName:"MaritalStatus", 221 | fieldLabel:"Marital Status", 222 | fieldItems:[ 223 | "Divorced", 224 | "Engaged", 225 | "Married", 226 | "Partnered", 227 | "Separated", 228 | "Single", 229 | "Widowed", 230 | ], 231 | }, 232 | { 233 | fieldType:'select', 234 | fieldName:"HousingType", 235 | fieldLabel:"Housing Type", 236 | fieldItems:[ 237 | "Friends/Family", 238 | "Other", 239 | "Own", 240 | "Rent", 241 | ], 242 | }, 243 | { 244 | fieldType:'select', 245 | fieldName:"TransportationType", 246 | fieldLabel:"Transportation Type", 247 | fieldItems:[ 248 | "Bus", 249 | "None", 250 | "Other", 251 | "Own vehicle", 252 | "Rides", 253 | ], 254 | }, 255 | { 256 | fieldType:'checkbox', 257 | fieldName:"PrimaryCaregiverDisabled", 258 | fieldLabel:"Primary Caregiver Disabled?", 259 | }, 260 | { 261 | fieldType:'text', 262 | fieldName:"MedicalConditions", 263 | fieldLabel:"Medical Conditions", 264 | }, 265 | { 266 | fieldType:'select', 267 | fieldName:"Ethnicity", 268 | fieldLabel:"Ethnicity", 269 | fieldItems:[ 270 | "A", 271 | "AA", 272 | "C", 273 | "H", 274 | "NA", 275 | "PI", 276 | "2 or more", 277 | "Decline to answer", 278 | ], 279 | }, 280 | { 281 | fieldType:'select', 282 | fieldName:"PrimaryLanguageSpoken", 283 | fieldLabel:"Primary Language Spoken", 284 | fieldItems:[ 285 | "Chinese", 286 | "English", 287 | "English/Spanis", 288 | "Spanish", 289 | ], 290 | }, 291 | { 292 | fieldType:'select', 293 | fieldName:"ReferredBy", 294 | fieldLabel:"Referred By", 295 | fieldItems:[ 296 | "DFS- FPC", 297 | "DFS- Kinship Licensing", 298 | "DFS- CPS", 299 | "DFS- Permanency", 300 | "Legal Aid- Family Court Self Help", 301 | "Legal Aid- Guardianship Clinic", 302 | "Family Resource Center", 303 | "211", 304 | "Internet", 305 | "FK Client (please note)", 306 | "Other", 307 | ], 308 | }, 309 | { 310 | fieldType:'text', 311 | fieldName:"ReferralNotes", 312 | fieldLabel:"Referral Notes", 313 | }, 314 | { 315 | fieldType:'date', 316 | fieldName:"AttendedDFSKinshipInfoSession", 317 | fieldLabel:"Attended DFS Kinship InfoSession", 318 | }, 319 | { 320 | fieldType:'checkbox', 321 | fieldName:"FederalPovertyLevel", 322 | fieldLabel:"Federal Poverty Level", 323 | }, 324 | { 325 | fieldType:'checkbox', 326 | fieldName:"Below200FPL", 327 | fieldLabel:"Below 200% FPL", 328 | }, 329 | { 330 | fieldType:'checkbox', 331 | fieldName:"Below275", 332 | fieldLabel:"Below 275 %", 333 | }, 334 | { 335 | fieldType:'select', 336 | fieldName:"HUDSection8Median", 337 | fieldLabel:"HUD Section 8 Median %", 338 | fieldItems:[ 339 | "30%", 340 | "50%", 341 | "80%", 342 | "100%", 343 | ], 344 | }, 345 | { 346 | fieldType:'select', 347 | fieldName:"GrantFundsUsedFY18", 348 | fieldLabel:"Grant Funds Used", 349 | fieldItems:[ 350 | "X", 351 | "Y", 352 | "Z", 353 | ], 354 | }, 355 | { 356 | fieldType:'select', 357 | fieldName:"GrantFundsUsedFY19", 358 | fieldLabel:"Grant Funds Used", 359 | fieldItems:[ 360 | "X", 361 | "Y", 362 | "Z", 363 | ], 364 | }, 365 | 366 | ], 367 | subTotals:{ 368 | config:{ 369 | title:"Totals", 370 | hiddenItemsIcon:"add" 371 | }, 372 | ids:{ 373 | houseHoldIncome:{ 374 | listDisplayText:"Total Household Incomes: ", 375 | icon: "monetization_on", 376 | valPrepend:"$", 377 | valAppendx:"", 378 | }, 379 | caregiverFundsDispersed:{ 380 | listDisplayText:"Total Funds Dispersed: ", 381 | icon: "monetization_on", 382 | valPrepend:"$", 383 | valAppendx:"", 384 | }, 385 | }, 386 | }, 387 | subEntities:{ 388 | PrimaryKinshipCaregiverIncome:PrimaryKinshipCaregiverIncome, 389 | KinshipChild:KinshipChild, 390 | OtherInHousehold:OtherInHousehold, 391 | FamilyAdvocacyCasePlan:FamilyAdvocacyCasePlan, 392 | PrimaryKinshipCaregiverContact:PrimaryKinshipCaregiverContact, 393 | PrimaryKinshipCaregiverFundsDispersed:PrimaryKinshipCaregiverFundsDispersed, 394 | } 395 | } -------------------------------------------------------------------------------- /config/Entities/PrimaryKinshipCaregiverContact.js: -------------------------------------------------------------------------------- 1 | export const PrimaryKinshipCaregiverContact = { 2 | title:'Contacts', 3 | toolbarTitle:"Contacts With Caregiver", 4 | collectionId:"PrimaryKinshipCaregiverContact", 5 | icon:"phone", 6 | addIcon:"phone_forwarded", 7 | addButtonText:"Add Contact", 8 | evalFunctions:{ 9 | breadCrumb:'"Contact - " + entityId', 10 | subEntityListDisplayText:'(entityFormFields.ContactDate||"") + " - " + (entityFormFields.ContactType||"")', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this contact from the primary kinship caregiver?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'Date', 25 | fieldName:"ContactDate", 26 | fieldLabel:"Contact Date", 27 | }, 28 | { 29 | fieldType:'select', 30 | fieldName:"ContactLocation", 31 | fieldLabel:"Contact Location", 32 | fieldItems:[ 33 | "Phone", 34 | "Email", 35 | "Mail", 36 | "Office", 37 | "Field", 38 | "Home", 39 | "Facebook Group", 40 | ], 41 | }, 42 | { 43 | fieldType:'select', 44 | fieldName:"ContactType", 45 | fieldLabel:"Contact Type", 46 | fieldItems:[ 47 | "Car Seat Check", 48 | "Car Seat Education Class", 49 | "Case Plan Referral", 50 | "Case Work/Research", 51 | "Copy Service", 52 | "CPLC Parenting Class", 53 | "CPR/First Aid Class", 54 | "Death Benefits", 55 | "DFS Info Session", 56 | "Emergency Resource", 57 | "Emotional Support", 58 | "Energy Assistance Application Assistance", 59 | "Family Event", 60 | "Follow Up Check- Family Advocacy", 61 | "Helpline- Info only", 62 | "Intake", 63 | "Kinship Licensing Class #5", 64 | "Licensing Application Assistance", 65 | "Medicaid", 66 | "Notary", 67 | "Permanency Session", 68 | "Pre-Test", 69 | "Post-Test", 70 | "Resource Locator Tool", 71 | "SNAP", 72 | "Support Group", 73 | "TANF Application Session", 74 | "QPI Training", 75 | ], 76 | }, 77 | { 78 | fieldType:'text', 79 | fieldName:"ContactNotes", 80 | fieldLabel:"Contact Notes", 81 | }, 82 | { 83 | fieldType:'select', 84 | fieldName:"FosterKinshipEmployee", 85 | fieldLabel:"FosterKinship Employee", 86 | fieldItems:[ 87 | "Berenice Blas", 88 | "Alison Caliendo", 89 | "Anntesha Chesterton", 90 | "Leah Dods", 91 | "Nani Garrett", 92 | "Michelle Pulido", 93 | "Sandy Vargas", 94 | ], 95 | }, 96 | { 97 | fieldType:'text', 98 | fieldName:"TimeSpentMinutes", 99 | fieldLabel:"Time Spent Minutes", 100 | }, 101 | ], 102 | } 103 | -------------------------------------------------------------------------------- /config/Entities/PrimaryKinshipCaregiverFundsDispersed.js: -------------------------------------------------------------------------------- 1 | export const PrimaryKinshipCaregiverFundsDispersed = { 2 | title:'FK Funds & Resources Dispersed', 3 | toolbarTitle:"FK Funds & Resources Dispersed", 4 | collectionId:"PrimaryKinshipCaregiverFundsDispersed", 5 | icon:"monetization_on", 6 | addIcon:"monetization_on", 7 | addButtonText:"Add Funds Dispersed", 8 | evalFunctions:{ 9 | breadCrumb:'"Dispersed Detail - " + entityId', 10 | subEntityListDisplayText:'entityFormFields.TypeOfAssistance +" - " + entityFormFields.Value', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this Funds Dispersed Detail from the Primary Kinship Caregiver", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'date', 25 | fieldName:"DateGiven", 26 | fieldLabel:"Date Given", 27 | }, 28 | { 29 | fieldType:'select', 30 | fieldName:"TypeOfAssistance", 31 | fieldLabel:"Type Of Assistance", 32 | fieldItems:[ 33 | "Cash", 34 | "Debit/Credit Card", 35 | "Check", 36 | "Gift Card", 37 | "Hard Goods", 38 | ], 39 | }, 40 | { 41 | fieldType:'select', 42 | fieldName:"AssistanceCategory", 43 | fieldLabel:"Assistance Category", 44 | fieldItems:[ 45 | "Birth Certificates", 46 | "Food", 47 | "Housing", 48 | "Clothing", 49 | "Hygiene", 50 | "Safety Items", 51 | "Bed/Crib", 52 | "Furniture", 53 | "Car Seat", 54 | "Legal Forms", 55 | "Transportation", 56 | "Utilities", 57 | "Rent", 58 | "School Supplies", 59 | "Books/Toys", 60 | "Holiday", 61 | "Other", 62 | ], 63 | }, 64 | { 65 | fieldType:'text', 66 | fieldName:"Value", 67 | fieldLabel:"Value", 68 | rules:[ 69 | "v => !!v || 'Required'", 70 | "v => !/ /.test(v) || 'Check for and remove errant spaces'", 71 | "v => /^[0-9]*\.?[0-9]+$/.test(v) || 'Only numbers are allowed'", 72 | ] , 73 | subTotals:['caregiverFundsDispersed'], 74 | }, 75 | { 76 | fieldType:'text', 77 | fieldName:"ResourceProvided", 78 | fieldLabel:"Resource Provided", 79 | }, 80 | { 81 | fieldType:'select', 82 | fieldName:"ReceiptReceived", 83 | fieldLabel:"Receipt Received?", 84 | fieldItems:[ 85 | "Yes", 86 | "No", 87 | "N/A", 88 | ], 89 | }, 90 | { 91 | fieldType:'text', 92 | fieldName:"Notes", 93 | fieldLabel:"Notes", 94 | }, 95 | ], 96 | } 97 | -------------------------------------------------------------------------------- /config/Entities/PrimaryKinshipCaregiverIncome.js: -------------------------------------------------------------------------------- 1 | export const PrimaryKinshipCaregiverIncome = { 2 | title:'Income', 3 | toolbarTitle:"Income", 4 | collectionId:"PrimaryKinshipCaregiverIncome", 5 | icon:"monetization_on", 6 | addIcon:"monetization_on", 7 | addButtonText:"Add Income", 8 | evalFunctions:{ 9 | breadCrumb:'"Income - " + entityId', 10 | subEntityListDisplayText:'(entityFormFields.IncomeSource||"") + " - $" + (entityFormFields.IncomePerMonth||"" + "/Month")', 11 | }, 12 | onDelete:{ 13 | confirmMessage:"Are you sure you want to delete this income from the primary kinship caregiver?", 14 | route:"/dashboard", 15 | }, 16 | formFields:[ 17 | { 18 | fieldType:'text', 19 | fieldName:"DateAdded", 20 | fieldLabel:"Date Added", 21 | disabled:true, 22 | }, 23 | { 24 | fieldType:'text', 25 | fieldName:"IncomeSource", 26 | fieldLabel:"Income Source", 27 | rules:[ 28 | "v => !!v || 'Required'", 29 | ] , 30 | }, 31 | { 32 | fieldType:'text', 33 | fieldName:"IncomePerMonth", 34 | fieldLabel:"Income / Month", 35 | rules:[ 36 | "v => !!v || 'Required'", 37 | "v => !/ /.test(v) || 'Check for and remove errant spaces'", 38 | "v => /^[0-9]*\.?[0-9]+$/.test(v) || 'Only numbers are allowed'", 39 | ] , 40 | subTotals:['houseHoldIncome'], 41 | }, 42 | { 43 | fieldType:'text', 44 | fieldName:"Notes", 45 | fieldLabel:"Notes", 46 | }, 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /config/Entities/RootEntity.js: -------------------------------------------------------------------------------- 1 | import {PrimaryKinshipCaregiver} from '@/../config/Entities/PrimaryKinshipCaregiver.js'; 2 | export const RootEntity = PrimaryKinshipCaregiver; -------------------------------------------------------------------------------- /config/credentials.template.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 3 | // 1) Create Accounts at Algolia and Google/Firebase to get these credentials. 4 | // 2) Copy this file to a new file named credentials.js in the same folder 5 | // 3) Then Fill in your credentials below 6 | 7 | // Initialize Algolia 8 | algolia:{ 9 | appId:"xxxxxxxx", 10 | apiKey:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 11 | indexName:'YourAlgoliaIndexName', 12 | }, 13 | // Initialize Firebase 14 | firebase:{ 15 | apiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 16 | authDomain: 'your-database.firebaseapp.com', 17 | databaseURL: 'https://your-database.firebaseio.com', 18 | projectId: 'your-project-id', 19 | storageBucket: 'yourproject.appspot.com', 20 | messagingSenderId: 'xxxxxxxxxxx', 21 | }, 22 | } -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.2.8 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | // Use Eslint Loader? 24 | // If true, your code will be linted during bundling and 25 | // linting errors and warnings will be shown in the console. 26 | useEslint: false, 27 | // If true, eslint errors and warnings will also be shown in the error overlay 28 | // in the browser. 29 | showEslintErrorsInOverlay: false, 30 | 31 | /** 32 | * Source Maps 33 | */ 34 | 35 | // https://webpack.js.org/configuration/devtool/#development 36 | devtool: 'cheap-module-eval-source-map', 37 | 38 | // If you have problems debugging vue-files in devtools, 39 | // set this to false - it *may* help 40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 41 | cacheBusting: true, 42 | 43 | cssSourceMap: true, 44 | }, 45 | 46 | build: { 47 | // Template for index.html 48 | index: path.resolve(__dirname, '../dist/index.html'), 49 | 50 | // Paths 51 | assetsRoot: path.resolve(__dirname, '../dist'), 52 | assetsSubDirectory: 'static', 53 | assetsPublicPath: '/', 54 | 55 | /** 56 | * Source Maps 57 | */ 58 | 59 | productionSourceMap: true, 60 | // https://webpack.js.org/configuration/devtool/#production 61 | devtool: '#source-map', 62 | 63 | // Gzip off by default as many popular static hosts such as 64 | // Surge or Netlify already gzip all static assets for you. 65 | // Before setting to `true`, make sure to: 66 | // npm install --save-dev compression-webpack-plugin 67 | productionGzip: false, 68 | productionGzipExtensions: ['js', 'css'], 69 | 70 | // Run the build command with an extra argument to 71 | // View the bundle analyzer report after build finishes: 72 | // `npm run build --report` 73 | // Set to `true` or `false` to always turn it on or off 74 | bundleAnalyzerReport: process.env.npm_config_report 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /documentation/Basic Program Flow Control - as of commit id 3d2ecbaf7bc72fe79c37ea529f7302a78458bec3.Draw.io: -------------------------------------------------------------------------------- 1 | 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 -------------------------------------------------------------------------------- /documentation/Basic Program Flow Control - as of commit id 3d2ecbaf7bc72fe79c37ea529f7302a78458bec3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DedicatedManagers/vue.vuex.vuetify.firebase-realtime-database/7cb4773d561b70dae32a7f445838b86f935f4501/documentation/Basic Program Flow Control - as of commit id 3d2ecbaf7bc72fe79c37ea529f7302a78458bec3.pdf -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | fk.vuetify.firebase.database 7 | 8 | 9 | 10 | 11 |
12 | 64 |
65 |
66 |

Loading Application

67 |
68 |
69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fk.vuetify.firebase.database", 3 | "version": "1.0.0", 4 | "description": " Foster Kinship Client Database - using VueJS, VuetifyJS, and Google Firebase", 5 | "author": "Terry Caliendo ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "lint": "eslint --ext .js,.vue src", 11 | "build": "node build/build.js" 12 | }, 13 | "dependencies": { 14 | "debounce": "^1.1.0", 15 | "deepmerge": "^2.1.1", 16 | "firebase": "^5.3.1", 17 | "vue": "^2.5.17", 18 | "vue-instantsearch": "^1.7.0", 19 | "vue-router": "^3.0.1", 20 | "vuetify": "^1.1.11", 21 | "vuex": "^3.0.1" 22 | }, 23 | "devDependencies": { 24 | "autoprefixer": "^7.1.2", 25 | "babel-core": "^6.22.1", 26 | "babel-eslint": "^7.1.1", 27 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 28 | "babel-loader": "^7.1.5", 29 | "babel-plugin-syntax-jsx": "^6.18.0", 30 | "babel-plugin-transform-runtime": "^6.22.0", 31 | "babel-plugin-transform-vue-jsx": "^3.5.0", 32 | "babel-preset-env": "^1.3.2", 33 | "babel-preset-stage-2": "^6.22.0", 34 | "chalk": "^2.0.1", 35 | "copy-webpack-plugin": "^4.5.2", 36 | "css-loader": "^0.28.0", 37 | "eslint": "^3.19.0", 38 | "eslint-config-airbnb-base": "^11.3.0", 39 | "eslint-friendly-formatter": "^3.0.0", 40 | "eslint-import-resolver-webpack": "^0.8.3", 41 | "eslint-loader": "^1.7.1", 42 | "eslint-plugin-html": "^4.0.5", 43 | "eslint-plugin-import": "^2.14.0", 44 | "extract-text-webpack-plugin": "^3.0.0", 45 | "file-loader": "^1.1.4", 46 | "friendly-errors-webpack-plugin": "^1.6.1", 47 | "html-webpack-plugin": "^2.30.1", 48 | "node-notifier": "^5.1.2", 49 | "optimize-css-assets-webpack-plugin": "^3.2.0", 50 | "ora": "^1.2.0", 51 | "portfinder": "^1.0.16", 52 | "postcss-import": "^11.0.0", 53 | "postcss-loader": "^2.1.6", 54 | "postcss-url": "^7.2.1", 55 | "rimraf": "^2.6.0", 56 | "semver": "^5.3.0", 57 | "shelljs": "^0.7.6", 58 | "uglifyjs-webpack-plugin": "^1.2.7", 59 | "url-loader": "^0.5.8", 60 | "vue-loader": "^13.3.0", 61 | "vue-style-loader": "^3.0.1", 62 | "vue-template-compiler": "^2.5.17", 63 | "webpack": "^3.6.0", 64 | "webpack-bundle-analyzer": "^2.9.0", 65 | "webpack-dev-server": "^2.9.1", 66 | "webpack-merge": "^4.1.4" 67 | }, 68 | "engines": { 69 | "node": ">= 6.0.0", 70 | "npm": ">= 3.0.0" 71 | }, 72 | "browserslist": [ 73 | "> 1%", 74 | "last 2 versions", 75 | "not ie <= 8" 76 | ] 77 | } 78 | -------------------------------------------------------------------------------- /src/.gitrepo: -------------------------------------------------------------------------------- 1 | ; DO NOT EDIT (unless you know what you are doing) 2 | ; 3 | ; This subdirectory is a git "subrepo", and this file is maintained by the 4 | ; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme 5 | ; 6 | [subrepo] 7 | remote = https://github.com/vuetifyjs/templates-common.git 8 | branch = subrepo/webpack-src 9 | commit = 090741fa8ba4da0c6f85db64eff64550704123e1 10 | parent = e05204fc0583a8c99f1963ce873eba1266838215 11 | method = merge 12 | cmdver = 0.4.0 13 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 91 | 92 | 103 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DedicatedManagers/vue.vuex.vuetify.firebase-realtime-database/7cb4773d561b70dae32a7f445838b86f935f4501/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/Dashboard.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 110 | 111 | 113 | -------------------------------------------------------------------------------- /src/components/Login.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 26 | 52 | 53 | 54 | 56 | -------------------------------------------------------------------------------- /src/components/Search.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 64 | 117 | 118 | -------------------------------------------------------------------------------- /src/components/TemplateLoader.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 206 | 207 | -------------------------------------------------------------------------------- /src/components/import.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 293 | 294 | 296 | -------------------------------------------------------------------------------- /src/components/shared/DialogConfirm.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/components/shared/EntityForm.Vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 36 | 96 | 97 | -------------------------------------------------------------------------------- /src/components/shared/EntitySearch.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 33 | 83 | 84 | -------------------------------------------------------------------------------- /src/components/shared/EntitySubtotals.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 37 | 169 | 170 | -------------------------------------------------------------------------------- /src/components/shared/FormFields/Checkbox.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 29 | 30 | -------------------------------------------------------------------------------- /src/components/shared/FormFields/Date.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 53 | 54 | -------------------------------------------------------------------------------- /src/components/shared/FormFields/Select.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 29 | 30 | -------------------------------------------------------------------------------- /src/components/shared/FormFields/Text.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 49 | 50 | -------------------------------------------------------------------------------- /src/components/shared/SearchBox.vue: -------------------------------------------------------------------------------- 1 | 82 | 83 | 84 | 105 | 106 | -------------------------------------------------------------------------------- /src/components/shared/SubEntityList.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 40 | 107 | 108 | 109 | 111 | -------------------------------------------------------------------------------- /src/components/shared/Templates/Column-Two.vue: -------------------------------------------------------------------------------- 1 | 53 | 54 | 82 | 83 | 85 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue'; 4 | import Vuetify from 'vuetify'; 5 | import firebase from 'firebase/app'; 6 | import 'firebase/auth'; 7 | import 'firebase/database'; 8 | import 'firebase/firestore'; 9 | import 'vuetify/dist/vuetify.min.css'; 10 | import App from './App'; 11 | import router from './router'; 12 | import {store} from './store/store' 13 | import InstantSearch from 'vue-instantsearch'; 14 | import credentials from '@/../config/credentials'; 15 | 16 | // Update the display 17 | document.querySelector('#PreLoader H1').innerHTML = 'Connecting...'; 18 | 19 | Vue.use(InstantSearch); 20 | 21 | firebase.initializeApp(credentials.firebase); // returns FirebaseApplImpl 22 | const firestore = firebase.firestore(); // returns a firestore object 23 | firestore.settings({timestampsInSnapshots: true,}); 24 | 25 | Vue.use(Vuetify, { 26 | // theme: { 27 | // primary: '#ee44aa', 28 | // secondary: '#424242', 29 | // accent: '#82B1FF', 30 | // error: '#FF5252', 31 | // info: '#2196F3', 32 | // success: '#4CAF50', 33 | // warning: '#FFC107', 34 | // } 35 | }); 36 | 37 | Vue.config.productionTip = false; 38 | 39 | let app; 40 | 41 | firebase.auth().onAuthStateChanged(function(user) { 42 | store.commit('setUserIsAuthenticated', user?true:null); 43 | store.commit('setUser', user); 44 | 45 | if (!app) { 46 | /* eslint-disable no-new */ 47 | app = new Vue({ 48 | store:store, 49 | el: '#app', 50 | router, 51 | components: { App }, 52 | template: '', 53 | }); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/app'; 2 | import Router from 'vue-router'; 3 | import Vue from 'vue'; 4 | import Dashboard from '@/components/Dashboard'; 5 | import Login from '@/components/Login'; 6 | import Search from '@/components/Search'; 7 | import Import from '@/components/Import'; 8 | //import {store} from '@/store/store' 9 | import TemplateLoader from '@/components/TemplateLoader'; 10 | 11 | Vue.use(Router); 12 | 13 | const router = new Router({ 14 | routes: [ 15 | { 16 | path: '*', 17 | redirect: '/login', 18 | }, 19 | { 20 | path: '/', 21 | redirect: '/login', 22 | }, 23 | { 24 | path: '/login', 25 | name: 'Login', 26 | component: Login, 27 | }, 28 | { 29 | path: '/import', 30 | name: 'Import', 31 | component: Import, 32 | }, 33 | { 34 | path: '/db/:DbPath(.*)', 35 | props: true, 36 | name: 'dbpath', 37 | component: TemplateLoader, 38 | }, 39 | { 40 | path: '/dashboard', 41 | name: 'Dashboard', 42 | component: Dashboard, 43 | meta: { 44 | requiresAuth: true, 45 | }, 46 | }, 47 | { 48 | path: '/search', 49 | name: 'Search', 50 | component: Search, 51 | meta: { 52 | requiresAuth: true, 53 | }, 54 | }, 55 | ], 56 | mode: 'history', 57 | }); 58 | 59 | router.beforeEach((to, from, next) => { 60 | const currentUser = firebase.auth().currentUser; 61 | const requiresAuth = to.matched.some(record => record.meta.requiresAuth); 62 | console.log('router.beforeEach'); 63 | // console.log('to:'); 64 | // console.log(to); 65 | // console.log(store.state.currentEntity); 66 | // console.log('from:'); 67 | // console.log(from); 68 | 69 | if (requiresAuth && !currentUser){ 70 | next('/login'); 71 | } 72 | else if(currentUser && to.matched.some(record=>record.path == "/login")){ 73 | next('/dashboard'); 74 | } 75 | else { 76 | next(); 77 | } 78 | }); 79 | 80 | export default router; 81 | -------------------------------------------------------------------------------- /src/store/store.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | import firebase from 'firebase/app'; 4 | import router from '@/router'; 5 | import merge from 'deepmerge'; 6 | import debounce from 'debounce'; 7 | 8 | Vue.use(Vuex); 9 | 10 | 11 | export const store = new Vuex.Store({ 12 | state:{ 13 | loadingIndicator:false, // each component needs to show/hide its output based on this indicator. Can't show or hide at the level or the component