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