mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/chatStorage
This commit is contained in:
@@ -22,14 +22,14 @@
|
||||
<!-- Add scrolls -->
|
||||
<div class="d-flex flex-column height-100 overflow-y-auto">
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="container-div width-100">TT
|
||||
<div class="ion-item-class-2 width-100">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom" >
|
||||
|
||||
<ion-select
|
||||
<!-- <ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
@@ -41,9 +41,9 @@
|
||||
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-select> -->
|
||||
|
||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" floatLabel="never" appearance="none">
|
||||
<mat-form-field appearance="fill" class="width-100" floatLabel="never" appearance="none">
|
||||
<mat-select placeholder="Prazo*" [(ngModel)]="postData.Priority">
|
||||
<mat-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
|
||||
<mat-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
|
||||
|
||||
@@ -121,13 +121,15 @@
|
||||
|
||||
<button title="Visualizar a lista de Eventos para aprovação" class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showEventList" class="right-icons" src="assets/images/theme/gov/icons-received-event-selected.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button title="Novo Evento" class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && !mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && mobileComponent.showAddNewEvent" class="right-icons" src="assets/images/theme/gov/icons-add-selected.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ export class AgendaPage implements OnInit {
|
||||
/* console.log('Event clicked', event); */
|
||||
//clear
|
||||
|
||||
|
||||
this.setIntervenient([]);
|
||||
this.setIntervenientCC([]);
|
||||
this.clearPostEvent();
|
||||
@@ -603,7 +604,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
let counter = 0;
|
||||
|
||||
// view MDGPR calendar with MDGPR profile
|
||||
// view MDGPR calendar with MDGPR profile
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59')).then((response: any) => {
|
||||
|
||||
@@ -8,6 +8,21 @@ import { EditEventPageRoutingModule } from './edit-event-routing.module';
|
||||
|
||||
import { EditEventPage } from './edit-event.page';
|
||||
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
|
||||
import {
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatTimepickerModule
|
||||
} from '@angular-material-components/datetime-picker';
|
||||
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -15,7 +30,16 @@ import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/att
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EditEventPageRoutingModule,
|
||||
|
||||
MatDatepickerModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule,
|
||||
//
|
||||
AttendeeModalPageModule
|
||||
],
|
||||
|
||||
@@ -55,19 +55,23 @@
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Selecione agenda*"
|
||||
selectedText="{{postEvent.CalendarName}}"
|
||||
[(ngModel)]="postEvent.CalendarName"
|
||||
interface="action-sheet" Cancel-text="Cancelar"
|
||||
required>
|
||||
<ion-select-option value="Oficial">Oficial</ion-select-option>
|
||||
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100 " >
|
||||
<mat-select placeholder="Selecione agenda*" [(ngModel)]="postEvent.CalendarName" >
|
||||
<mat-option value="Oficial">
|
||||
Oficial
|
||||
</mat-option>
|
||||
<mat-option value="Pessoal">
|
||||
Pessoal
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,21 +86,30 @@
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
[(ngModel)]="postEvent.Category"
|
||||
selectedText="{{postEvent.Category}}"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
|
||||
<mat-option value="Reunião">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value="Viagem">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value="Conferência">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,77 +128,103 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class width-100" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Início"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
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"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input> -->
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
[max]="maxDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi">
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Fim"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
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"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" floatLabel="never" class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
[max]="maxDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<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"
|
||||
[stepSecond]="stepSecond">
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="container-div d-flex width-100">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select placeholder="Selecione a repetição*"
|
||||
[(ngModel)]="selectedRecurringType"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let recurring of recurringTypes" value="{{recurring.Code}}">{{recurring.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
||||
<mat-select
|
||||
placeholder="Selecione repetição*"
|
||||
[(ngModel)]="selectedRecurringType"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
||||
<mat-option
|
||||
*ngFor="let recurring of recurringTypes"
|
||||
value="{{recurring.Code}}">
|
||||
{{recurring.Description}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="selectedRecurringType != '-1'" class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-datetime
|
||||
placeholder="Última ocorrência"
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
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="2021"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
<div (click)="openLastOccurrence()" class="ion-input-class flex-grow-1">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #occurrrence
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi"
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,20 +11,33 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
|
||||
import { SearchPage } from '../../search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
},
|
||||
display: {
|
||||
dateInput: "DD MMM YYYY H:mm",
|
||||
monthYearLabel: "MMM YYYY",
|
||||
dateA11yLabel: "LL",
|
||||
monthYearA11yLabel: "MMMM YYYY"
|
||||
}
|
||||
}
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
templateUrl: './edit-event.page.html',
|
||||
styleUrls: ['./edit-event.page.scss'],
|
||||
providers: [
|
||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
]
|
||||
})
|
||||
export class EditEventPage implements OnInit {
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
|
||||
postEvent: Event;
|
||||
isRecurring:string;
|
||||
@@ -41,6 +54,19 @@ export class EditEventPage implements OnInit {
|
||||
recurringTypes: any;
|
||||
selectedRecurringType: any;
|
||||
|
||||
public date: any;
|
||||
public disabled = false;
|
||||
public showSpinners = true;
|
||||
public showSeconds = false;
|
||||
public touchUi = false;
|
||||
public enableMeridian = false;
|
||||
public minDate = new Date().toISOString().slice(0,10)
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000).toISOString().slice(0,10)
|
||||
public maxDate: any;
|
||||
public stepHour = 1;
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
|
||||
loadedEventAttachments: Attachment[] = [];
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
@@ -48,6 +74,11 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
showAttendees = false;
|
||||
|
||||
public listColors = ['primary', 'accent', 'warn'];
|
||||
public stepHours = [1, 2, 3, 4, 5];
|
||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
@@ -59,10 +90,12 @@ export class EditEventPage implements OnInit {
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
|
||||
this.postEvent = new Event();
|
||||
/* this.postEvent = new Event(); */
|
||||
this.isEventEdited = false;
|
||||
this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''};
|
||||
/* this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''}; */
|
||||
this.postEvent = this.navParams.get('event');
|
||||
console.log(this.postEvent);
|
||||
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
|
||||
@@ -99,6 +132,7 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth >= 1024) {
|
||||
@@ -178,6 +212,28 @@ export class EditEventPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
openFim() {
|
||||
let input: any = document.querySelector('#new-fim')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
openLastOccurrence() {
|
||||
let input: any = document.querySelector('#last-occurrence')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
save() {
|
||||
|
||||
@@ -207,7 +263,7 @@ export class EditEventPage implements OnInit {
|
||||
finally {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.toastService.successMessage();
|
||||
|
||||
@@ -7,6 +7,22 @@ import { IonicModule } from '@ionic/angular';
|
||||
import { NewEventPageRoutingModule } from './new-event-routing.module';
|
||||
|
||||
import { NewEventPage } from './new-event.page';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
import { MatNativeDateModule } from '@angular/material/core';
|
||||
|
||||
import {
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatTimepickerModule
|
||||
} from '@angular-material-components/datetime-picker';
|
||||
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -14,6 +30,16 @@ import { NewEventPage } from './new-event.page';
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
NewEventPageRoutingModule,
|
||||
MatDatepickerModule,
|
||||
MatInputModule,
|
||||
MatNativeDateModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatTimepickerModule,
|
||||
NgxMatNativeDateModule,
|
||||
NgxMatMomentModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule
|
||||
],
|
||||
declarations: [NewEventPage]
|
||||
})
|
||||
|
||||
@@ -18,39 +18,30 @@
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="container-div" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione agenda*"
|
||||
selectedText="{{postEvent.CalendarName}}"
|
||||
[(ngModel)]="CalendarName"
|
||||
interface="action-sheet" Cancel-text="Cancelar"
|
||||
required>
|
||||
<ion-select-option value="PR"> Calendário do Presidente da República</ion-select-option>
|
||||
<ion-select-option value="MDGPR"> Meu calendário</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" >
|
||||
<!-- <mat-select [(value)]="postEvent.CalendarName" > -->
|
||||
<mat-option value="PR">
|
||||
Calendário do Presidente da República
|
||||
</mat-option>
|
||||
<mat-option value="MDGPR">
|
||||
Meu calendário
|
||||
</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</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">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
@@ -60,38 +51,26 @@
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Error messages -->
|
||||
<!-- <span class="error ion-padding" >
|
||||
Campo obrigatório
|
||||
</span> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <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 class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione agenda*"
|
||||
selectedText="{{postEvent.CalendarName}}"
|
||||
[(ngModel)]="postEvent.CalendarName"
|
||||
interface="action-sheet" Cancel-text="Cancelar"
|
||||
required>
|
||||
<ion-select-option value="Oficial">Oficial</ion-select-option>
|
||||
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="postEvent.CalendarName" >
|
||||
<mat-option value="Oficial">
|
||||
Oficial
|
||||
</mat-option>
|
||||
<mat-option value="Pessoal">
|
||||
Pessoal
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,20 +84,30 @@
|
||||
</div> -->
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
[(ngModel)]="postEvent.Category"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option value="Reunião">Reunião</ion-select-option>
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs">
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(value)]="postEvent.Category" >
|
||||
<mat-option value="Reunião">
|
||||
Reunião
|
||||
</mat-option>
|
||||
<mat-option value="Viagem">
|
||||
Viagem
|
||||
</mat-option>
|
||||
<mat-option value="Conferência">
|
||||
Conferência
|
||||
</mat-option>
|
||||
<mat-option value="Encontro">
|
||||
Encontro
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,78 +122,110 @@
|
||||
</div> -->
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex" >
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Início*"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
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"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data início" [(ngModel)]="postData.StartDate"></ion-input> -->
|
||||
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.StartDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi"
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
placeholder="Fim*"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
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"
|
||||
max="2025"
|
||||
<!--
|
||||
[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 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.EndDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<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"
|
||||
[stepSecond]="stepSecond"
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
<ion-select placeholder="Selecione a repetição*"
|
||||
[(ngModel)]="selectedRecurringType"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)"
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let recurring of recurringTypes" value="{{recurring.Code}}">{{recurring.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('dateOccurrence')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
|
||||
<mat-select placeholder="Selecione repetição*"
|
||||
[(ngModel)]="postEvent.EventRecurrence.Type"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
||||
<mat-option
|
||||
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
||||
>
|
||||
{{recurring.Description}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="selectedRecurringType != '-1'" class="container-div width-100">
|
||||
<div class="ion-item-class-2">
|
||||
<div *ngIf="postEvent.EventRecurrence.Type != '-1'" class="container-div width-100">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-datetime
|
||||
placeholder="Última ocorrência"
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
displayFormat="DD MMM YYYY"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
max="2045"
|
||||
>
|
||||
</ion-datetime>
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
<div (click)="openLastOccurrence()" class="ion-input-class flex-grow-1">
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="last-occurrence" matSuffix [for]="occurrrence"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #occurrrence
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi"
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -218,15 +239,9 @@
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes*</ion-label>
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes*</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people cursor-pointer">
|
||||
@@ -246,15 +261,9 @@
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com conhecimento</ion-label>
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-list>
|
||||
<ion-label *ngIf="taskParticipantsCc?.length < 1" class="list-people-title">Com conhecimento</ion-label>
|
||||
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people cursor-pointer">
|
||||
|
||||
@@ -16,7 +16,7 @@ ion-content{
|
||||
padding: 30px 20px 0px 20px;
|
||||
color:#000;
|
||||
transform: translate3d(0, 1px, 0);
|
||||
|
||||
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
@@ -59,7 +59,7 @@ ion-content{
|
||||
}
|
||||
.container-div{
|
||||
margin-bottom: 15px;
|
||||
overflow: auto;
|
||||
//overflow: auto;
|
||||
}
|
||||
.ion-item-class-2{
|
||||
display: flex;
|
||||
@@ -91,9 +91,9 @@ ion-content{
|
||||
flex: 1;
|
||||
}
|
||||
.list-people{
|
||||
width: 256px;
|
||||
width: 250px;
|
||||
float: left;
|
||||
|
||||
|
||||
}
|
||||
.add-people{
|
||||
width: 45px;
|
||||
@@ -154,7 +154,7 @@ ion-content{
|
||||
--color:#ffffff;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
|
||||
.text-input{
|
||||
width: 100%;
|
||||
border: 1px solid #ebebeb;
|
||||
@@ -162,7 +162,7 @@ ion-content{
|
||||
padding: 0 !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Error Messages */
|
||||
.error{
|
||||
color:red;
|
||||
@@ -178,7 +178,7 @@ ion-content{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.app-name{
|
||||
background: var(--title-text-color);
|
||||
border-radius: 18px;
|
||||
@@ -195,8 +195,8 @@ ion-content{
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.close-button {
|
||||
display: none;
|
||||
height: 20px;
|
||||
@@ -215,4 +215,4 @@ ion-content{
|
||||
}
|
||||
.icon-time{
|
||||
color: #797979b0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,28 @@ import { SearchPage } from '../../search/search.page';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { EventRecurrence } from 'src/app/models/agenda/eventrecurrence.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
dateInput: "YYYY-MMMM-DD HH:mm"
|
||||
},
|
||||
display: {
|
||||
dateInput: "DD MMM YYYY H:mm",
|
||||
monthYearLabel: "MMM YYYY",
|
||||
dateA11yLabel: "LL",
|
||||
monthYearA11yLabel: "MMMM YYYY"
|
||||
}
|
||||
}
|
||||
@Component({
|
||||
selector: 'app-new-event',
|
||||
templateUrl: './new-event.page.html',
|
||||
styleUrls: ['./new-event.page.scss'],
|
||||
providers: [
|
||||
{ provide: NGX_MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
|
||||
]
|
||||
})
|
||||
|
||||
export class NewEventPage implements OnInit {
|
||||
@@ -61,6 +76,14 @@ export class NewEventPage implements OnInit {
|
||||
members:any;
|
||||
CalendarName;
|
||||
|
||||
public listColors = ['primary', 'accent', 'warn'];
|
||||
public stepHours = [1, 2, 3, 4, 5];
|
||||
public stepMinutes = [1, 5, 10, 15, 20, 25];
|
||||
public stepSeconds = [1, 5, 10, 15, 20, 25];
|
||||
|
||||
autoStartTime;
|
||||
autoEndTime;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private navParams: NavParams,
|
||||
@@ -82,8 +105,21 @@ export class NewEventPage implements OnInit {
|
||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||
this.taskParticipants = this.navParams.get('attendees');
|
||||
|
||||
this.postEvent.StartDate = new Date()
|
||||
this.postEvent.EndDate = (new Date(new Date().getTime() + 15 * 60000))
|
||||
let now = new Date();
|
||||
|
||||
if(now.getMinutes() <= 30){
|
||||
this.autoStartTime = new Date(now.setMinutes(30));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
else{
|
||||
this.autoStartTime = new Date(now.setHours(now.getHours()+1));
|
||||
this.autoStartTime = new Date(this.autoStartTime.setMinutes(0));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -91,16 +127,11 @@ export class NewEventPage implements OnInit {
|
||||
this.CalendarName = this.loggeduser.Profile;
|
||||
this.selectedRecurringType = "-1";
|
||||
console.log(this.postEvent);
|
||||
console.log(this.selectedSegment);
|
||||
|
||||
|
||||
this.getRecurrenceTypes();
|
||||
|
||||
/* console.log(this.profile); */
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30) ;
|
||||
|
||||
if(this.selectedSegment != "Combinada"){
|
||||
this.postEvent ={
|
||||
EventId: '',
|
||||
@@ -108,9 +139,9 @@ export class NewEventPage implements OnInit {
|
||||
Body: this.eventBody,
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: '',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
@@ -120,7 +151,7 @@ export class NewEventPage implements OnInit {
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: {Type:'-1'},
|
||||
EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime},
|
||||
};
|
||||
}
|
||||
else{
|
||||
@@ -131,8 +162,8 @@ export class NewEventPage implements OnInit {
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
@@ -142,7 +173,7 @@ export class NewEventPage implements OnInit {
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: {Type:'-1'},
|
||||
EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -224,6 +255,28 @@ export class NewEventPage implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
openInicio() {
|
||||
let input: any = document.querySelector('#new-inicio')
|
||||
if(input) {
|
||||
console.log(input)
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
openFim() {
|
||||
let input: any = document.querySelector('#new-fim')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
openLastOccurrence() {
|
||||
let input: any = document.querySelector('#last-occurrence')
|
||||
if(input) {
|
||||
input.click()
|
||||
}
|
||||
}
|
||||
|
||||
async save() {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 1">Semanal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 2">Mensal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 3">Anual</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == -1">Nunca</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == -1">Nunca</span>
|
||||
</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
+3
-3
@@ -51,7 +51,7 @@
|
||||
<ion-icon class="icon-time" slot="start" name="time-outline"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Priority')?.invalid && validateFrom">
|
||||
<ion-select
|
||||
<!-- <ion-select
|
||||
placeholder="Prazo*"
|
||||
[(ngModel)]="postData.Priority"
|
||||
interface="action-sheet"
|
||||
@@ -63,9 +63,9 @@
|
||||
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
|
||||
<ion-select-option value="99999864"><b>Urgentíssimo</b> (8 horas para a execução da tarefa)</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-select> -->
|
||||
|
||||
<mat-form-field appearance="fill" class="width-100 d-none d-md-block" floatLabel="never" appearance="none">
|
||||
<mat-form-field appearance="fill" class="width-100" floatLabel="never" appearance="none">
|
||||
<mat-select placeholder="Prazo*" [(ngModel)]="postData.Priority">
|
||||
<mat-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
|
||||
<mat-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
|
||||
|
||||
@@ -98,7 +98,9 @@ export class NewEventPage implements OnInit {
|
||||
@ViewChild('picker1') picker1: any;
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
validateFrom = false;
|
||||
autoStartTime;
|
||||
autoEndTime;
|
||||
|
||||
public options = [
|
||||
{ value: true, label: 'True' },
|
||||
@@ -129,8 +131,22 @@ export class NewEventPage implements OnInit {
|
||||
this.loggeduser = userService.ValidatedUser;
|
||||
this.postEvent = new Event();
|
||||
|
||||
this.postEvent.StartDate = new Date()
|
||||
this.postEvent.EndDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
let now = new Date();
|
||||
|
||||
if(now.getMinutes() <= 30){
|
||||
this.autoStartTime = new Date(now.setMinutes(30));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
else{
|
||||
this.autoStartTime = new Date(now.setHours(now.getHours()+1));
|
||||
this.autoStartTime = new Date(this.autoStartTime.setMinutes(0));
|
||||
this.postEvent.StartDate = this.autoStartTime;
|
||||
this.autoEndTime = new Date(this.autoStartTime.getTime() + 30 * 60000);
|
||||
this.postEvent.EndDate = this.autoEndTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -143,14 +159,6 @@ export class NewEventPage implements OnInit {
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
|
||||
/* console.log(this.profile); */
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30) ;
|
||||
|
||||
|
||||
if(this.selectedSegment != "Combinada"){
|
||||
this.postEvent ={
|
||||
EventId: '',
|
||||
@@ -159,8 +167,8 @@ export class NewEventPage implements OnInit {
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
@@ -170,7 +178,7 @@ export class NewEventPage implements OnInit {
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: {Type:'-1'},
|
||||
EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime},
|
||||
};
|
||||
}
|
||||
else{
|
||||
@@ -181,8 +189,8 @@ export class NewEventPage implements OnInit {
|
||||
Location: '',
|
||||
CalendarId: '',
|
||||
CalendarName: 'Oficial',
|
||||
StartDate: selectedStartdDate,
|
||||
EndDate: new Date(selectedEndDate),
|
||||
StartDate: this.autoStartTime,
|
||||
EndDate: this.autoEndTime,
|
||||
EventType: 'Reunião',
|
||||
Attendees: null,
|
||||
IsMeeting: false,
|
||||
@@ -192,7 +200,7 @@ export class NewEventPage implements OnInit {
|
||||
Organizer: '',
|
||||
Category: 'Reunião',
|
||||
HasAttachments: false,
|
||||
EventRecurrence: {Type:'-1'},
|
||||
EventRecurrence: {Type:'-1',LastOccurrence:this.autoEndTime},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
|
||||
<ion-select disabled placeholder="Selecione agenda*"
|
||||
<!-- <ion-select disabled placeholder="Selecione agenda*"
|
||||
class="d-block d-md-none"
|
||||
selectedText="{{eventProcess.workflowInstanceDataFields.Agenda}}"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda"
|
||||
@@ -50,10 +50,10 @@
|
||||
>
|
||||
<ion-select-option value="Oficial">Oficial</ion-select-option>
|
||||
<ion-select-option value="Pessoal">Pessoal</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-select> -->
|
||||
|
||||
|
||||
<mat-form-field appearance="none" class="d-none d-md-block width-100" >
|
||||
<mat-form-field appearance="none" class="width-100" >
|
||||
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
|
||||
<mat-option value="Oficial">
|
||||
Oficial
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
<!-- <ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
|
||||
interface="action-sheet"
|
||||
@@ -84,10 +84,10 @@
|
||||
<ion-select-option value="Viagem">Viagem</ion-select-option>
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-select> -->
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
|
||||
<mat-option value="Reunião">
|
||||
@@ -116,7 +116,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class width-100">
|
||||
<ion-datetime
|
||||
<!-- <ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Início"
|
||||
[(ngModel)]="startDate"
|
||||
@@ -126,10 +126,10 @@
|
||||
min="{{minDate}}"
|
||||
max="2022"
|
||||
>
|
||||
</ion-datetime>
|
||||
</ion-datetime> -->
|
||||
|
||||
<mat-form-field appearance="none"
|
||||
class="width-100 date-hour-picker d-none d-md-block">
|
||||
class="width-100 date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="startDate"
|
||||
@@ -155,7 +155,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class width-100">
|
||||
<ion-datetime
|
||||
<!-- <ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Fim"
|
||||
[(ngModel)]="endDate"
|
||||
@@ -165,10 +165,10 @@
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
</ion-datetime> -->
|
||||
|
||||
<mat-form-field appearance="none"
|
||||
class="width-100 date-hour-picker d-none d-md-block">
|
||||
class="width-100 date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="endDate"
|
||||
@@ -195,7 +195,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
<ion-select
|
||||
<!-- <ion-select
|
||||
placeholder="Selecione repetição"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.OccurrenceType"
|
||||
@@ -203,10 +203,10 @@
|
||||
interface="action-sheet"
|
||||
Cancel-text="Cancelar" required>
|
||||
<ion-select-option *ngFor="let recurring of recurringTypes" value="{{recurring.Code}}">{{recurring.Description}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-select> -->
|
||||
|
||||
<mat-form-field
|
||||
class="width-100 d-none d-md-block"
|
||||
class="width-100"
|
||||
placeholder="Selecione repetição"
|
||||
value="false"
|
||||
interface="action-sheet"
|
||||
@@ -236,7 +236,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
|
||||
<ion-datetime
|
||||
<!-- <ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Última ocorrência"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
|
||||
@@ -246,9 +246,9 @@
|
||||
min="2021"
|
||||
max="2025"
|
||||
>
|
||||
</ion-datetime>
|
||||
</ion-datetime> -->
|
||||
|
||||
<mat-form-field class="date-hour-picker d-none d-md-block">
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 7H18V8H7V7Z" fill="white"/>
|
||||
<path d="M10.5 9C11.3284 9 12 8.32843 12 7.5C12 6.67157 11.3284 6 10.5 6C9.67157 6 9 6.67157 9 7.5C9 8.32843 9.67157 9 10.5 9Z" fill="white"/>
|
||||
<path d="M17.5 35C27.165 35 35 27.165 35 17.5C35 7.83502 27.165 0 17.5 0C7.83502 0 0 7.83502 0 17.5C0 27.165 7.83502 35 17.5 35Z" fill="#D30606"/>
|
||||
<path d="M19 11C19 10.4477 18.5523 10 18 10C17.4477 10 17 10.4477 17 11V24C17 24.5523 17.4477 25 18 25C18.5523 25 19 24.5523 19 24V11Z" fill="white"/>
|
||||
<path d="M24.5 18.5C25.0523 18.5 25.5 18.0523 25.5 17.5C25.5 16.9477 25.0523 16.5 24.5 16.5H11.5C10.9477 16.5 10.5 16.9477 10.5 17.5C10.5 18.0523 10.9477 18.5 11.5 18.5H24.5Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 815 B |
@@ -0,0 +1,10 @@
|
||||
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 7H18V8H7V7Z" fill="white"/>
|
||||
<path d="M10.5 9C11.3284 9 12 8.32843 12 7.5C12 6.67157 11.3284 6 10.5 6C9.67157 6 9 6.67157 9 7.5C9 8.32843 9.67157 9 10.5 9Z" fill="white"/>
|
||||
<path d="M17.5 35C27.165 35 35 27.165 35 17.5C35 7.83502 27.165 0 17.5 0C7.83502 0 0 7.83502 0 17.5C0 27.165 7.83502 35 17.5 35Z" fill="#D30606"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 16L17.5 20L27 16V27H8V16Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
|
||||
<path d="M10.5 17V7H24.5V17" stroke="white" stroke-width="2" stroke-linejoin="round"/>
|
||||
<path d="M8 16L10.5 13.5" stroke="white" stroke-width="2"/>
|
||||
<path d="M27 16L24.5 13.5" stroke="white" stroke-width="2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 15.25L15.443 16.332L15.836 14.041L14.171 12.418L16.471 12.084L17.5 10L18.529 12.084L20.829 12.418L19.164 14.041L19.557 16.332L17.5 15.25Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user