This commit is contained in:
tiago.kayaya
2021-07-15 08:56:55 +01:00
22 changed files with 105 additions and 40 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export class Event{
AppointmentState: number;
TimeZone: string;
Organizer: string;
Categories: string;
Category: string;
HasAttachments: boolean;
EventRecurrence?: EventRecurrence;
+2 -2
View File
@@ -1,12 +1,12 @@
/* import { Image } from './image'; */
export class Publication{
DateIndex: Date;
DateIndex: Date | string;
DocumentId:string;
ProcessId:string;
Title: string;
Message: string;
DatePublication: Date;
DatePublication: Date | string;
OriginalFileName?: string;
FileBase64?:string;
FileExtension?: string;
@@ -74,7 +74,7 @@
<div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('CalendarName').invalid " class="input-errror-message">
{{ postEvent.Categories }}
{{ postEvent.Category }}
<div *ngIf="Form.get('CalendarName').errors?.required">
Campo obrigatório.
</div>
@@ -88,8 +88,8 @@
</div>
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<ion-select placeholder="Selecione tipo de evento*"
[(ngModel)]="postEvent.Categories"
selectedText="{{postEvent.Categories}}"
[(ngModel)]="postEvent.Category"
selectedText="{{postEvent.Category}}"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
@@ -103,7 +103,7 @@
<div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Categories').invalid " class="input-errror-message">
{{ postEvent.Categories}}
{{ postEvent.Category}}
<div *ngIf="Form.get('Categories').errors?.required">
Campo obrigatório.
</div>
@@ -162,7 +162,7 @@ export class EditEventPage implements OnInit {
CalendarName: new FormControl(this.postEvent.CalendarName, [
Validators.required
]),
Categories: new FormControl(this.postEvent.Categories, [
Categories: new FormControl(this.postEvent.Category, [
Validators.required
]),
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
@@ -90,7 +90,7 @@
</div>
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<ion-select placeholder="Selecione tipo de evento*"
[(ngModel)]="postEvent.Categories"
[(ngModel)]="postEvent.Category"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
@@ -104,7 +104,7 @@
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Categories').invalid " class="input-errror-message">
{{ postEvent.Categories }}
{{ postEvent.Category }}
<div *ngIf="Form.get('Categories').errors?.required">
Campo obrigatório.
</div>
@@ -114,7 +114,7 @@ export class NewEventPage implements OnInit {
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: 'Reunião',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {Type:'-1'},
};
@@ -136,7 +136,7 @@ export class NewEventPage implements OnInit {
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: 'Reunião',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {Type:'-1'},
};
@@ -207,7 +207,7 @@ export class NewEventPage implements OnInit {
Date: new FormControl(this.dateValid, [
Validators.required
]),
Categories: new FormControl(this.postEvent.Categories, [
Categories: new FormControl(this.postEvent.Category, [
Validators.required
]),
participantes: new FormControl(this.taskParticipants, [
@@ -88,7 +88,7 @@
<ion-select placeholder="Selecione tipo de evento*"
class="d-block d-md-none"
[(ngModel)]="postData.Categories"
[(ngModel)]="postData.Category"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option value="Reunião">Reunião</ion-select-option>
@@ -100,7 +100,7 @@
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(ngModel)]="postData.Categories" >
<mat-select [(ngModel)]="postData.Category" >
<mat-option value="Reunião">
Reunião
</mat-option>
@@ -146,7 +146,7 @@ export class BookMeetingModalPage implements OnInit {
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
this.postData.Categories = 'Reunião'
this.postData.Category = 'Reunião'
}
ngOnInit() {
@@ -208,7 +208,7 @@ export class BookMeetingModalPage implements OnInit {
participantes: new FormControl(this.taskParticipants, [
Validators.required
]),
Categories: new FormControl(this.postData.Categories, [
Categories: new FormControl(this.postData.Category, [
Validators.required
]),
@@ -249,7 +249,7 @@ export class BookMeetingModalPage implements OnInit {
AppointmentState: 0,
TimeZone: 'UTC',
Organizer: null,
Categories: 'Reunião',
Category: 'Reunião',
HasAttachments: true,
EventRecurrence: null,
}
@@ -3,7 +3,7 @@
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
@@ -215,6 +215,8 @@ export class NewPublicationPage implements OnInit {
}
}
else {
this.publication = {
DateIndex: new Date(),
DocumentId:null,
+2 -2
View File
@@ -33,7 +33,7 @@ export class ToastService {
notification.innerHTML = `
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<p class="message d-flex align-center success">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/nofitication-success.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
@@ -65,7 +65,7 @@ export class ToastService {
notification.innerHTML = `
<div class="main-content width-100 pa-20">
<p class="message d-flex align-center">
<p class="message d-flex align-center faild">
<ion-icon slot="end" class="title-icon pr-10" src="/assets/images/notification-error.svg"></ion-icon>
<p class="text">{{ message }}</p>
</p>
@@ -87,7 +87,7 @@
<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.Categories" >
<mat-select placeholder="Selecione o tipo de evento*" matInput [(ngModel)]="postEvent.Category" >
<mat-option value="Reunião">
Reunião
</mat-option>
@@ -204,7 +204,7 @@ export class EditEventPage implements OnInit {
Validators.required,
]),
CalendarName: new FormControl(this.postEvent.CalendarName),
Categories: new FormControl(this.postEvent.Categories, [
Categories: new FormControl(this.postEvent.Category, [
Validators.required
]),
dateStart: new FormControl(this.dateStart, [
@@ -74,7 +74,7 @@
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select [(value)]="postEvent.Categories" >
<mat-select [(value)]="postEvent.Category" >
<mat-option value="Reunião">
Reunião
</mat-option>
@@ -139,8 +139,6 @@ export class NewEventPage implements OnInit {
this.getRecurrenceTypes();
if(!this.restoreTemporaryData()){
// clear
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
@@ -169,7 +167,7 @@ export class NewEventPage implements OnInit {
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: 'Reunião',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {Type:'-1'},
};
@@ -191,7 +189,7 @@ export class NewEventPage implements OnInit {
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Categories: 'Reunião',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: {Type:'-1'},
};
@@ -238,7 +236,7 @@ export class NewEventPage implements OnInit {
Validators.required,
]),
CalendarName: new FormControl(this.postEvent.CalendarName),
Categories: new FormControl(this.postEvent.Categories, [
Categories: new FormControl(this.postEvent.Category, [
Validators.required
]),
dateStart: new FormControl(this.postEvent.StartDate, [
@@ -147,7 +147,7 @@ export class NewPublicationPage implements OnInit {
}
async save(){
async save() {
this.injectValidation()
this.runValidation()
@@ -188,8 +188,8 @@ export class NewPublicationPage implements OnInit {
}
}
else{
else if (!this.publication.OriginalFileName) {
this.publication = {
DateIndex: this.publication.DateIndex,
DocumentId:this.publication.DocumentId,
@@ -197,9 +197,9 @@ export class NewPublicationPage implements OnInit {
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: this.publication.DatePublication,
OriginalFileName: this.publication.OriginalFileName,
FileBase64: this.publication.FileBase64,
FileExtension: 'jpeg',
// OriginalFileName: this.publication.OriginalFileName,
// FileBase64: this.publication.FileBase64,
// FileExtension: 'jpeg',
}
const loader = this.toastService.loading()
@@ -218,14 +218,16 @@ export class NewPublicationPage implements OnInit {
}
}
else {
let time = new Date()
this.publication = {
DateIndex: new Date(),
DateIndex: time,
DocumentId:null,
ProcessId:this.folderId,
Title: this.pub.Title,
Message: this.pub.Message,
DatePublication: new Date(),
DatePublication: time,
OriginalFileName: this.capturedImageTitle,
FileBase64: this.capturedImage,
FileExtension: 'jpeg',
@@ -120,7 +120,7 @@ export class ViewPublicationsPage implements OnInit {
publicationType: publicationType,
folderId: folderId,
},
cssClass: 'new-publication',
cssClass: 'new-publication modal modal-desktop',
backdropDismiss: false
});
await modal.present();