#23-cleanup-&-enhancements #25

Merged
jkeffects merged 2 commits from #23-cleanup-&-enhancements into main 2025-01-03 18:27:20 +00:00
5 changed files with 23 additions and 1 deletions
Showing only changes of commit 683d862560 - Show all commits

View file

@ -69,6 +69,10 @@
<label for="email">Mail-Adresse</label>
<input type="text" id="email" required />
</div>
<div v-if="selectedCommunicationType?.fields.includes('postalCode')">
<label for="postalCode">Postleitzahl</label>
<input type="text" id="postalCode" required />
</div>
<div v-if="selectedCommunicationType?.fields.includes('city')">
<label for="city">Stadt</label>
<input type="text" id="city" required />
@ -162,6 +166,7 @@ export default defineComponent({
preferred: formData.preferred.checked,
mobile: formData.mobile?.value,
email: formData.email?.value,
postalCode: formData.postalCode.value,
city: formData.city?.value,
street: formData.street?.value,
streetNumber: formData.streetNumber?.value,

View file

@ -18,6 +18,10 @@
<label for="email">Mail-Adresse</label>
<input type="text" id="email" required v-model="communication.email" />
</div>
<div v-if="communication.type.fields.includes('postalCode')">
<label for="postalCode">Postleitzahl</label>
<input type="text" id="postalCode" required v-model="communication.postalCode" />
</div>
<div v-if="communication.type.fields.includes('city')">
<label for="city">Stadt</label>
<input type="text" id="city" required v-model="communication.city" />
@ -132,6 +136,7 @@ export default defineComponent({
preferred: formData.preferred.checked,
mobile: formData.mobile?.value,
email: formData.email?.value,
postalCode: formData.postalCode.value,
city: formData.city?.value,
street: formData.street?.value,
streetNumber: formData.streetNumber?.value,

View file

@ -41,6 +41,7 @@ export const useCommunicationStore = defineStore("communication", {
preferred: communication.preferred,
mobile: communication.mobile,
email: communication.email,
postalCode: communication.postalCode,
city: communication.city,
street: communication.street,
streetNumber: communication.streetNumber,
@ -58,6 +59,7 @@ export const useCommunicationStore = defineStore("communication", {
preferred: communication.preferred,
mobile: communication.mobile,
email: communication.email,
postalCode: communication.postalCode,
city: communication.city,
street: communication.street,
streetNumber: communication.streetNumber,

View file

@ -1 +1,8 @@
export type CommunicationFieldType = "mobile" | "email" | "city" | "street" | "streetNumber" | "streetNumberAddition";
export type CommunicationFieldType =
| "mobile"
| "email"
| "postalCode"
| "city"
| "street"
| "streetNumber"
| "streetNumberAddition";

View file

@ -5,6 +5,7 @@ export interface CommunicationViewModel {
preferred: boolean;
mobile: string;
email: string;
postalCode: string;
city: string;
street: string;
streetNumber: number;
@ -18,6 +19,7 @@ export interface CreateCommunicationViewModel {
preferred: boolean;
mobile: string;
email: string;
postalCode: string;
city: string;
street: string;
streetNumber: number;
@ -32,6 +34,7 @@ export interface UpdateCommunicationViewModel {
preferred: boolean;
mobile: string;
email: string;
postalCode: string;
city: string;
street: string;
streetNumber: number;