| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | // date ranges
 | 
					
						
							|  |  |  | var ranges = {};
 | 
					
						
							|  |  |  | {% for title, range in dateRangeConfig.ranges %}
 | 
					
						
							| 
									
										
										
										
											2024-10-18 07:35:19 +02:00
										 |  |  |     ranges["{{ title|escape('js') }}"] = [moment("{{ range[0].format('Y-m-d') }}"), moment("{{ range[1].format('Y-m-d') }}")];
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | {% endfor %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // date range meta configuration
 | 
					
						
							|  |  |  | var dateRangeMeta = {
 | 
					
						
							| 
									
										
										
										
											2024-10-18 07:35:19 +02:00
										 |  |  | title: "{{ dateRangeTitle|escape('js') }}",
 | 
					
						
							| 
									
										
										
										
											2022-04-12 18:19:30 +02:00
										 |  |  | url: "{{ route('daterange') }}",
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | labels: {
 | 
					
						
							|  |  |  | apply: "{{ 'apply'|_ }}",
 | 
					
						
							|  |  |  | cancel: "{{ 'cancel'|_ }}",
 | 
					
						
							|  |  |  | from: "{{ 'from'|_ }}",
 | 
					
						
							|  |  |  | to: "{{ 'to'|_ }}",
 | 
					
						
							|  |  |  | customRange: "{{ 'customRange'|_ }}"
 | 
					
						
							|  |  |  | }
 | 
					
						
							|  |  |  | };
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // date range actual configuration:
 | 
					
						
							|  |  |  | var dateRangeConfig = {
 | 
					
						
							|  |  |  | startDate: moment("{{ dateRangeConfig.start }}"),
 | 
					
						
							|  |  |  | endDate: moment("{{ dateRangeConfig.end }}"),
 | 
					
						
							|  |  |  | ranges: ranges
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | };
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var uid = "{{ uid }}";
 | 
					
						
							|  |  |  | var language = "{{ language|escape }}";
 | 
					
						
							|  |  |  | var locale = "{{ locale|escape }}";
 | 
					
						
							|  |  |  | var currencyCode = '{{ currencyCode|escape('js') }}';
 | 
					
						
							|  |  |  | var currencySymbol = '{{ currencySymbol|escape('js') }}';
 | 
					
						
							|  |  |  | var mon_decimal_point = "{{ accountingLocaleInfo.mon_decimal_point|escape('js') }}";
 | 
					
						
							|  |  |  | var mon_thousands_sep = "{{ accountingLocaleInfo.mon_thousands_sep|escape('js') }}";
 | 
					
						
							|  |  |  | var frac_digits = {{ accountingLocaleInfo.frac_digits|default('0') }};
 | 
					
						
							|  |  |  | var noDataForChart = '{{ trans('firefly.no_data_for_chart')|escape('js') }}';
 | 
					
						
							|  |  |  | var showFullList = '{{ trans('firefly.show_full_list')|escape('js') }}';
 | 
					
						
							|  |  |  | var showOnlyTop = '{{ trans('firefly.show_only_top',{number:listLength})|escape('js') }}';
 | 
					
						
							|  |  |  | var accountingConfig = {{ accountingLocaleInfo.format|json_encode|raw }};
 | 
					
						
							|  |  |  | var token = '{{ csrf_token() }}';
 | 
					
						
							|  |  |  | var sessionStart = '{{ session('start').format('Y-m-d') }}';
 | 
					
						
							|  |  |  | var sessionEnd = '{{ session('end').format('Y-m-d') }}';
 | 
					
						
							|  |  |  | var todayText = ' {{ trans('firefly.today')|escape('js') }}';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // some formatting stuff:
 | 
					
						
							|  |  |  | var month_and_day_js = "{{ trans('config.month_and_day_js') }}";
 | 
					
						
							| 
									
										
										
										
											2024-11-09 20:38:30 +01:00
										 |  |  | var date_time_js = "{{ trans('config.date_time_js') }}";
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | var acc_config_new = {format: accountingConfig};
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // strings and translations used often:
 | 
					
						
							|  |  |  | var helpPageTitle = "{{ trans('firefly.help_for_this_page')|escape('js') }}";
 | 
					
						
							| 
									
										
										
										
											2022-02-03 10:32:20 +01:00
										 |  |  | var helpPageBody = "{{ trans('firefly.help_for_this_page_body')|escape('js') }}";
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | var edit_selected_txt = "{{ trans('firefly.mass_edit')|escape('js') }}";
 | 
					
						
							|  |  |  | var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}";
 | 
					
						
							|  |  |  | var delete_selected_txt = "{{ trans('firefly.mass_delete')|escape('js') }}";
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-05 19:34:46 +02:00
										 |  |  | var mass_edit_url   = '{{ route('transactions.mass.edit', ['']) }}';
 | 
					
						
							|  |  |  | var bulk_edit_url   = '{{ route('transactions.bulk.edit', ['']) }}';
 | 
					
						
							|  |  |  | var mass_delete_url = '{{ route('transactions.mass.delete', ['']) }}';
 | 
					
						
							| 
									
										
										
										
											2022-01-29 14:15:34 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | // for demo:
 | 
					
						
							|  |  |  | var nextLabel = "{{ trans('firefly.intro_next_label')|escape('js') }}";
 | 
					
						
							|  |  |  | var prevLabel = "{{ trans('firefly.intro_prev_label')|escape('js') }}";
 | 
					
						
							|  |  |  | var skipLabel = "{{ trans('firefly.intro_skip_label')|escape('js') }}";
 | 
					
						
							|  |  |  | var doneLabel = "{{ trans('firefly.intro_done_label')|escape('js') }}";
 |