| @@ -6338,7 +6338,6 @@ components: | |||||
| deprecated: false | deprecated: false | ||||
| required: | required: | ||||
| - headline | - headline | ||||
| - description | |||||
| - assignedToIri | - assignedToIri | ||||
| - dueAt | - dueAt | ||||
| - productIri | - productIri | ||||
| @@ -6429,7 +6428,6 @@ components: | |||||
| deprecated: false | deprecated: false | ||||
| required: | required: | ||||
| - headline | - headline | ||||
| - description | |||||
| - assignedToIri | - assignedToIri | ||||
| - dueAt | - dueAt | ||||
| - productIri | - productIri | ||||
| @@ -6529,7 +6527,6 @@ components: | |||||
| deprecated: false | deprecated: false | ||||
| required: | required: | ||||
| - headline | - headline | ||||
| - description | |||||
| - assignedToIri | - assignedToIri | ||||
| - dueAt | - dueAt | ||||
| - productIri | - productIri | ||||
| @@ -6644,6 +6641,7 @@ components: | |||||
| required: | required: | ||||
| - message | - message | ||||
| - taskIri | - taskIri | ||||
| - contactType | |||||
| properties: | properties: | ||||
| message: | message: | ||||
| type: | type: | ||||
| @@ -6659,6 +6657,12 @@ components: | |||||
| - 'null' | - 'null' | ||||
| format: iri-reference | format: iri-reference | ||||
| example: 'https://example.com/' | example: 'https://example.com/' | ||||
| contactType: | |||||
| type: string | |||||
| enum: | |||||
| - personal | |||||
| - phone | |||||
| createdAt: | createdAt: | ||||
| readOnly: true | readOnly: true | ||||
| type: | type: | ||||
| @@ -6672,6 +6676,7 @@ components: | |||||
| required: | required: | ||||
| - message | - message | ||||
| - taskIri | - taskIri | ||||
| - contactType | |||||
| properties: | properties: | ||||
| _links: | _links: | ||||
| type: object | type: object | ||||
| @@ -6696,6 +6701,12 @@ components: | |||||
| - 'null' | - 'null' | ||||
| format: iri-reference | format: iri-reference | ||||
| example: 'https://example.com/' | example: 'https://example.com/' | ||||
| contactType: | |||||
| type: string | |||||
| enum: | |||||
| - personal | |||||
| - phone | |||||
| createdAt: | createdAt: | ||||
| readOnly: true | readOnly: true | ||||
| type: | type: | ||||
| @@ -6709,6 +6720,7 @@ components: | |||||
| required: | required: | ||||
| - message | - message | ||||
| - taskIri | - taskIri | ||||
| - contactType | |||||
| properties: | properties: | ||||
| '@context': | '@context': | ||||
| readOnly: true | readOnly: true | ||||
| @@ -6747,6 +6759,12 @@ components: | |||||
| - 'null' | - 'null' | ||||
| format: iri-reference | format: iri-reference | ||||
| example: 'https://example.com/' | example: 'https://example.com/' | ||||
| contactType: | |||||
| type: string | |||||
| enum: | |||||
| - personal | |||||
| - phone | |||||
| createdAt: | createdAt: | ||||
| readOnly: true | readOnly: true | ||||
| type: | type: | ||||
| @@ -6777,6 +6795,10 @@ components: | |||||
| type: | type: | ||||
| - string | - string | ||||
| - 'null' | - 'null' | ||||
| goals: | |||||
| type: | |||||
| - string | |||||
| - 'null' | |||||
| image: | image: | ||||
| type: | type: | ||||
| - string | - string | ||||
| @@ -6840,6 +6862,10 @@ components: | |||||
| type: | type: | ||||
| - string | - string | ||||
| - 'null' | - 'null' | ||||
| goals: | |||||
| type: | |||||
| - string | |||||
| - 'null' | |||||
| image: | image: | ||||
| type: | type: | ||||
| - string | - string | ||||
| @@ -6917,6 +6943,10 @@ components: | |||||
| type: | type: | ||||
| - string | - string | ||||
| - 'null' | - 'null' | ||||
| goals: | |||||
| type: | |||||
| - string | |||||
| - 'null' | |||||
| image: | image: | ||||
| type: | type: | ||||
| - string | - string | ||||
| @@ -438,7 +438,7 @@ export const saleSummaryJsonldForm = new FormGroup({ | |||||
| export const taskForm = new FormGroup({ | export const taskForm = new FormGroup({ | ||||
| headline: new FormControl(null, [Validators.required]), | headline: new FormControl(null, [Validators.required]), | ||||
| description: new FormControl(null, [Validators.required]), | |||||
| description: new FormControl(null, []), | |||||
| createdBy: new FormControl(null, []), | createdBy: new FormControl(null, []), | ||||
| assignedTo: new FormControl(null, []), | assignedTo: new FormControl(null, []), | ||||
| assignedToIri: new FormControl(null, [Validators.required]), | assignedToIri: new FormControl(null, [Validators.required]), | ||||
| @@ -458,7 +458,7 @@ export const taskForm = new FormGroup({ | |||||
| export const taskJsonhalForm = new FormGroup({ | export const taskJsonhalForm = new FormGroup({ | ||||
| _links: new FormControl(null, []), | _links: new FormControl(null, []), | ||||
| headline: new FormControl(null, [Validators.required]), | headline: new FormControl(null, [Validators.required]), | ||||
| description: new FormControl(null, [Validators.required]), | |||||
| description: new FormControl(null, []), | |||||
| createdBy: new FormControl(null, []), | createdBy: new FormControl(null, []), | ||||
| assignedTo: new FormControl(null, []), | assignedTo: new FormControl(null, []), | ||||
| assignedToIri: new FormControl(null, [Validators.required]), | assignedToIri: new FormControl(null, [Validators.required]), | ||||
| @@ -477,7 +477,7 @@ export const taskJsonhalForm = new FormGroup({ | |||||
| export const taskJsonldForm = new FormGroup({ | export const taskJsonldForm = new FormGroup({ | ||||
| headline: new FormControl(null, [Validators.required]), | headline: new FormControl(null, [Validators.required]), | ||||
| description: new FormControl(null, [Validators.required]), | |||||
| description: new FormControl(null, []), | |||||
| createdBy: new FormControl(null, []), | createdBy: new FormControl(null, []), | ||||
| assignedTo: new FormControl(null, []), | assignedTo: new FormControl(null, []), | ||||
| assignedToIri: new FormControl(null, [Validators.required]), | assignedToIri: new FormControl(null, [Validators.required]), | ||||
| @@ -498,6 +498,7 @@ export const taskNoteForm = new FormGroup({ | |||||
| message: new FormControl(null, [Validators.required]), | message: new FormControl(null, [Validators.required]), | ||||
| owner: new FormControl(null, []), | owner: new FormControl(null, []), | ||||
| taskIri: new FormControl(null, [Validators.required]), | taskIri: new FormControl(null, [Validators.required]), | ||||
| contactType: new FormControl(null, [Validators.required]), | |||||
| createdAt: new FormControl(null, []) | createdAt: new FormControl(null, []) | ||||
| }); | }); | ||||
| @@ -506,6 +507,7 @@ export const taskNoteJsonhalForm = new FormGroup({ | |||||
| message: new FormControl(null, [Validators.required]), | message: new FormControl(null, [Validators.required]), | ||||
| owner: new FormControl(null, []), | owner: new FormControl(null, []), | ||||
| taskIri: new FormControl(null, [Validators.required]), | taskIri: new FormControl(null, [Validators.required]), | ||||
| contactType: new FormControl(null, [Validators.required]), | |||||
| createdAt: new FormControl(null, []) | createdAt: new FormControl(null, []) | ||||
| }); | }); | ||||
| @@ -513,6 +515,7 @@ export const taskNoteJsonldForm = new FormGroup({ | |||||
| message: new FormControl(null, [Validators.required]), | message: new FormControl(null, [Validators.required]), | ||||
| owner: new FormControl(null, []), | owner: new FormControl(null, []), | ||||
| taskIri: new FormControl(null, [Validators.required]), | taskIri: new FormControl(null, [Validators.required]), | ||||
| contactType: new FormControl(null, [Validators.required]), | |||||
| createdAt: new FormControl(null, []) | createdAt: new FormControl(null, []) | ||||
| }); | }); | ||||
| @@ -520,6 +523,7 @@ export const userForm = new FormGroup({ | |||||
| email: new FormControl(null, [Validators.required, Validators.email]), | email: new FormControl(null, [Validators.required, Validators.email]), | ||||
| firstName: new FormControl(null, [Validators.required]), | firstName: new FormControl(null, [Validators.required]), | ||||
| lastName: new FormControl(null, [Validators.required]), | lastName: new FormControl(null, [Validators.required]), | ||||
| goals: new FormControl(null, []), | |||||
| image: new FormControl(null, []), | image: new FormControl(null, []), | ||||
| imageUrl: new FormControl(null, []), | imageUrl: new FormControl(null, []), | ||||
| fullName: new FormControl(null, []), | fullName: new FormControl(null, []), | ||||
| @@ -533,6 +537,7 @@ export const userJsonhalForm = new FormGroup({ | |||||
| email: new FormControl(null, [Validators.required, Validators.email]), | email: new FormControl(null, [Validators.required, Validators.email]), | ||||
| firstName: new FormControl(null, [Validators.required]), | firstName: new FormControl(null, [Validators.required]), | ||||
| lastName: new FormControl(null, [Validators.required]), | lastName: new FormControl(null, [Validators.required]), | ||||
| goals: new FormControl(null, []), | |||||
| image: new FormControl(null, []), | image: new FormControl(null, []), | ||||
| imageUrl: new FormControl(null, []), | imageUrl: new FormControl(null, []), | ||||
| fullName: new FormControl(null, []), | fullName: new FormControl(null, []), | ||||
| @@ -545,6 +550,7 @@ export const userJsonldForm = new FormGroup({ | |||||
| email: new FormControl(null, [Validators.required, Validators.email]), | email: new FormControl(null, [Validators.required, Validators.email]), | ||||
| firstName: new FormControl(null, [Validators.required]), | firstName: new FormControl(null, [Validators.required]), | ||||
| lastName: new FormControl(null, [Validators.required]), | lastName: new FormControl(null, [Validators.required]), | ||||
| goals: new FormControl(null, []), | |||||
| image: new FormControl(null, []), | image: new FormControl(null, []), | ||||
| imageUrl: new FormControl(null, []), | imageUrl: new FormControl(null, []), | ||||
| fullName: new FormControl(null, []), | fullName: new FormControl(null, []), | ||||
| @@ -5,9 +5,15 @@ | |||||
| <div class="mb-3"> | <div class="mb-3"> | ||||
| <label for="message" class="form-label">{{ 'form.comment' | translate }}:</label> | <label for="message" class="form-label">{{ 'form.comment' | translate }}:</label> | ||||
| <textarea class="form-control" id="message" formControlName="message" cols="50" rows="5"></textarea> | <textarea class="form-control" id="message" formControlName="message" cols="50" rows="5"></textarea> | ||||
| <div class="form-text" *ngIf="taskNoteForm.get('message')?.invalid && taskNoteForm.get('message')?.touched"> | |||||
| {{ 'form.comment' | translate }} {{ 'form.mandatory' | translate }}. | |||||
| </div> | |||||
| </div> | |||||
| <div class="mb-3"> | |||||
| <label for="contactType" class="form-label">{{ 'form.contactType' | translate }}:</label> | |||||
| <select class="form-control" id="contactType" formControlName="contactType"> | |||||
| <option *ngFor="let type of contactTypes" [value]="type"> | |||||
| {{ getTranslationKey(type) | translate }} | |||||
| </option> | |||||
| </select> | |||||
| </div> | </div> | ||||
| <button type="submit" class="btn btn-primary" [disabled]="taskNoteForm.invalid">{{ 'form.send' | translate }} | <button type="submit" class="btn btn-primary" [disabled]="taskNoteForm.invalid">{{ 'form.send' | translate }} | ||||
| @@ -18,6 +18,7 @@ export class NewTaskNoteComponent { | |||||
| protected taskNoteForm: FormGroup; | protected taskNoteForm: FormGroup; | ||||
| protected taskNoteSub: Subscription; | protected taskNoteSub: Subscription; | ||||
| protected contactTypes = Object.values(TaskNoteJsonld.ContactTypeEnum); | |||||
| constructor( | constructor( | ||||
| private taskNoteService: TaskNoteService, | private taskNoteService: TaskNoteService, | ||||
| @@ -31,6 +32,10 @@ export class NewTaskNoteComponent { | |||||
| this.taskNoteForm = FormGroupInitializer.initFormGroup(this.taskNoteForm, this.taskNote); | this.taskNoteForm = FormGroupInitializer.initFormGroup(this.taskNoteForm, this.taskNote); | ||||
| } | } | ||||
| getTranslationKey(type: string): string { | |||||
| return `task-note.type-${type}`; | |||||
| } | |||||
| onSubmit() { | onSubmit() { | ||||
| if (this.taskNoteForm.valid) { | if (this.taskNoteForm.valid) { | ||||
| if (this.taskNote.id === null || this.taskNote.id === undefined) { | if (this.taskNote.id === null || this.taskNote.id === undefined) { | ||||
| @@ -4,8 +4,10 @@ | |||||
| <div class="spt-col col-12 col-sm-6 col-lg-8"> | <div class="spt-col col-12 col-sm-6 col-lg-8"> | ||||
| <h1>{{ user.firstName }} {{ user.lastName }}</h1> | <h1>{{ user.firstName }} {{ user.lastName }}</h1> | ||||
| <dl> | <dl> | ||||
| <dt>E-Mail Adresse:</dt> | |||||
| <dt>{{('user.email' | translate)}}</dt> | |||||
| <dd><a href="mailto:{{ user.email }}">{{ user.email }}</a></dd> | <dd><a href="mailto:{{ user.email }}">{{ user.email }}</a></dd> | ||||
| <dt>{{('user.goals' | translate)}}</dt> | |||||
| <dd>{{ user.goals }}</dd> | |||||
| </dl> | </dl> | ||||
| </div> | </div> | ||||
| <div class="col-12 col-sm-6 col-lg-4 has-image"> | <div class="col-12 col-sm-6 col-lg-4 has-image"> | ||||
| @@ -20,7 +20,7 @@ import { Contact } from './contact'; | |||||
| */ | */ | ||||
| export interface Task { | export interface Task { | ||||
| headline: string | null; | headline: string | null; | ||||
| description: string | null; | |||||
| description?: string | null; | |||||
| /** | /** | ||||
| * ?UserApi | * ?UserApi | ||||
| */ | */ | ||||
| @@ -22,7 +22,7 @@ import { UserJsonhal } from './userJsonhal'; | |||||
| export interface TaskJsonhal { | export interface TaskJsonhal { | ||||
| _links?: CommentJsonhalLinks; | _links?: CommentJsonhalLinks; | ||||
| headline: string | null; | headline: string | null; | ||||
| description: string | null; | |||||
| description?: string | null; | |||||
| /** | /** | ||||
| * ?UserApi | * ?UserApi | ||||
| */ | */ | ||||
| @@ -24,7 +24,7 @@ export interface TaskJsonld { | |||||
| readonly id?: string; | readonly id?: string; | ||||
| readonly type?: string; | readonly type?: string; | ||||
| headline: string | null; | headline: string | null; | ||||
| description: string | null; | |||||
| description?: string | null; | |||||
| /** | /** | ||||
| * ?UserApi | * ?UserApi | ||||
| */ | */ | ||||
| @@ -22,6 +22,16 @@ export interface TaskNote { | |||||
| */ | */ | ||||
| readonly owner?: User; | readonly owner?: User; | ||||
| taskIri: string | null; | taskIri: string | null; | ||||
| contactType: TaskNote.ContactTypeEnum; | |||||
| readonly createdAt?: string | null; | readonly createdAt?: string | null; | ||||
| } | } | ||||
| export namespace TaskNote { | |||||
| export type ContactTypeEnum = 'personal' | 'phone' | 'email'; | |||||
| export const ContactTypeEnum = { | |||||
| Personal: 'personal' as ContactTypeEnum, | |||||
| Phone: 'phone' as ContactTypeEnum, | |||||
| Email: 'email' as ContactTypeEnum | |||||
| }; | |||||
| } | |||||
| @@ -24,6 +24,16 @@ export interface TaskNoteJsonhal { | |||||
| */ | */ | ||||
| readonly owner?: UserJsonhal; | readonly owner?: UserJsonhal; | ||||
| taskIri: string | null; | taskIri: string | null; | ||||
| contactType: TaskNoteJsonhal.ContactTypeEnum; | |||||
| readonly createdAt?: string | null; | readonly createdAt?: string | null; | ||||
| } | } | ||||
| export namespace TaskNoteJsonhal { | |||||
| export type ContactTypeEnum = 'personal' | 'phone' | 'email'; | |||||
| export const ContactTypeEnum = { | |||||
| Personal: 'personal' as ContactTypeEnum, | |||||
| Phone: 'phone' as ContactTypeEnum, | |||||
| Email: 'email' as ContactTypeEnum | |||||
| }; | |||||
| } | |||||
| @@ -26,6 +26,16 @@ export interface TaskNoteJsonld { | |||||
| */ | */ | ||||
| readonly owner?: UserJsonld; | readonly owner?: UserJsonld; | ||||
| taskIri: string | null; | taskIri: string | null; | ||||
| contactType: TaskNoteJsonld.ContactTypeEnum; | |||||
| readonly createdAt?: string | null; | readonly createdAt?: string | null; | ||||
| } | } | ||||
| export namespace TaskNoteJsonld { | |||||
| export type ContactTypeEnum = 'personal' | 'phone' | 'email'; | |||||
| export const ContactTypeEnum = { | |||||
| Personal: 'personal' as ContactTypeEnum, | |||||
| Phone: 'phone' as ContactTypeEnum, | |||||
| Email: 'email' as ContactTypeEnum | |||||
| }; | |||||
| } | |||||
| @@ -18,6 +18,7 @@ export interface User { | |||||
| email: string | null; | email: string | null; | ||||
| firstName: string | null; | firstName: string | null; | ||||
| lastName: string | null; | lastName: string | null; | ||||
| goals?: string | null; | |||||
| image?: string | null; | image?: string | null; | ||||
| readonly imageUrl?: string | null; | readonly imageUrl?: string | null; | ||||
| readonly fullName?: string | null; | readonly fullName?: string | null; | ||||
| @@ -20,6 +20,7 @@ export interface UserJsonhal { | |||||
| email: string | null; | email: string | null; | ||||
| firstName: string | null; | firstName: string | null; | ||||
| lastName: string | null; | lastName: string | null; | ||||
| goals?: string | null; | |||||
| image?: string | null; | image?: string | null; | ||||
| readonly imageUrl?: string | null; | readonly imageUrl?: string | null; | ||||
| readonly fullName?: string | null; | readonly fullName?: string | null; | ||||
| @@ -22,6 +22,7 @@ export interface UserJsonld { | |||||
| email: string | null; | email: string | null; | ||||
| firstName: string | null; | firstName: string | null; | ||||
| lastName: string | null; | lastName: string | null; | ||||
| goals?: string | null; | |||||
| image?: string | null; | image?: string | null; | ||||
| readonly imageUrl?: string | null; | readonly imageUrl?: string | null; | ||||
| readonly fullName?: string | null; | readonly fullName?: string | null; | ||||
| @@ -55,7 +55,9 @@ | |||||
| "user": | "user": | ||||
| { | { | ||||
| "hello": "Hi", | "hello": "Hi", | ||||
| "my": "Meine " | |||||
| "my": "Meine ", | |||||
| "email": "Email", | |||||
| "goals": "Ziele" | |||||
| }, | }, | ||||
| "overview": | "overview": | ||||
| { | { | ||||
| @@ -123,11 +125,18 @@ | |||||
| "quantity": "Anzahl", | "quantity": "Anzahl", | ||||
| "send": "Speichern", | "send": "Speichern", | ||||
| "search-placeholder": "Suche", | "search-placeholder": "Suche", | ||||
| "no-data": "Keine Datensätze gefunden." | |||||
| "no-data": "Keine Datensätze gefunden.", | |||||
| "contactType": "Kontaktart" | |||||
| }, | }, | ||||
| "sales": | "sales": | ||||
| { | { | ||||
| "turnover": "Umsatz", | "turnover": "Umsatz", | ||||
| "profit": "Gewinn" | "profit": "Gewinn" | ||||
| }, | |||||
| "task-note": | |||||
| { | |||||
| "type-personal": "Persönlich", | |||||
| "type-phone": "Telefon", | |||||
| "type-email": "Email" | |||||
| } | } | ||||
| } | } | ||||