mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-27 19:51:09 -04:00 
			
		
		
		
	remove unused components and update eslint + prettier config
This commit is contained in:
		
							
								
								
									
										12
									
								
								.eslintrc
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								.eslintrc
									
									
									
									
									
								
							| @ -2,9 +2,17 @@ | |||||||
|   "root": true, |   "root": true, | ||||||
|   "extends": [ |   "extends": [ | ||||||
|     "plugin:vue/recommended", |     "plugin:vue/recommended", | ||||||
|     "standard" |     "eslint:recommended", | ||||||
|  |     "prettier/vue", | ||||||
|  |     "plugin:prettier/recommended" | ||||||
|   ], |   ], | ||||||
|   "rules": { |   "rules": { | ||||||
|     "vue/max-attributes-per-line" : 3 |     "vue/max-attributes-per-line": ["error", { | ||||||
|  |       "singleline": 10, | ||||||
|  |       "multiline": { | ||||||
|  |         "max": 1, | ||||||
|  |         "allowFirstLine": false | ||||||
|  |       } | ||||||
|  |     }]     | ||||||
|   } |   } | ||||||
| } | } | ||||||
							
								
								
									
										5
									
								
								.prettierrc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.prettierrc.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | { | ||||||
|  |   "semi": false, | ||||||
|  |   "singleQuote": true, | ||||||
|  |   "tabWidth": 2 | ||||||
|  | } | ||||||
							
								
								
									
										5516
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5516
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										22
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								package.json
									
									
									
									
									
								
							| @ -8,19 +8,16 @@ | |||||||
|     "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" |     "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "babel-eslint": "^8.2.3", |     "babel-eslint": "^8.2.6", | ||||||
|     "browser-sync": "^2.26.7", |  | ||||||
|     "browser-sync-webpack-plugin": "^2.0.1", |  | ||||||
|     "cross-env": "^5.1", |     "cross-env": "^5.1", | ||||||
|     "css-loader": "^0.28.8", |     "css-loader": "^0.28.8", | ||||||
|     "eslint": "^4.14.0", |     "eslint": "^4.19.1", | ||||||
|     "eslint-config-standard": "^11.0.0-beta.0", |     "eslint-config-prettier": "^6.10.1", | ||||||
|     "eslint-plugin-import": "^2.11.0", |     "eslint-loader": "^3.0.3", | ||||||
|     "eslint-plugin-node": "^5.2.1", |     "eslint-plugin-prettier": "^3.1.2", | ||||||
|     "eslint-plugin-promise": "^3.6.0", |     "eslint-plugin-vue": "^4.7.1", | ||||||
|     "eslint-plugin-standard": "^3.0.1", |  | ||||||
|     "eslint-plugin-vue": "^4.0.1", |  | ||||||
|     "laravel-mix": "^5.0.0", |     "laravel-mix": "^5.0.0", | ||||||
|  |     "prettier": "^2.0.2", | ||||||
|     "resolve-url-loader": "3.1.0", |     "resolve-url-loader": "3.1.0", | ||||||
|     "sass": "^1.22.9", |     "sass": "^1.22.9", | ||||||
|     "sass-loader": "7.*", |     "sass-loader": "7.*", | ||||||
| @ -35,17 +32,12 @@ | |||||||
|     "axios": "^0.19", |     "axios": "^0.19", | ||||||
|     "bootstrap": "^4.1.0", |     "bootstrap": "^4.1.0", | ||||||
|     "chart.js": "^2.7.3", |     "chart.js": "^2.7.3", | ||||||
|     "easy-pie-chart": "^2.1.7", |  | ||||||
|     "fs": "0.0.1-security", |  | ||||||
|     "guid": "0.0.12", |     "guid": "0.0.12", | ||||||
|     "lodash": "^4.17.13", |     "lodash": "^4.17.13", | ||||||
|     "moment": "^2.18.1", |     "moment": "^2.18.1", | ||||||
|     "npm": "^6.4.1", |  | ||||||
|     "popper.js": "^1.12.9", |  | ||||||
|     "sweet-modal-vue": "^2.0.0", |     "sweet-modal-vue": "^2.0.0", | ||||||
|     "sweetalert": "^2.1.2", |     "sweetalert": "^2.1.2", | ||||||
|     "toastr": "^2.1.4", |     "toastr": "^2.1.4", | ||||||
|     "upgrade": "^1.1.0", |  | ||||||
|     "v-money": "^0.8.1", |     "v-money": "^0.8.1", | ||||||
|     "v-tooltip": "^2.0.2", |     "v-tooltip": "^2.0.2", | ||||||
|     "vue": "^2.5.17", |     "vue": "^2.5.17", | ||||||
|  | |||||||
| @ -1,69 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="graph-container"> |  | ||||||
|     <canvas |  | ||||||
|       id="graph" |  | ||||||
|       ref="graph" |  | ||||||
|     /> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script> |  | ||||||
| import Chart from 'chart.js' |  | ||||||
|  |  | ||||||
| export default { |  | ||||||
|   props: { |  | ||||||
|     labels: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     values: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   mounted () { |  | ||||||
|     let context = this.$refs.graph.getContext('2d') |  | ||||||
|     let options = { |  | ||||||
|       responsive: true, |  | ||||||
|       maintainAspectRatio: false, |  | ||||||
|       legend: { |  | ||||||
|         display: false |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     let data = { |  | ||||||
|       labels: this.labels, |  | ||||||
|       datasets: [ |  | ||||||
|         { |  | ||||||
|           label: 'My First dataset', |  | ||||||
|           backgroundColor: 'rgba(79, 196, 127,0.2)', |  | ||||||
|           borderColor: 'rgba(79, 196, 127,1)', |  | ||||||
|           borderWidth: 1, |  | ||||||
|           hoverBackgroundColor: 'rgba(79, 196, 127,0.4)', |  | ||||||
|           hoverBorderColor: 'rgba(79, 196, 127,1)', |  | ||||||
|           data: this.values |  | ||||||
|         } |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     this.myBarChart = new Chart(context, { |  | ||||||
|       type: 'bar', |  | ||||||
|       data: data, |  | ||||||
|       options: options |  | ||||||
|     }) |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   beforeDestroy () { |  | ||||||
|     this.myBarChart.destroy() |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
|  |  | ||||||
| <style scoped> |  | ||||||
| .graph-container { |  | ||||||
|   height: 300px; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -1,71 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="graph-container"> |  | ||||||
|     <canvas |  | ||||||
|       id="graph" |  | ||||||
|       ref="graph"/> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script> |  | ||||||
| import Chart from 'chart.js' |  | ||||||
|  |  | ||||||
| export default { |  | ||||||
|   props: { |  | ||||||
|     labels: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     values: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     bgColors: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     hoverBgColors: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   mounted () { |  | ||||||
|     let context = this.$refs.graph.getContext('2d') |  | ||||||
|     let options = { |  | ||||||
|       responsive: true, |  | ||||||
|       maintainAspectRatio: false |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     let data = { |  | ||||||
|       labels: this.labels, |  | ||||||
|       datasets: [ |  | ||||||
|         { |  | ||||||
|           data: this.values, |  | ||||||
|           backgroundColor: this.bgColors, |  | ||||||
|           hoverBackgroundColor: this.hoverBgColors |  | ||||||
|         } |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     this.myDoughnutChart = new Chart(context, { |  | ||||||
|       type: 'doughnut', |  | ||||||
|       data: data, |  | ||||||
|       options: options |  | ||||||
|     }) |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   beforeDestroy () { |  | ||||||
|     this.myDoughnutChart.destroy() |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
|  |  | ||||||
| <style scoped> |  | ||||||
| .graph-container { |  | ||||||
|   height: 300px; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -1,72 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="graph-container"> |  | ||||||
|     <canvas |  | ||||||
|       id="graph" |  | ||||||
|       ref="graph" /> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script> |  | ||||||
| import Chart from 'chart.js' |  | ||||||
|  |  | ||||||
| export default { |  | ||||||
|   props: { |  | ||||||
|     labels: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     values: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     bgColors: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     }, |  | ||||||
|     hoverBgColors: { |  | ||||||
|       type: Array, |  | ||||||
|       require: true, |  | ||||||
|       default: Array |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   mounted () { |  | ||||||
|     let context = this.$refs.graph.getContext('2d') |  | ||||||
|  |  | ||||||
|     let options = { |  | ||||||
|       responsive: true, |  | ||||||
|       maintainAspectRatio: false |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     let data = { |  | ||||||
|       labels: this.labels, |  | ||||||
|       datasets: [ |  | ||||||
|         { |  | ||||||
|           data: this.values, |  | ||||||
|           backgroundColor: this.bgColors, |  | ||||||
|           hoverBackgroundColor: this.hoverBgColors |  | ||||||
|         } |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     this.pieChart = new Chart(context, { |  | ||||||
|       type: 'pie', |  | ||||||
|       data: data, |  | ||||||
|       options: options |  | ||||||
|     }) |  | ||||||
|   }, |  | ||||||
|  |  | ||||||
|   beforeDestroy () { |  | ||||||
|     this.pieChart.destroy() |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
|  |  | ||||||
| <style scoped> |  | ||||||
| .graph-container { |  | ||||||
|   height: 300px; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -1,95 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="graph-container easy-pie-chart"> |  | ||||||
|     <svg width="100%" height="100%" viewBox="0 0 34 34" class="donut"> |  | ||||||
|       <circle :stroke-width="strokeWidth" class="donut-segment" cx="17" cy="17" r="15.91549430918954" fill="transparent" :stroke="strokeColor" stroke-dasharray="100 0" /> |  | ||||||
|       <circle :stroke-width="strokeWidth" :stroke="color" :stroke-dasharray="successProgress" class="donut-segment" cx="17" cy="17" r="15.91549430918954" fill="transparent" /> |  | ||||||
|       <!-- <g class="chart-text"> |  | ||||||
|         <text :style="'fill:' + color" x="48%" y="50%" class="chart-number" > |  | ||||||
|           {{ progress }} |  | ||||||
|         </text> |  | ||||||
|         <text :style="'fill:' + color" x="73%" y="50%" class="chart-label" > |  | ||||||
|           % |  | ||||||
|         </text> |  | ||||||
|       </g> --> |  | ||||||
|     </svg> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
| <script> |  | ||||||
| export default { |  | ||||||
|   props: { |  | ||||||
|     values: { |  | ||||||
|       type: Number, |  | ||||||
|       require: true, |  | ||||||
|       default: 100 |  | ||||||
|     }, |  | ||||||
|     strokeWidth: { |  | ||||||
|       type: Number, |  | ||||||
|       require: false, |  | ||||||
|       default: 1.2 |  | ||||||
|     }, |  | ||||||
|     strokeColor: { |  | ||||||
|       type: String, |  | ||||||
|       require: true, |  | ||||||
|       default: '#eeeeee' |  | ||||||
|     }, |  | ||||||
|     color: { |  | ||||||
|       type: String, |  | ||||||
|       require: true, |  | ||||||
|       default: '#007dcc' |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   data () { |  | ||||||
|     return { |  | ||||||
|       progress: 0 |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   watch: { |  | ||||||
|     values (newvalue, oldvalue) { |  | ||||||
|       if (newvalue !== oldvalue) { |  | ||||||
|         this.setProgress() |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   computed: { |  | ||||||
|     successProgress () { |  | ||||||
|       return this.progress + ' ' + (100 - this.progress) |  | ||||||
|     }, |  | ||||||
|     remainProgress () { |  | ||||||
|       return 100 - this.progress + ' ' + this.progress |  | ||||||
|     }, |  | ||||||
|   }, |  | ||||||
|   mounted () { |  | ||||||
|     this.setProgress() |  | ||||||
|   }, |  | ||||||
|   methods: { |  | ||||||
|     setProgress () { |  | ||||||
|       let self = this |  | ||||||
|       for (let i = 0; i < this.values; i++) { |  | ||||||
|         setTimeout(function () { |  | ||||||
|           ++self.progress |  | ||||||
|         }, 15 * i) |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
| <style scoped> |  | ||||||
| .chart-text { |  | ||||||
|   font: 6px "Montserrat", Arial, sans-serif; |  | ||||||
|   fill: #000; |  | ||||||
|   -moz-transform: translateY(0.25em); |  | ||||||
|   -ms-transform: translateY(0.25em); |  | ||||||
|   -webkit-transform: translateY(0.25em); |  | ||||||
|   transform: translateY(0.5em); |  | ||||||
| } |  | ||||||
| .chart-number { |  | ||||||
|   font-size: 8px; |  | ||||||
|   line-height: 1; |  | ||||||
|   text-anchor: middle; |  | ||||||
| } |  | ||||||
| .chart-label { |  | ||||||
|   font-size: 5px; |  | ||||||
|   text-transform: uppercase; |  | ||||||
|   text-anchor: middle; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
		Reference in New Issue
	
	Block a user