Skip to content
Snippets Groups Projects
Verified Commit d82f0b1b authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #50 add cond if delay == *

parent cec189b7
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,10 @@
<ng-container matColumnDef="delays">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processDelay}}</mat-header-cell>
<mat-cell *matCellDef="let element">
<span *ngIf="element.delays == 0">
<span *ngIf="element.delays == '*'">
<i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
</span>
<span *ngIf="element.delays != 0">
<span *ngIf="element.delays != '*'">
{{element.delays}}
</span>
</mat-cell>
......@@ -41,13 +41,13 @@
<ng-container matColumnDef="working_days">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processType}}</mat-header-cell>
<mat-cell *matCellDef="let element">
<span *ngIf="element.delays == 0">
<span *ngIf="element.delays == '*'">
<i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
</span>
<span *ngIf="element.working_days && element.delays != 0">
<span *ngIf="element.working_days && element.delays != '*'">
{{lang.workingDays}}
</span>
<span *ngIf="!element.working_days && element.delays != 0">
<span *ngIf="!element.working_days && element.delays != '*'">
{{lang.calDays}}
</span>
</mat-cell>
......
......@@ -30,7 +30,7 @@
</mat-form-field>
</div>
<div class="col-md-6">
<mat-slider [disabled]="!priority.useDoctypeDelay" style="width:100%" name="delays" color="primary" max="60" min="1" thumb-label="true" [(ngModel)]="priority.delays"></mat-slider>
<mat-slider [disabled]="!priority.useDoctypeDelay" style="width:100%" name="delays" color="primary" max="60" min="0" thumb-label="true" [(ngModel)]="priority.delays"></mat-slider>
</div>
<div class="col-md-3">
<mat-form-field>
......
......@@ -25,7 +25,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
this.priority = {
useDoctypeDelay: false,
color: "#135f7f",
delays: "1",
delays: "0",
working_days: "false"
};
}
......@@ -56,7 +56,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
_this.http.get(_this.coreUrl + "rest/priorities/" + _this.id)
.subscribe(function (data) {
_this.priority = data.priority;
if (_this.priority.delays == 0) {
if (_this.priority.delays == '*') {
_this.priority.useDoctypeDelay = false;
}
else {
......@@ -78,7 +78,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
PriorityAdministrationComponent.prototype.onSubmit = function () {
var _this = this;
if (this.priority.useDoctypeDelay == false) {
this.priority.delays = 0;
this.priority.delays = '*';
}
if (this.priority.working_days == "true") {
this.priority.working_days = true;
......
......@@ -24,7 +24,7 @@ export class PriorityAdministrationComponent implements OnInit {
priority : any = {
useDoctypeDelay : false,
color : "#135f7f",
delays : "1",
delays : "0",
working_days : "false"
};
selectedWorkingDays: any;
......@@ -59,7 +59,7 @@ export class PriorityAdministrationComponent implements OnInit {
this.http.get(this.coreUrl + "rest/priorities/" + this.id)
.subscribe((data : any) => {
this.priority = data.priority;
if (this.priority.delays == 0) {
if (this.priority.delays == '*') {
this.priority.useDoctypeDelay = false;
} else {
this.priority.useDoctypeDelay = true;
......@@ -79,7 +79,7 @@ export class PriorityAdministrationComponent implements OnInit {
onSubmit(){
if (this.priority.useDoctypeDelay == false) {
this.priority.delays = 0;
this.priority.delays = '*';
}
if (this.priority.working_days == "true") {
this.priority.working_days = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment