mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve
This commit is contained in:
@@ -28,15 +28,14 @@
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
class="d-block d-md-none">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlEnd"
|
||||
[formControl]="folder.DateBegin"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
@@ -68,18 +67,18 @@
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2022">
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="minDate"
|
||||
[formControl]="folder.DateEnd"
|
||||
[min]="maxDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #fim
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
|
||||
@@ -22,13 +22,14 @@ export class EditActionPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public minDate = new Date().toISOString()
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
currentDate = new Date();
|
||||
|
||||
folder: PublicationFolder;
|
||||
folderId: string;
|
||||
@@ -64,8 +65,15 @@ export class EditActionPage implements OnInit {
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
var validado: boolean;
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
|
||||
validado = true;
|
||||
}else{
|
||||
validado = false;
|
||||
}
|
||||
return validado == true ? ['ok']: [];
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
@@ -89,6 +97,11 @@ export class EditActionPage implements OnInit {
|
||||
}
|
||||
|
||||
async save() {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
let body = {
|
||||
ProcessId: this.folderId,
|
||||
Description: this.folder.Description,
|
||||
|
||||
@@ -43,13 +43,14 @@ export class NewActionPage implements OnInit {
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public minDate = new Date().toISOString()
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
currentDate = new Date();
|
||||
|
||||
showLoader = false
|
||||
|
||||
@@ -94,8 +95,15 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
var validado: boolean;
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) {
|
||||
validado = true;
|
||||
}else{
|
||||
validado = false;
|
||||
}
|
||||
return validado == true ? ['ok']: [];
|
||||
} else {
|
||||
return ['ok']
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
</button>
|
||||
<button title="Atualizar" *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
|
||||
<button title="Atualizar" class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="icon-only" class="title-icon font-awesome" name="reload-circle" title="Actualizar"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -409,6 +409,7 @@ export class PublicationsPage implements OnInit {
|
||||
goBackToViewPublications() {
|
||||
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
|
||||
@@ -416,6 +417,7 @@ export class PublicationsPage implements OnInit {
|
||||
// Emitters
|
||||
goBackToPubications() {
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
|
||||
@@ -437,6 +439,7 @@ export class PublicationsPage implements OnInit {
|
||||
// edit publication will send null
|
||||
if (folderId != undefined) {
|
||||
this.folderId = folderId;
|
||||
this.idSelected = this.folderId;
|
||||
}
|
||||
|
||||
this.publication = publication;
|
||||
@@ -445,6 +448,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
async editPublication(foolderId: string) {
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showEditActions = true;
|
||||
}
|
||||
|
||||
@@ -453,6 +457,7 @@ export class PublicationsPage implements OnInit {
|
||||
this.publicationId = publicationId;
|
||||
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = this.folderId;
|
||||
this.desktopComponent.showPublicationDetail = true;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user