mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve validation for desktop
This commit is contained in:
+31
-13
@@ -9,24 +9,41 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="overflow-y-auto content-default-padding">
|
<div class="overflow-y-auto content-default-padding">
|
||||||
|
|
||||||
<div class="ion-item-container width-100">
|
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
|
<ion-input placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||||
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="container-div width-100">
|
<div class="container-div width-100">
|
||||||
<div class="ion-item-class-2 width-100">
|
<div class="ion-item-class-2 width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||||
<ion-input placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
|
<ion-input placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Error messages -->
|
</div>
|
||||||
<span class="error ion-padding" *ngIf="formLocationSatus">
|
|
||||||
Campo obrigatório
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
<div *ngIf="Form && validateFrom" >
|
||||||
|
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||||
|
<div *ngIf="Form.get('Location').errors?.required">
|
||||||
|
Campo obrigatório.
|
||||||
|
</div>
|
||||||
|
<div *ngIf="Form.get('Location').errors?.minlength">
|
||||||
|
O campo deve ter pelo menos 4 caracteres.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div">
|
<div class="container-div">
|
||||||
@@ -34,7 +51,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class" >
|
||||||
<ion-select
|
<ion-select
|
||||||
class="d-block d-md-none"
|
class="d-block d-md-none"
|
||||||
[(ngModel)]="postData.CalendarName"
|
[(ngModel)]="postData.CalendarName"
|
||||||
@@ -46,7 +63,7 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field floatLabel="never" class="d-none d-md-block width-100">
|
<mat-form-field floatLabel="never" appearance="none" class="d-none d-md-block width-100">
|
||||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" >
|
<mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" >
|
||||||
<mat-option value="Oficial">
|
<mat-option value="Oficial">
|
||||||
Oficial
|
Oficial
|
||||||
@@ -79,11 +96,11 @@
|
|||||||
value="2020-11-19T11:06Z">
|
value="2020-11-19T11:06Z">
|
||||||
</ion-datetime>
|
</ion-datetime>
|
||||||
|
|
||||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
<mat-form-field class="width-100 date-hour-picker d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date*"
|
placeholder="Choose a date*"
|
||||||
[formControl]="dateControlStart"
|
[formControl]="dateControlStart"
|
||||||
[min]="minDate" [max]="maxDate"
|
[min]="minDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||||
@@ -105,7 +122,7 @@
|
|||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class">
|
<div class="ion-input-class flex-grow-1">
|
||||||
<ion-datetime
|
<ion-datetime
|
||||||
class="d-block d-md-none"
|
class="d-block d-md-none"
|
||||||
placeholder="Fim*"
|
placeholder="Fim*"
|
||||||
@@ -118,11 +135,11 @@
|
|||||||
value="2020-11-19T11:06Z">
|
value="2020-11-19T11:06Z">
|
||||||
</ion-datetime>
|
</ion-datetime>
|
||||||
|
|
||||||
<mat-form-field class="date-hour-picker">
|
<mat-form-field class="date-hour-picker width-100 d-none d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date*S"
|
placeholder="Choose a date*S"
|
||||||
[formControl]="dateControlEnd"
|
[formControl]="dateControlEnd"
|
||||||
[min]="minDate" [max]="maxDate"
|
[min]="endMinDate"
|
||||||
[disabled]="disabled"
|
[disabled]="disabled"
|
||||||
>
|
>
|
||||||
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim"></mat-datepicker-toggle>
|
||||||
@@ -168,6 +185,7 @@
|
|||||||
value="false"
|
value="false"
|
||||||
interface="action-sheet"
|
interface="action-sheet"
|
||||||
required
|
required
|
||||||
|
appearance="none"
|
||||||
>
|
>
|
||||||
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postData.IsRecurring" >
|
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postData.IsRecurring" >
|
||||||
<mat-option value="false">
|
<mat-option value="false">
|
||||||
|
|||||||
+8
-2
@@ -54,8 +54,11 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
public showSeconds = false;
|
public showSeconds = false;
|
||||||
public touchUi = false;
|
public touchUi = false;
|
||||||
public enableMeridian = false;
|
public enableMeridian = false;
|
||||||
public minDate: any;
|
public minDate = new Date();
|
||||||
public maxDate: any;
|
|
||||||
|
// curent timestamp + 15 minutes
|
||||||
|
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||||
|
|
||||||
public stepHour = 1;
|
public stepHour = 1;
|
||||||
public stepMinute = 5;
|
public stepMinute = 5;
|
||||||
public stepSecond = 5;
|
public stepSecond = 5;
|
||||||
@@ -138,6 +141,9 @@ export class BookMeetingModalPage implements OnInit {
|
|||||||
/* Set + 30minutes to seleted datetime */
|
/* Set + 30minutes to seleted datetime */
|
||||||
let selectedEndDate = new Date();
|
let selectedEndDate = new Date();
|
||||||
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
||||||
|
|
||||||
|
this.dateControlStart = new FormControl(moment(new Date()));
|
||||||
|
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
+1
@@ -53,6 +53,7 @@
|
|||||||
float: left;
|
float: left;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-height: 44px;
|
||||||
}
|
}
|
||||||
.ion-input-class-no-height{
|
.ion-input-class-no-height{
|
||||||
border: 1px solid #ebebeb;
|
border: 1px solid #ebebeb;
|
||||||
|
|||||||
+8
-11
@@ -3,20 +3,15 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
|||||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||||
import { EventsService } from 'src/app/services/events.service';
|
import { EventsService } from 'src/app/services/events.service';
|
||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||||
import { DailyWorkTask } from '../../../../models/dailyworktask.model';
|
|
||||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||||
import { formatDate } from '@angular/common';
|
|
||||||
import { Event } from '../../../../models/event.model';
|
import { Event } from '../../../../models/event.model';
|
||||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
import { ModalController, PopoverController } from '@ionic/angular';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
|
||||||
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
|
import { ExpedientTaskModalPage } from '../expedient-task-modal/expedient-task-modal.page';
|
||||||
import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.page';
|
import { BookMeetingModalPage } from '../book-meeting-modal/book-meeting-modal.page';
|
||||||
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
|
||||||
import { momentG } from 'src/plugin/momentG'
|
import { momentG } from 'src/plugin/momentG'
|
||||||
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page';
|
||||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
|
||||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -43,20 +38,16 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
|
|
||||||
hideSendToPendentes = true
|
hideSendToPendentes = true
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
private iab: InAppBrowser,
|
||||||
private attachments: AttachmentsService,
|
private attachments: AttachmentsService,
|
||||||
private events: EventsService,
|
private events: EventsService,
|
||||||
private menu: MenuController,
|
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private alertService: AlertService,
|
|
||||||
public popoverController: PopoverController,
|
public popoverController: PopoverController,
|
||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private animationController: AnimationController,
|
|
||||||
) {
|
) {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].SerialNumber) {
|
if(params["params"].SerialNumber) {
|
||||||
@@ -164,6 +155,11 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
console.log('this.task', this.task)
|
||||||
|
console.log('this.task.DocumentURL', this.task.DocumentURL)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -185,9 +181,10 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewDocument(){
|
viewDocument() {
|
||||||
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
this.processes.GetDocumentUrl(this.task.DocId, this.task.FsId).subscribe(res=>{
|
||||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||||
|
|
||||||
const browser = this.iab.create(url,"_blank");
|
const browser = this.iab.create(url,"_blank");
|
||||||
browser.show();
|
browser.show();
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</ion-select>
|
</ion-select>
|
||||||
|
|
||||||
|
|
||||||
<mat-form-field class="d-none d-md-block width-100" >
|
<mat-form-field appearance="none" class="d-none d-md-block width-100" >
|
||||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
||||||
<mat-option value="Oficial">
|
<mat-option value="Oficial">
|
||||||
Oficial
|
Oficial
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
>
|
>
|
||||||
</ion-datetime>
|
</ion-datetime>
|
||||||
|
|
||||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlStart"
|
[formControl]="dateControlStart"
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
>
|
>
|
||||||
</ion-datetime>
|
</ion-datetime>
|
||||||
|
|
||||||
<mat-form-field class="width-100 date-hour-picker d-none d-md-block">
|
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||||
<input matInput [ngxMatDatetimePicker]="fim"
|
<input matInput [ngxMatDatetimePicker]="fim"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
[formControl]="dateControlEnd"
|
[formControl]="dateControlEnd"
|
||||||
@@ -193,6 +193,7 @@
|
|||||||
value="false"
|
value="false"
|
||||||
interface="action-sheet"
|
interface="action-sheet"
|
||||||
required
|
required
|
||||||
|
appearance="none"
|
||||||
>
|
>
|
||||||
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.IsRecurring">
|
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.IsRecurring">
|
||||||
<mat-option value="false">
|
<mat-option value="false">
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.loggeduser = userService.ValidatedUser;
|
this.loggeduser = userService.ValidatedUser;
|
||||||
|
|
||||||
this.dateControlStart = new FormControl(moment(new Date()));
|
this.dateControlStart = new FormControl(moment(new Date()));
|
||||||
this.dateControlEnd = new FormControl(moment(new Date()));
|
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
+10
-2
@@ -967,7 +967,7 @@ background: rgb(92, 92, 92);
|
|||||||
.ng-star-inserted{
|
.ng-star-inserted{
|
||||||
// display: none;
|
// display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 447px;
|
width: 100%;
|
||||||
height: 43px;
|
height: 43px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
button {
|
button {
|
||||||
@@ -975,7 +975,15 @@ background: rgb(92, 92, 92);
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
button {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mat-datepicker-toggle, mat-datepicker-toggle {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.mat-active span {
|
.mat-active span {
|
||||||
color: #0d89d1 !important;
|
color: #0d89d1 !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user