+ #simdutTemplate>
diff --git a/src/main/frontend/src/app/modules/material/pages/edit/edit.component.ts b/src/main/frontend/src/app/modules/material/pages/edit/edit.component.ts
index a194cda..6a17fc0 100644
--- a/src/main/frontend/src/app/modules/material/pages/edit/edit.component.ts
+++ b/src/main/frontend/src/app/modules/material/pages/edit/edit.component.ts
@@ -8,6 +8,7 @@ import {ActivatedRoute, Router} from "@angular/router";
import {SubscribingComponent} from "../../../shared/components/subscribing.component";
import {Material} from "../../../shared/model/material.model";
import {environment} from "../../../../../environments/environment";
+import {FileButtonComponent} from "../../../shared/file-button/file-button.component";
@Component({
selector: 'cre-edit',
@@ -16,7 +17,6 @@ import {environment} from "../../../../../environments/environment";
})
export class EditComponent extends SubscribingComponent {
@ViewChild('simdutTemplate', {static: true}) simdutTemplateRef
- @ViewChild('simdutFileInput') simdutFileInput
material: Material | null
formFields: FormField[] = [
@@ -67,6 +67,7 @@ export class EditComponent extends SubscribingComponent {
unknownError = false
errorMessage: string | null
hasSimdut = false
+ selectedSimdutFile: File | null
constructor(
private materialService: MaterialService,
@@ -106,7 +107,7 @@ export class EditComponent extends SubscribingComponent {
submit(values) {
this.subscribe(
- this.materialService.update(this.material.id, values.name, values.inventoryQuantity, values.materialType, values.simdutFile),
+ this.materialService.update(this.material.id, values.name, values.inventoryQuantity, values.materialType, this.selectedSimdutFile),
{
next: () => this.router.navigate(['/catalog/material/list']),
error: err => {
diff --git a/src/main/frontend/src/app/modules/material/pages/list/list.component.ts b/src/main/frontend/src/app/modules/material/pages/list/list.component.ts
index 43c578a..5fc6e62 100644
--- a/src/main/frontend/src/app/modules/material/pages/list/list.component.ts
+++ b/src/main/frontend/src/app/modules/material/pages/list/list.component.ts
@@ -12,7 +12,7 @@ import {ActivatedRoute, Router} from "@angular/router";
styleUrls: ['./list.component.sass']
})
export class ListComponent extends SubscribingComponent {
- materials$ = this.materialService.all
+ materials$ = this.materialService.allNotMixType
columns = [
{def: 'name', title: 'Code', valueFn: t => t.name},
{def: 'inventoryQuantity', title: 'Quantité', valueFn: t => t.inventoryQuantity},
diff --git a/src/main/frontend/src/app/modules/material/service/material.service.ts b/src/main/frontend/src/app/modules/material/service/material.service.ts
index fc167fb..c8ea1d8 100644
--- a/src/main/frontend/src/app/modules/material/service/material.service.ts
+++ b/src/main/frontend/src/app/modules/material/service/material.service.ts
@@ -17,6 +17,10 @@ export class MaterialService {
return this.api.get