diff --git a/matsen-tool/package-lock.json b/matsen-tool/package-lock.json index 67cb1c8..e9b8821 100644 --- a/matsen-tool/package-lock.json +++ b/matsen-tool/package-lock.json @@ -27,6 +27,7 @@ "bootstrap-icons": "^1.11.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", + "uuid": "^9.0.1", "zone.js": "~0.14.2" }, "devDependencies": { @@ -35,6 +36,7 @@ "@angular/compiler-cli": "^17.0.0", "@openapitools/openapi-generator-cli": "^2.7.0", "@types/jasmine": "~5.1.0", + "@types/uuid": "^9.0.8", "@verizonconnect/ngx-form-generator": "^1.2.0", "jasmine-core": "~5.1.0", "karma": "~6.4.0", @@ -4829,6 +4831,12 @@ "@types/node": "*" } }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true + }, "node_modules/@types/ws": { "version": "8.5.10", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", @@ -13036,6 +13044,15 @@ "websocket-driver": "^0.7.4" } }, + "node_modules/sockjs/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/socks": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", @@ -13919,10 +13936,13 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { "uuid": "dist/bin/uuid" } diff --git a/matsen-tool/package.json b/matsen-tool/package.json index d38547a..beba248 100644 --- a/matsen-tool/package.json +++ b/matsen-tool/package.json @@ -30,6 +30,7 @@ "bootstrap-icons": "^1.11.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", + "uuid": "^9.0.1", "zone.js": "~0.14.2" }, "devDependencies": { @@ -38,6 +39,7 @@ "@angular/compiler-cli": "^17.0.0", "@openapitools/openapi-generator-cli": "^2.7.0", "@types/jasmine": "~5.1.0", + "@types/uuid": "^9.0.8", "@verizonconnect/ngx-form-generator": "^1.2.0", "jasmine-core": "~5.1.0", "karma": "~6.4.0", diff --git a/matsen-tool/src/app/_components/toggle/toggle.component.html b/matsen-tool/src/app/_components/toggle/toggle.component.html new file mode 100644 index 0000000..6e84b9b --- /dev/null +++ b/matsen-tool/src/app/_components/toggle/toggle.component.html @@ -0,0 +1,9 @@ +
+ +
+ +
+
\ No newline at end of file diff --git a/matsen-tool/src/app/_components/toggle/toggle.component.scss b/matsen-tool/src/app/_components/toggle/toggle.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/matsen-tool/src/app/_components/toggle/toggle.component.spec.ts b/matsen-tool/src/app/_components/toggle/toggle.component.spec.ts new file mode 100644 index 0000000..d11a5b2 --- /dev/null +++ b/matsen-tool/src/app/_components/toggle/toggle.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ToggleComponent } from './toggle.component'; + +describe('ToggleComponent', () => { + let component: ToggleComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ToggleComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ToggleComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/matsen-tool/src/app/_components/toggle/toggle.component.ts b/matsen-tool/src/app/_components/toggle/toggle.component.ts new file mode 100644 index 0000000..273027c --- /dev/null +++ b/matsen-tool/src/app/_components/toggle/toggle.component.ts @@ -0,0 +1,16 @@ +import {Component, Input} from '@angular/core'; +import { v4 as uuidv4 } from 'uuid'; +import {ContactJsonld} from "@app/core/api/v1"; +@Component({ + selector: 'app-toggle', + templateUrl: './toggle.component.html', + styleUrl: './toggle.component.scss' +}) +export class ToggleComponent { + @Input() public headline!: string; + + protected toggleId: string; + constructor() { + this.toggleId = uuidv4(); + } +} diff --git a/matsen-tool/src/app/app.module.ts b/matsen-tool/src/app/app.module.ts index 621d1e6..89b1a63 100644 --- a/matsen-tool/src/app/app.module.ts +++ b/matsen-tool/src/app/app.module.ts @@ -46,6 +46,7 @@ import { DocumentsDetailComponent } from './documents/documents-detail/documents import { SalesComponent } from './sales/sales.component'; import { SalesDetailComponent } from './sales/sales-detail/sales-detail.component'; import { NewSaleComponent } from './sales/new-sale/new-sale.component'; +import { ToggleComponent } from './_components/toggle/toggle.component'; export function apiConfigFactory(): Configuration { const params: ConfigurationParameters = { @@ -112,7 +113,8 @@ export function HttpLoaderFactory(http: HttpClient) { DocumentsDetailComponent, SalesComponent, SalesDetailComponent, - NewSaleComponent + NewSaleComponent, + ToggleComponent ], providers: [ {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, diff --git a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html index c88c2aa..c677b29 100644 --- a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html +++ b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.html @@ -46,170 +46,174 @@ -
-
-
-

{{ 'basic.contacts' | translate }}

- -
-
-
-
-
-
-

{{ contact.firstName }} {{ contact.lastName }}

-

{{ contact.email }}
- {{ contact.phone }}
- {{ contact.position }}

-
-
- {{contact.firstName}} {{contact.lastName}} + +
+
+
+ +
+
+
+
+
+
+

{{ contact.firstName }} {{ contact.lastName }}

+

{{ contact.email }}
+ {{ contact.phone }}
+ {{ contact.position }}

+
+
+ {{contact.firstName}} {{contact.lastName}} +
-
-
- {{ 'basic.details' | translate }} +
+ {{ 'basic.details' | translate }} +
+ +
- -
-
-
-
-
-

{{ 'basic.tasks' | translate }}

- -
-
-
- -
-
-

-

Zugewiesen an: {{ task.assignedToName }}

- -
-
+ + + +
+
+
+
-
-
-
-
-

{{ taskNote.createdAt | date:'dd.MM.YYYY' }}

-

{{ taskNote.ownerName }}

+
+
+ +
+
+

+

Zugewiesen an: {{ task.assignedToName }}

+
-
-

{{ taskNote.message }}

+
+
+
+
+
+
+

{{ taskNote.createdAt | date:'dd.MM.YYYY' }}

+

{{ taskNote.ownerName }}

+
+
+

{{ taskNote.message }}

+
+
-
-
-
- - {{ 'basic.hide-comments' | translate }} - {{ 'basic.show-comments' | translate }} - - {{ 'basic.comment-it' | translate }} +
+ + {{ 'basic.hide-comments' | translate }} + {{ 'basic.show-comments' | translate }} + + {{ 'basic.comment-it' | translate }} +
+ +
- -
-
-
-
-
-

{{ 'basic.posts' | translate }}

- -
-
-
-
-
-

{{ post.createdAt | date:'dd.MM.YYYY' }}

-

{{ post.ownerName }}

-
-
-

{{ post.headline }}

-

-
- -
+ + +
+
+
+
-
-
+
+
-

{{ comment.createdAt | date:'dd.MM.YYYY' }}

-

{{ comment.ownerName }}

+

{{ post.createdAt | date:'dd.MM.YYYY' }}

+

{{ post.ownerName }}

-

+

{{ post.headline }}

+

+
+ +
+
+
+
+
+
+

{{ comment.createdAt | date:'dd.MM.YYYY' }}

+

{{ comment.ownerName }}

+
+
+

+
+
-
-
-
- - {{ 'basic.hide-comments' | translate }} - {{ 'basic.show-comments' | translate }} - - {{ 'basic.comment-it' | translate }} +
+ + {{ 'basic.hide-comments' | translate }} + {{ 'basic.show-comments' | translate }} + + {{ 'basic.comment-it' | translate }} +
+ +
- -
-
+ diff --git a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts index 4b7184f..3070e54 100644 --- a/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts +++ b/matsen-tool/src/app/partners/partners-detail/partners-detail.component.ts @@ -24,6 +24,7 @@ import {User} from "@app/_models"; import {NewCommentComponent} from "@app/postings/new-comment/new-comment.component"; import {NewPartnerComponent} from "@app/partners/new-partner/new-partner.component"; import {NewTaskNoteComponent} from "@app/tasks/new-task-note/new-task-note.component"; +import {ToggleComponent} from "@app/_components/toggle/toggle.component"; @Component({ selector: 'app-partners-detail', @@ -31,6 +32,9 @@ import {NewTaskNoteComponent} from "@app/tasks/new-task-note/new-task-note.compo styleUrl: './partners-detail.component.scss' }) export class PartnersDetailComponent implements OnInit, AfterViewInit { + @ViewChild("toggleContacts", { static: true }) toggleContacts: ToggleComponent = new ToggleComponent(); + @ViewChild("toggleTasks", { static: true }) toggleTasks: ToggleComponent = new ToggleComponent(); + @ViewChild("togglePosts", { static: true }) togglePosts: ToggleComponent = new ToggleComponent(); @ViewChild(MatPaginator) contactsPaginator: MatPaginator; @ViewChild(MatPaginator) tasksPaginator: MatPaginator; @ViewChild(MatPaginator) postsPaginator: MatPaginator; diff --git a/matsen-tool/src/assets/scss/_basics.scss b/matsen-tool/src/assets/scss/_basics.scss index 1d917e6..c31fae7 100644 --- a/matsen-tool/src/assets/scss/_basics.scss +++ b/matsen-tool/src/assets/scss/_basics.scss @@ -56,4 +56,8 @@ img { height: 120px; width: 100%; } +} + +.toggle-btn { + margin-top: -3.25rem; } \ No newline at end of file