Compare commits
	
		
			17 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b0172c500b | |||
| 75b4dac0fe | |||
| 51d058bf96 | |||
| ad13bae068 | |||
| 152e74190d | |||
| 4c83e2e738 | |||
| cb1b9d330b | |||
| 3b4c11e4c0 | |||
| 89820d4450 | |||
| 121022c843 | |||
| d713fbef94 | |||
| 815a36f202 | |||
| baa6da3dd0 | |||
| f141130db5 | |||
| 5a123b0cf8 | |||
| f5ae2145df | |||
| 96c0e56986 | 
							
								
								
									
										33
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -2,13 +2,44 @@ | ||||
|  | ||||
| All notable changes to this project will be documented in this file. Dates are displayed in UTC. | ||||
|  | ||||
| #### [0.7.1](https://git.odit.services/lfk/selfservice/compare/0.7.0...0.7.1) | ||||
|  | ||||
| - Merge pull request 'bugfix/31-env-js-linking-ci' (#41) from bugfix/31-env-js-linking-ci into dev [`#31`](https://git.odit.services/lfk/selfservice/issues/31) | ||||
| - ⏫ dependency bump [`ad13bae`](https://git.odit.services/lfk/selfservice/commit/ad13bae068416bed10d00e6887a05d580a836482) | ||||
| - added 'yarn postbuild' script for fixing env.js in dist/index.html [`51d058b`](https://git.odit.services/lfk/selfservice/commit/51d058bf966c3dcb064562e6bf696a748d0cd148) | ||||
|  | ||||
| #### [0.7.0](https://git.odit.services/lfk/selfservice/compare/0.6.1...0.7.0) | ||||
|  | ||||
| > 6 April 2021 | ||||
|  | ||||
| - 🚀Bumped version to v0.7.0 [`152e741`](https://git.odit.services/lfk/selfservice/commit/152e74190d13d30110d494a9062f868390ca19b3) | ||||
| - Merge pull request 'Donation list feature/39-donation_list' (#40) from feature/39-donation_list into dev [`4c83e2e`](https://git.odit.services/lfk/selfservice/commit/4c83e2e738a075354383dca4d500808f761247d2) | ||||
| - Added total to bottom of page [`89820d4`](https://git.odit.services/lfk/selfservice/commit/89820d44501793365248b8e778522cdc188afa70) | ||||
| - Sorted translations 🌍 [`cb1b9d3`](https://git.odit.services/lfk/selfservice/commit/cb1b9d330b28f11cceed9691aee4ccee5246d346) | ||||
| - Added basic sponsoring table [`f141130`](https://git.odit.services/lfk/selfservice/commit/f141130db5ede60a623747f4e324f66259e5bc75) | ||||
| - Added translations 🌍 [`d713fbe`](https://git.odit.services/lfk/selfservice/commit/d713fbef94e75fbbc62254ea8f0ca50dc4e93d79) | ||||
| - Now w/ formatted currency amount [`815a36f`](https://git.odit.services/lfk/selfservice/commit/815a36f20271f47f49c3814b001c3404d43113cd) | ||||
| - Fixed spaces in name [`baa6da3`](https://git.odit.services/lfk/selfservice/commit/baa6da3dd06c493fccc61945b9bcbd9b2e79d910) | ||||
| - Updated env description [`5a123b0`](https://git.odit.services/lfk/selfservice/commit/5a123b0cf89f49d450becbbc03b28c5bb6416b7c) | ||||
| - added distance formatting [`121022c`](https://git.odit.services/lfk/selfservice/commit/121022c8434484a363a3f2ea68aba4d8ef7cad2d) | ||||
|  | ||||
| #### [0.6.1](https://git.odit.services/lfk/selfservice/compare/0.6.0...0.6.1) | ||||
|  | ||||
| > 6 April 2021 | ||||
|  | ||||
| - 🚀Bumped version to v0.6.1 [`f5ae214`](https://git.odit.services/lfk/selfservice/commit/f5ae2145df07413329f60c229d9571fd1de2ca79) | ||||
| - Fixed imprint/privacy default links [`96c0e56`](https://git.odit.services/lfk/selfservice/commit/96c0e5698697361e65c5aa80c9a0aada5c3d5f30) | ||||
|  | ||||
| #### [0.6.0](https://git.odit.services/lfk/selfservice/compare/0.5.1...0.6.0) | ||||
|  | ||||
| > 3 April 2021 | ||||
|  | ||||
| - 🚀Bumped version to v0.6.0 [`bc1de2a`](https://git.odit.services/lfk/selfservice/commit/bc1de2acdcbf8f3319026887cb6b3d594fcd63dc) | ||||
| - first part of certificate generation with manual data [`f633439`](https://git.odit.services/lfk/selfservice/commit/f6334397dc99cd38d31ef524bc26ba7d386b33dd) | ||||
| - Renoved fixed data [`f0a7f35`](https://git.odit.services/lfk/selfservice/commit/f0a7f35dec07508a07d4c11abda297ad0bf91187) | ||||
| - Revert "🚀Bumped version to v0.6.0" [`145b499`](https://git.odit.services/lfk/selfservice/commit/145b49906bdf2d75abf93e1779f188a691a3a909) | ||||
| - 🚀Bumped version to v0.6.0 [`0a62e8f`](https://git.odit.services/lfk/selfservice/commit/0a62e8f5d1929bfe9a53a9709a3031f06a2487c3) | ||||
| - Merge pull request 'Certificate download feature/19-runner_certficates' (#38) from feature/19-runner_certficates into dev [`53eeb6b`](https://git.odit.services/lfk/selfservice/commit/53eeb6be3ddf4735a11b6c4636c28b4d16aa58ee) | ||||
| - Renoved fixed data [`f0a7f35`](https://git.odit.services/lfk/selfservice/commit/f0a7f35dec07508a07d4c11abda297ad0bf91187) | ||||
| - Fixed blob handling [`b938cfc`](https://git.odit.services/lfk/selfservice/commit/b938cfc49e269e76761a752f8257ebbab88f6959) | ||||
| - Reverted relative linking fix [`c3b2b93`](https://git.odit.services/lfk/selfservice/commit/c3b2b93d90102b4e31cfce15220acfc8fe48a7c5) | ||||
|  | ||||
|   | ||||
| @@ -3,6 +3,7 @@ WORKDIR /app | ||||
| COPY . . | ||||
| RUN yarn | ||||
| RUN yarn build | ||||
| RUN yarn postbuild | ||||
| # final image | ||||
| FROM fholzer/nginx-brotli:v1.19.1 | ||||
| COPY --from=0 /app/dist /usr/share/nginx/html | ||||
|   | ||||
							
								
								
									
										6
									
								
								env_fix.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								env_fix.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| const fs = require('fs'); | ||||
| if (fs.existsSync('./dist/index.html')) { | ||||
| 	const content = fs.readFileSync('./dist/index.html', { encoding: 'utf8' }); | ||||
| 	const newcontent = content.replace(`"/env.js"`, `"./env.js"`); | ||||
| 	fs.writeFileSync('./dist/index.html', newcontent); | ||||
| } | ||||
							
								
								
									
										15
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,17 +1,18 @@ | ||||
| { | ||||
| 	"name": "@odit/lfk-selfservice", | ||||
| 	"version": "0.6.0", | ||||
| 	"version": "0.7.1", | ||||
| 	"scripts": { | ||||
| 		"dev": "vite", | ||||
| 		"build": "vite build", | ||||
| 		"release": "release-it --only-version" | ||||
| 		"release": "release-it --only-version", | ||||
| 		"postbuild": "node env_fix.js" | ||||
| 	}, | ||||
| 	"dependencies": { | ||||
| 		"marked": "2.0.1", | ||||
| 		"marked": "2.0.3", | ||||
| 		"redaxios": "0.4.1", | ||||
| 		"toastify-js": "1.10.0", | ||||
| 		"validator": "13.5.2", | ||||
| 		"vue-i18n": "9.0.0", | ||||
| 		"vue-i18n": "9.1.4", | ||||
| 		"vue-toastification": "2.0.0-rc.1", | ||||
| 		"vue": "3.0.9", | ||||
| 		"vue-router": "4.0.5" | ||||
| @@ -23,10 +24,10 @@ | ||||
| 		"@tailwindcss/line-clamp": "0.2.0", | ||||
| 		"@tailwindcss/typography": "0.4.0", | ||||
| 		"@vitejs/plugin-vue": "1.2.1", | ||||
| 		"@vue/compiler-sfc": "3.0.10", | ||||
| 		"@vue/compiler-sfc": "3.0.11", | ||||
| 		"autoprefixer": "10.2.5", | ||||
| 		"tailwindcss": "2.0.4", | ||||
| 		"release-it": "14.5.0", | ||||
| 		"tailwindcss": "2.1.1", | ||||
| 		"release-it": "14.6.1", | ||||
| 		"vite": "2.1.5" | ||||
| 	}, | ||||
| 	"release-it": { | ||||
|   | ||||
| @@ -5,8 +5,8 @@ const config = { | ||||
| 	baseurl: '', | ||||
| 	// optional, will fallback to /selfservice/ | ||||
| 	baseurl_selfservice: '/selfservice/', | ||||
| 	// optional, will fallback to /imprint | ||||
| 	// optional, will fallback to baseurl_selfservice/imprint | ||||
| 	url_imprint: '', | ||||
| 	// optional, will fallback to /privacy | ||||
| 	// optional, will fallback to baseurl_selfservice/privacy | ||||
| 	url_privacy: '' | ||||
| }; | ||||
|   | ||||
| @@ -31,8 +31,8 @@ | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       imprint_url: config.url_imprint || "/imprint/" | ||||
|       , privacy_url: config.url_privacy || "/privacy/" | ||||
|       imprint_url: config.url_imprint || config.baseurl_selfservice + "imprint" | ||||
|       , privacy_url: config.url_privacy || config.baseurl_selfservice + "privacy" | ||||
|     } | ||||
|   }, | ||||
| } | ||||
|   | ||||
| @@ -1,12 +1,14 @@ | ||||
| { | ||||
|     "access_is_only_provided_via_your_email_link": "Der Zugang erfolgt nur über den Link, den Sie bei der Registrierung erhalten haben.", | ||||
|     "already_have_an_account": "Sie haben bereits einen Account?", | ||||
|     "amount_per_kilometer_in_eur": "Betrag pro Kilometer (in €)", | ||||
|     "apartment_suite_etc": "Addresszeile 2", | ||||
|     "cancel_keep_my_data": "Abbrechen, meine Daten behalten", | ||||
|     "configuration_error": "Konfigurationsfehler", | ||||
|     "confirm_delete_all_of_my_data": "Bestätigung, meine gesamten Daten löschen", | ||||
|     "confirm_personal_data": "Hiermit bestätige ich die Vollständigkeit und Richtigkeit der oben genannten Angaben", | ||||
|     "delete-all-of-my-data": "Meine gesamten Daten löschen", | ||||
|     "current_total_amount_in_eur": "Aktueller Gesamtbetrag (in €)", | ||||
|     "delete_all_of_my_data": "Meine gesamten Daten löschen", | ||||
|     "delete_my_data": "Meine Daten löschen", | ||||
|     "deletion_in_progress": "Daten werden gelöscht...", | ||||
|     "distance": "Distanz", | ||||
| @@ -24,6 +26,7 @@ | ||||
|     "mittelname": "Mittelname", | ||||
|     "nachname": "Nachname", | ||||
|     "no_laps_scans_were_recorded_yet": "Es wurden noch keine Runden / Scans aufgezeichnet ...", | ||||
|     "no_sponsorings_for_you_were_recorded_yet": "Es gibt noch keine Sponsorings für dich", | ||||
|     "not_registered_yet": "Noch nicht registriert?", | ||||
|     "organization": "Organisation", | ||||
|     "ort": "Ort", | ||||
| @@ -47,6 +50,7 @@ | ||||
|     "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "Das System ist nicht richtig konfiguriert. Bitte wenden Sie sich an den Systemadministrator, um Hilfe zu erhalten.", | ||||
|     "this_is_not_a_valid_international_phone_number": "Dies ist keine gültige internationale Telefonnummer", | ||||
|     "tos": "AGBs", | ||||
|     "total": "Gesamt", | ||||
|     "view_my_data": "Meine Läuferdaten einsehen", | ||||
|     "vorname": "Vorname", | ||||
|     "you_have_been_registered": "Sie wurden registriert!", | ||||
|   | ||||
| @@ -2,11 +2,13 @@ | ||||
|     "access_is_only_provided_via_your_email_link": "Access is only provided via the link you received upon registration.", | ||||
|     "all_data_deleted": "All Data deleted!", | ||||
|     "already_have_an_account": "Already have an account?", | ||||
|     "amount_per_kilometer_in_eur": "Amount per kilometer (in €)", | ||||
|     "apartment_suite_etc": "Apartment, suite, etc.", | ||||
|     "cancel_keep_my_data": "Cancel, keep my data", | ||||
|     "configuration_error": "Configuration error", | ||||
|     "confirm_delete_all_of_my_data": "Confirm, delete all of my data", | ||||
|     "confirm_personal_data": "I hereby confirm that the above information is complete and correct", | ||||
|     "current_total_amount_in_eur": "Current total amount (in €)", | ||||
|     "delete_my_data": "Delete my data", | ||||
|     "deletion_in_progress": "Deletion in progress...", | ||||
|     "distance": "Distance", | ||||
| @@ -24,6 +26,7 @@ | ||||
|     "mittelname": "Middlename", | ||||
|     "nachname": "Lastname", | ||||
|     "no_laps_scans_were_recorded_yet": "No laps/ scans were recorded yet...", | ||||
|     "no_sponsorings_for_you_were_recorded_yet": "No sponsorings for you were recorded yet...", | ||||
|     "not_registered_yet": "Not registered yet?", | ||||
|     "organization": "Organization", | ||||
|     "ort": "City", | ||||
| @@ -47,6 +50,7 @@ | ||||
|     "the_system_is_not_properly_configured_please_contact_the_system_administrator_for_help": "The system is not properly configured. Please contact the system administrator for help.", | ||||
|     "this_is_not_a_valid_international_phone_number": "This is not a valid international phone number", | ||||
|     "tos": "Terms of Service", | ||||
|     "total": "Total", | ||||
|     "view_my_data": "View my data", | ||||
|     "vorname": "Firstname", | ||||
|     "you_have_been_registered": "You have been registered!", | ||||
|   | ||||
| @@ -216,7 +216,7 @@ | ||||
|                       <tbody class="text-gray-900 dark:text-gray-50"> | ||||
|                         <tr v-for="s in state.scans" :key="s.id"> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span v-text="s.distance"></span>m | ||||
|                             <span v-text="s.distance"></span> | ||||
|                           </td> | ||||
|                           <td class="px-4 py-3" v-text="s.lapTime"></td> | ||||
|                         </tr> | ||||
| @@ -236,7 +236,88 @@ | ||||
|             </div> | ||||
|           </div> | ||||
|           <div v-if="(state.activetab === 'sponsorings')" class="tab-content block"> | ||||
|             <div class="py-4 w-full">coming soon...</div> | ||||
|             <div class="py-4 w-full"> | ||||
|               <section class="text-gray-400 dark:bg-gray-900 body-font"> | ||||
|                 <div class="container mx-auto"> | ||||
|                   <div class="lg:w-2/3 w-full mx-auto overflow-auto"> | ||||
|                     <table | ||||
|                       v-if="state.sponsorings.length > 0" | ||||
|                       class="table-auto w-full text-left whitespace-no-wrap" | ||||
|                     > | ||||
|                       <thead | ||||
|                         class="text-black bg-gray-300 dark:text-white text-sm dark:bg-gray-800" | ||||
|                       > | ||||
|                         <tr> | ||||
|                           <th class="px-4 py-3 title-font tracking-wider font-medium">Name</th> | ||||
|                           <th | ||||
|                             class="px-4 py-3 title-font tracking-wider font-medium" | ||||
|                           >{{ $t('amount_per_kilometer_in_eur') }}</th> | ||||
|                           <th | ||||
|                             class="px-4 py-3 title-font tracking-wider font-medium" | ||||
|                           >{{ $t('current_total_amount_in_eur') }}</th> | ||||
|                         </tr> | ||||
|                       </thead> | ||||
|                       <tbody class="text-gray-900 dark:text-gray-50"> | ||||
|                         <tr v-for="s in state.sponsorings" :key="s.id"> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span v-text="s.donor.firstname"></span> | ||||
|                             <span v-if="s.donor.middlename"> | ||||
|                               <span v-text="s.donor.middlename"></span> | ||||
|                             </span> | ||||
|                             <span v-text="s.donor.lastname"></span> | ||||
|                           </td> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span | ||||
|                               v-text="(s.amountPerDistance / 100) | ||||
|                               .toFixed(2) | ||||
|                               .toLocaleString('de-DE', { valute: 'EUR' })" | ||||
|                             ></span>€ | ||||
|                           </td> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span | ||||
|                               v-text="(s.amount / 100) | ||||
|                               .toFixed(2) | ||||
|                               .toLocaleString('de-DE', { valute: 'EUR' })" | ||||
|                             ></span>€ | ||||
|                           </td> | ||||
|                         </tr> | ||||
|                       </tbody> | ||||
|                       <tfoot class="text-gray-900 dark:text-gray-50"> | ||||
|                         <tr> | ||||
|                           <td class="px-4 py-3">{{ $t('total') }}</td> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span | ||||
|                               v-text="(state.sponsorings.reduce(function(sum, current) { | ||||
|                               return sum + current.amountPerDistance; | ||||
|                             }, 0) / 100) | ||||
|                               .toFixed(2) | ||||
|                               .toLocaleString('de-DE', { valute: 'EUR' })" | ||||
|                             ></span>€ | ||||
|                           </td> | ||||
|                           <td class="px-4 py-3"> | ||||
|                             <span | ||||
|                               v-text="(state.sponsorings.reduce(function(sum, current) { | ||||
|                               return sum + current.amount; | ||||
|                             }, 0) / 100) | ||||
|                               .toFixed(2) | ||||
|                               .toLocaleString('de-DE', { valute: 'EUR' })" | ||||
|                             ></span>€ | ||||
|                           </td> | ||||
|                         </tr> | ||||
|                       </tfoot> | ||||
|                     </table> | ||||
|                     <div v-else class="text-center font-bold text-black dark:text-white text-2xl"> | ||||
|                       <img | ||||
|                         src="../assets/empty_laps.svg" | ||||
|                         style="height:25rem; margin:0 auto;" | ||||
|                         :alt="[[$t('no_sponsorings_for_you_were_recorded_yet')]]" | ||||
|                       /> | ||||
|                       {{ $t('no_sponsorings_for_you_were_recorded_yet') }} | ||||
|                     </div> | ||||
|                   </div> | ||||
|                 </div> | ||||
|               </section> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
| @@ -256,6 +337,7 @@ const state = reactive({ | ||||
|   middlename: "", | ||||
|   lastname: "", | ||||
|   scans: [], | ||||
|   sponsorings: [], | ||||
|   group: "", | ||||
|   activetab: "profile", | ||||
|   delete_active: false, | ||||
| @@ -274,6 +356,7 @@ axios.get(`${config.baseurl}api/runners/me/${accesstoken}`) | ||||
|     state.middlename = data.middlename; | ||||
|     state.lastname = data.lastname; | ||||
|     state.group = data.group; | ||||
|     state.sponsorings = data.distanceDonations; | ||||
|     state.fullobject = data; | ||||
|   }).catch((error) => { | ||||
|     toast.error("An error occured while loading your profile data"); | ||||
| @@ -282,6 +365,7 @@ axios.get(`${config.baseurl}api/runners/me/${accesstoken}/scans`) | ||||
|   .then(({ data }) => { | ||||
|     data.map(function(s) { | ||||
|       s.lapTime = Math.floor(s.lapTime / 60) + 'min ' + (Math.floor(s.lapTime % 60) + "").padStart(2, "0") + "s" | ||||
|       s.distance = Math.floor(s.distance / 1000) + 'km ' + (Math.floor(s.distance % 1000) + "").padStart(3, "0") + "m" | ||||
|       return s; | ||||
|     }) | ||||
|     data.filter(s => s.valid === true); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user