mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Improve
This commit is contained in:
+110
-24
@@ -1,7 +1,15 @@
|
||||
import { EventRecurrence } from './agenda/eventrecurrence.model';
|
||||
import { EventBody } from './eventbody.model';
|
||||
import { EventPerson } from './eventperson.model';
|
||||
|
||||
|
||||
export interface EventRecurrence {
|
||||
Type: number | string;
|
||||
Day?: number;
|
||||
DayOfWeek?: number;
|
||||
Month?: number | string;
|
||||
LastOccurrence?: Date | string;
|
||||
}
|
||||
|
||||
export class Event{
|
||||
ParentId?: string;
|
||||
EventId: string;
|
||||
@@ -29,27 +37,105 @@ export class Event{
|
||||
} */
|
||||
}
|
||||
|
||||
export class EventToApproveEdit {
|
||||
"serialNumber": "9296_86"
|
||||
"Body": "Testando"
|
||||
"Location": "Testland"
|
||||
"Subject": "Teste 0123"
|
||||
"StartDate": "2021-05-12T10:30:00"
|
||||
"EndDate": "2021-05-12T11:30:00"
|
||||
"Private": false
|
||||
"ReviewUserComment": ""
|
||||
"MDName": "Paulo Pinto"
|
||||
"OccurrenceType": "-1"
|
||||
"LastOccurrence": "2021-07-14"
|
||||
"MDEmail": "paulo.pinto@gabinetedigital.local"
|
||||
"Agenda": "Oficial" | "Pessoal"
|
||||
"EventType": "Reunião"
|
||||
"IsRecurring": false
|
||||
"IsAllDayEvent": true
|
||||
"ParticipantsList": {
|
||||
"EmailAddress": "gilson.manuel@gabinetedigital.local",
|
||||
"Name": "Gilson Manuel",
|
||||
"IsRequired": true
|
||||
}[]
|
||||
"Message": "Recebeu um novo"
|
||||
|
||||
// event to approve details ================================================
|
||||
export interface Originator {
|
||||
email: string;
|
||||
manager: string;
|
||||
displayName: string;
|
||||
fqn: string;
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface WorkflowInstanceDataFields {
|
||||
Body: string;
|
||||
Location: string;
|
||||
Subject: string;
|
||||
StartDate: string;
|
||||
EndDate: string;
|
||||
Participants?: string;
|
||||
CC?: string;
|
||||
ReviewUserComment?: string;
|
||||
Role?: number;
|
||||
MDName: string;
|
||||
MDEmail: string;
|
||||
OriginatorComments?: string;
|
||||
Status?: string;
|
||||
TimeZone?: string;
|
||||
Agenda: string;
|
||||
EventType: string;
|
||||
EventID?: string;
|
||||
IsRecurring?: any;
|
||||
HasAttachments?: boolean;
|
||||
ParticipantsList?: any;
|
||||
EventOrganizer?: string;
|
||||
CreateEvent?: string;
|
||||
IsAllDayEvent: boolean;
|
||||
SerializedItem?: string;
|
||||
MDwxUserID?: number;
|
||||
DeserializedItem?: string;
|
||||
Message: string;
|
||||
InstanceId: string;
|
||||
Header?: string;
|
||||
RecurringString?: string;
|
||||
LastOccurrence: string;
|
||||
OccurrenceType: string;
|
||||
SerialNumber?: string;
|
||||
UserEmail?: string;
|
||||
PREmail?: string;
|
||||
}
|
||||
|
||||
export interface EventToApproveDetails {
|
||||
serialNumber: string;
|
||||
originator?: Originator;
|
||||
actions?: string[];
|
||||
activityInstanceName?: string;
|
||||
workflowInstanceFolio?: string;
|
||||
taskStartDate?: string;
|
||||
workflowID?: number;
|
||||
workflowInstanceID?: number;
|
||||
workflowName?: string;
|
||||
workflowDisplayName?: string;
|
||||
formURL?: string;
|
||||
workflowInstanceDataFields: WorkflowInstanceDataFields;
|
||||
totalDocuments?: any;
|
||||
Documents?: any;
|
||||
}
|
||||
// ================================================================================
|
||||
|
||||
|
||||
// event event to approve ================
|
||||
export interface ParticipantsList {
|
||||
Id: number;
|
||||
EmailAddress: string;
|
||||
Name: string;
|
||||
IsRequired: boolean;
|
||||
}
|
||||
|
||||
|
||||
export interface EventToApproveEdit {
|
||||
SerialNumber: string;
|
||||
Body: string;
|
||||
Location: string;
|
||||
Subject: string;
|
||||
StartDate: Date | string;
|
||||
EndDate: Date | string;
|
||||
ReviewUserComment: string;
|
||||
MDName: string;
|
||||
MDEmail: string;
|
||||
IsAllDayEvent: boolean;
|
||||
Status: string;
|
||||
EventType: string;
|
||||
IsRecurring: boolean;
|
||||
ParticipantsList: ParticipantsList[];
|
||||
Message: string;
|
||||
EventRecurrence: EventRecurrence;
|
||||
Participants?: string;
|
||||
CC?: string;
|
||||
Agenda: string;
|
||||
HasAttachments?: boolean;
|
||||
EventOrganizer?: string;
|
||||
InstanceId?: string;
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
@@ -60,7 +60,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
this.postEvent = new Event();
|
||||
this.isEventEdited = false;
|
||||
this.postEvent.EventRecurrence = {Type:'-1'};
|
||||
this.postEvent.EventRecurrence = { Type:'-1', LastOccurrence:''};
|
||||
this.postEvent = this.navParams.get('event');
|
||||
this.caller = this.navParams.get('caller');
|
||||
this.initCalendarName = this.postEvent.CalendarName;
|
||||
|
||||
@@ -253,7 +253,7 @@ export class DespachosPrPage implements OnInit {
|
||||
}
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth <= 800) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
|
||||
@@ -6,7 +6,6 @@ import { ModalController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||
import { DespachoPageStore } from 'src/app/store/despachos-page-store.service';
|
||||
|
||||
@Component({
|
||||
|
||||
+5
-13
@@ -19,7 +19,6 @@ import * as _moment from 'moment';
|
||||
import * as _rollupMoment from 'moment';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -124,7 +123,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private calendarService: EventsService,
|
||||
authService: AuthService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
) {
|
||||
@@ -137,17 +135,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postData.Body = this.eventBody;
|
||||
|
||||
/* Initialize 'Subject' with the title of the expedient */
|
||||
this.postData.Subject = this.task.Folio;
|
||||
this.postData.CalendarName = "Oficial";
|
||||
/* this.postData.StartDate = new Date(); */
|
||||
/* Set + 30minutes to seleted datetime */
|
||||
/* 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)));
|
||||
|
||||
|
||||
this.postData.Category = 'Reunião'
|
||||
}
|
||||
|
||||
@@ -264,8 +257,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
},
|
||||
}
|
||||
|
||||
console.log(this.postData);
|
||||
|
||||
if(this.task.FsId == '8') {
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
@@ -314,6 +305,11 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(true) {
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async addParticipants() {
|
||||
@@ -443,10 +439,6 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.taskParticipantsCc = taskParticipantsCc;
|
||||
}
|
||||
|
||||
goToGabinete() {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
setIntervenient(data){
|
||||
this.taskParticipants = data;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { EventToApproveEdit } from 'src/app/models/event.model';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -83,7 +84,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
StartDate: '',
|
||||
MDEmail: '',
|
||||
MDName: '',
|
||||
IsAllDayEvent: '',
|
||||
IsAllDayEvent: false,
|
||||
Message: ''
|
||||
}
|
||||
}
|
||||
@@ -280,7 +281,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
const event: any = {
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||
@@ -288,6 +289,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
StartDate: this.eventProcess.workflowInstanceDataFields.StartDate,
|
||||
EndDate: this.eventProcess.workflowInstanceDataFields.EndDate,
|
||||
ReviewUserComment: '',
|
||||
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||
MDName: this.eventProcess.workflowInstanceDataFields.MDName,
|
||||
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { AlertController, AnimationController, ModalController, NavParams } from '@ionic/angular';
|
||||
import * as moment from 'moment';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
@@ -11,7 +9,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Event } from '../../../models/event.model';
|
||||
import { Event, EventToApproveEdit } from '../../../models/event.model';
|
||||
import { NgxMatDateFormats, NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
|
||||
@@ -71,7 +69,6 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
Body: "",
|
||||
OccurrenceType: '',
|
||||
LastOccurrence: '',
|
||||
IsRecurring: false,
|
||||
ParticipantsList: [],
|
||||
Agenda: '',
|
||||
EndDate: '',
|
||||
@@ -82,8 +79,9 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
StartDate: '',
|
||||
MDEmail: '',
|
||||
MDName: '',
|
||||
IsAllDayEvent: '',
|
||||
Message: ''
|
||||
IsAllDayEvent: false,
|
||||
Message: '',
|
||||
IsRecurring: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +233,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
const event: any = {
|
||||
const event: EventToApproveEdit = {
|
||||
SerialNumber: this.eventProcess.serialNumber,
|
||||
Body: this.eventProcess.workflowInstanceDataFields.Body,
|
||||
Location: this.eventProcess.workflowInstanceDataFields.Location,
|
||||
@@ -247,6 +245,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
MDEmail: this.eventProcess.workflowInstanceDataFields.MDEmail,
|
||||
IsAllDayEvent: this.eventProcess.workflowInstanceDataFields.IsAllDayEvent,
|
||||
Status: null,
|
||||
Agenda: this.eventProcess.workflowInstanceDataFields.Agenda,
|
||||
EventType: this.eventProcess.workflowInstanceDataFields.EventType,
|
||||
IsRecurring: this.eventProcess.workflowInstanceDataFields.IsRecurring,
|
||||
Message: this.eventProcess.workflowInstanceDataFields.Message,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="solid"></div>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
<button (click)="cancle()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
||||
import { AnimationController, MenuController, ModalController, PopoverController } from '@ionic/angular';
|
||||
import { ModalController, PopoverController } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page';
|
||||
import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
|
||||
@@ -322,23 +322,15 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
|
||||
// let navigationExtras: NavigationExtras = {
|
||||
// queryParams: {
|
||||
// "despachospr": true,
|
||||
// }
|
||||
// };
|
||||
|
||||
// this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
|
||||
this.location.back()
|
||||
|
||||
this.cancle()
|
||||
}
|
||||
|
||||
cancle() {
|
||||
this.popoverController.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user