Parcourir la source

taks note, user, etc

master
Daniel il y a 1 an
Parent
révision
9f0d941d79
16 fichiers modifiés avec 107 ajouts et 16 suppressions
  1. +1
    -1
      matsen-tool/openapi.json
  2. +33
    -3
      matsen-tool/openapi.yaml
  3. +9
    -3
      matsen-tool/src/app/_forms/apiForms.ts
  4. +9
    -3
      matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.html
  5. +5
    -0
      matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts
  6. +3
    -1
      matsen-tool/src/app/_views/user/user-detail/user-detail.component.html
  7. +1
    -1
      matsen-tool/src/app/core/api/v1/model/task.ts
  8. +1
    -1
      matsen-tool/src/app/core/api/v1/model/taskJsonhal.ts
  9. +1
    -1
      matsen-tool/src/app/core/api/v1/model/taskJsonld.ts
  10. +10
    -0
      matsen-tool/src/app/core/api/v1/model/taskNote.ts
  11. +10
    -0
      matsen-tool/src/app/core/api/v1/model/taskNoteJsonhal.ts
  12. +10
    -0
      matsen-tool/src/app/core/api/v1/model/taskNoteJsonld.ts
  13. +1
    -0
      matsen-tool/src/app/core/api/v1/model/user.ts
  14. +1
    -0
      matsen-tool/src/app/core/api/v1/model/userJsonhal.ts
  15. +1
    -0
      matsen-tool/src/app/core/api/v1/model/userJsonld.ts
  16. +11
    -2
      matsen-tool/src/assets/i18n/de.json

+ 1
- 1
matsen-tool/openapi.json
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 33
- 3
matsen-tool/openapi.yaml Voir le fichier

@@ -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
- email
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
- email
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
- email
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


+ 9
- 3
matsen-tool/src/app/_forms/apiForms.ts Voir le fichier

@@ -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, []),


+ 9
- 3
matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.html Voir le fichier

@@ -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 }}


+ 5
- 0
matsen-tool/src/app/_views/tasks/new-task-note/new-task-note.component.ts Voir le fichier

@@ -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) {


+ 3
- 1
matsen-tool/src/app/_views/user/user-detail/user-detail.component.html Voir le fichier

@@ -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">


+ 1
- 1
matsen-tool/src/app/core/api/v1/model/task.ts Voir le fichier

@@ -20,7 +20,7 @@ import { Contact } from './contact';
*/
export interface Task {
headline: string | null;
description: string | null;
description?: string | null;
/**
* ?UserApi
*/


+ 1
- 1
matsen-tool/src/app/core/api/v1/model/taskJsonhal.ts Voir le fichier

@@ -22,7 +22,7 @@ import { UserJsonhal } from './userJsonhal';
export interface TaskJsonhal {
_links?: CommentJsonhalLinks;
headline: string | null;
description: string | null;
description?: string | null;
/**
* ?UserApi
*/


+ 1
- 1
matsen-tool/src/app/core/api/v1/model/taskJsonld.ts Voir le fichier

@@ -24,7 +24,7 @@ export interface TaskJsonld {
readonly id?: string;
readonly type?: string;
headline: string | null;
description: string | null;
description?: string | null;
/**
* ?UserApi
*/


+ 10
- 0
matsen-tool/src/app/core/api/v1/model/taskNote.ts Voir le fichier

@@ -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
};
}



+ 10
- 0
matsen-tool/src/app/core/api/v1/model/taskNoteJsonhal.ts Voir le fichier

@@ -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
};
}



+ 10
- 0
matsen-tool/src/app/core/api/v1/model/taskNoteJsonld.ts Voir le fichier

@@ -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
};
}



+ 1
- 0
matsen-tool/src/app/core/api/v1/model/user.ts Voir le fichier

@@ -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;


+ 1
- 0
matsen-tool/src/app/core/api/v1/model/userJsonhal.ts Voir le fichier

@@ -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;


+ 1
- 0
matsen-tool/src/app/core/api/v1/model/userJsonld.ts Voir le fichier

@@ -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;


+ 11
- 2
matsen-tool/src/assets/i18n/de.json Voir le fichier

@@ -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"
}
}

Chargement…
Annuler
Enregistrer