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 @@ ...@@ -30,10 +30,10 @@
<ng-container matColumnDef="delays"> <ng-container matColumnDef="delays">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processDelay}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processDelay}}</mat-header-cell>
<mat-cell *matCellDef="let element"> <mat-cell *matCellDef="let element">
<span *ngIf="element.delays == 0"> <span *ngIf="element.delays == '*'">
<i style="opacity:0.5">{{lang.processDelayDoctype}}</i> <i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
</span> </span>
<span *ngIf="element.delays != 0"> <span *ngIf="element.delays != '*'">
{{element.delays}} {{element.delays}}
</span> </span>
</mat-cell> </mat-cell>
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
<ng-container matColumnDef="working_days"> <ng-container matColumnDef="working_days">
<mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processType}}</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>{{lang.processType}}</mat-header-cell>
<mat-cell *matCellDef="let element"> <mat-cell *matCellDef="let element">
<span *ngIf="element.delays == 0"> <span *ngIf="element.delays == '*'">
<i style="opacity:0.5">{{lang.processDelayDoctype}}</i> <i style="opacity:0.5">{{lang.processDelayDoctype}}</i>
</span> </span>
<span *ngIf="element.working_days && element.delays != 0"> <span *ngIf="element.working_days && element.delays != '*'">
{{lang.workingDays}} {{lang.workingDays}}
</span> </span>
<span *ngIf="!element.working_days && element.delays != 0"> <span *ngIf="!element.working_days && element.delays != '*'">
{{lang.calDays}} {{lang.calDays}}
</span> </span>
</mat-cell> </mat-cell>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="col-md-6"> <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>
<div class="col-md-3"> <div class="col-md-3">
<mat-form-field> <mat-form-field>
......
...@@ -25,7 +25,7 @@ var PriorityAdministrationComponent = /** @class */ (function () { ...@@ -25,7 +25,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
this.priority = { this.priority = {
useDoctypeDelay: false, useDoctypeDelay: false,
color: "#135f7f", color: "#135f7f",
delays: "1", delays: "0",
working_days: "false" working_days: "false"
}; };
} }
...@@ -56,7 +56,7 @@ var PriorityAdministrationComponent = /** @class */ (function () { ...@@ -56,7 +56,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
_this.http.get(_this.coreUrl + "rest/priorities/" + _this.id) _this.http.get(_this.coreUrl + "rest/priorities/" + _this.id)
.subscribe(function (data) { .subscribe(function (data) {
_this.priority = data.priority; _this.priority = data.priority;
if (_this.priority.delays == 0) { if (_this.priority.delays == '*') {
_this.priority.useDoctypeDelay = false; _this.priority.useDoctypeDelay = false;
} }
else { else {
...@@ -78,7 +78,7 @@ var PriorityAdministrationComponent = /** @class */ (function () { ...@@ -78,7 +78,7 @@ var PriorityAdministrationComponent = /** @class */ (function () {
PriorityAdministrationComponent.prototype.onSubmit = function () { PriorityAdministrationComponent.prototype.onSubmit = function () {
var _this = this; var _this = this;
if (this.priority.useDoctypeDelay == false) { if (this.priority.useDoctypeDelay == false) {
this.priority.delays = 0; this.priority.delays = '*';
} }
if (this.priority.working_days == "true") { if (this.priority.working_days == "true") {
this.priority.working_days = true; this.priority.working_days = true;
......
...@@ -24,7 +24,7 @@ export class PriorityAdministrationComponent implements OnInit { ...@@ -24,7 +24,7 @@ export class PriorityAdministrationComponent implements OnInit {
priority : any = { priority : any = {
useDoctypeDelay : false, useDoctypeDelay : false,
color : "#135f7f", color : "#135f7f",
delays : "1", delays : "0",
working_days : "false" working_days : "false"
}; };
selectedWorkingDays: any; selectedWorkingDays: any;
...@@ -59,7 +59,7 @@ export class PriorityAdministrationComponent implements OnInit { ...@@ -59,7 +59,7 @@ export class PriorityAdministrationComponent implements OnInit {
this.http.get(this.coreUrl + "rest/priorities/" + this.id) this.http.get(this.coreUrl + "rest/priorities/" + this.id)
.subscribe((data : any) => { .subscribe((data : any) => {
this.priority = data.priority; this.priority = data.priority;
if (this.priority.delays == 0) { if (this.priority.delays == '*') {
this.priority.useDoctypeDelay = false; this.priority.useDoctypeDelay = false;
} else { } else {
this.priority.useDoctypeDelay = true; this.priority.useDoctypeDelay = true;
...@@ -79,7 +79,7 @@ export class PriorityAdministrationComponent implements OnInit { ...@@ -79,7 +79,7 @@ export class PriorityAdministrationComponent implements OnInit {
onSubmit(){ onSubmit(){
if (this.priority.useDoctypeDelay == false) { if (this.priority.useDoctypeDelay == false) {
this.priority.delays = 0; this.priority.delays = '*';
} }
if (this.priority.working_days == "true") { if (this.priority.working_days == "true") {
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