mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	fix conflicts
This commit is contained in:
		| @ -101,13 +101,23 @@ export default { | ||||
|       'deleteCategory' | ||||
|     ]), | ||||
|     async removeExpenseCategory (id, index) { | ||||
|       let response = await this.deleteCategory(id) | ||||
|       if (response.data.success) { | ||||
|         window.toastr['success'](this.$tc('settings.expense_category.deleted_message')) | ||||
|         this.id = null | ||||
|         this.$refs.table.refresh() | ||||
|         return true | ||||
|       } window.toastr['success'](this.$t('settings.expense_category.already_in_use')) | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$t('settings.expense_category.confirm_delete'), | ||||
|         icon: '/assets/icon/trash-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willDelete) => { | ||||
|         if (willDelete) { | ||||
|           let response = await this.deleteCategory(id) | ||||
|           if (response.data.success) { | ||||
|             window.toastr['success'](this.$tc('settings.expense_category.deleted_message')) | ||||
|             this.id = null | ||||
|             this.$refs.table.refresh() | ||||
|             return true | ||||
|           } window.toastr['error'](this.$t('settings.expense_category.already_in_use')) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     openCategoryModal () { | ||||
|       this.openModal({ | ||||
|  | ||||
| @ -8,7 +8,7 @@ | ||||
|         </p> | ||||
|       </div> | ||||
|       <form action="" @submit.prevent="saveEmailConfig()"> | ||||
|         <div class="row my-2 mt-5"> | ||||
|         <div class="row"> | ||||
|           <div class="col-md-6 my-2"> | ||||
|             <label class="form-label">{{ $t('settings.mail.driver') }}</label> | ||||
|             <span class="text-danger"> *</span> | ||||
| @ -117,7 +117,7 @@ | ||||
|         </div> | ||||
|         <base-button | ||||
|           :loading="loading" | ||||
|           class="pull-right mt-5" | ||||
|           class="pull-right mt-4" | ||||
|           icon="save" | ||||
|           color="theme" | ||||
|           type="submit" | ||||
|  | ||||
| @ -29,16 +29,9 @@ | ||||
|       > | ||||
|         <table-column | ||||
|           :sortable="true" | ||||
|           :filterable="true" | ||||
|           :label="$t('settings.tax_types.tax_name')" | ||||
|         > | ||||
|           <template slot-scope="row"> | ||||
|             <span>{{ $t('settings.tax_types.tax_name') }}</span> | ||||
|             <span class="tax-name"> | ||||
|               {{ row.name }} | ||||
|             </span> | ||||
|           </template> | ||||
|         </table-column> | ||||
|           show="name" | ||||
|         /> | ||||
|         <table-column | ||||
|           :sortable="true" | ||||
|           :filterable="true" | ||||
| @ -159,13 +152,23 @@ export default { | ||||
|       } | ||||
|     }, | ||||
|     async removeTax (id, index) { | ||||
|       let response = await this.deleteTaxType(id) | ||||
|       if (response.data.success) { | ||||
|         window.toastr['success'](this.$t('settings.tax_types.deleted_message')) | ||||
|         this.id = null | ||||
|         this.$refs.table.refresh() | ||||
|         return true | ||||
|       }window.toastr['success'](this.$t('settings.tax_types.already_in_use')) | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$t('settings.tax_types.confirm_delete'), | ||||
|         icon: '/assets/icon/trash-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willDelete) => { | ||||
|         if (willDelete) { | ||||
|           let response = await this.deleteTaxType(id) | ||||
|           if (response.data.success) { | ||||
|             window.toastr['success'](this.$t('settings.tax_types.deleted_message')) | ||||
|             this.id = null | ||||
|             this.$refs.table.refresh() | ||||
|             return true | ||||
|           }window.toastr['error'](this.$t('settings.tax_types.already_in_use')) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     openTaxModal () { | ||||
|       this.openModal({ | ||||
|  | ||||
							
								
								
									
										55
									
								
								resources/assets/js/views/settings/UpdateApp.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								resources/assets/js/views/settings/UpdateApp.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | ||||
| <template> | ||||
|   <div class="setting-main-container"> | ||||
|     <div class="card setting-card"> | ||||
|       <div class="page-header"> | ||||
|         <h3 class="page-title">{{ $t('settings.update_app.title') }}</h3> | ||||
|         <p class="page-sub-title"> | ||||
|           {{ $t('settings.update_app.description') }} | ||||
|         </p> | ||||
|         <base-button size="large" icon="sync-alt" color="theme" @click="onUpdateApp"> | ||||
|           {{ $t('settings.update_app.update') }} | ||||
|         </base-button> | ||||
|         <div v-if="isShowProgressBar" class="progress mt-4"> | ||||
|           <div | ||||
|             :style="[{'width': progress+'%'}]" | ||||
|             class="progress-bar progress-bar-striped progress-bar-animated" | ||||
|             role="progressbar" | ||||
|             aria-valuenow="0" | ||||
|             aria-valuemin="0" | ||||
|             aria-valuemax="100" | ||||
|           /> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
| <script> | ||||
|  | ||||
| export default { | ||||
|   data () { | ||||
|     return { | ||||
|       isShowProgressBar: false, | ||||
|       progress: 10, | ||||
|       interval: null | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|   }, | ||||
|   mounted () { | ||||
|   }, | ||||
|   methods: { | ||||
|     onUpdateApp () { | ||||
|       this.isShowProgressBar = true | ||||
|       this.interval = setInterval(() => { | ||||
|         if (this.progress >= 100) { | ||||
|           clearInterval(this.interval) | ||||
|           setTimeout(() => { | ||||
|             this.isShowProgressBar = false | ||||
|           }, 1000) | ||||
|         } | ||||
|         this.progress += 10 | ||||
|       }, 250) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| @ -43,6 +43,9 @@ | ||||
|               type="password" | ||||
|               @input="$v.formData.password.$touch()" | ||||
|             /> | ||||
|             <div v-if="$v.formData.password.$error"> | ||||
|               <span v-if="!$v.formData.password.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.formData.password.$params.minLength.min, {count: $v.formData.password.$params.minLength.min}) }} </span> | ||||
|             </div> | ||||
|           </div> | ||||
|           <div class="col-md-6 mb-4 form-group"> | ||||
|             <label class="input-label">{{ $tc('settings.account_settings.confirm_password') }}</label> | ||||
| @ -78,7 +81,7 @@ | ||||
| <script> | ||||
| import { validationMixin } from 'vuelidate' | ||||
| import { mapActions } from 'vuex' | ||||
| const { required, requiredIf, sameAs, email } = require('vuelidate/lib/validators') | ||||
| const { required, requiredIf, sameAs, email, minLength } = require('vuelidate/lib/validators') | ||||
|  | ||||
| export default { | ||||
|   mixins: [validationMixin], | ||||
| @ -103,6 +106,7 @@ export default { | ||||
|         email | ||||
|       }, | ||||
|       password: { | ||||
|         minLength: minLength(5) | ||||
|       }, | ||||
|       confirm_password: { | ||||
|         required: requiredIf('isRequired'), | ||||
|  | ||||
| @ -74,6 +74,12 @@ export default { | ||||
|           title: 'settings.menu_title.notifications', | ||||
|           icon: 'bell', | ||||
|           iconType: 'far' | ||||
|         }, | ||||
|         { | ||||
|           link: '/admin/settings/update-app', | ||||
|           title: 'settings.menu_title.update_app', | ||||
|           icon: 'sync-alt', | ||||
|           iconType: 'fas' | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user