mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve
This commit is contained in:
@@ -117,8 +117,6 @@ export class EditEventToApprovePage implements OnInit {
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
|
||||
alert('nice!!___')
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ion-content>
|
||||
<div class="main-content">
|
||||
|
||||
<div class="ion-item-container" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-item-container' : 'ion-item-container' ">
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
<div class="ion-input-class flex-grow-1 width-100" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-input-class flex-grow-1 width-100' : 'ion-input-class flex-grow-1 width-100' " >
|
||||
<div class="ion-input-class flex-grow-1 width-100" [class.input-error]="Form?.get('Location')?.invalid && validateFrom " >
|
||||
<ion-input type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +144,7 @@
|
||||
<!--
|
||||
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||
-->
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1" >
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom" >
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
@@ -190,12 +190,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('participantes').errors?.required">
|
||||
Adicionar participant.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
<div class="ion-input-class-no-height flex-grow-1" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
@@ -218,7 +227,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
<div class="ion-input-class-no-height flex-grow-1" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom">
|
||||
<div class="list-people">
|
||||
|
||||
<ion-item lines="none">
|
||||
|
||||
@@ -94,7 +94,7 @@ export class NewEventPage implements OnInit {
|
||||
@ViewChild('inicio') inicio: any;
|
||||
@ViewChild('picker1') picker1: any;
|
||||
|
||||
Form: any = {}
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
|
||||
@@ -125,11 +125,8 @@ export class NewEventPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private eventService: EventsService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private userService: AuthService,
|
||||
private http: HttpClient,
|
||||
private zone: NgZone,
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
// private translate: TranslateService
|
||||
) {
|
||||
@@ -237,7 +234,7 @@ export class NewEventPage implements OnInit {
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
Validators.minLength(4)
|
||||
// Validators.minLength(4)
|
||||
]),
|
||||
Location: new FormControl(this.postEvent.Location, [
|
||||
Validators.required,
|
||||
@@ -255,16 +252,13 @@ export class NewEventPage implements OnInit {
|
||||
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
Validators.required
|
||||
]),
|
||||
participantes: new FormControl(this.participantes, [
|
||||
participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
get participantes() {
|
||||
return this.taskParticipantsCc.concat(this.taskParticipants)
|
||||
}
|
||||
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
@@ -327,10 +321,10 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
async save() {
|
||||
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
// dont runt this function
|
||||
// if (!this.Form.valid) return false
|
||||
|
||||
if(this.Form.invalid) return false
|
||||
|
||||
this.getDatepickerData()
|
||||
|
||||
|
||||
@@ -123,8 +123,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
// Edit event to approve
|
||||
alert('nice!!___')
|
||||
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
|
||||
this.isEventEdited = false;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="email">{{loggeduser.Email}}</div>
|
||||
</div>
|
||||
|
||||
<div class="login-preference">
|
||||
<div class="login-preference" (mouseover)="checkState()" (click)="checkState()">
|
||||
<div class="preference">Preferência Login</div>
|
||||
|
||||
<ion-row>
|
||||
|
||||
@@ -14,6 +14,7 @@ import { PinPage } from 'src/app/shared/pin/pin.page';
|
||||
export class ProfileComponent implements OnInit {
|
||||
|
||||
loggeduser: User;
|
||||
userLoginPreference: boolean
|
||||
|
||||
constructor(private modalController:ModalController,
|
||||
private authService: AuthService,
|
||||
@@ -23,6 +24,8 @@ export class ProfileComponent implements OnInit {
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
console.log(this.loggeduser.RoleDescription)
|
||||
|
||||
this.checkState()
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
@@ -130,15 +133,14 @@ export class ProfileComponent implements OnInit {
|
||||
localStorage.setItem('UserData', JSON.stringify(userData) )
|
||||
}
|
||||
|
||||
get userLoginPreference() {
|
||||
checkState() {
|
||||
|
||||
let userData = JSON.parse(localStorage.getItem('UserData')) || {}
|
||||
|
||||
if (userData.hasOwnProperty('loginPreference')) {
|
||||
console.log( userData.loginPreference)
|
||||
return userData.loginPreference
|
||||
this.userLoginPreference = userData.loginPreference
|
||||
} else {
|
||||
return false
|
||||
this.userLoginPreference = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user