ソースを参照

bugfixing

master
Florian Eisenmenger 1年前
コミット
135df08514
7個のファイルの変更17行の追加12行の削除
  1. +1
    -0
      matsen-tool/src/app/_components/search-select/search-select.component.html
  2. +1
    -3
      matsen-tool/src/app/_components/search-select/search-select.component.ts
  3. +4
    -2
      matsen-tool/src/app/_views/documents/new-document/new-document.component.html
  4. +3
    -2
      matsen-tool/src/app/_views/posts/new-post/new-post.component.html
  5. +0
    -1
      matsen-tool/src/app/_views/posts/new-post/new-post.component.ts
  6. +3
    -1
      matsen-tool/src/app/_views/posts/post-list/post-list.component.ts
  7. +5
    -3
      matsen-tool/src/app/_views/products/assign-product/assign-product.component.html

+ 1
- 0
matsen-tool/src/app/_components/search-select/search-select.component.html ファイルの表示

@@ -26,6 +26,7 @@
</ng-container> </ng-container>
<ng-container *ngIf="column.columnType == COLUMN_TYPE_IMAGE"> <ng-container *ngIf="column.columnType == COLUMN_TYPE_IMAGE">
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
X{{element.imageUrl}}X
<img *ngIf="element.imageUrl !== null && element.imageUrl !== undefined" <img *ngIf="element.imageUrl !== null && element.imageUrl !== undefined"
src="{{ getElementValue(element, column) }}" width="40" height="40"/> src="{{ getElementValue(element, column) }}" width="40" height="40"/>
<img *ngIf="element.imageUrl === null || element.imageUrl === undefined" <img *ngIf="element.imageUrl === null || element.imageUrl === undefined"


+ 1
- 3
matsen-tool/src/app/_components/search-select/search-select.component.ts ファイルの表示

@@ -98,10 +98,8 @@ export class SearchSelectComponent implements OnInit, AfterViewInit {
this.documentForm.get(this.formId)?.setValue(row.id); this.documentForm.get(this.formId)?.setValue(row.id);
if (this.displayedDataSubResource !== undefined) { if (this.displayedDataSubResource !== undefined) {
this.paragraphRef.nativeElement.textContent = row[this.displayedDataSubResource][this.displayedDataField]; this.paragraphRef.nativeElement.textContent = row[this.displayedDataSubResource][this.displayedDataField];
console.log(row[this.displayedDataSubResource][this.displayedDataField]);
} else { } else {
this.paragraphRef.nativeElement.textContent = row[this.displayedDataField]; this.paragraphRef.nativeElement.textContent = row[this.displayedDataField];
console.log(row[this.displayedDataField]);
} }
this.searchBoxFilled = true; this.searchBoxFilled = true;
this.searchBoxOpen = false; this.searchBoxOpen = false;
@@ -141,7 +139,7 @@ export class SearchSelectComponent implements OnInit, AfterViewInit {
res.columnHeader = columnHeader; res.columnHeader = columnHeader;
res.columnType = columnType; res.columnType = columnType;
res.field = field; res.field = field;
res.subResource = subResource
res.subResource = subResource;
return res; return res;
} }




+ 4
- 2
matsen-tool/src/app/_views/documents/new-document/new-document.component.html ファイルの表示

@@ -13,6 +13,7 @@
</div> </div>


<div class="mb-3"> <div class="mb-3">
<label for="partner" class="form-label">{{ 'form.partner' | translate }}:</label>
<app-search-select #partnerSearchSelect <app-search-select #partnerSearchSelect
[formId]="'partnerIri'" [formId]="'partnerIri'"
[formLabelLangKey]="'form.partner'" [formLabelLangKey]="'form.partner'"
@@ -24,10 +25,11 @@
[dataSet]="document.partner" [dataSet]="document.partner"
> >
</app-search-select> </app-search-select>
<input type="hidden" formControlName="partner"/>
<input type="hidden" id="partner" formControlName="partner"/>
</div> </div>


<div class="mb-3"> <div class="mb-3">
<label for="product" class="form-label">{{ 'form.product' | translate }}:</label>
<app-search-select #productSearchSelect <app-search-select #productSearchSelect
[formId]="'productIri'" [formId]="'productIri'"
[formLabelLangKey]="'form.product'" [formLabelLangKey]="'form.product'"
@@ -39,7 +41,7 @@
[dataSet]="document.product" [dataSet]="document.product"
> >
</app-search-select> </app-search-select>
<input type="hidden" formControlName="product"/>
<input type="hidden" id="product" formControlName="product"/>
</div> </div>


<div class="mb-3" *ngIf="documentForm.get('documentUrl')?.value === null"> <div class="mb-3" *ngIf="documentForm.get('documentUrl')?.value === null">


+ 3
- 2
matsen-tool/src/app/_views/posts/new-post/new-post.component.html ファイルの表示

@@ -11,6 +11,7 @@
</div> </div>


<div class="mb-3"> <div class="mb-3">
<label for="product" class="form-label">{{ 'form.product' | translate }}:</label>
<ng-container *ngIf="posting.saleIri === null || posting.saleIri === undefined"> <ng-container *ngIf="posting.saleIri === null || posting.saleIri === undefined">
<app-search-select *ngIf="this.posting.id === null || this.posting.id === undefined" <app-search-select *ngIf="this.posting.id === null || this.posting.id === undefined"
#productSearchSelect #productSearchSelect
@@ -23,12 +24,12 @@
[displayedDataField]="'name'" [displayedDataField]="'name'"
> >
</app-search-select> </app-search-select>
<input type="hidden" *ngIf="this.posting.id === null || this.posting.id === undefined"
<input id="product" type="hidden" *ngIf="this.posting.id === null || this.posting.id === undefined"
formControlName="product"/> formControlName="product"/>
</ng-container> </ng-container>
<input type="text" <input type="text"
*ngIf="posting.saleIri !== null && posting.saleIri !== undefined && (this.posting.id === null || this.posting.id === undefined)" *ngIf="posting.saleIri !== null && posting.saleIri !== undefined && (this.posting.id === null || this.posting.id === undefined)"
class="form-control" disabled value="{{product?.name}}"/>
class="form-control" disabled value="{{product.name}}"/>
<input type="text" *ngIf="this.posting.id !== null && this.posting.id !== undefined" class="form-control" <input type="text" *ngIf="this.posting.id !== null && this.posting.id !== undefined" class="form-control"
disabled value="{{posting.product?.name}}"/> disabled value="{{posting.product?.name}}"/>
</div> </div>


+ 0
- 1
matsen-tool/src/app/_views/posts/new-post/new-post.component.ts ファイルの表示

@@ -49,7 +49,6 @@ export class NewPostComponent implements OnInit {
} }


ngOnInit(): void { ngOnInit(): void {
console.log(this.posting);
this.postForm = FormGroupInitializer.initFormGroup(this.postForm, this.posting); this.postForm = FormGroupInitializer.initFormGroup(this.postForm, this.posting);
} }




+ 3
- 1
matsen-tool/src/app/_views/posts/post-list/post-list.component.ts ファイルの表示

@@ -11,7 +11,6 @@ import {
} from "@app/core/api/v1"; } from "@app/core/api/v1";
import {MatTableDataSource} from "@angular/material/table"; import {MatTableDataSource} from "@angular/material/table";
import {NewPostComponent} from "@app/_views/posts/new-post/new-post.component"; import {NewPostComponent} from "@app/_views/posts/new-post/new-post.component";
import {NgbModal, NgbModalOptions} from "@ng-bootstrap/ng-bootstrap";
import {AppHelperService} from "@app/_helpers/app-helper.service"; import {AppHelperService} from "@app/_helpers/app-helper.service";
import {PagingComponent} from "@app/_components/paging/paging.component"; import {PagingComponent} from "@app/_components/paging/paging.component";
import {NewCommentComponent} from "@app/_views/posts/new-comment/new-comment.component"; import {NewCommentComponent} from "@app/_views/posts/new-comment/new-comment.component";
@@ -141,6 +140,9 @@ export class PostListComponent implements OnInit, AfterViewInit {
if (this.partner !== undefined) { if (this.partner !== undefined) {
post.partnerIri = this.partner?.id; post.partnerIri = this.partner?.id;
} }
if (this.contact !== undefined) {
post.contactIri = this.contact.id;
}
if (this.sale !== undefined) { if (this.sale !== undefined) {
post.partnerIri = this.sale?.partnerIri; post.partnerIri = this.sale?.partnerIri;
post.productIri = this.sale?.productIri; post.productIri = this.sale?.productIri;


+ 5
- 3
matsen-tool/src/app/_views/products/assign-product/assign-product.component.html ファイルの表示

@@ -3,6 +3,7 @@
<div class="spt-form"> <div class="spt-form">
<form [formGroup]="form" (ngSubmit)="onSubmit()"> <form [formGroup]="form" (ngSubmit)="onSubmit()">
<div class="mb-3" *ngIf="this.partnerProduct"> <div class="mb-3" *ngIf="this.partnerProduct">
<label for="product" class="form-label">{{ 'form.product' | translate }}:</label>
<app-search-select #productSearchSelect <app-search-select #productSearchSelect
[formId]="'productIri'" [formId]="'productIri'"
[formLabelLangKey]="'form.product'" [formLabelLangKey]="'form.product'"
@@ -12,11 +13,12 @@
[searchSelectColDefs]="colDefProducts" [searchSelectColDefs]="colDefProducts"
[displayedDataField]="'name'" [displayedDataField]="'name'"
> >
<input type="hidden" formControlName="productIri" value="{{partnerProduct.productIri}}"/>
<input type="hidden" id="product" formControlName="productIri" value="{{partnerProduct.productIri}}"/>
</app-search-select> </app-search-select>
</div> </div>
<div class="mb-3" *ngIf="this.contactPartnerProduct"> <div class="mb-3" *ngIf="this.contactPartnerProduct">
<app-search-select #productSearchSelect
<label for="partnerProduct" class="form-label">{{ 'form.product' | translate }}:</label>
<app-search-select #partnerSearchSelect
[formId]="'partnerProductIri'" [formId]="'partnerProductIri'"
[formLabelLangKey]="'form.product'" [formLabelLangKey]="'form.product'"
[documentForm]="form" [documentForm]="form"
@@ -26,7 +28,7 @@
[displayedDataField]="'name'" [displayedDataField]="'name'"
[displayedDataSubResource]="'product'" [displayedDataSubResource]="'product'"
> >
<input type="hidden" formControlName="partnerProductIri" value="{{contactPartnerProduct.partnerProductIri}}"/>
<input type="hidden" id="partnerProduct" formControlName="partnerProductIri" value="{{contactPartnerProduct.partnerProductIri}}"/>
</app-search-select> </app-search-select>
</div> </div>
<button type="submit" class="btn btn-primary" [disabled]="form.invalid">{{'form.send' | translate}}</button> <button type="submit" class="btn btn-primary" [disabled]="form.invalid">{{'form.send' | translate}}</button>


読み込み中…
キャンセル
保存