mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7bba576dca | |||
| 05454af593 | |||
| 74fe481ed5 | |||
| 1cd654b0cc | 
							
								
								
									
										40
									
								
								app/Listeners/Updates/v2/Version202.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								app/Listeners/Updates/v2/Version202.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | |||||||
|  | <?php | ||||||
|  |  | ||||||
|  | namespace Crater\Listeners\Updates\v2; | ||||||
|  |  | ||||||
|  | use Illuminate\Contracts\Queue\ShouldQueue; | ||||||
|  | use Illuminate\Queue\InteractsWithQueue; | ||||||
|  | use Crater\Events\UpdateFinished; | ||||||
|  | use Crater\Listeners\Updates\Listener; | ||||||
|  | use Crater\Setting; | ||||||
|  |  | ||||||
|  | class Version202 extends Listener | ||||||
|  | { | ||||||
|  |     const VERSION = '2.0.2'; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Create the event listener. | ||||||
|  |      * | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function __construct() | ||||||
|  |     { | ||||||
|  |         // | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Handle the event. | ||||||
|  |      * | ||||||
|  |      * @param  object  $event | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function handle(UpdateFinished $event) | ||||||
|  |     { | ||||||
|  |         if ($this->isListenerFired($event)) { | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // Update Crater app version | ||||||
|  |         Setting::setSetting('version', static::VERSION); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -8,6 +8,7 @@ use Crater\Events\UpdateFinished; | |||||||
| use Crater\Listeners\Updates\v1\Version110; | use Crater\Listeners\Updates\v1\Version110; | ||||||
| use Crater\Listeners\Updates\v2\Version200; | use Crater\Listeners\Updates\v2\Version200; | ||||||
| use Crater\Listeners\Updates\v2\Version201; | use Crater\Listeners\Updates\v2\Version201; | ||||||
|  | use Crater\Listeners\Updates\v2\Version202; | ||||||
|  |  | ||||||
| class EventServiceProvider extends ServiceProvider | class EventServiceProvider extends ServiceProvider | ||||||
| { | { | ||||||
| @ -21,6 +22,7 @@ class EventServiceProvider extends ServiceProvider | |||||||
|             Version110::class, |             Version110::class, | ||||||
|             Version200::class, |             Version200::class, | ||||||
|             Version201::class, |             Version201::class, | ||||||
|  |             Version202::class, | ||||||
|         ], |         ], | ||||||
|         Registered::class => [ |         Registered::class => [ | ||||||
|             SendEmailVerificationNotification::class, |             SendEmailVerificationNotification::class, | ||||||
|  | |||||||
| @ -9,6 +9,6 @@ return [ | |||||||
|     | |     | | ||||||
|     */ |     */ | ||||||
|  |  | ||||||
|     'version' => '2.0.1', |     'version' => '2.0.2', | ||||||
|  |  | ||||||
| ]; | ]; | ||||||
|  | |||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,4 +1,4 @@ | |||||||
| { | { | ||||||
|     "/assets/js/app.js": "/assets/js/app.js?id=2a5cfd8271e10bd501dc", |     "/assets/js/app.js": "/assets/js/app.js?id=36ab3529ebffd4f0624b", | ||||||
|     "/assets/css/crater.css": "/assets/css/crater.css?id=108e3a8d009e7d38018c" |     "/assets/css/crater.css": "/assets/css/crater.css?id=108e3a8d009e7d38018c" | ||||||
| } | } | ||||||
|  | |||||||
| @ -151,6 +151,7 @@ export default { | |||||||
|       id: null, |       id: null, | ||||||
|       count: null, |       count: null, | ||||||
|       estimates: [], |       estimates: [], | ||||||
|  |       estimate: null, | ||||||
|       currency: null, |       currency: null, | ||||||
|       searchData: { |       searchData: { | ||||||
|         orderBy: null, |         orderBy: null, | ||||||
| @ -165,10 +166,6 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
|     estimate () { |  | ||||||
|       return this.$store.getters['estimate/getEstimate'](this.$route.params.id) |  | ||||||
|     }, |  | ||||||
|  |  | ||||||
|     getOrderBy () { |     getOrderBy () { | ||||||
|       if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) { |       if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) { | ||||||
|         return true |         return true | ||||||
| @ -180,8 +177,14 @@ export default { | |||||||
|       return `/estimates/pdf/${this.estimate.unique_hash}` |       return `/estimates/pdf/${this.estimate.unique_hash}` | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|  |   watch: { | ||||||
|  |     $route (to, from) { | ||||||
|  |       this.loadEstimate() | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|   created () { |   created () { | ||||||
|     this.loadEstimates() |     this.loadEstimates() | ||||||
|  |     this.loadEstimate() | ||||||
|     this.onSearched = _.debounce(this.onSearched, 500) |     this.onSearched = _.debounce(this.onSearched, 500) | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
| @ -192,7 +195,8 @@ export default { | |||||||
|       'markAsSent', |       'markAsSent', | ||||||
|       'sendEmail', |       'sendEmail', | ||||||
|       'deleteEstimate', |       'deleteEstimate', | ||||||
|       'selectEstimate' |       'selectEstimate', | ||||||
|  |       'fetchViewEstimate' | ||||||
|     ]), |     ]), | ||||||
|     async loadEstimates () { |     async loadEstimates () { | ||||||
|       let response = await this.fetchEstimates() |       let response = await this.fetchEstimates() | ||||||
| @ -200,6 +204,13 @@ export default { | |||||||
|         this.estimates = response.data.estimates.data |         this.estimates = response.data.estimates.data | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     async loadEstimate () { | ||||||
|  |       let response = await this.fetchViewEstimate(this.$route.params.id) | ||||||
|  |  | ||||||
|  |       if (response.data) { | ||||||
|  |         this.estimate = response.data.estimate | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     async onSearched () { |     async onSearched () { | ||||||
|       let data = '' |       let data = '' | ||||||
|       if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) { |       if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) { | ||||||
|  | |||||||
| @ -154,6 +154,7 @@ export default { | |||||||
|       id: null, |       id: null, | ||||||
|       count: null, |       count: null, | ||||||
|       invoices: [], |       invoices: [], | ||||||
|  |       invoice: null, | ||||||
|       currency: null, |       currency: null, | ||||||
|       searchData: { |       searchData: { | ||||||
|         orderBy: null, |         orderBy: null, | ||||||
| @ -167,9 +168,7 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
|     invoice () { |  | ||||||
|       return this.$store.getters['invoice/getInvoice'](this.$route.params.id) |  | ||||||
|     }, |  | ||||||
|     getOrderBy () { |     getOrderBy () { | ||||||
|       if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) { |       if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) { | ||||||
|         return true |         return true | ||||||
| @ -180,8 +179,14 @@ export default { | |||||||
|       return `/invoices/pdf/${this.invoice.unique_hash}` |       return `/invoices/pdf/${this.invoice.unique_hash}` | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|  |   watch: { | ||||||
|  |     $route (to, from) { | ||||||
|  |       this.loadInvoice() | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|   created () { |   created () { | ||||||
|     this.loadInvoices() |     this.loadInvoices() | ||||||
|  |     this.loadInvoice() | ||||||
|     this.onSearch = _.debounce(this.onSearch, 500) |     this.onSearch = _.debounce(this.onSearch, 500) | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
| @ -192,7 +197,8 @@ export default { | |||||||
|       'markAsSent', |       'markAsSent', | ||||||
|       'sendEmail', |       'sendEmail', | ||||||
|       'deleteInvoice', |       'deleteInvoice', | ||||||
|       'selectInvoice' |       'selectInvoice', | ||||||
|  |       'fetchViewInvoice' | ||||||
|     ]), |     ]), | ||||||
|     async loadInvoices () { |     async loadInvoices () { | ||||||
|       let response = await this.fetchInvoices() |       let response = await this.fetchInvoices() | ||||||
| @ -200,6 +206,13 @@ export default { | |||||||
|         this.invoices = response.data.invoices.data |         this.invoices = response.data.invoices.data | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     async loadInvoice () { | ||||||
|  |       let response = await this.fetchViewInvoice(this.$route.params.id) | ||||||
|  |  | ||||||
|  |       if (response.data) { | ||||||
|  |         this.invoice = response.data.invoice | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     async onSearch () { |     async onSearch () { | ||||||
|       let data = '' |       let data = '' | ||||||
|       if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) { |       if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) { | ||||||
|  | |||||||
| @ -410,7 +410,7 @@ | |||||||
|             <div class="bill-address-container"> |             <div class="bill-address-container"> | ||||||
|                 @include('app.pdf.estimate.partials.billing-address') |                 @include('app.pdf.estimate.partials.billing-address') | ||||||
|             </div> |             </div> | ||||||
|             @if($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone) |             @if($estimate->user->billingaddress && ($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone)) | ||||||
|                 <div class="ship-address-container"> |                 <div class="ship-address-container"> | ||||||
|             @else |             @else | ||||||
|                 <div class="ship-address-container " style="float:left;padding-left:0px;"> |                 <div class="ship-address-container " style="float:left;padding-left:0px;"> | ||||||
|  | |||||||
| @ -421,7 +421,7 @@ | |||||||
|             <div class="ship-address-container"> |             <div class="ship-address-container"> | ||||||
|                 @include('app.pdf.estimate.partials.shipping-address') |                 @include('app.pdf.estimate.partials.shipping-address') | ||||||
|             </div> |             </div> | ||||||
|             @if($estimate->user->shippingaddress->name || $estimate->user->shippingaddress->address_street_1 || $estimate->user->shippingaddress->address_street_2 || $estimate->user->shippingaddress->country || $estimate->user->shippingaddress->state || $estimate->user->shippingaddress->city || $estimate->user->shippingaddress->zip || $estimate->user->phone) |             @if($estimate->user->shippingaddress && ($estimate->user->shippingaddress->name || $estimate->user->shippingaddress->address_street_1 || $estimate->user->shippingaddress->address_street_2 || $estimate->user->shippingaddress->country || $estimate->user->shippingaddress->state || $estimate->user->shippingaddress->city || $estimate->user->shippingaddress->zip || $estimate->user->phone)) | ||||||
|                 <div class="bill-address-container"> |                 <div class="bill-address-container"> | ||||||
|             @else |             @else | ||||||
|                 <div class="bill-address-container" style="float:right;padding-right:0px;"> |                 <div class="bill-address-container" style="float:right;padding-right:0px;"> | ||||||
|  | |||||||
| @ -426,7 +426,7 @@ | |||||||
|                 <div style="float:left;"> |                 <div style="float:left;"> | ||||||
|                     @include('app.pdf.estimate.partials.billing-address') |                     @include('app.pdf.estimate.partials.billing-address') | ||||||
|                 </div> |                 </div> | ||||||
|                 @if($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone) |                 @if($estimate->user->billingaddress && ($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone)) | ||||||
|                     <div style="float:right;"> |                     <div style="float:right;"> | ||||||
|                 @else |                 @else | ||||||
|                     <div style="float:left;"> |                     <div style="float:left;"> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	