* fault-type added
* expensive step is mandatory
This commit is contained in:
parent
9d07b8ad82
commit
6348fb5dd0
@ -30,6 +30,7 @@ export class RoleGuardService{
|
|||||||
new RegExp("/karbantartas/naptar/[\\d]+", "i"),
|
new RegExp("/karbantartas/naptar/[\\d]+", "i"),
|
||||||
],
|
],
|
||||||
'projektvezeto': [
|
'projektvezeto': [
|
||||||
|
new RegExp("/hiba/rogzites", "i"),
|
||||||
new RegExp("/hiba/lista", "i"),
|
new RegExp("/hiba/lista", "i"),
|
||||||
new RegExp("/hiba/feladat-lista", "i"),
|
new RegExp("/hiba/feladat-lista", "i"),
|
||||||
new RegExp("/hiba/visszaigazolas/[\\d]+", "i"),
|
new RegExp("/hiba/visszaigazolas/[\\d]+", "i"),
|
||||||
@ -125,6 +126,11 @@ export class RoleGuardService{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'setFaultType':
|
||||||
|
if (roles.indexOf('projektvezeto') != -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'monthlyClose':
|
case 'monthlyClose':
|
||||||
if (roles.indexOf('projektvezeto') != -1) {
|
if (roles.indexOf('projektvezeto') != -1) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="ui indeterminate text loader">Mentés</div>
|
<div class="ui indeterminate text loader">Mentés</div>
|
||||||
</div>
|
</div>
|
||||||
<form class="ui form" #confirmForm>
|
<form class="ui form" #confirmForm>
|
||||||
<h4 class="ui dividing header">Nagyértékű munka jóváhagyása</h4>
|
<h4 class="ui dividing header">Munka jóváhagyása</h4>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>Elutasítás indoklása</label>
|
<label>Elutasítás indoklása</label>
|
||||||
<textarea rows="3"
|
<textarea rows="3"
|
||||||
@ -13,9 +13,30 @@
|
|||||||
name="rejectReason"
|
name="rejectReason"
|
||||||
[(ngModel)]="rejectReason"></textarea>
|
[(ngModel)]="rejectReason"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inline fields">
|
||||||
|
<label>Hiba típusa</label>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="uzemeltetesi" value="uzemeltetesi" [(ngModel)]="fault.faultType">
|
||||||
|
<label for="uzemeltetesi">Üzemeltetési</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="garancialis" value="garancialis" [(ngModel)]="fault.faultType">
|
||||||
|
<label for="garancialis">Garanciális</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="arajanlat" value="arajanlat" [(ngModel)]="fault.faultType">
|
||||||
|
<label for="arajanlat">Árajánlat</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="four inline fields">
|
<div class="four inline fields">
|
||||||
<div class="two wide field">
|
<div class="two wide field">
|
||||||
<button class="ui fluid button" [class.negative]="canReject" [class.disabled]="!canReject" (click)="reject()">Elvetés</button>
|
<button class="ui fluid button" [class.negative]="canReject" [class.disabled]="!canReject" (click)="reject()">Elutasítás</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="three wide field">
|
<div class="three wide field">
|
||||||
<button class="ui fluid button"
|
<button class="ui fluid button"
|
||||||
@ -23,17 +44,17 @@
|
|||||||
[class.disabled]="submitInProgress"
|
[class.disabled]="submitInProgress"
|
||||||
(click)="confirm()">Jóváhagyás</button>
|
(click)="confirm()">Jóváhagyás</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="five wide field">
|
<!--<div class="five wide field">-->
|
||||||
<div class="ui checkbox">
|
<!--<div class="ui checkbox">-->
|
||||||
<input type="checkbox" id="mustLowerCost" name="mustLowerCost"
|
<!--<input type="checkbox" id="mustLowerCost" name="mustLowerCost"-->
|
||||||
[(ngModel)]="fault.mustLowerCost">
|
<!--[(ngModel)]="fault.mustLowerCost">-->
|
||||||
<label for="mustLowerCost">Költség csökkentés szükséges</label>
|
<!--<label for="mustLowerCost">Költség csökkentés szükséges</label>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="six wide field" [class.error]="noAllocatedExpense" *ngIf="fault.mustLowerCost">
|
<!--<div class="six wide field" [class.error]="noAllocatedExpense" *ngIf="fault.mustLowerCost">-->
|
||||||
<label>Keret összeg:</label>
|
<!--<label>Keret összeg:</label>-->
|
||||||
<input type="number" name="allocatedExpense" [(ngModel)]="fault.allocatedExpense">
|
<!--<input type="number" name="allocatedExpense" [(ngModel)]="fault.allocatedExpense">-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui dividing header">Hiba adatai</h4>
|
<h4 class="ui dividing header">Hiba adatai</h4>
|
||||||
@ -46,11 +67,11 @@
|
|||||||
<td class="collapsing">Becsült alapanyagköltség</td>
|
<td class="collapsing">Becsült alapanyagköltség</td>
|
||||||
<td>{{numericMaterialCostEstimate|currencyFormat}}</td>
|
<td>{{numericMaterialCostEstimate|currencyFormat}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<!--<tr>-->
|
||||||
<td class="collapsing">Részletes költségvetés</td>
|
<!--<td class="collapsing">Részletes költségvetés</td>-->
|
||||||
<td><a [href]="expensePdfDownloadUrl" target="_blank"><i class="file pdf outline icon"></i>Letöltés</a>
|
<!--<td><a [href]="expensePdfDownloadUrl" target="_blank"><i class="file pdf outline icon"></i>Letöltés</a>-->
|
||||||
</td>
|
<!--</td>-->
|
||||||
</tr>
|
<!--</tr>-->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="collapsing">Hiba helye</td>
|
<td class="collapsing">Hiba helye</td>
|
||||||
<td><b>{{fault.facilityLocation.roomNumber}}</b>-{{fault.facilityLocation.name}}</td>
|
<td><b>{{fault.facilityLocation.roomNumber}}</b>-{{fault.facilityLocation.name}}</td>
|
||||||
|
|||||||
@ -24,26 +24,35 @@
|
|||||||
[(ngModel)]="fault.workCostEstimate">
|
[(ngModel)]="fault.workCostEstimate">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field" [class.error]="hasNoPdfAttachment" [hidden]="!highExpense">
|
<!--<div class="field" [class.error]="hasNoPdfAttachment" [hidden]="!highExpense">-->
|
||||||
<h4 class="ui dividing header">Költség becslés pdf formátumban</h4>
|
<!--<h4 class="ui dividing header">Költség becslés pdf formátumban</h4>-->
|
||||||
<input #pdfUpload type="file" accept="application/pdf"/>
|
<!--<input #pdfUpload type="file" accept="application/pdf"/>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="ui error message" [class.visible]="hasErrors">
|
<div class="ui error message" [class.visible]="hasErrors">
|
||||||
<p>A pirossal jelölt mezők kitöltése kötelező.</p>
|
<p>A pirossal jelölt mezők kitöltése kötelező.</p>
|
||||||
</div>
|
</div>
|
||||||
<button *ngIf="!highExpense" class="ui button"
|
<button class="ui button"
|
||||||
[class.positive]="canConfirm"
|
[class.positive]="canConfirm"
|
||||||
[class.disabled]="!canConfirm" tabindex="0"
|
[class.disabled]="!canConfirm" tabindex="0"
|
||||||
(click)="confirm()">Visszaigazolás
|
(click)="confirm()">Visszaigazolás
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="highExpense" class="ui button"
|
<!--<button *ngIf="!highExpense" class="ui button"-->
|
||||||
[class.orange]="canHighExpense"
|
<!--[class.positive]="canConfirm"-->
|
||||||
[class.disabled]="!canHighExpense" tabindex="0"
|
<!--[class.disabled]="!canConfirm" tabindex="0"-->
|
||||||
(click)="setHighExpenseFault()">Nagyértékű munka továbbküldése jóváhagyásra
|
<!--(click)="confirm()">Visszaigazolás-->
|
||||||
</button>
|
<!--</button>-->
|
||||||
|
<!--<button *ngIf="highExpense" class="ui button"-->
|
||||||
|
<!--[class.orange]="canHighExpense"-->
|
||||||
|
<!--[class.disabled]="!canHighExpense" tabindex="0"-->
|
||||||
|
<!--(click)="setHighExpenseFault()">Nagyértékű munka továbbküldése jóváhagyásra-->
|
||||||
|
<!--</button>-->
|
||||||
|
|
||||||
<h4 class="ui dividing header">Hiba helye</h4>
|
<h4 class="ui dividing header">Hiba helye</h4>
|
||||||
<table class="ui red definition table">
|
<table class="ui red definition table">
|
||||||
|
<tr>
|
||||||
|
<td class="collapsing">Hiba típus</td>
|
||||||
|
<td>{{faultType}}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="collapsing">Hiba helye</td>
|
<td class="collapsing">Hiba helye</td>
|
||||||
<td><b>{{fault.facilityLocation.roomNumber}}</b>-{{fault.facilityLocation.name}}</td>
|
<td><b>{{fault.facilityLocation.roomNumber}}</b>-{{fault.facilityLocation.name}}</td>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { finalize } from 'rxjs/operators';
|
|||||||
import { environment } from "../../../environments/environment";
|
import { environment } from "../../../environments/environment";
|
||||||
import { FaultManagerService } from "../fault-manager.service";
|
import { FaultManagerService } from "../fault-manager.service";
|
||||||
import { Fault } from "../shared/fault";
|
import { Fault } from "../shared/fault";
|
||||||
|
import { FaultType } from "../shared/fault-type";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-confirm-fault',
|
selector: 'app-confirm-fault',
|
||||||
@ -36,49 +37,54 @@ export class ConfirmFaultComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.titleService.setTitle('Webnapló : Hiba visszaigazolása');
|
this.titleService.setTitle('Webnapló : Hiba visszaigazolása');
|
||||||
this.route.data.subscribe((data: { fault: Fault }) => this.fault = data.fault);
|
this.route.data.subscribe((data: { fault: Fault }) => this.fault = data.fault);
|
||||||
jQuery(this.pdfUpload.nativeElement).on('change', changeEvent => {
|
// jQuery(this.pdfUpload.nativeElement).on('change', changeEvent => {
|
||||||
for (let i = 0; i < this.pdfUpload.nativeElement.files.length; i++) {
|
// for (let i = 0; i < this.pdfUpload.nativeElement.files.length; i++) {
|
||||||
if (!/\.(pdf)$/i.test(this.pdfUpload.nativeElement.files[i].name)) {
|
// if (!/\.(pdf)$/i.test(this.pdfUpload.nativeElement.files[i].name)) {
|
||||||
this.pdfUpload.nativeElement.value = null;
|
// this.pdfUpload.nativeElement.value = null;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
jQuery(this.photoUpload.nativeElement).on('change', changeEvent => {
|
// jQuery(this.photoUpload.nativeElement).on('change', changeEvent => {
|
||||||
this.rawImageData = [];
|
// this.rawImageData = [];
|
||||||
for (let i = 0; i < this.photoUpload.nativeElement.files.length; i++) {
|
// for (let i = 0; i < this.photoUpload.nativeElement.files.length; i++) {
|
||||||
if (!/\.(jpe?g|png|gif)$/i.test(this.photoUpload.nativeElement.files[i].name)) {
|
// if (!/\.(jpe?g|png|gif)$/i.test(this.photoUpload.nativeElement.files[i].name)) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
let reader = new FileReader();
|
// let reader = new FileReader();
|
||||||
reader.addEventListener("load", () => {
|
// reader.addEventListener("load", () => {
|
||||||
this.rawImageData.push(reader.result);
|
// this.rawImageData.push(reader.result);
|
||||||
});
|
// });
|
||||||
reader.readAsDataURL(this.photoUpload.nativeElement.files[i]);
|
// reader.readAsDataURL(this.photoUpload.nativeElement.files[i]);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
public confirm() {
|
public confirm() {
|
||||||
this.submitInProgress = true;
|
this.submitInProgress = true;
|
||||||
// this.fault.costEstimate = this.costEstimate;
|
this.faultManager.setHighExpenseFault(this.fault).pipe(
|
||||||
this.faultManager.confirmFault(this.fault).pipe(
|
|
||||||
finalize(() => this.submitInProgress = false))
|
finalize(() => this.submitInProgress = false))
|
||||||
.subscribe(() => this.router.navigate(['/hiba/feladat-lista']));
|
.subscribe(() => this.router.navigate(['/hiba/feladat-lista']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public setHighExpenseFault() {
|
// public confirm() {
|
||||||
this.submitInProgress = true;
|
// this.submitInProgress = true;
|
||||||
// this.fault.costEstimate = this.costEstimate;
|
// this.faultManager.confirmFault(this.fault).pipe(
|
||||||
this.faultManager.setHighExpenseFault(this.fault).pipe(
|
// finalize(() => this.submitInProgress = false))
|
||||||
finalize(() => this.submitInProgress = false))
|
// .subscribe(() => this.router.navigate(['/hiba/feladat-lista']));
|
||||||
.subscribe(fault => {
|
// }
|
||||||
this.faultManager.attachPdf(this.fault.id, this.pdfUpload.nativeElement.files).subscribe(
|
//
|
||||||
attRes => this.router.navigate(['/hiba/feladat-lista']),
|
// public setHighExpenseFault() {
|
||||||
attErr => console.log("File upload error: ", attErr)
|
// this.submitInProgress = true;
|
||||||
);
|
// this.faultManager.setHighExpenseFault(this.fault).pipe(
|
||||||
});
|
// finalize(() => this.submitInProgress = false))
|
||||||
}
|
// .subscribe(fault => {
|
||||||
|
// this.faultManager.attachPdf(this.fault.id, this.pdfUpload.nativeElement.files).subscribe(
|
||||||
|
// attRes => this.router.navigate(['/hiba/feladat-lista']),
|
||||||
|
// attErr => console.log("File upload error: ", attErr)
|
||||||
|
// );
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
public attachImages() {
|
public attachImages() {
|
||||||
this.submitInProgress = true;
|
this.submitInProgress = true;
|
||||||
@ -145,4 +151,8 @@ export class ConfirmFaultComponent implements OnInit {
|
|||||||
&& !this.noWorkCostEstimate
|
&& !this.noWorkCostEstimate
|
||||||
&& !this.noMaterialCostEstimate);
|
&& !this.noMaterialCostEstimate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get faultType(): string {
|
||||||
|
return FaultType[this.fault.faultType];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,6 +194,7 @@ export class FaultManagerService implements Resolve<false|Array<Fault>> {
|
|||||||
return {
|
return {
|
||||||
id: fault.id,
|
id: fault.id,
|
||||||
workSheetNumber: fault.worksheetNumber,
|
workSheetNumber: fault.worksheetNumber,
|
||||||
|
faultType: fault.faultType,
|
||||||
errorOrigin: fault.errorOrigin.id,
|
errorOrigin: fault.errorOrigin.id,
|
||||||
errorCategory: fault.errorCategory.id,
|
errorCategory: fault.errorCategory.id,
|
||||||
solutionTimeInterval: fault.solutionTimeInterval.id,
|
solutionTimeInterval: fault.solutionTimeInterval.id,
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
heading="Visszaigazolásra váró hiba jelentések"></div>
|
heading="Visszaigazolásra váró hiba jelentések"></div>
|
||||||
<div app-table-view class="ui segment" [editor]="hasPermission('confirmExtraCost')"
|
<div app-table-view class="ui segment" [editor]="hasPermission('confirmExtraCost')"
|
||||||
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['exp']"
|
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['exp']"
|
||||||
[faults]="expFaults" noRecordMessage="Nincs jóváhagyásra váró nagyértékű munka."
|
[faults]="expFaults" noRecordMessage="Nincs jóváhagyásra váró munka."
|
||||||
heading="Jóváhagyásra váró nagyértékű munkák"></div>
|
heading="Jóváhagyásra váró munkák"></div>
|
||||||
<div app-table-view class="ui segment" showWorksheetNumber="true" [editor]="hasPermission('repair')"
|
<div app-table-view class="ui segment" showWorksheetNumber="true" [editor]="hasPermission('repair')"
|
||||||
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['cnf']"
|
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['cnf']"
|
||||||
[faults]="cnfFaults" noRecordMessage="Nincs javításra váró hiba."
|
[faults]="cnfFaults" noRecordMessage="Nincs javításra váró hiba."
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
heading="Visszaigazolásra váró hiba jelentések"></div>
|
heading="Visszaigazolásra váró hiba jelentések"></div>
|
||||||
<div app-table-view class="ui segment" *ngIf="hasPermission('confirmExtraCost')"
|
<div app-table-view class="ui segment" *ngIf="hasPermission('confirmExtraCost')"
|
||||||
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['exp']"
|
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['exp']"
|
||||||
[faults]="expFaults" noRecordMessage="Nincs jóváhagyásra váró nagyértékű munka."
|
[faults]="expFaults" noRecordMessage="Nincs jóváhagyásra váró munka."
|
||||||
heading="Jóváhagyásra váró nagyértékű munkák"></div>
|
heading="Jóváhagyásra váró munkák"></div>
|
||||||
<div app-table-view class="ui segment" showWorksheetNumber="true" *ngIf="hasPermission('repair')"
|
<div app-table-view class="ui segment" showWorksheetNumber="true" *ngIf="hasPermission('repair')"
|
||||||
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['cnf']"
|
(actionClicked)="actionClickHandler($event)" [actions]="actionButtons['cnf']"
|
||||||
[faults]="cnfFaults" noRecordMessage="Nincs javításra váró hiba."
|
[faults]="cnfFaults" noRecordMessage="Nincs javításra váró hiba."
|
||||||
|
|||||||
@ -45,6 +45,10 @@
|
|||||||
|
|
||||||
<h4 class="ui dividing header">Hiba adatai</h4>
|
<h4 class="ui dividing header">Hiba adatai</h4>
|
||||||
<table class="ui red definition table">
|
<table class="ui red definition table">
|
||||||
|
<tr *ngIf="fault">
|
||||||
|
<td class="collapsing">Hiba típus</td>
|
||||||
|
<td>{{faultType}}</td>
|
||||||
|
</tr>
|
||||||
<tr *ngIf="fault?.worksheetNumber">
|
<tr *ngIf="fault?.worksheetNumber">
|
||||||
<td class="collapsing">Munkalap száma</td>
|
<td class="collapsing">Munkalap száma</td>
|
||||||
<td>{{fault?.worksheetNumber}}</td>
|
<td>{{fault?.worksheetNumber}}</td>
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import { environment } from "../../../environments/environment";
|
|||||||
import { Fault } from "../shared/fault";
|
import { Fault } from "../shared/fault";
|
||||||
import { AuthService } from "../../auth/auth.service";
|
import { AuthService } from "../../auth/auth.service";
|
||||||
import { FaultManagerService } from "../fault-manager.service";
|
import { FaultManagerService } from "../fault-manager.service";
|
||||||
|
import { FaultType } from "../shared/fault-type";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-readonly-display',
|
selector: 'app-readonly-display',
|
||||||
@ -92,4 +93,8 @@ export class ReadonlyDisplayComponent implements OnInit {
|
|||||||
attErr => alert("Hiba történt a képfeltöltés közben.")
|
attErr => alert("Hiba történt a képfeltöltés közben.")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get faultType(): string {
|
||||||
|
return FaultType[this.fault.faultType];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui dividing header">Hiba</h4>
|
<h4 class="ui dividing header">Hiba</h4>
|
||||||
|
<div class="inline fields" *ngIf="hasPermission('setFaultType')">
|
||||||
|
<label>Hiba típusa</label>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="uzemeltetesi" value="uzemeltetesi" [(ngModel)]="faultType">
|
||||||
|
<label for="uzemeltetesi">Üzemeltetési</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="garancialis" value="garancialis" [(ngModel)]="faultType">
|
||||||
|
<label for="garancialis">Garanciális</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input type="radio" name="faultType" id="arajanlat" value="arajanlat" [(ngModel)]="faultType">
|
||||||
|
<label for="arajanlat">Árajánlat</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="two fields">
|
<div class="two fields">
|
||||||
<div class="field" [class.error]="noErrorCategory">
|
<div class="field" [class.error]="noErrorCategory">
|
||||||
<label>Hiba szakág</label>
|
<label>Hiba szakág</label>
|
||||||
@ -79,7 +101,7 @@
|
|||||||
<div class="field" [class.error]="noAttachments">
|
<div class="field" [class.error]="noAttachments">
|
||||||
<input #photoUpload type="file" accept="image/*" multiple/>
|
<input #photoUpload type="file" accept="image/*" multiple/>
|
||||||
</div>
|
</div>
|
||||||
<div #photoAttachments class="photoAttachments" class="ui bordered images segment"
|
<div #photoAttachments class="ui bordered images segment photoAttachments"
|
||||||
*ngIf="rawImageData?.length">
|
*ngIf="rawImageData?.length">
|
||||||
<img class="ui image" *ngFor="let image of rawImageData; let idx = index" [src]="image" height="200"/>
|
<img class="ui image" *ngFor="let image of rawImageData; let idx = index" [src]="image" height="200"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import { SolutionTimeInterval } from "../shared";
|
|||||||
import { FaultManagerService } from "../fault-manager.service";
|
import { FaultManagerService } from "../fault-manager.service";
|
||||||
import { SimpleFault } from "../shared/simple-fault";
|
import { SimpleFault } from "../shared/simple-fault";
|
||||||
import { Title } from "@angular/platform-browser";
|
import { Title } from "@angular/platform-browser";
|
||||||
|
import { RoleGuardService } from "../../auth/role-guard.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-record-fault',
|
selector: 'app-record-fault',
|
||||||
@ -23,6 +24,7 @@ export class RecordFaultComponent implements OnInit, AfterViewInit {
|
|||||||
|
|
||||||
public submitInProgress: boolean = false;
|
public submitInProgress: boolean = false;
|
||||||
|
|
||||||
|
public faultType: string = 'uzemeltetesi';
|
||||||
public facilityLocationText: string = '';
|
public facilityLocationText: string = '';
|
||||||
public errorCategory: ErrorCategory;
|
public errorCategory: ErrorCategory;
|
||||||
public errorOrigin: ErrorOrigin;
|
public errorOrigin: ErrorOrigin;
|
||||||
@ -39,7 +41,8 @@ export class RecordFaultComponent implements OnInit, AfterViewInit {
|
|||||||
constructor(private activatedRoute: ActivatedRoute,
|
constructor(private activatedRoute: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private faultService: FaultManagerService,
|
private faultService: FaultManagerService,
|
||||||
private titleService: Title) {
|
private titleService: Title,
|
||||||
|
private roleGuard: RoleGuardService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -83,6 +86,7 @@ export class RecordFaultComponent implements OnInit, AfterViewInit {
|
|||||||
this.submitInProgress = true;
|
this.submitInProgress = true;
|
||||||
let fault: SimpleFault = {
|
let fault: SimpleFault = {
|
||||||
// id: null,
|
// id: null,
|
||||||
|
faultType: this.faultType,
|
||||||
facilityLocation: parseInt(this.facilityLocationIdElement.nativeElement.value),
|
facilityLocation: parseInt(this.facilityLocationIdElement.nativeElement.value),
|
||||||
facilityLocationDescription: this.facilityLocationText,
|
facilityLocationDescription: this.facilityLocationText,
|
||||||
errorCategory: this.errorCategory.id,
|
errorCategory: this.errorCategory.id,
|
||||||
@ -154,4 +158,8 @@ export class RecordFaultComponent implements OnInit, AfterViewInit {
|
|||||||
get noAttachments(): boolean {
|
get noAttachments(): boolean {
|
||||||
return this.rawImageData.length == 0;
|
return this.rawImageData.length == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public hasPermission(resourceName: string): boolean {
|
||||||
|
return this.roleGuard.userCanAccessResource(resourceName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,6 +57,10 @@
|
|||||||
|
|
||||||
<h4 class="ui dividing header">Hiba adatai</h4>
|
<h4 class="ui dividing header">Hiba adatai</h4>
|
||||||
<table class="ui red definition table">
|
<table class="ui red definition table">
|
||||||
|
<tr>
|
||||||
|
<td class="collapsing">Hiba típus</td>
|
||||||
|
<td>{{faultType}}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="collapsing">Becsült munkaköltség</td>
|
<td class="collapsing">Becsült munkaköltség</td>
|
||||||
<td>{{fault.workCostEstimate|currencyFormat}}</td>
|
<td>{{fault.workCostEstimate|currencyFormat}}</td>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { Fault } from "../shared/fault";
|
|||||||
import { FaultManagerService } from "../fault-manager.service";
|
import { FaultManagerService } from "../fault-manager.service";
|
||||||
import { Title } from "@angular/platform-browser";
|
import { Title } from "@angular/platform-browser";
|
||||||
import { ActivatedRoute, Router } from "@angular/router";
|
import { ActivatedRoute, Router } from "@angular/router";
|
||||||
|
import { FaultType } from "../shared/fault-type";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-repair-complete',
|
selector: 'app-repair-complete',
|
||||||
@ -75,4 +76,8 @@ export class RepairCompleteComponent implements OnInit {
|
|||||||
? this.fault.materialCostEstimate
|
? this.fault.materialCostEstimate
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get faultType(): string {
|
||||||
|
return FaultType[this.fault.faultType];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,6 +128,10 @@
|
|||||||
|
|
||||||
<h4 class="ui dividing header">Hiba adatai</h4>
|
<h4 class="ui dividing header">Hiba adatai</h4>
|
||||||
<table class="ui red definition table">
|
<table class="ui red definition table">
|
||||||
|
<tr>
|
||||||
|
<td class="collapsing">Hiba típus</td>
|
||||||
|
<td>{{faultType}}</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="collapsing">Becsült munkaköltség</td>
|
<td class="collapsing">Becsült munkaköltség</td>
|
||||||
<td>{{fault.workCostEstimate|currencyFormat}}</td>
|
<td>{{fault.workCostEstimate|currencyFormat}}</td>
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { Fault } from "../shared/fault";
|
|||||||
import { UsedMaterial } from "../shared/used-material";
|
import { UsedMaterial } from "../shared/used-material";
|
||||||
import { User } from "../../user/shared/user";
|
import { User } from "../../user/shared/user";
|
||||||
import { Comment } from "../shared/comment";
|
import { Comment } from "../shared/comment";
|
||||||
|
import { FaultType } from "../shared/fault-type";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-repair-fault',
|
selector: 'app-repair-fault',
|
||||||
@ -185,4 +186,8 @@ export class RepairFaultComponent implements OnInit {
|
|||||||
? this.fault.materialCostEstimate
|
? this.fault.materialCostEstimate
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get faultType(): string {
|
||||||
|
return FaultType[this.fault.faultType];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
src/app/fault-manager/shared/fault-type.ts
Normal file
5
src/app/fault-manager/shared/fault-type.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export enum FaultType {
|
||||||
|
uzemeltetesi = 'Üzemeltetési',
|
||||||
|
garancialis = 'Garanciális',
|
||||||
|
arajanlat = 'Árajánlat',
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@ import { UsedMaterial } from "./used-material";
|
|||||||
export class Fault {
|
export class Fault {
|
||||||
public id?: number;
|
public id?: number;
|
||||||
public worksheetNumber: string;
|
public worksheetNumber: string;
|
||||||
|
public faultType: string;
|
||||||
public facilityLocation: FacilityLocation;
|
public facilityLocation: FacilityLocation;
|
||||||
public facilityLocationDescription: string;
|
public facilityLocationDescription: string;
|
||||||
public errorCategory: ErrorCategory;
|
public errorCategory: ErrorCategory;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import {Comment} from "./comment";
|
|||||||
export class SimpleFault {
|
export class SimpleFault {
|
||||||
public id?: number;
|
public id?: number;
|
||||||
public workSheetNumber?: string;
|
public workSheetNumber?: string;
|
||||||
|
public faultType: string;
|
||||||
public facilityLocation: number;
|
public facilityLocation: number;
|
||||||
public facilityLocationDescription: string;
|
public facilityLocationDescription: string;
|
||||||
public errorCategory: number;
|
public errorCategory: number;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user