Compare commits

..

No commits in common. "1.3.0" and "1.2.7" have entirely different histories.
1.3.0 ... 1.2.7

5 changed files with 27 additions and 67 deletions

View File

@ -2,18 +2,9 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.3.0](https://git.odit.services/lfk/selfservice/compare/1.2.7...1.3.0)
- feat: improve phone number registration [`e14a6d6`](https://git.odit.services/lfk/selfservice/commit/e14a6d6329d547d3086abe59d00f0d054688b6f4)
- feat: improved Register UI [`e418d2a`](https://git.odit.services/lfk/selfservice/commit/e418d2a2b74553f614520ac8c0f0377d141daa8d)
- feat: only show international phone number thing if + is missing [`f0c668c`](https://git.odit.services/lfk/selfservice/commit/f0c668c1c3d1a5c27d78617e5ca34ca68603ce14)
#### [1.2.7](https://git.odit.services/lfk/selfservice/compare/1.2.6...1.2.7) #### [1.2.7](https://git.odit.services/lfk/selfservice/compare/1.2.6...1.2.7)
> 23 March 2025
- refactor(ci): Switch to actions [`a862593`](https://git.odit.services/lfk/selfservice/commit/a862593c5315043577699d1a6fd50854dd1bca00) - refactor(ci): Switch to actions [`a862593`](https://git.odit.services/lfk/selfservice/commit/a862593c5315043577699d1a6fd50854dd1bca00)
- 🚀Bumped version to v1.2.7 [`e1a87ed`](https://git.odit.services/lfk/selfservice/commit/e1a87eda4a0c9b9be47bcfe4ddb0e93696d037f4)
- footer: cleanup imprint & privacy url [`0e557ef`](https://git.odit.services/lfk/selfservice/commit/0e557ef4080e997b06adcbbadf3e82f12152281b) - footer: cleanup imprint & privacy url [`0e557ef`](https://git.odit.services/lfk/selfservice/commit/0e557ef4080e997b06adcbbadf3e82f12152281b)
- fix: footer [`422df7c`](https://git.odit.services/lfk/selfservice/commit/422df7c3f832dc29721e783dc4a86ee55e9d8ccc) - fix: footer [`422df7c`](https://git.odit.services/lfk/selfservice/commit/422df7c3f832dc29721e783dc4a86ee55e9d8ccc)
- footer padding [`0af7352`](https://git.odit.services/lfk/selfservice/commit/0af73525bc154ba730351d7a4970e9737edaa4db) - footer padding [`0af7352`](https://git.odit.services/lfk/selfservice/commit/0af73525bc154ba730351d7a4970e9737edaa4db)

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-selfservice", "name": "@odit/lfk-selfservice",
"version": "1.3.0", "version": "1.2.7",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -19,7 +19,6 @@
"e_mail_des_sponsors": "E-Mail des Sponsors", "e_mail_des_sponsors": "E-Mail des Sponsors",
"error_requesting_the_login_link": "Fehler beim Anfordern des Login-Links...", "error_requesting_the_login_link": "Fehler beim Anfordern des Login-Links...",
"first_lap": "👏 erste Runde", "first_lap": "👏 erste Runde",
"hinweis": "Hinweis:",
"i_accept": "Ich habe die ", "i_accept": "Ich habe die ",
"i_accept_end": "gelesen und akzeptiert.", "i_accept_end": "gelesen und akzeptiert.",
"if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "Wenn Sie der Systemadministrator sind, finden Sie Konfigurationsanweisungen in der offiziellen Produktdokumentation / README.", "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "Wenn Sie der Systemadministrator sind, finden Sie Konfigurationsanweisungen in der offiziellen Produktdokumentation / README.",
@ -39,7 +38,7 @@
"not_registered_yet": "Noch nicht registriert?", "not_registered_yet": "Noch nicht registriert?",
"organization": "Organisation", "organization": "Organisation",
"ort": "Ort", "ort": "Ort",
"phone_number": "Telefonnummer", "phone_number": "Telefonnummer (international formatiert)",
"please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...", "please_provide_a_valid_zipcode": "Bitte geben Sie eine gültige Postleitzahl an...",
"please_provide_valid_mail": "Bitte geben Sie eine gültige E-Mail Adresse an", "please_provide_valid_mail": "Bitte geben Sie eine gültige E-Mail Adresse an",
"plz": "PLZ", "plz": "PLZ",
@ -54,7 +53,6 @@
}, },
"register_now": "Jetzt registrieren!", "register_now": "Jetzt registrieren!",
"register_now_small": "Jetzt registrieren", "register_now_small": "Jetzt registrieren",
"registration_local_phone_nr": "Wenn Sie eine Telefonnummer ohne Vorwahl angeben, wird Sie als deutsche Telefonnummer gewertet",
"registration_running": "Registrierung läuft...", "registration_running": "Registrierung läuft...",
"registrationcode": "Registrierungscode", "registrationcode": "Registrierungscode",
"registrieren": "Registrieren", "registrieren": "Registrieren",

View File

@ -19,7 +19,6 @@
"e_mail_des_sponsors": "E-Mail of the Sponsor", "e_mail_des_sponsors": "E-Mail of the Sponsor",
"error_requesting_the_login_link": "Error requesting the login link...", "error_requesting_the_login_link": "Error requesting the login link...",
"first_lap": "👏 first lap", "first_lap": "👏 first lap",
"hinweis": "Note:",
"i_accept": "I have read and accepted the ", "i_accept": "I have read and accepted the ",
"i_accept_end": "", "i_accept_end": "",
"if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.", "if_you_are_the_system_administrator_please_refer_to_the_official_product_documentation_readme_for_configuration_guidance": "If you are the system administrator, please refer to the official product documentation/ README for configuration guidance.",
@ -39,7 +38,7 @@
"not_registered_yet": "Not registered yet?", "not_registered_yet": "Not registered yet?",
"organization": "Organization", "organization": "Organization",
"ort": "City", "ort": "City",
"phone_number": "Phone Number", "phone_number": "Phone Number (international format)",
"please_provide_a_valid_zipcode": "Please provide a valid zipcode...", "please_provide_a_valid_zipcode": "Please provide a valid zipcode...",
"please_provide_valid_mail": "Please provide a valid mail address.", "please_provide_valid_mail": "Please provide a valid mail address.",
"plz": "zipcode", "plz": "zipcode",
@ -54,7 +53,6 @@
}, },
"register_now": "Register now!", "register_now": "Register now!",
"register_now_small": "Register now", "register_now_small": "Register now",
"registration_local_phone_nr": "If you enter a phone number without an country code, it will be treated as a German phone number",
"registration_running": "registration is running...", "registration_running": "registration is running...",
"registrationcode": "Registration Code", "registrationcode": "Registration Code",
"registrieren": "Register Now", "registrieren": "Register Now",

View File

@ -51,7 +51,7 @@
{{ $t('buergerlauf') }} {{ $t('buergerlauf') }}
</p> </p>
<div class="mt-4"> <div class="mt-4">
<label for="first_name" class="block font-semibold mt-2"> <label for="first_name" class="block font-medium">
{{ $t("vorname") }} {{ $t("vorname") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -61,6 +61,7 @@
'border-green-300': userdetails.firstname.trim(), 'border-green-300': userdetails.firstname.trim(),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -72,7 +73,7 @@
p-2 p-2
" /> " />
<!-- --> <!-- -->
<label for="last_name" class="block font-semibold mt-2"> <label for="last_name" class="block font-medium">
{{ $t("nachname") }} {{ $t("nachname") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -82,6 +83,7 @@
'border-green-300': userdetails.lastname.trim(), 'border-green-300': userdetails.lastname.trim(),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -93,7 +95,7 @@
p-2 p-2
" /> " />
<!-- --> <!-- -->
<label for="email_address" class="block font-semibold mt-2"> <label for="email_address" class="block font-medium">
{{ $t("e_mail_adress") }} {{ $t("e_mail_adress") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -103,6 +105,7 @@
'border-green-300': isEmail(userdetails.mail), 'border-green-300': isEmail(userdetails.mail),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -117,31 +120,9 @@
{{ $t("please_provide_valid_mail") }} {{ $t("please_provide_valid_mail") }}
</p> </p>
<!-- --> <!-- -->
<label for="phone" class="block font-semibold mt-2">{{ <label for="phone" class="select-none block font-medium">{{
$t("phone_number") $t("phone_number")
}}</label> }}</label>
<div v-if="userdetails.phone!=='' && !userdetails.phone.includes('+')" class="bg-blue-100 border border-blue-200 text-black rounded-lg p-4 mb-1" role="alert" tabindex="-1"
aria-labelledby="hs-actions-label">
<div class="flex">
<div class="shrink-0">
<svg class="shrink-0 size-4 mt-1" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M12 16v-4"></path>
<path d="M12 8h.01"></path>
</svg>
</div>
<div class="ms-3">
<h3 id="hs-actions-label" class="font-semibold">
{{ $t('hinweis') }}
</h3>
<div class="mt-2 text-sm text-gray-800 font-medium">
{{ $t('registration_local_phone_nr') }}
</div>
</div>
</div>
</div>
<input v-model="userdetails.phone" name="phone" id="phone" autocomplete="off" <input v-model="userdetails.phone" name="phone" id="phone" autocomplete="off"
:placeholder="[[$t('phone_number')]]" type="text" :class="{ :placeholder="[[$t('phone_number')]]" type="text" :class="{
'border-red-500': 'border-red-500':
@ -150,6 +131,7 @@
isPhoneOkay(userdetails.phone), isPhoneOkay(userdetails.phone),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -178,7 +160,7 @@
</div> </div>
<div v-if="provide_address === true" class="col-span-6"> <div v-if="provide_address === true" class="col-span-6">
<div class="col-span-6"> <div class="col-span-6">
<label for="street" class="block font-semibold mt-2"> <label for="street" class="block font-medium">
{{ $t("strasse") }} {{ $t("strasse") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -188,6 +170,7 @@
'border-green-300': userdetails.address.street.trim(), 'border-green-300': userdetails.address.street.trim(),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -200,12 +183,13 @@
" /> " />
</div> </div>
<div class="col-span-6"> <div class="col-span-6">
<label for="address2" class="block font-semibold mt-2">{{ <label for="address2" class="block font-medium">{{
$t("apartment_suite_etc") $t("apartment_suite_etc")
}}</label> }}</label>
<input v-model="userdetails.address.address2" type="text" name="address2" <input v-model="userdetails.address.address2" type="text" name="address2"
:placeholder="[[$t('apartment_suite_etc')]]" id="address2" autocomplete="street-address" class=" :placeholder="[[$t('apartment_suite_etc')]]" id="address2" autocomplete="street-address" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -218,7 +202,7 @@
" /> " />
</div> </div>
<div class="col-span-6 sm:col-span-6 lg:col-span-2"> <div class="col-span-6 sm:col-span-6 lg:col-span-2">
<label for="city" class="block font-semibold mt-2"> <label for="city" class="block font-medium">
{{ $t("ort") }} {{ $t("ort") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -228,6 +212,7 @@
'border-green-300': userdetails.address.city.trim(), 'border-green-300': userdetails.address.city.trim(),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -240,7 +225,7 @@
" /> " />
</div> </div>
<div class="col-span-6 sm:col-span-3 lg:col-span-2"> <div class="col-span-6 sm:col-span-3 lg:col-span-2">
<label for="postal_code" class="block font-semibold mt-2"> <label for="postal_code" class="block font-medium">
{{ $t("plz") }} {{ $t("plz") }}
<span class="font-bold">*</span> <span class="font-bold">*</span>
</label> </label>
@ -256,6 +241,7 @@
), ),
}" class=" }" class="
dark:bg-gray-800 dark:bg-gray-800
mt-1
block block
w-full w-full
shadow-sm shadow-sm
@ -362,30 +348,17 @@ let userdetails = ref({
phone: "", phone: "",
address: { street: "", address2: "", city: "", zipcode: "" }, address: { street: "", address2: "", city: "", zipcode: "" },
}); });
function formatPhoneNumber(phoneNumber, countryCode = "+49") {
// Remove all non-digit characters
const cleanedNumber = phoneNumber.replace(/\D/g, "");
// Check if the number starts with the country code
if (cleanedNumber.startsWith(countryCode.replace("+", ""))) {
return "+" + cleanedNumber; // already international
}
// Check if the number starts with 0
if (cleanedNumber.startsWith("0")) {
return countryCode + cleanedNumber.slice(1);
}
// If it doesn't start with 0 or the country code, assume it's a local number.
// In this case, prepend the country code.
return countryCode + cleanedNumber;
}
function isPhoneOkay() { function isPhoneOkay() {
if (userdetails.value.phone === "") { if (userdetails.value.phone === "") {
return true return true
} }
const formattedNumber = formatPhoneNumber(userdetails.value.phone) if (userdetails.value.phone.includes(" ")) {
if (isMobilePhone(formattedNumber)) { return false
}
if (!userdetails.value.phone.includes("+")) {
return false
}
if (isMobilePhone(userdetails.value.phone)) {
return true return true
} }
return false return false
@ -427,7 +400,7 @@ function login() {
address: {}, address: {},
}; };
if (userdetails.value.phone !== "") { if (userdetails.value.phone !== "") {
postdata.phone = formatPhoneNumber(userdetails.value.phone) postdata.phone = userdetails.value.phone
} }
if (provide_address.value === true) { if (provide_address.value === true) {
postdata.address = { postdata.address = {